Commit f79057107dd5c5660e7fc06d2ecac031c0cb10a1
1 parent
47d71a4d1d
Exists in
master
and in
6 other branches
产前诊断
Showing 9 changed files with 245 additions and 71 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/DiagnosisModel.java
- platform-dal/src/main/java/com/lyms/platform/query/DiagnosisQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/DiagnosisController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabySieveFacede.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DiagnosisFacaed.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/DiagnosisAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabySieveManager.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabySieveResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/BabySieveHandleTask.java
platform-dal/src/main/java/com/lyms/platform/pojo/DiagnosisModel.java
View file @
f790571
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 | private String cardNo;//身份证号 |
| 23 | 23 | private String age;//年龄 |
| 24 | 24 | private String dueWeek;//孕周 |
| 25 | + private Integer dueDays;//孕周天数 | |
| 25 | 26 | private String applyWeek;//申请孕周 |
| 26 | 27 | private String nowWeek;//当前孕周 |
| 27 | 28 | private String rsResult;//妊娠结局 |
| ... | ... | @@ -338,6 +339,14 @@ |
| 338 | 339 | |
| 339 | 340 | public void setZtfeText(String ztfeText) { |
| 340 | 341 | this.ztfeText = ztfeText; |
| 342 | + } | |
| 343 | + | |
| 344 | + public Integer getDueDays() { | |
| 345 | + return dueDays; | |
| 346 | + } | |
| 347 | + | |
| 348 | + public void setDueDays(Integer dueDays) { | |
| 349 | + this.dueDays = dueDays; | |
| 341 | 350 | } |
| 342 | 351 | |
| 343 | 352 | public Map<String,String> contomap(){ |
platform-dal/src/main/java/com/lyms/platform/query/DiagnosisQuery.java
View file @
f790571
| ... | ... | @@ -8,6 +8,9 @@ |
| 8 | 8 | import com.lyms.platform.common.utils.StringUtils; |
| 9 | 9 | import org.springframework.data.mongodb.core.query.Criteria; |
| 10 | 10 | |
| 11 | +import java.util.Date; | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 11 | 14 | /** |
| 12 | 15 | * 新增产前诊断申请 |
| 13 | 16 | * Created by Administrator on 2018/9/10. |
| 14 | 17 | |
| 15 | 18 | |
| ... | ... | @@ -18,19 +21,20 @@ |
| 18 | 21 | private String parentId;//孕妇建档ID |
| 19 | 22 | private String queryNos;//查询号 |
| 20 | 23 | private String diaStatus;//数据状态 |
| 24 | + private List<String> diaStatus2;//数据状态 | |
| 21 | 25 | private String queryNo;//查询号 |
| 22 | 26 | private String order;//排序字段 |
| 23 | 27 | private String hospitalId;//医院ID |
| 24 | 28 | private String cardNo;//身份证 |
| 25 | 29 | private String vcCardNo;//就诊卡号 |
| 26 | 30 | private String diaResult;//诊断结果 |
| 27 | - private String applyWeeksStart;//申请开始孕周 | |
| 28 | - private String applyWeeksEnd;//申请结束孕周 | |
| 29 | - private String nowWeeksStart;//当前开始孕周 | |
| 30 | - private String nowWeeksEnd;//当前结束孕周 | |
| 31 | + private Integer applyWeeksStart;//申请开始孕周 | |
| 32 | + private Integer applyWeeksEnd;//申请结束孕周 | |
| 33 | + private Date lastMensesStart;//当前开始孕周 | |
| 34 | + private Date lastMensesEnd;//当前结束孕周 | |
| 31 | 35 | private String rsResult;//妊娠结局 |
| 32 | - private String applyDateStart;//申请开始时间 | |
| 33 | - private String applyDateEnd;//申请结束时间 | |
| 36 | + private Date applyDateStart;//申请开始时间 | |
| 37 | + private Date applyDateEnd;//申请结束时间 | |
| 34 | 38 | private String resultDateStart;//诊断出具开始时间 |
| 35 | 39 | private String resultDateEnd;//诊断出具结束时间 |
| 36 | 40 | private String specimenNo;//标本号 |
| ... | ... | @@ -69,6 +73,14 @@ |
| 69 | 73 | this.diaStatus = diaStatus; |
| 70 | 74 | } |
| 71 | 75 | |
| 76 | + public List<String> getDiaStatus2() { | |
| 77 | + return diaStatus2; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public void setDiaStatus2(List<String> diaStatus2) { | |
| 81 | + this.diaStatus2 = diaStatus2; | |
| 82 | + } | |
| 83 | + | |
| 72 | 84 | public String getQueryNo() { |
| 73 | 85 | return queryNo; |
| 74 | 86 | } |
| 75 | 87 | |
| 76 | 88 | |
| 77 | 89 | |
| 78 | 90 | |
| 79 | 91 | |
| 80 | 92 | |
| 81 | 93 | |
| ... | ... | @@ -117,36 +129,36 @@ |
| 117 | 129 | this.diaResult = diaResult; |
| 118 | 130 | } |
| 119 | 131 | |
| 120 | - public String getApplyWeeksStart() { | |
| 132 | + public Integer getApplyWeeksStart() { | |
| 121 | 133 | return applyWeeksStart; |
| 122 | 134 | } |
| 123 | 135 | |
| 124 | - public void setApplyWeeksStart(String applyWeeksStart) { | |
| 136 | + public void setApplyWeeksStart(Integer applyWeeksStart) { | |
| 125 | 137 | this.applyWeeksStart = applyWeeksStart; |
| 126 | 138 | } |
| 127 | 139 | |
| 128 | - public String getApplyWeeksEnd() { | |
| 140 | + public Integer getApplyWeeksEnd() { | |
| 129 | 141 | return applyWeeksEnd; |
| 130 | 142 | } |
| 131 | 143 | |
| 132 | - public void setApplyWeeksEnd(String applyWeeksEnd) { | |
| 144 | + public void setApplyWeeksEnd(Integer applyWeeksEnd) { | |
| 133 | 145 | this.applyWeeksEnd = applyWeeksEnd; |
| 134 | 146 | } |
| 135 | 147 | |
| 136 | - public String getNowWeeksStart() { | |
| 137 | - return nowWeeksStart; | |
| 148 | + public Date getLastMensesStart() { | |
| 149 | + return lastMensesStart; | |
| 138 | 150 | } |
| 139 | 151 | |
| 140 | - public void setNowWeeksStart(String nowWeeksStart) { | |
| 141 | - this.nowWeeksStart = nowWeeksStart; | |
| 152 | + public void setLastMensesStart(Date lastMensesStart) { | |
| 153 | + this.lastMensesStart = lastMensesStart; | |
| 142 | 154 | } |
| 143 | 155 | |
| 144 | - public String getNowWeeksEnd() { | |
| 145 | - return nowWeeksEnd; | |
| 156 | + public Date getLastMensesEnd() { | |
| 157 | + return lastMensesEnd; | |
| 146 | 158 | } |
| 147 | 159 | |
| 148 | - public void setNowWeeksEnd(String nowWeeksEnd) { | |
| 149 | - this.nowWeeksEnd = nowWeeksEnd; | |
| 160 | + public void setLastMensesEnd(Date lastMensesEnd) { | |
| 161 | + this.lastMensesEnd = lastMensesEnd; | |
| 150 | 162 | } |
| 151 | 163 | |
| 152 | 164 | public String getRsResult() { |
| 153 | 165 | |
| 154 | 166 | |
| 155 | 167 | |
| ... | ... | @@ -157,19 +169,19 @@ |
| 157 | 169 | this.rsResult = rsResult; |
| 158 | 170 | } |
| 159 | 171 | |
| 160 | - public String getApplyDateStart() { | |
| 172 | + public Date getApplyDateStart() { | |
| 161 | 173 | return applyDateStart; |
| 162 | 174 | } |
| 163 | 175 | |
| 164 | - public void setApplyDateStart(String applyDateStart) { | |
| 176 | + public void setApplyDateStart(Date applyDateStart) { | |
| 165 | 177 | this.applyDateStart = applyDateStart; |
| 166 | 178 | } |
| 167 | 179 | |
| 168 | - public String getApplyDateEnd() { | |
| 180 | + public Date getApplyDateEnd() { | |
| 169 | 181 | return applyDateEnd; |
| 170 | 182 | } |
| 171 | 183 | |
| 172 | - public void setApplyDateEnd(String applyDateEnd) { | |
| 184 | + public void setApplyDateEnd(Date applyDateEnd) { | |
| 173 | 185 | this.applyDateEnd = applyDateEnd; |
| 174 | 186 | } |
| 175 | 187 | |
| ... | ... | @@ -225,6 +237,9 @@ |
| 225 | 237 | if(null != collectHospitalId){ |
| 226 | 238 | condition = condition.and("collectHospitalId", collectHospitalId, MongoOper.IS); |
| 227 | 239 | } |
| 240 | + if(null != diaStatus2){ | |
| 241 | + condition = condition.and("diaStatus", diaStatus2, MongoOper.IN); | |
| 242 | + } | |
| 228 | 243 | |
| 229 | 244 | Criteria c = null; |
| 230 | 245 | if(null != applyDateStart && null != applyDateEnd){ |
| 231 | 246 | |
| 232 | 247 | |
| ... | ... | @@ -237,11 +252,11 @@ |
| 237 | 252 | c = Criteria.where("applyWeek").gte(applyWeeksStart).lte(applyWeeksEnd); |
| 238 | 253 | } |
| 239 | 254 | } |
| 240 | - if(null != nowWeeksStart && null != nowWeeksEnd){ | |
| 255 | + if(null != lastMensesStart && null != lastMensesEnd){ | |
| 241 | 256 | if(c != null){ |
| 242 | - c = c.where("lastMenses").gte(nowWeeksStart).lte(nowWeeksEnd); | |
| 257 | + c = c.where("lastMenses").gte(lastMensesStart).lte(lastMensesEnd); | |
| 243 | 258 | }else{ |
| 244 | - c = Criteria.where("lastMenses").gte(nowWeeksStart).lte(nowWeeksEnd); | |
| 259 | + c = Criteria.where("lastMenses").gte(lastMensesStart).lte(lastMensesEnd); | |
| 245 | 260 | } |
| 246 | 261 | } |
| 247 | 262 | if (StringUtils.isNotEmpty(queryNo)) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/DiagnosisController.java
View file @
f790571
| ... | ... | @@ -48,6 +48,28 @@ |
| 48 | 48 | @RequestMapping(value = "/addDiagnosis",method = RequestMethod.GET) |
| 49 | 49 | public BaseResponse addOrUpdateDiagnosis(DiagnosisAddRequest diagnosisAddRequest,HttpServletRequest request){ |
| 50 | 50 | //LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 51 | + diagnosisAddRequest.setName("李欣"); | |
| 52 | + diagnosisAddRequest.setId("5bad9c8193131f38be325f04"); | |
| 53 | + diagnosisAddRequest.setCardNo("210224199007216341"); | |
| 54 | + diagnosisAddRequest.setPhone("15533641942"); | |
| 55 | + diagnosisAddRequest.setAge("28"); | |
| 56 | + diagnosisAddRequest.setDueWeek("孕14周+2天"); | |
| 57 | + diagnosisAddRequest.setyChanQi("2019-03-08"); | |
| 58 | + diagnosisAddRequest.setDiaProject("1");//羊水穿刺 | |
| 59 | + diagnosisAddRequest.setBirth("1990-07-21"); | |
| 60 | + diagnosisAddRequest.setWeight("60"); | |
| 61 | + diagnosisAddRequest.setLastMenses("2018-06-01"); | |
| 62 | + diagnosisAddRequest.setMensStartDay("28"); | |
| 63 | + diagnosisAddRequest.setMensEndDay("30"); | |
| 64 | + diagnosisAddRequest.setMensStopStartDay("5"); | |
| 65 | + diagnosisAddRequest.setMensStopEndDay("7"); | |
| 66 | + diagnosisAddRequest.setSpecimenNo("00001"); | |
| 67 | + diagnosisAddRequest.setCollectDocterId("1000000185"); | |
| 68 | + diagnosisAddRequest.setCollectDate("2018-09-28"); | |
| 69 | + diagnosisAddRequest.setSendDocterId("1000000185"); | |
| 70 | + diagnosisAddRequest.setSendDate("2018-09-29"); | |
| 71 | + diagnosisAddRequest.setCollectHospitalId("216"); | |
| 72 | + diagnosisAddRequest.setHospitalId("216"); | |
| 51 | 73 | return diagnosisFacaed.addOrUpdateDiagnosis(diagnosisAddRequest, 1000000185); |
| 52 | 74 | } |
| 53 | 75 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabySieveFacede.java
View file @
f790571
| ... | ... | @@ -125,7 +125,8 @@ |
| 125 | 125 | String jzShi = CommonsHelper.getName1(pat.getCityRegisterId(), basicConfigService); |
| 126 | 126 | String jzXian = CommonsHelper.getName1(pat.getAreaRegisterId(), basicConfigService); |
| 127 | 127 | String jzXiang = CommonsHelper.getName1(pat.getStreetRegisterId(), basicConfigService); |
| 128 | - String jQquan = jzSheng+jzShi+jzXian+jzXiang; | |
| 128 | + String jzd = pat.getAddressRegister(); | |
| 129 | + String jQquan = jzSheng+jzShi+jzXian+jzXiang+jzd; | |
| 129 | 130 | babySieveResult.convert(pat); |
| 130 | 131 | babySieveResult.setAdress(jQquan); |
| 131 | 132 | List<BabySieveData> list = new ArrayList<BabySieveData>(); |
| ... | ... | @@ -600,6 +601,44 @@ |
| 600 | 601 | if (patients.getBirth() != null) { |
| 601 | 602 | babySieveManager.setAge(DateUtil.getAge(patients.getBirth())); |
| 602 | 603 | } |
| 604 | + | |
| 605 | + //分娩方式 | |
| 606 | + String deliveryMode = ""; | |
| 607 | + if (StringUtils.isNotEmpty(maternalDeliverModelList.get(0).getDeliveryMode())) { | |
| 608 | + | |
| 609 | + StringBuilder sb = new StringBuilder(); | |
| 610 | + | |
| 611 | + Map m = JsonUtil.str2Obj(maternalDeliverModelList.get(0).getDeliveryMode(), Map.class); | |
| 612 | + String fmfs = null; | |
| 613 | + if (m != null) { | |
| 614 | + Object b = m.get("fmfs"); | |
| 615 | + if (b != null) { | |
| 616 | + fmfs = b.toString(); | |
| 617 | + if (fmfs != null) { | |
| 618 | + if (fmfs.equals("1")) { | |
| 619 | + String fmName = FmTypeEnums.getFmNameById(fmfs); | |
| 620 | + sb.append(fmName); | |
| 621 | + if (null != m.get("scfs") && !"null".equals(m.get("scfs").toString())) { | |
| 622 | + sb.append(","); | |
| 623 | + String scfs = m.get("scfs").toString(); | |
| 624 | + sb.append(FmTypeEnums.getFmScNameById(scfs)); | |
| 625 | + } | |
| 626 | + deliveryMode = sb.toString(); | |
| 627 | + } else if (fmfs.equals("2")) { | |
| 628 | + String fmName = FmTypeEnums.getFmNameById(fmfs); | |
| 629 | + deliveryMode = fmName; | |
| 630 | + } | |
| 631 | + } | |
| 632 | + } | |
| 633 | + } | |
| 634 | + } | |
| 635 | + if (deliveryMode.contains("顺产")) { | |
| 636 | + babySieveManager.setDueType(deliveryMode); | |
| 637 | + } else { | |
| 638 | + babySieveManager.setDueType(deliveryMode); | |
| 639 | + babySieveManager.setOperationCause(maternalDeliverModelList.get(0).getOperationCause() == null ? "--" : maternalDeliverModelList.get(0).getOperationCause()); | |
| 640 | + } | |
| 641 | + | |
| 603 | 642 | List<MaternalDeliverModel.Baby> babies = maternalDeliverModelList.get(0).getBaby(); |
| 604 | 643 | if (babies != null && babies.size() > 0) { |
| 605 | 644 | for (MaternalDeliverModel.Baby baby : babies) { |
| 606 | 645 | |
| ... | ... | @@ -644,13 +683,13 @@ |
| 644 | 683 | if (new Integer(1).equals(highRisk)) { |
| 645 | 684 | babySieveManager.setHighRisk("高危"); |
| 646 | 685 | } |
| 647 | - String dueType = babySieveManager.getDueType(); | |
| 686 | + /*String dueType = babySieveManager.getDueType(); | |
| 648 | 687 | if ("1".equals(dueType)) { |
| 649 | 688 | babySieveManager.setDueType("顺产"); |
| 650 | 689 | } |
| 651 | 690 | if ("2".equals(dueType)) { |
| 652 | 691 | babySieveManager.setDueType("剖宫产"); |
| 653 | - } | |
| 692 | + }*/ | |
| 654 | 693 | babySieveManager.setSieveStatus(StringUtils.isEmpty(model.getSieveStatus()) ? "0" : model.getSieveStatus()); |
| 655 | 694 | babySieveManager.setmName(model.getMname()); |
| 656 | 695 | |
| ... | ... | @@ -737,6 +776,44 @@ |
| 737 | 776 | if (patients.getBirth() != null) { |
| 738 | 777 | babySieveManager.setAge(DateUtil.getAge(patients.getBirth())); |
| 739 | 778 | } |
| 779 | + | |
| 780 | + //分娩方式 | |
| 781 | + String deliveryMode = ""; | |
| 782 | + if (StringUtils.isNotEmpty(maternalDeliverModelList.get(0).getDeliveryMode())) { | |
| 783 | + | |
| 784 | + StringBuilder sb = new StringBuilder(); | |
| 785 | + | |
| 786 | + Map m = JsonUtil.str2Obj(maternalDeliverModelList.get(0).getDeliveryMode(), Map.class); | |
| 787 | + String fmfs = null; | |
| 788 | + if (m != null) { | |
| 789 | + Object b = m.get("fmfs"); | |
| 790 | + if (b != null) { | |
| 791 | + fmfs = b.toString(); | |
| 792 | + if (fmfs != null) { | |
| 793 | + if (fmfs.equals("1")) { | |
| 794 | + String fmName = FmTypeEnums.getFmNameById(fmfs); | |
| 795 | + sb.append(fmName); | |
| 796 | + if (null != m.get("scfs") && !"null".equals(m.get("scfs").toString())) { | |
| 797 | + sb.append(","); | |
| 798 | + String scfs = m.get("scfs").toString(); | |
| 799 | + sb.append(FmTypeEnums.getFmScNameById(scfs)); | |
| 800 | + } | |
| 801 | + deliveryMode = sb.toString(); | |
| 802 | + } else if (fmfs.equals("2")) { | |
| 803 | + String fmName = FmTypeEnums.getFmNameById(fmfs); | |
| 804 | + deliveryMode = fmName; | |
| 805 | + } | |
| 806 | + } | |
| 807 | + } | |
| 808 | + } | |
| 809 | + } | |
| 810 | + if (deliveryMode.contains("顺产")) { | |
| 811 | + babySieveManager.setDueType(deliveryMode); | |
| 812 | + } else { | |
| 813 | + babySieveManager.setDueType(deliveryMode); | |
| 814 | + babySieveManager.setOperationCause(maternalDeliverModelList.get(0).getOperationCause() == null ? "--" : maternalDeliverModelList.get(0).getOperationCause()); | |
| 815 | + } | |
| 816 | + | |
| 740 | 817 | List<MaternalDeliverModel.Baby> babies = maternalDeliverModelList.get(0).getBaby(); |
| 741 | 818 | if (babies != null && babies.size() > 0) { |
| 742 | 819 | for (MaternalDeliverModel.Baby baby : babies) { |
| 743 | 820 | |
| ... | ... | @@ -781,13 +858,13 @@ |
| 781 | 858 | if (new Integer(1).equals(highRisk)) { |
| 782 | 859 | babySieveManager.setHighRisk("高危"); |
| 783 | 860 | } |
| 784 | - String dueType = babySieveManager.getDueType(); | |
| 861 | + /*String dueType = babySieveManager.getDueType(); | |
| 785 | 862 | if ("1".equals(dueType)) { |
| 786 | 863 | babySieveManager.setDueType("顺产"); |
| 787 | 864 | } |
| 788 | 865 | if ("2".equals(dueType)) { |
| 789 | 866 | babySieveManager.setDueType("剖宫产"); |
| 790 | - } | |
| 867 | + }*/ | |
| 791 | 868 | babySieveManager.setSieveStatus(StringUtils.isEmpty(model.getSieveStatus()) ? "0" : model.getSieveStatus()); |
| 792 | 869 | babySieveManager.setmName(model.getMname()); |
| 793 | 870 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DiagnosisFacaed.java
View file @
f790571
| ... | ... | @@ -234,16 +234,16 @@ |
| 234 | 234 | diagnosisQuery.setDiaResult(dataresult.getDiaResult()); |
| 235 | 235 | } |
| 236 | 236 | if(null != dataresult.getApplyWeekStart()){ |
| 237 | - diagnosisQuery.setApplyWeeksStart(dataresult.getApplyWeekStart()); | |
| 237 | + diagnosisQuery.setApplyWeeksStart(7 * Integer.valueOf(dataresult.getApplyWeekStart())); | |
| 238 | 238 | } |
| 239 | 239 | if(null != dataresult.getApplyWeekEnd()){ |
| 240 | - diagnosisQuery.setApplyWeeksEnd(dataresult.getApplyWeekEnd()); | |
| 240 | + diagnosisQuery.setApplyWeeksEnd(7 * Integer.valueOf(dataresult.getApplyWeekEnd()) + 6); | |
| 241 | 241 | } |
| 242 | 242 | if(null != dataresult.getNowWeeksStart()){ |
| 243 | - diagnosisQuery.setNowWeeksStart(dataresult.getNowWeeksStart()); | |
| 243 | + diagnosisQuery.setLastMensesEnd(DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(dataresult.getNowWeeksStart() * 7))); | |
| 244 | 244 | } |
| 245 | 245 | if(null != dataresult.getNowWeeksEnd()){ |
| 246 | - diagnosisQuery.setNowWeeksEnd(dataresult.getNowWeeksEnd()); | |
| 246 | + diagnosisQuery.setLastMensesStart(DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(dataresult.getNowWeeksEnd() * 7) - 6)); | |
| 247 | 247 | } |
| 248 | 248 | if(null != dataresult.getDiaStatus()){ |
| 249 | 249 | diagnosisQuery.setDiaStatus(dataresult.getDiaStatus()); |
| 250 | 250 | |
| ... | ... | @@ -254,12 +254,14 @@ |
| 254 | 254 | if(null != dataresult.getQueryNo()){ |
| 255 | 255 | diagnosisQuery.setQueryNo(dataresult.getQueryNo()); |
| 256 | 256 | } |
| 257 | - if(null != dataresult.getApplyDateStart()){ | |
| 258 | - diagnosisQuery.setApplyDateStart(dataresult.getApplyDateStart()); | |
| 257 | + if(StringUtils.isNotEmpty(dataresult.getApplyDate())){ | |
| 258 | + String[] dates = dataresult.getApplyDate().split(" - "); | |
| 259 | + diagnosisQuery.setApplyDateStart(DateUtil.parseYMD(dates[0])); | |
| 260 | + | |
| 261 | + if (dates.length == 2) { | |
| 262 | + diagnosisQuery.setApplyDateEnd(DateUtil.parseYMDHMS(dates[1] + " 23:59:59")); | |
| 263 | + } | |
| 259 | 264 | } |
| 260 | - if(null != dataresult.getApplyDateEnd()){ | |
| 261 | - diagnosisQuery.setApplyDateEnd(dataresult.getApplyDateEnd()); | |
| 262 | - } | |
| 263 | 265 | if(null != dataresult.getResultDateStart()){ |
| 264 | 266 | diagnosisQuery.setResultDateStart(dataresult.getResultDateStart()); |
| 265 | 267 | } |
| 266 | 268 | |
| ... | ... | @@ -320,12 +322,14 @@ |
| 320 | 322 | public DiagnosisManagerResult queryDiagnosisLab(DiagnosisAddRequest dataresult){ |
| 321 | 323 | DiagnosisManagerResult diagnosisManagerResult = new DiagnosisManagerResult(); |
| 322 | 324 | DiagnosisQuery diagnosisQuery = new DiagnosisQuery(); |
| 323 | - if(null != dataresult.getApplyDateStart()){ | |
| 324 | - diagnosisQuery.setApplyDateStart(dataresult.getApplyDateStart()); | |
| 325 | + if(StringUtils.isNotEmpty(dataresult.getApplyDate())){ | |
| 326 | + String[] dates = dataresult.getApplyDate().split(" - "); | |
| 327 | + diagnosisQuery.setApplyDateStart(DateUtil.parseYMD(dates[0])); | |
| 328 | + | |
| 329 | + if (dates.length == 2) { | |
| 330 | + diagnosisQuery.setApplyDateEnd(DateUtil.parseYMDHMS(dates[1] + " 23:59:59")); | |
| 331 | + } | |
| 325 | 332 | } |
| 326 | - if(null != dataresult.getApplyDateEnd()){ | |
| 327 | - diagnosisQuery.setApplyDateEnd(dataresult.getApplyDateEnd()); | |
| 328 | - } | |
| 329 | 333 | if(null != dataresult.getCollectHospitalId()){ |
| 330 | 334 | diagnosisQuery.setCollectHospitalId(dataresult.getCollectHospitalId()); |
| 331 | 335 | } |
| ... | ... | @@ -345,7 +349,11 @@ |
| 345 | 349 | diagnosisQuery.setQueryNo(dataresult.getQueryNo()); |
| 346 | 350 | } |
| 347 | 351 | //只查询状态为已申请和已接收的 |
| 348 | - | |
| 352 | + List<String> listString = new ArrayList<String>(); | |
| 353 | + listString.add("1"); | |
| 354 | + listString.add("2"); | |
| 355 | + listString.add("3"); | |
| 356 | + diagnosisQuery.setDiaStatus2(listString); | |
| 349 | 357 | |
| 350 | 358 | diagnosisQuery.setPage(dataresult.getPage()); |
| 351 | 359 | diagnosisQuery.setLimit(dataresult.getLimit()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/DiagnosisAddRequest.java
View file @
f790571
| ... | ... | @@ -75,13 +75,11 @@ |
| 75 | 75 | //申请孕周结束 |
| 76 | 76 | private String applyWeekEnd; |
| 77 | 77 | //当前孕周开始 |
| 78 | - private String nowWeeksStart; | |
| 78 | + private Integer nowWeeksStart; | |
| 79 | 79 | //当前孕周结束 |
| 80 | - private String nowWeeksEnd; | |
| 81 | - //产前诊断申请开始时间 | |
| 82 | - private String applyDateStart; | |
| 83 | - //产前诊断申请结束时间 | |
| 84 | - private String applyDateEnd; | |
| 80 | + private Integer nowWeeksEnd; | |
| 81 | + //产前诊断申请时间 | |
| 82 | + private String applyDate; | |
| 85 | 83 | //诊断出具开始时间 |
| 86 | 84 | private String resultDateStart; |
| 87 | 85 | //诊断出具结束时间 |
| 88 | 86 | |
| 89 | 87 | |
| 90 | 88 | |
| 91 | 89 | |
| 92 | 90 | |
| 93 | 91 | |
| ... | ... | @@ -341,38 +339,30 @@ |
| 341 | 339 | this.applyWeekEnd = applyWeekEnd; |
| 342 | 340 | } |
| 343 | 341 | |
| 344 | - public String getNowWeeksStart() { | |
| 342 | + public Integer getNowWeeksStart() { | |
| 345 | 343 | return nowWeeksStart; |
| 346 | 344 | } |
| 347 | 345 | |
| 348 | - public void setNowWeeksStart(String nowWeeksStart) { | |
| 346 | + public void setNowWeeksStart(Integer nowWeeksStart) { | |
| 349 | 347 | this.nowWeeksStart = nowWeeksStart; |
| 350 | 348 | } |
| 351 | 349 | |
| 352 | - public String getNowWeeksEnd() { | |
| 350 | + public Integer getNowWeeksEnd() { | |
| 353 | 351 | return nowWeeksEnd; |
| 354 | 352 | } |
| 355 | 353 | |
| 356 | - public void setNowWeeksEnd(String nowWeeksEnd) { | |
| 354 | + public void setNowWeeksEnd(Integer nowWeeksEnd) { | |
| 357 | 355 | this.nowWeeksEnd = nowWeeksEnd; |
| 358 | 356 | } |
| 359 | 357 | |
| 360 | - public String getApplyDateStart() { | |
| 361 | - return applyDateStart; | |
| 358 | + public String getApplyDate() { | |
| 359 | + return applyDate; | |
| 362 | 360 | } |
| 363 | 361 | |
| 364 | - public void setApplyDateStart(String applyDateStart) { | |
| 365 | - this.applyDateStart = applyDateStart; | |
| 362 | + public void setApplyDate(String applyDate) { | |
| 363 | + this.applyDate = applyDate; | |
| 366 | 364 | } |
| 367 | 365 | |
| 368 | - public String getApplyDateEnd() { | |
| 369 | - return applyDateEnd; | |
| 370 | - } | |
| 371 | - | |
| 372 | - public void setApplyDateEnd(String applyDateEnd) { | |
| 373 | - this.applyDateEnd = applyDateEnd; | |
| 374 | - } | |
| 375 | - | |
| 376 | 366 | public String getResultDateStart() { |
| 377 | 367 | return resultDateStart; |
| 378 | 368 | } |
| ... | ... | @@ -415,6 +405,7 @@ |
| 415 | 405 | diagnosisModel.setCardNo(cardNo); |
| 416 | 406 | diagnosisModel.setAge(age); |
| 417 | 407 | diagnosisModel.setDueWeek(dueWeek); |
| 408 | + diagnosisModel.setDueDays(100); | |
| 418 | 409 | diagnosisModel.setyChanQi(DateUtil.parseYMD(yChanQi)); |
| 419 | 410 | diagnosisModel.setPhone(phone); |
| 420 | 411 | diagnosisModel.setDiaProject(diaProject); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabySieveManager.java
View file @
f790571
| ... | ... | @@ -76,6 +76,17 @@ |
| 76 | 76 | //试验号 |
| 77 | 77 | private String testNumber; |
| 78 | 78 | |
| 79 | + //手术原因 | |
| 80 | + private String operationCause; | |
| 81 | + | |
| 82 | + public String getOperationCause() { | |
| 83 | + return operationCause; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public void setOperationCause(String operationCause) { | |
| 87 | + this.operationCause = operationCause; | |
| 88 | + } | |
| 89 | + | |
| 79 | 90 | public String getTestNumber() { |
| 80 | 91 | return testNumber; |
| 81 | 92 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabySieveResult.java
View file @
f790571
| ... | ... | @@ -229,6 +229,7 @@ |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | public BabySieveResult convert(Patients pat){ |
| 232 | + setNowWeeks("已分娩"); | |
| 232 | 233 | setId(pat.getId()); |
| 233 | 234 | try { |
| 234 | 235 | if (null != pat.getBirth()) { |
| ... | ... | @@ -248,7 +249,7 @@ |
| 248 | 249 | /*int days = DateUtil.daysBetween(pat.getLastMenses(), new Date()); |
| 249 | 250 | this.dueWeek = StringUtils.dueWeek(days);*/ |
| 250 | 251 | int days = DateUtil.daysBetween(pat.getLastMenses(), new Date()); |
| 251 | - this.nowWeeks = StringUtils.dueWeek(days); | |
| 252 | + //this.nowWeeks = StringUtils.dueWeek(days); | |
| 252 | 253 | |
| 253 | 254 | setLastMenses(DateUtil.getyyyy_MM_dd(pat.getLastMenses())); |
| 254 | 255 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/BabySieveHandleTask.java
View file @
f790571
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | import com.lyms.platform.common.enums.YnEnums; |
| 10 | 10 | import com.lyms.platform.common.utils.DateUtil; |
| 11 | 11 | import com.lyms.platform.common.utils.ExceptionUtils; |
| 12 | +import com.lyms.platform.common.utils.JsonUtil; | |
| 12 | 13 | import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade; |
| 13 | 14 | import com.lyms.platform.operate.web.result.BabySieveManager; |
| 14 | 15 | import com.lyms.platform.operate.web.result.HighScoreResult; |
| ... | ... | @@ -26,6 +27,7 @@ |
| 26 | 27 | import java.util.ArrayList; |
| 27 | 28 | import java.util.Date; |
| 28 | 29 | import java.util.List; |
| 30 | +import java.util.Map; | |
| 29 | 31 | import java.util.concurrent.Callable; |
| 30 | 32 | |
| 31 | 33 | /** |
| ... | ... | @@ -101,7 +103,7 @@ |
| 101 | 103 | String jzShi = CommonsHelper.getName1(patients.getCityRegisterId(), basicConfigService); |
| 102 | 104 | String jzXian = CommonsHelper.getName1(patients.getAreaRegisterId(), basicConfigService); |
| 103 | 105 | String jzXiang = CommonsHelper.getName1(patients.getStreetRegisterId(), basicConfigService); |
| 104 | - String address = patients.getAddress(); | |
| 106 | + String address = patients.getAddressRegister(); | |
| 105 | 107 | String jQquan = jzSheng+jzShi+jzXian+jzXiang+address; |
| 106 | 108 | babySieveManager.setAdress(jQquan); |
| 107 | 109 | babySieveManager.setPatientId(patients.getId()); |
| ... | ... | @@ -112,6 +114,44 @@ |
| 112 | 114 | babySieveManager.setAge(DateUtil.getAge(patients.getBirth())); |
| 113 | 115 | } |
| 114 | 116 | List<MaternalDeliverModel.Baby> babies = maternalDeliverModel.getBaby(); |
| 117 | + | |
| 118 | + //分娩方式 | |
| 119 | + String deliveryMode = ""; | |
| 120 | + if (StringUtils.isNotEmpty(maternalDeliverModel.getDeliveryMode())) { | |
| 121 | + | |
| 122 | + StringBuilder sb = new StringBuilder(); | |
| 123 | + | |
| 124 | + Map m = JsonUtil.str2Obj(maternalDeliverModel.getDeliveryMode(), Map.class); | |
| 125 | + String fmfs = null; | |
| 126 | + if (m != null) { | |
| 127 | + Object b = m.get("fmfs"); | |
| 128 | + if (b != null) { | |
| 129 | + fmfs = b.toString(); | |
| 130 | + if (fmfs != null) { | |
| 131 | + if (fmfs.equals("1")) { | |
| 132 | + String fmName = FmTypeEnums.getFmNameById(fmfs); | |
| 133 | + sb.append(fmName); | |
| 134 | + if (null != m.get("scfs") && !"null".equals(m.get("scfs").toString())) { | |
| 135 | + sb.append(","); | |
| 136 | + String scfs = m.get("scfs").toString(); | |
| 137 | + sb.append(FmTypeEnums.getFmScNameById(scfs)); | |
| 138 | + } | |
| 139 | + deliveryMode = sb.toString(); | |
| 140 | + } else if (fmfs.equals("2")) { | |
| 141 | + String fmName = FmTypeEnums.getFmNameById(fmfs); | |
| 142 | + deliveryMode = fmName; | |
| 143 | + } | |
| 144 | + } | |
| 145 | + } | |
| 146 | + } | |
| 147 | + } | |
| 148 | + if (deliveryMode.contains("顺产")) { | |
| 149 | + babySieveManager.setDueType(deliveryMode); | |
| 150 | + } else { | |
| 151 | + babySieveManager.setDueType(deliveryMode); | |
| 152 | + babySieveManager.setOperationCause(maternalDeliverModel.getOperationCause() == null ? "--" : maternalDeliverModel.getOperationCause()); | |
| 153 | + } | |
| 154 | + | |
| 115 | 155 | if (org.apache.commons.collections.CollectionUtils.isNotEmpty(babies)) { |
| 116 | 156 | for (MaternalDeliverModel.Baby baby : babies) { |
| 117 | 157 | if(baby.getId() != null && baby.getId().equals(babyModel.getId())){ |
| 118 | 158 | |
| ... | ... | @@ -154,13 +194,13 @@ |
| 154 | 194 | if (new Integer(1).equals(highRisk)) { |
| 155 | 195 | babySieveManager.setHighRisk("高危"); |
| 156 | 196 | } |
| 157 | - String dueType = babySieveManager.getDueType(); | |
| 197 | + /*String dueType = babySieveManager.getDueType(); | |
| 158 | 198 | if ("1".equals(dueType)) { |
| 159 | 199 | babySieveManager.setDueType("顺产"); |
| 160 | 200 | } |
| 161 | 201 | if ("2".equals(dueType)) { |
| 162 | 202 | babySieveManager.setDueType("剖宫产"); |
| 163 | - } | |
| 203 | + }*/ | |
| 164 | 204 | babySieveManager.setSieveStatus(StringUtils.isEmpty(babyModel.getSieveStatus()) ? "0" : babyModel.getSieveStatus()); |
| 165 | 205 | babySieveManager.setmName(babyModel.getMname()); |
| 166 | 206 |