Commit 33eb30aa47ef180fba46040a76f91a582845856e
1 parent
1842739297
Exists in
master
and in
1 other branch
修改新电子病历
Showing 2 changed files with 19 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
33eb30a
| ... | ... | @@ -52,6 +52,8 @@ |
| 52 | 52 | private PersonService personService; |
| 53 | 53 | @Autowired |
| 54 | 54 | private UsersService usersService; |
| 55 | + @Autowired | |
| 56 | + private StopPregnancyService stopPregnancyService; | |
| 55 | 57 | |
| 56 | 58 | private static Map<Integer, String> ONE_ENUMS = new HashMap<>(); |
| 57 | 59 | |
| ... | ... | @@ -230,7 +232,7 @@ |
| 230 | 232 | List<Patients> patientsList = patientsService.queryPatient(patientsQuery); |
| 231 | 233 | for (Patients patients : patientsList) { |
| 232 | 234 | //判断分娩日期是否大于24孕周 |
| 233 | - if (fmDate.getTime()>=DateUtil.addDay(patients.getLastMenses(), 168).getTime()) { | |
| 235 | + if (fmDate.getTime() >= DateUtil.addDay(patients.getLastMenses(), 168).getTime()) { | |
| 234 | 236 | patients.setFmDate(fmDate); |
| 235 | 237 | patients.setType(3); |
| 236 | 238 | patientsService.updatePatient(patients); |
| 237 | 239 | |
| 238 | 240 | |
| ... | ... | @@ -438,15 +440,15 @@ |
| 438 | 440 | return new BaseResponse().setErrormsg("没有相关的产妇记录").setErrorcode(ErrorCodeConstants.BUSINESS_ERROR); |
| 439 | 441 | }*/ |
| 440 | 442 | //外院的孕妇 |
| 441 | - Patients patients1 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, null, 1, false,null); | |
| 443 | + Patients patients1 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, null, 1, false, null); | |
| 442 | 444 | //外院的产妇 |
| 443 | 445 | // Patients patients2 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, null, 3); |
| 444 | 446 | |
| 445 | 447 | //http://jira.healthbaby.com.cn/browse/WEB-204 修改bug |
| 446 | 448 | //本院的孕妇 |
| 447 | - Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, hospital, 1, false,null); | |
| 449 | + Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, hospital, 1, false, null); | |
| 448 | 450 | //本院产妇 |
| 449 | - Patients patients3 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, hospital, 3, false,null); | |
| 451 | + Patients patients3 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, hospital, 3, false, null); | |
| 450 | 452 | //本院产妇,并且本院没建档需要提醒补录记录 |
| 451 | 453 | if (null != patients3 && null == patients) { |
| 452 | 454 | patients = patients3; |
| ... | ... | @@ -462,7 +464,7 @@ |
| 462 | 464 | if (days < 168 && patients.getFmDate() == null) { |
| 463 | 465 | return new BaseResponse().setErrorcode(ErrorCodeConstants.BUSINESS_ERROR1).setErrormsg("当前孕妇的孕周小于24孕周,不能进行分娩"); |
| 464 | 466 | } |
| 465 | - if(null!=patients.getDueStatus() && 1 == patients.getDueStatus()){ | |
| 467 | + if (null != patients.getDueStatus() && 1 == patients.getDueStatus()) { | |
| 466 | 468 | return new BaseResponse().setErrorcode(ErrorCodeConstants.BUSINESS_ERROR).setErrormsg(" 该孕妇在系统中已终止妊娠不能再进行分娩,请重新建档"); |
| 467 | 469 | } |
| 468 | 470 | |
| 469 | 471 | |
| ... | ... | @@ -471,9 +473,8 @@ |
| 471 | 473 | matDeliverQuery.setYn(YnEnums.YES.getId()); |
| 472 | 474 | List<MaternalDeliverModel> list = matDeliverService.query(matDeliverQuery); |
| 473 | 475 | MatDeliverListResult matDeliverListResult = new MatDeliverListResult(); |
| 474 | - matDeliverListResult.convertToResult(list, patients); | |
| 476 | + matDeliverListResult.convertToResult(patients); | |
| 475 | 477 | |
| 476 | - | |
| 477 | 478 | if (CollectionUtils.isNotEmpty(list)) { |
| 478 | 479 | List<MatDeliverListResult.MatDeliverExt> list12 = new ArrayList<>(); |
| 479 | 480 | for (MaternalDeliverModel model : list) { |
| ... | ... | @@ -500,6 +501,14 @@ |
| 500 | 501 | } |
| 501 | 502 | }); |
| 502 | 503 | matDeliverListResult.setData(list12); |
| 504 | + } else { | |
| 505 | + StopPregQuery stopPregQuery = new StopPregQuery(); | |
| 506 | + stopPregQuery.setYn(YnEnums.YES.getId()); | |
| 507 | + stopPregQuery.setPatientId(patients.getId()); | |
| 508 | + List<StopPregModel> list2 = stopPregnancyService.queryStopPreg(stopPregQuery); | |
| 509 | + if (CollectionUtils.isEmpty(list2)) { | |
| 510 | + matDeliverListResult.setDueType("1"); | |
| 511 | + } | |
| 503 | 512 | } |
| 504 | 513 | |
| 505 | 514 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatDeliverListResult.java
View file @
33eb30a
| ... | ... | @@ -84,7 +84,7 @@ |
| 84 | 84 | this.tireNumber1 = tireNumber1; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - public MatDeliverListResult convertToResult(List<MaternalDeliverModel> destList, Patients patients) { | |
| 87 | + public MatDeliverListResult convertToResult(Patients patients) { | |
| 88 | 88 | setId(patients.getId()); |
| 89 | 89 | try { |
| 90 | 90 | if (null != patients.getBirth()) { |
| 91 | 91 | |
| ... | ... | @@ -98,9 +98,9 @@ |
| 98 | 98 | if (null != patients.getDueDate()) { |
| 99 | 99 | setyChanQi(DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
| 100 | 100 | } |
| 101 | - if (null != patients.getBuildType()) { | |
| 101 | + /* if (null != patients.getBuildType()) { | |
| 102 | 102 | setDueType(2 == patients.getBuildType() ? "1" : "0"); |
| 103 | - } | |
| 103 | + }*/ | |
| 104 | 104 | setIsGravida(patients.getType()==3?"0":"1"); |
| 105 | 105 | setName(patients.getUsername()); |
| 106 | 106 | setPhone(patients.getPhone()); |