Commit fbe8f0969d2b66f32a600c1270c1961942029e6e
1 parent
8326d79885
Exists in
master
and in
6 other branches
产检表格导出
Showing 3 changed files with 133 additions and 3 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/AntenatalExaminationModel.java
View file @
fbe8f09
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
fbe8f09
... | ... | @@ -319,6 +319,7 @@ |
319 | 319 | |
320 | 320 | /** |
321 | 321 | * 诸城孕产妇妊娠风险评估分级报告单.docx |
322 | + * | |
322 | 323 | * @param id |
323 | 324 | * @param request |
324 | 325 | * @param response |
... | ... | @@ -876,6 +877,7 @@ |
876 | 877 | |
877 | 878 | /** |
878 | 879 | * 秦皇岛电子病历接口 |
880 | + * | |
879 | 881 | * @param cardNo |
880 | 882 | * @param vcCardNo |
881 | 883 | * @param response |
... | ... | @@ -884,9 +886,9 @@ |
884 | 886 | @RequestMapping(method = RequestMethod.GET, value = "/getPatientRecordInfo") |
885 | 887 | @ResponseBody |
886 | 888 | public BaseObjectResponse getPatientRecordInfo(@RequestParam(required = true) String userName, |
887 | - @RequestParam(required = false) String cardNo, | |
888 | - @RequestParam(required = false) String vcCardNo, | |
889 | - HttpServletResponse response) { | |
889 | + @RequestParam(required = false) String cardNo, | |
890 | + @RequestParam(required = false) String vcCardNo, | |
891 | + HttpServletResponse response) { | |
890 | 892 | return viewFacade.getPatientRecordInfo(userName, cardNo, vcCardNo); |
891 | 893 | } |
892 | 894 | |
... | ... | @@ -922,6 +924,20 @@ |
922 | 924 | return viewFacade.executeUpgrade(); |
923 | 925 | |
924 | 926 | } |
927 | + | |
928 | + /*** | |
929 | + * 检查报告 | |
930 | + * */ | |
931 | + @RequestMapping(value = "/checkReport", method = RequestMethod.GET) | |
932 | + @ResponseBody | |
933 | + @TokenRequired | |
934 | + public BaseResponse checkReport(@RequestParam(required = false) List<String> antex, HttpServletRequest request) { | |
935 | + | |
936 | + | |
937 | + return viewFacade.checkReport(antex, getUserId(request)); | |
938 | + | |
939 | + } | |
940 | + | |
925 | 941 | |
926 | 942 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
fbe8f09
... | ... | @@ -119,6 +119,8 @@ |
119 | 119 | |
120 | 120 | @Autowired |
121 | 121 | private HosptialHighRiskService hosptialHighRiskService; |
122 | + @Autowired | |
123 | + private CommonService commonService; | |
122 | 124 | |
123 | 125 | /** |
124 | 126 | * 建档查询 |
... | ... | @@ -6026,6 +6028,117 @@ |
6026 | 6028 | BaseResponse response = new BaseResponse(); |
6027 | 6029 | response.setObject(map); |
6028 | 6030 | return response; |
6031 | + } | |
6032 | + | |
6033 | + public BaseResponse checkReport(List<String> antexId, Integer userId) { | |
6034 | + List<Map<String, Object>> data = new ArrayList<>(); | |
6035 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
6036 | + for (String antId : antexId) { | |
6037 | + Map<String, Object> map = new LinkedHashMap<>(); | |
6038 | + AntenatalExaminationModel antenatalExaminationModel = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(antId).and("yn"). | |
6039 | + is(YnEnums.YES.getId()).and("hospitalId").is(hospital)), AntenatalExaminationModel.class); | |
6040 | + if (antenatalExaminationModel != null) { | |
6041 | + //检查日期 | |
6042 | + map.put("checkDate", DateUtil.getyyyy_MM_dd(antenatalExaminationModel.getCheckDate())); | |
6043 | + //孕周 | |
6044 | + map.put("week", DateUtil.getWeekDesc(antenatalExaminationModel.getLastMenses(), new Date())); | |
6045 | + //血压 | |
6046 | + map.put("bloodPressure", antenatalExaminationModel.getBp()); | |
6047 | + //体重 | |
6048 | + map.put("weight", antenatalExaminationModel.getWeight()); | |
6049 | + //宫高 | |
6050 | + map.put("fuh", antenatalExaminationModel.getGongGao()); | |
6051 | + //腹围 | |
6052 | + map.put("abdominalCircumference", antenatalExaminationModel.getAbdominalCircumference()); | |
6053 | + //默认值 | |
6054 | + map.put("heartRate", ""); | |
6055 | + map.put("fetalPosition", ""); | |
6056 | + map.put("fetalPresentation", ""); | |
6057 | + map.put("join", ""); | |
6058 | + if (CollectionUtils.isNotEmpty(antenatalExaminationModel.getTireData())) { | |
6059 | + // String heartRateVal = "", fetalPositionVal = "", fetalPresentationVal = "", joinVal = ""; | |
6060 | + for (int j = 0; j < antenatalExaminationModel.getTireData().size(); j++) { | |
6061 | + LinkedHashMap maps = (LinkedHashMap) antenatalExaminationModel.getTireData().get(j); | |
6062 | + if (null != maps) { | |
6063 | + //胎先露、胎方位、胎心率和衔接 | |
6064 | + String heartRate = String.valueOf(map.get("heartRate")); | |
6065 | + String fetalPosition = String.valueOf(map.get("fetalPosition")); | |
6066 | + String fetalPresentation = String.valueOf(map.get("fetalPresentation")); | |
6067 | + String join = String.valueOf(map.get("join")); | |
6068 | + if (!"null".equals(heartRate) && com.lyms.platform.common.utils.StringUtils.isNotEmpty(heartRate)) { | |
6069 | + //胎心率 | |
6070 | + map.put("heartRate", antenatalExaminationModel.getTireData()); | |
6071 | + | |
6072 | + // heartRateVal += heartRate + "次/分" + ","; | |
6073 | + } | |
6074 | + if (!"null".equals(fetalPosition) && com.lyms.platform.common.utils.StringUtils.isNotEmpty(fetalPosition)) { | |
6075 | + //胎方位 | |
6076 | + map.put("fetalPosition", fetalPosition); | |
6077 | + // fetalPositionVal += FetalPositionEnums.getTitle(fetalPosition) + ","; | |
6078 | + } | |
6079 | + if (!"null".equals(fetalPresentation) && com.lyms.platform.common.utils.StringUtils.isNotEmpty(fetalPresentation)) { | |
6080 | + //胎先露 | |
6081 | + map.put("fetalPresentation", fetalPresentation); | |
6082 | + } | |
6083 | + // fetalPresentationVal += FetalEnums.getTitle(fetalPresentation) + ","; | |
6084 | + | |
6085 | + if (!"null".equals(join) && com.lyms.platform.common.utils.StringUtils.isNotEmpty(join)) { | |
6086 | + // joinVal += JoinEnums.getTitle(join) + ","; | |
6087 | + //衔接 | |
6088 | + map.put("join", join); | |
6089 | + } | |
6090 | + } | |
6091 | + } | |
6092 | + } | |
6093 | + //浮肿 | |
6094 | + map.put("edema", antenatalExaminationModel.getEdema()); | |
6095 | + //血红蛋白 | |
6096 | + map.put("hemoglobin", antenatalExaminationModel.getHemoglobin()); | |
6097 | + //尿蛋白 | |
6098 | + map.put("urineProtein", antenatalExaminationModel.getUrineProtein()); | |
6099 | + //其他检查 | |
6100 | + map.put("quickenRemark", antenatalExaminationModel.getQuickenRemark()); | |
6101 | + //妊娠风险因素 | |
6102 | + List<String> listss = JsonUtil.toList(antenatalExaminationModel.getRiskFactor(), String.class); | |
6103 | + | |
6104 | + String rFactor = commonService.resloveFactor(JsonUtil.toList(antenatalExaminationModel.getRiskFactor(), String.class)); | |
6105 | + if (antenatalExaminationModel.getHighriskDesc() != null && !"null".equals(antenatalExaminationModel.getHighriskDesc())) { | |
6106 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(rFactor)) { | |
6107 | + rFactor += "," + antenatalExaminationModel.getHighriskDesc(); | |
6108 | + } else { | |
6109 | + rFactor = antenatalExaminationModel.getHighriskDesc(); | |
6110 | + } | |
6111 | + } | |
6112 | + map.put("riskFactor", rFactor); // 高危因素 | |
6113 | + | |
6114 | + //检查医院 | |
6115 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(antenatalExaminationModel.getHospitalId())) { | |
6116 | + Organization org = organizationService.getOrganization(Integer.valueOf(antenatalExaminationModel.getHospitalId())); | |
6117 | + if (null != org) { | |
6118 | + map.put("organization", org.getName()); | |
6119 | + } else { | |
6120 | + map.put("organization", antenatalExaminationModel.getHospitalId()); | |
6121 | + } | |
6122 | + } | |
6123 | + //检查医生 | |
6124 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(antenatalExaminationModel.getCheckDoctor())) { | |
6125 | + if (NumberUtils.isNumber(antenatalExaminationModel.getCheckDoctor())) { | |
6126 | + Users users = usersService.getUsers(NumberUtils.toInt(antenatalExaminationModel.getCheckDoctor())); | |
6127 | + if (null != users) { | |
6128 | + map.put("DoctorName", users.getName()); | |
6129 | + } else { | |
6130 | + map.put("DoctorName", antenatalExaminationModel.getCheckDoctor()); | |
6131 | + } | |
6132 | + } else { | |
6133 | + map.put("DoctorName", antenatalExaminationModel.getCheckDoctor()); | |
6134 | + } | |
6135 | + } | |
6136 | + //下次检查日期 | |
6137 | + map.put("NextCheckDate", DateUtil.getyyyy_MM_dd(antenatalExaminationModel.getNextCheckTime())); | |
6138 | + } | |
6139 | + data.add(map); | |
6140 | + } | |
6141 | + return new BaseObjectResponse().setData(data).setErrorcode(0).setErrormsg("成功"); | |
6029 | 6142 | } |
6030 | 6143 | } |