Commit 453c95d97370025349487b5eea570cb7a9654aa0
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 6 changed files
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyBookbuildingAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBasicResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBuildResult.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
View file @
453c95d
| ... | ... | @@ -76,7 +76,7 @@ |
| 76 | 76 | * @param id |
| 77 | 77 | * @return |
| 78 | 78 | */ |
| 79 | - @RequestMapping(value = "/queryBabyCheckInfo/id", method = RequestMethod.GET) | |
| 79 | + @RequestMapping(value = "/queryBabyCheckInfo/{id}", method = RequestMethod.GET) | |
| 80 | 80 | @ResponseBody |
| 81 | 81 | public BaseObjectResponse queryBabyCheckInfo(@PathVariable("id")String id){ |
| 82 | 82 | return babyCheckFacade.queryBabyCheckInfo(id); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
453c95d
| ... | ... | @@ -228,7 +228,7 @@ |
| 228 | 228 | //bm.setHighRiskReason(b.getHighRiskReason()); |
| 229 | 229 | bm.setExpVip(b.getExpVip()); |
| 230 | 230 | bm.setMremark(b.getMremark()); |
| 231 | - bm.setDiagnose(b.getDiagnose()); | |
| 231 | + bm.setDiagnose(JsonUtil.obj2JsonString(b.getDiagnose())); | |
| 232 | 232 | |
| 233 | 233 | if (b.getExpType() != null) |
| 234 | 234 | { |
| ... | ... | @@ -353,7 +353,7 @@ |
| 353 | 353 | //result.setHighRiskReason(model.getHighRiskReason()); |
| 354 | 354 | result.setExpVip(model.getExpVip()); |
| 355 | 355 | result.setMremark(model.getMremark() == null ? "" : model.getMremark()); |
| 356 | - result.setDiagnose(model.getDiagnose()); | |
| 356 | + result.setDiagnose(JsonUtil.toList(model.getDiagnose(),List.class)); | |
| 357 | 357 | //result.setVipEndTime(DateUtil.getyyyy_MM_dd(model.getVipEndTime())); |
| 358 | 358 | result.setServiceStatus(String.valueOf(model.getServiceStatus())); |
| 359 | 359 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
453c95d
| ... | ... | @@ -14,12 +14,8 @@ |
| 14 | 14 | import com.lyms.platform.operate.web.result.BabyCheckResult; |
| 15 | 15 | import com.lyms.platform.operate.web.result.BabyChooseResult; |
| 16 | 16 | import com.lyms.platform.operate.web.result.BasicConfigResult; |
| 17 | -import com.lyms.platform.pojo.AwModel; | |
| 18 | -import com.lyms.platform.pojo.BabyCheckModel; | |
| 19 | -import com.lyms.platform.pojo.BabyModel; | |
| 20 | -import com.lyms.platform.pojo.HwModel; | |
| 21 | -import com.lyms.platform.query.BabyCheckModelQuery; | |
| 22 | -import com.lyms.platform.query.BabyModelQuery; | |
| 17 | +import com.lyms.platform.pojo.*; | |
| 18 | +import com.lyms.platform.query.*; | |
| 23 | 19 | import org.apache.commons.collections.CollectionUtils; |
| 24 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| 25 | 21 | import org.springframework.stereotype.Component; |
| 26 | 22 | |
| ... | ... | @@ -34,8 +30,21 @@ |
| 34 | 30 | |
| 35 | 31 | @Autowired |
| 36 | 32 | private BabyBookbuildingService babyBookbuildingService; |
| 37 | - private BaseObjectResponse baseConfig; | |
| 38 | 33 | |
| 34 | + | |
| 35 | + @Autowired | |
| 36 | + private BasicConfigService basicConfigService; | |
| 37 | + | |
| 38 | + @Autowired | |
| 39 | + private PatientsService patientsService; | |
| 40 | + | |
| 41 | + @Autowired | |
| 42 | + private AntenatalExaminationService antenatalExaminationService; | |
| 43 | + | |
| 44 | + | |
| 45 | + @Autowired | |
| 46 | + private AntenatalExaminationFacade antenatalExaminationFacade; | |
| 47 | + | |
| 39 | 48 | /** |
| 40 | 49 | * 更新检查 |
| 41 | 50 | * |
| ... | ... | @@ -208,8 +217,91 @@ |
| 208 | 217 | base.setName(model.getName()); |
| 209 | 218 | base.setMonthAge(DateUtil.getBabyMonthAge(model.getBirth(), new Date())); |
| 210 | 219 | base.setBirthday(DateUtil.getyyyy_MM_dd(model.getBirth())); |
| 211 | - base.setDiagnose(model.getDiagnose()); | |
| 212 | - base.setHighRisk(model.getHighRisk()); //TODO | |
| 220 | + if (model.getDiagnose() != null) | |
| 221 | + { | |
| 222 | + //诊断 | |
| 223 | + List list = JsonUtil.toList(model.getDiagnose(),List.class); | |
| 224 | + List<Map> dlist = new ArrayList<>(); | |
| 225 | + if (CollectionUtils.isNotEmpty(list)) { | |
| 226 | + for (Object did : list) { | |
| 227 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 228 | + basicConfigQuery.setYn(YnEnums.YES.getId()); | |
| 229 | + basicConfigQuery.setId(String.valueOf(did)); | |
| 230 | + List<BasicConfig> datas = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 231 | + | |
| 232 | + if (CollectionUtils.isNotEmpty(datas)) { | |
| 233 | + Map map = new HashMap(); | |
| 234 | + map.put("id", did); | |
| 235 | + map.put("diagnose", datas.get(0).getName()); | |
| 236 | + dlist.add(map); | |
| 237 | + } | |
| 238 | + | |
| 239 | + | |
| 240 | + } | |
| 241 | + base.setDiagnose(dlist); | |
| 242 | + } | |
| 243 | + } | |
| 244 | + | |
| 245 | + | |
| 246 | + //母亲是否高危 | |
| 247 | + if (!StringUtils.isEmpty(model.getMcertNo())) | |
| 248 | + { | |
| 249 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 250 | + patientsQuery.setCardNo(model.getMcertNo()); | |
| 251 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 252 | + | |
| 253 | + | |
| 254 | + List listHighRisk = new ArrayList(); | |
| 255 | + List<Patients> list = patientsService.queryPatient(patientsQuery); | |
| 256 | + Patients patients = null; | |
| 257 | + if (CollectionUtils.isNotEmpty(list)) { | |
| 258 | + patients = list.get(0); | |
| 259 | + | |
| 260 | + AntExChuQuery antExChuQuery=new AntExChuQuery(); | |
| 261 | + antExChuQuery.setParentId(patients.getId()); | |
| 262 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 263 | + //查询产前检查记录 | |
| 264 | + List checkList = antenatalExaminationService.findAllByParentId(patients.getId()); | |
| 265 | + | |
| 266 | + String highRisk = ""; | |
| 267 | + if (CollectionUtils.isNotEmpty(checkList)) | |
| 268 | + { | |
| 269 | + AntenatalExaminationModel m = (AntenatalExaminationModel)checkList.get(0); | |
| 270 | + highRisk = m.getRiskFactor(); | |
| 271 | + } | |
| 272 | + else | |
| 273 | + { | |
| 274 | + | |
| 275 | + //获取初诊记录 | |
| 276 | + List<AntExChuModel> antExChulist = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 277 | + AntExChuModel antExChuModel=null; | |
| 278 | + if(CollectionUtils.isNotEmpty(antExChulist)){ | |
| 279 | + antExChuModel= antExChulist.get(0); | |
| 280 | + } | |
| 281 | + if (antExChuModel != null) | |
| 282 | + { | |
| 283 | + highRisk = antExChuModel.getHighrisk(); | |
| 284 | + } | |
| 285 | + | |
| 286 | + } | |
| 287 | + | |
| 288 | + if (!StringUtils.isEmpty(highRisk)) | |
| 289 | + { | |
| 290 | + listHighRisk = JsonUtil.toList(highRisk, List.class); | |
| 291 | + } | |
| 292 | + | |
| 293 | + if (CollectionUtils.isNotEmpty(listHighRisk)) | |
| 294 | + { | |
| 295 | + base.setHighRisk("高危"); | |
| 296 | + } | |
| 297 | + else | |
| 298 | + { | |
| 299 | + base.setHighRisk("正常"); | |
| 300 | + } | |
| 301 | + } | |
| 302 | + } | |
| 303 | + | |
| 304 | + | |
| 213 | 305 | base.setMremark(model.getMremark()); |
| 214 | 306 | base.setMphone(model.getMphone()); |
| 215 | 307 | base.setMname(model.getMname()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyBookbuildingAddRequest.java
View file @
453c95d
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.common.core.annotation.form.Form; |
| 4 | 4 | |
| 5 | +import java.util.List; | |
| 5 | 6 | import java.util.Map; |
| 6 | 7 | |
| 7 | 8 | /** |
| ... | ... | @@ -131,7 +132,7 @@ |
| 131 | 132 | //private String highRiskReason; |
| 132 | 133 | |
| 133 | 134 | //诊断 |
| 134 | - private String diagnose; | |
| 135 | + private List diagnose; | |
| 135 | 136 | |
| 136 | 137 | //是否高危 0 非高危 1高危 |
| 137 | 138 | private Integer highRisk; |
| 138 | 139 | |
| ... | ... | @@ -156,11 +157,11 @@ |
| 156 | 157 | this.serviceStatus = serviceStatus; |
| 157 | 158 | } |
| 158 | 159 | |
| 159 | - public String getDiagnose() { | |
| 160 | + public List getDiagnose() { | |
| 160 | 161 | return diagnose; |
| 161 | 162 | } |
| 162 | 163 | |
| 163 | - public void setDiagnose(String diagnose) { | |
| 164 | + public void setDiagnose(List diagnose) { | |
| 164 | 165 | this.diagnose = diagnose; |
| 165 | 166 | } |
| 166 | 167 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBasicResult.java
View file @
453c95d
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | +import java.util.List; | |
| 4 | +import java.util.Map; | |
| 5 | + | |
| 3 | 6 | /** |
| 4 | 7 | * Created by Administrator on 2016/6/20. |
| 5 | 8 | */ |
| 6 | 9 | |
| ... | ... | @@ -12,15 +15,15 @@ |
| 12 | 15 | //检查日期 |
| 13 | 16 | private String checkDate; |
| 14 | 17 | //诊断 |
| 15 | - private String diagnose; | |
| 18 | + private List<Map> diagnose; | |
| 16 | 19 | //生日 |
| 17 | 20 | private String birthday; |
| 18 | 21 | //母亲名称 |
| 19 | 22 | private String mname; |
| 20 | 23 | //联系方式 |
| 21 | 24 | private String mphone; |
| 22 | - //是否高危 0 非高危 1 高危 | |
| 23 | - private Integer highRisk; | |
| 25 | + //是否高危 孕妇 | |
| 26 | + private String highRisk; | |
| 24 | 27 | //备注 |
| 25 | 28 | private String mremark; |
| 26 | 29 | //性别 |
| 27 | 30 | |
| ... | ... | @@ -58,11 +61,11 @@ |
| 58 | 61 | this.name = name; |
| 59 | 62 | } |
| 60 | 63 | |
| 61 | - public String getDiagnose() { | |
| 64 | + public List<Map> getDiagnose() { | |
| 62 | 65 | return diagnose; |
| 63 | 66 | } |
| 64 | 67 | |
| 65 | - public void setDiagnose(String diagnose) { | |
| 68 | + public void setDiagnose(List<Map> diagnose) { | |
| 66 | 69 | this.diagnose = diagnose; |
| 67 | 70 | } |
| 68 | 71 | |
| 69 | 72 | |
| ... | ... | @@ -90,11 +93,11 @@ |
| 90 | 93 | this.mphone = mphone; |
| 91 | 94 | } |
| 92 | 95 | |
| 93 | - public Integer getHighRisk() { | |
| 96 | + public String getHighRisk() { | |
| 94 | 97 | return highRisk; |
| 95 | 98 | } |
| 96 | 99 | |
| 97 | - public void setHighRisk(Integer highRisk) { | |
| 100 | + public void setHighRisk(String highRisk) { | |
| 98 | 101 | this.highRisk = highRisk; |
| 99 | 102 | } |
| 100 | 103 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBuildResult.java
View file @
453c95d
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | +import java.util.List; | |
| 3 | 4 | import java.util.Map; |
| 4 | 5 | |
| 5 | 6 | /** |
| ... | ... | @@ -121,7 +122,7 @@ |
| 121 | 122 | //private String highRiskReason; |
| 122 | 123 | |
| 123 | 124 | //诊断 |
| 124 | - private String diagnose; | |
| 125 | + private List diagnose; | |
| 125 | 126 | |
| 126 | 127 | //是否高危 0 非高危 1高危 |
| 127 | 128 | private Integer highRisk; |
| 128 | 129 | |
| 129 | 130 | |
| ... | ... | @@ -171,15 +172,14 @@ |
| 171 | 172 | // this.highRiskReason = highRiskReason; |
| 172 | 173 | // } |
| 173 | 174 | |
| 174 | - public String getDiagnose() { | |
| 175 | + | |
| 176 | + public List getDiagnose() { | |
| 175 | 177 | return diagnose; |
| 176 | 178 | } |
| 177 | 179 | |
| 178 | - public void setDiagnose(String diagnose) { | |
| 180 | + public void setDiagnose(List diagnose) { | |
| 179 | 181 | this.diagnose = diagnose; |
| 180 | 182 | } |
| 181 | - | |
| 182 | - | |
| 183 | 183 | |
| 184 | 184 | public Integer getHospitalId() { |
| 185 | 185 | return hospitalId; |