Commit 7af995fb87b1557bf4f0048e5c48d1e4d99e560a
1 parent
7eb87a7095
Exists in
master
and in
6 other branches
血压报告孕周计算bug修改1
Showing 2 changed files with 14 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
View file @
7af995f
... | ... | @@ -689,7 +689,8 @@ |
689 | 689 | //2.通过pnationId ID获取到相应的信息例如:末次月经 |
690 | 690 | if (StringUtils.isNotEmpty(bloodPressure.getParentId()) && StringUtils.isNotEmpty(weight) && StringUtils.isNotEmpty(height) && StringUtils.isNotEmpty(bregmatic)) { |
691 | 691 | Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(bloodPressure.getParentId())), Patients.class); |
692 | - Integer weeks = DateUtil.daysBetween(bloodPressure.getModified(), new Date()) / 7; | |
692 | + Integer weeks = DateUtil.getWeek(patients.getLastMenses(), bloodPressure.getModified()) ; | |
693 | + System.out.println("孕周:"+weeks); | |
693 | 694 | Map paMap = new HashMap(); |
694 | 695 | paMap.put("vcCardNo", patients.getVcCardNo()); |
695 | 696 | paMap.put("username", patients.getUsername()); |
... | ... | @@ -753,7 +754,7 @@ |
753 | 754 | } else if (weeks >= 13 && weeks <= 28) { |
754 | 755 | mapxy.put("proposal", "建议(孕中期)"); |
755 | 756 | mapxy.put("proposalInfo", xy.getMiddleSuggests()); |
756 | - } else if (weeks >= 29 && weeks <= 40) { | |
757 | + } else if (weeks>=29 && weeks <= 40) { | |
757 | 758 | mapxy.put("proposal", "建议(孕晚期)"); |
758 | 759 | mapxy.put("proposalInfo", xy.getLaterSuggests()); |
759 | 760 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
7af995f
... | ... | @@ -1952,9 +1952,17 @@ |
1952 | 1952 | public BaseResponse getWeightsReport(String pid) { |
1953 | 1953 | //1.获取该孕妇是否有推荐的高危项 |
1954 | 1954 | Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(pid)), Patients.class); |
1955 | - List<String> riskFactor = patients.getRiskFactorId(); | |
1956 | - for (String s : riskFactor) { | |
1957 | - System.out.println("得到的高危因素向:" + s); | |
1955 | + //1.1获取到这孕妇所有的高危因素id | |
1956 | + List<String> riskFactorId = patients.getRiskFactorId(); | |
1957 | + Criteria criteria = new Criteria(); | |
1958 | + criteria.orOperator(Criteria.where("diseasesDigestiveSystemId").in(riskFactorId), Criteria.where("viralHepatitisId").in(riskFactorId), | |
1959 | + Criteria.where("cirrhosis").in(riskFactorId), Criteria.where("liverFunctionErrorId").in(riskFactorId)); | |
1960 | + | |
1961 | + List<WeightReportModel> weightReport = mongoTemplate.find(Query.query(criteria), WeightReportModel.class); | |
1962 | + for (WeightReportModel weightReportModel : weightReport) { | |
1963 | + System.out.println(weightReportModel.getCal()); | |
1964 | + System.out.println(weightReportModel.getBreakfast()); | |
1965 | + | |
1958 | 1966 | } |
1959 | 1967 | //2.如果有打印推荐项对应的内容 |
1960 | 1968 | //2.1:根据高危因素id获取对应的内容 |