Commit ca857e912be31a5bea66517686c5a7c222291468
1 parent
5b77bb7842
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 112 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java
View file @
ca857e9
... | ... | @@ -93,12 +93,25 @@ |
93 | 93 | */ |
94 | 94 | @ResponseBody |
95 | 95 | @TokenRequired |
96 | - @RequestMapping(value = "/querySievePatientInfo", method = RequestMethod.GET) | |
96 | + @RequestMapping(value = "/querySievePatientInfohs", method = RequestMethod.GET) | |
97 | 97 | public BaseResponse querySievePatientInfo(@RequestParam(required = false) String cardNo, @RequestParam(required = false) String vcCardNo, HttpServletRequest request) { |
98 | 98 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
99 | + return sieveFacade.querySievePatientInfohs(cardNo, vcCardNo, loginState.getId()); | |
100 | + } | |
101 | + /** | |
102 | + * 添加查询前 查询孕妇基本信息 | |
103 | + * 如果孕妇没有在本院建档就添加隐藏档案 | |
104 | + * | |
105 | + * @param request | |
106 | + * @return | |
107 | + */ | |
108 | + @ResponseBody | |
109 | + @TokenRequired | |
110 | + @RequestMapping(value = "/querySievePatientInfo", method = RequestMethod.GET) | |
111 | + public BaseResponse querySievePatientInfoqhd(@RequestParam(required = false) String cardNo, @RequestParam(required = false) String vcCardNo, HttpServletRequest request) { | |
112 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
99 | 113 | return sieveFacade.querySievePatientInfo(cardNo, vcCardNo, loginState.getId()); |
100 | 114 | } |
101 | - | |
102 | 115 | /** |
103 | 116 | * 查看申请单 |
104 | 117 | * <p> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
ca857e9
... | ... | @@ -843,7 +843,7 @@ |
843 | 843 | * @param userId |
844 | 844 | * @return |
845 | 845 | */ |
846 | - public BaseResponse querySievePatientInfo(String cardNo, String vcCardNo, Integer userId) { | |
846 | + public BaseResponse querySievePatientInfohs(String cardNo, String vcCardNo, Integer userId) { | |
847 | 847 | |
848 | 848 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
849 | 849 | |
... | ... | @@ -895,6 +895,102 @@ |
895 | 895 | if (CollectionUtils.isNotEmpty(list)) { |
896 | 896 | return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("已申请过产筛!"); |
897 | 897 | }*/ |
898 | + | |
899 | + patientBaseResult.convert(pat); | |
900 | + } | |
901 | + patientBaseResult.setRiskFactor(highScoreResult.getHighRisk()); | |
902 | + patientBaseResult.setRiskScore(highScoreResult.getScoreStr()); | |
903 | + | |
904 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
905 | + antExChuQuery.setParentId(pat.getId()); | |
906 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
907 | + | |
908 | + List<AntExChuModel> list = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
909 | + if (CollectionUtils.isNotEmpty(list)) { | |
910 | + AntExChuModel chuModel = list.get(0); | |
911 | + patientBaseResult.setWeight(chuModel.getYqWeight()); | |
912 | + } | |
913 | + | |
914 | + //查询产前诊断 | |
915 | + int a = 0; | |
916 | + List<Map<String, String>> mList = new ArrayList<Map<String, String>>(); | |
917 | + Map<String, String> map = new HashMap<String, String>(); | |
918 | + map.put("cqSieve", "0");//0,未申请;1,已申请;2,已接收;3,已诊断 | |
919 | + map.put("diaProject", ""); | |
920 | + map.put("diaResult", "");//(0,阴性;1,阳性) | |
921 | + DiagnosisQuery diagnosisQuery = new DiagnosisQuery(); | |
922 | + diagnosisQuery.setParentId(pat.getId()); | |
923 | + diagnosisQuery.setHospitalId(hospitalId); | |
924 | + List<DiagnosisModel> diaList = diagnosisService.queryDiagnosis(diagnosisQuery); | |
925 | + if (CollectionUtils.isNotEmpty(diaList)) { | |
926 | + for (DiagnosisModel diagnosisModel : diaList) { | |
927 | + Map<String, String> m = new HashMap<String, String>(); | |
928 | + m.put("cqSieve", diagnosisModel.getDiaStatus());//0,未申请;1,已申请;2,已接收;3,已诊断 | |
929 | + m.put("diaProject", diagnosisModel.getDiaProject()); | |
930 | + m.put("diaResult", diagnosisModel.getDiaResult());//(0,阴性;1,阳性) | |
931 | + a = 1; | |
932 | + mList.add(m); | |
933 | + } | |
934 | + } | |
935 | + if (a == 0) { | |
936 | + mList.add(map); | |
937 | + } | |
938 | + patientBaseResult.setDia(mList); | |
939 | + | |
940 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(patientBaseResult); | |
941 | + } | |
942 | + public BaseResponse querySievePatientInfo(String cardNo, String vcCardNo, Integer userId) { | |
943 | + | |
944 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
945 | + | |
946 | + | |
947 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
948 | + patientsQuery.setHospitalId(hospitalId); | |
949 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
950 | + if (StringUtils.isNotEmpty(cardNo)) { | |
951 | + patientsQuery.setPhoneOrCert(cardNo); | |
952 | + } else if (StringUtils.isNotEmpty(vcCardNo)) { | |
953 | + patientsQuery.setVcCardNo(vcCardNo); | |
954 | + } | |
955 | + | |
956 | + | |
957 | + List<Patients> localPatients = patientsService.queryPatient(patientsQuery); | |
958 | + Patients pat = null; | |
959 | + if (CollectionUtils.isNotEmpty(localPatients)) { | |
960 | + pat = localPatients.get(0); | |
961 | + } else { | |
962 | + patientsQuery.setHospitalId(null); | |
963 | + List<Patients> areaPatients = patientsService.queryPatient(patientsQuery); | |
964 | + if (CollectionUtils.isNotEmpty(areaPatients)) { | |
965 | + pat = areaPatients.get(0); | |
966 | + if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { | |
967 | + //建立隐藏档案 | |
968 | + String id = antenatalExaminationFacade.handHideBuild(pat.getPid(), pat.getId(), userId, 1); | |
969 | + | |
970 | + pat = patientsService.findOnePatientById(id); | |
971 | + } else { | |
972 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有档案,请建档后申请产筛"); | |
973 | + } | |
974 | + } else { | |
975 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有档案,请建档后申请产筛"); | |
976 | + } | |
977 | + } | |
978 | + | |
979 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(pat.getPid(), false); | |
980 | + PatientBaseResult patientBaseResult = new PatientBaseResult(); | |
981 | + if (null != pat) { | |
982 | + | |
983 | + /* | |
984 | + 20200608 产筛修改 wtt ,去掉已申请过产筛限制,可以多次申请产筛*/ | |
985 | + SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery(); | |
986 | + sieveApplyOrderQuery1.setParentId(pat.getId()); | |
987 | + sieveApplyOrderQuery1.setHospitalId(hospitalId); | |
988 | + sieveApplyOrderQuery1.setYn(YnEnums.YES.getId()); | |
989 | + | |
990 | + List<SieveApplyOrderModel> list = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1); | |
991 | + if (CollectionUtils.isNotEmpty(list)) { | |
992 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("已申请过产筛!"); | |
993 | + } | |
898 | 994 | |
899 | 995 | patientBaseResult.convert(pat); |
900 | 996 | } |