Commit 4efbf3112981de04eca5b945087a7a6f267b4ffa
1 parent
feb8b02003
Exists in
master
and in
6 other branches
产筛
Showing 4 changed files with 155 additions and 1 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/SieveApplyOrderModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveApplyOrderAddRequest.java
platform-dal/src/main/java/com/lyms/platform/pojo/SieveApplyOrderModel.java
View file @
4efbf31
| ... | ... | @@ -72,6 +72,28 @@ |
| 72 | 72 | //申请医院 |
| 73 | 73 | private String applyHospitalId; |
| 74 | 74 | |
| 75 | + //送检医生 | |
| 76 | + private String sendDoctor; | |
| 77 | + | |
| 78 | + //送检日期 | |
| 79 | + private Date sendTime; | |
| 80 | + | |
| 81 | + public String getSendDoctor() { | |
| 82 | + return sendDoctor; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void setSendDoctor(String sendDoctor) { | |
| 86 | + this.sendDoctor = sendDoctor; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public Date getSendTime() { | |
| 90 | + return sendTime; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public void setSendTime(Date sendTime) { | |
| 94 | + this.sendTime = sendTime; | |
| 95 | + } | |
| 96 | + | |
| 75 | 97 | public Date getBirth() { |
| 76 | 98 | return birth; |
| 77 | 99 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java
View file @
4efbf31
| ... | ... | @@ -75,7 +75,8 @@ |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | - * 添加查询前 查询孕妇基本信息 如果孕妇没有在本院建档就添加隐藏档案 | |
| 78 | + * 添加查询前 查询孕妇基本信息 | |
| 79 | + * 如果孕妇没有在本院建档就添加隐藏档案 | |
| 79 | 80 | * |
| 80 | 81 | * @param request |
| 81 | 82 | * @return |
| ... | ... | @@ -87,6 +88,22 @@ |
| 87 | 88 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 88 | 89 | return sieveFacade.querySievePatientInfo(cardNo, loginState.getId()); |
| 89 | 90 | } |
| 91 | + | |
| 92 | + | |
| 93 | + /** | |
| 94 | + * 查看申请单 | |
| 95 | + * @param parentId | |
| 96 | + * @param request | |
| 97 | + * @return | |
| 98 | + */ | |
| 99 | + @ResponseBody | |
| 100 | + @TokenRequired | |
| 101 | + @RequestMapping(value = "/getSieveApplyInfo",method = RequestMethod.GET) | |
| 102 | + public BaseResponse getSieveApplyInfo(@RequestParam("parentId")String parentId,HttpServletRequest request) { | |
| 103 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 104 | + return sieveFacade.getSieveApplyInfo(parentId, loginState.getId()); | |
| 105 | + } | |
| 106 | + | |
| 90 | 107 | |
| 91 | 108 | |
| 92 | 109 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
4efbf31
| ... | ... | @@ -632,5 +632,92 @@ |
| 632 | 632 | |
| 633 | 633 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(patientBaseResult); |
| 634 | 634 | } |
| 635 | + | |
| 636 | + public BaseResponse getSieveApplyInfo(String parentId, Integer userId) { | |
| 637 | + | |
| 638 | + Map<String,Object> map = new HashMap<>(); | |
| 639 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 640 | + | |
| 641 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 642 | + patientsQuery.setHospitalId(hospitalId); | |
| 643 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 644 | + patientsQuery.setId(parentId); | |
| 645 | + | |
| 646 | + List<Patients> localPatients = patientsService.queryPatient(patientsQuery); | |
| 647 | + Patients pat = null; | |
| 648 | + if (CollectionUtils.isNotEmpty(localPatients)) | |
| 649 | + { | |
| 650 | + pat = localPatients.get(0); | |
| 651 | + } | |
| 652 | + else | |
| 653 | + { | |
| 654 | + patientsQuery.setHospitalId(null); | |
| 655 | + List<Patients> areaPatients = patientsService.queryPatient(patientsQuery); | |
| 656 | + if (CollectionUtils.isNotEmpty(areaPatients)) { | |
| 657 | + pat = areaPatients.get(0); | |
| 658 | + if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { | |
| 659 | + //建立隐藏档案 | |
| 660 | + String id = antenatalExaminationFacade.handHideBuild(pat.getPid(), pat.getId(), userId, 1); | |
| 661 | + | |
| 662 | + pat = patientsService.findOnePatientById(id); | |
| 663 | + } | |
| 664 | + else | |
| 665 | + { | |
| 666 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有档案,请建档后申请产筛"); | |
| 667 | + } | |
| 668 | + } | |
| 669 | + } | |
| 670 | + | |
| 671 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(pat.getPid(), false); | |
| 672 | + PatientBaseResult patientBaseResult = new PatientBaseResult(); | |
| 673 | + if (null != pat) { | |
| 674 | + patientBaseResult.convert(pat); | |
| 675 | + } | |
| 676 | + patientBaseResult.setRiskFactor(highScoreResult.getHighRisk()); | |
| 677 | + patientBaseResult.setRiskScore(highScoreResult.getScoreStr()); | |
| 678 | + | |
| 679 | + map.put("patientInfo",patientBaseResult); | |
| 680 | + | |
| 681 | + SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery(); | |
| 682 | + sieveApplyOrderQuery1.setParentId(parentId); | |
| 683 | + sieveApplyOrderQuery1.setHospitalId(hospitalId); | |
| 684 | + sieveApplyOrderQuery1.setYn(YnEnums.YES.getId()); | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + List<SieveApplyOrderModel> sieveApplyOrderModels = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1); | |
| 689 | + if (CollectionUtils.isNotEmpty(sieveApplyOrderModels)) | |
| 690 | + { | |
| 691 | + Map<String,Object> result = new HashMap<>(); | |
| 692 | + SieveApplyOrderModel sieveApply = sieveApplyOrderModels.get(0); | |
| 693 | + | |
| 694 | + result.put("id",sieveApply.getId()); | |
| 695 | + result.put("parentId",sieveApply.getParentId()); | |
| 696 | + | |
| 697 | + result.put("checkItem",sieveApply.getCheckItem()); | |
| 698 | + result.put("guide",sieveApply.getGuide()); | |
| 699 | + result.put("checkDate",sieveApply.getCheckDate()); | |
| 700 | + result.put("applyDoctor",sieveApply.getApplyDoctor()); | |
| 701 | + result.put("hospitalId",sieveApply.getHospitalId()); | |
| 702 | + result.put("applyTime",DateUtil.getyyyy_MM_dd(sieveApply.getApplyTime())); | |
| 703 | + result.put("birth",DateUtil.getyyyy_MM_dd(sieveApply.getBirth())); | |
| 704 | + result.put("weight",sieveApply.getWeight()); | |
| 705 | + result.put("lastMenses",DateUtil.getyyyy_MM_dd(sieveApply.getLastMenses())); | |
| 706 | + result.put("number",sieveApply.getNumber()); | |
| 707 | + result.put("collectionDoctorId",sieveApply.getCollectionDoctorId()); | |
| 708 | + result.put("collectionDate",DateUtil.getyyyy_MM_dd(sieveApply.getCollectionDate())); | |
| 709 | + result.put("crl",sieveApply.getCrl()); | |
| 710 | + result.put("bcCheckDate",DateUtil.getyyyy_MM_dd(sieveApply.getBcCheckDate())); | |
| 711 | + result.put("historyBirth",StringUtils.isNotEmpty(sieveApply.getHistoryBirth()) ? JsonUtil.getMap(sieveApply.getHistoryBirth()) : new HashMap<>()); | |
| 712 | + result.put("pastHistory",sieveApply.getPastHistory()); | |
| 713 | + result.put("applyHospitalId",sieveApply.getApplyHospitalId()); | |
| 714 | + result.put("sendDoctor",sieveApply.getSendDoctor()); | |
| 715 | + result.put("sendTime",DateUtil.getyyyy_MM_dd(sieveApply.getSendTime())); | |
| 716 | + | |
| 717 | + result.put("sieveApplyInfo",result); | |
| 718 | + | |
| 719 | + } | |
| 720 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(map); | |
| 721 | + } | |
| 635 | 722 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveApplyOrderAddRequest.java
View file @
4efbf31
| ... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 | import com.lyms.platform.common.utils.StringUtils; |
| 9 | 9 | import com.lyms.platform.pojo.SieveApplyOrderModel; |
| 10 | 10 | |
| 11 | +import java.util.Date; | |
| 11 | 12 | import java.util.List; |
| 12 | 13 | import java.util.Map; |
| 13 | 14 | |
| 14 | 15 | |
| 15 | 16 | |
| ... | ... | @@ -68,8 +69,14 @@ |
| 68 | 69 | //接收状态 1未接收 2接收 |
| 69 | 70 | private Integer reviceStatus; |
| 70 | 71 | |
| 72 | + //送检医生 | |
| 73 | + private String sendDoctor; | |
| 71 | 74 | |
| 75 | + //送检日期 | |
| 76 | + private String sendTime; | |
| 72 | 77 | |
| 78 | + | |
| 79 | + | |
| 73 | 80 | @Override |
| 74 | 81 | public SieveApplyOrderModel convertToDataModel() { |
| 75 | 82 | SieveApplyOrderModel sieveApplyOrderModel = new SieveApplyOrderModel(); |
| 76 | 83 | |
| ... | ... | @@ -94,7 +101,28 @@ |
| 94 | 101 | sieveApplyOrderModel.setPastHistory(pastHistory); |
| 95 | 102 | sieveApplyOrderModel.setApplyHospitalId(applyHospitalId); |
| 96 | 103 | |
| 104 | + sieveApplyOrderModel.setSendDoctor(sendDoctor); | |
| 105 | + | |
| 106 | + sieveApplyOrderModel.setSendTime(StringUtils.isNotEmpty(sendTime) ? DateUtil.parseYMD(sendTime) : null); | |
| 107 | + | |
| 97 | 108 | return sieveApplyOrderModel; |
| 109 | + } | |
| 110 | + | |
| 111 | + | |
| 112 | + public String getSendDoctor() { | |
| 113 | + return sendDoctor; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public void setSendDoctor(String sendDoctor) { | |
| 117 | + this.sendDoctor = sendDoctor; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public String getSendTime() { | |
| 121 | + return sendTime; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public void setSendTime(String sendTime) { | |
| 125 | + this.sendTime = sendTime; | |
| 98 | 126 | } |
| 99 | 127 | |
| 100 | 128 | public Integer getReviceStatus() { |