Commit 4cbcb5d72ce5937a15ee955da07f9529980d443c

Authored by jiangjiazhi
1 parent 3ebd743afc

修改新电子病历

Showing 1 changed file with 20 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 4cbcb5d
... ... @@ -497,6 +497,26 @@
497 497 Patients patients = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, hospital, 1, false, null);
498 498 //本院产妇
499 499 Patients patients3 = antenatalExaminationFacade.findOnePatient(deliverQueryRequest.getCardNo(), deliverQueryRequest.getVcCardNo(), null, hospital, 3, false, null);
  500 + PersonModelQuery personModelQuery=new PersonModelQuery();
  501 + String pid = "";
  502 + if(null!=patients1){
  503 + pid=patients1.getPid();
  504 + }else if (null!=patients){
  505 + pid=patients.getPid();
  506 + }else if(null!=patients3){
  507 + pid= patients3.getPid();
  508 + }
  509 + if(StringUtils.isNotEmpty(pid)){
  510 + personModelQuery.setId(pid);
  511 + List<PersonModel> personModels = personService.queryPersons(personModelQuery);
  512 + if(CollectionUtils.isNotEmpty(personModels)){
  513 + PersonModel personModel= personModels.get(0);
  514 + if(personModel.getType()==1 &&null==patients){
  515 + return new BaseResponse().setErrormsg("该孕妇还未在本院建档不能进行分娩").setErrorcode(ErrorCodeConstants.NO_DATA);
  516 + }
  517 + }
  518 + }
  519 +
500 520 //本院产妇,并且本院没建档需要提醒补录记录
501 521 if (null != patients3 && null == patients) {
502 522 patients = patients3;