Commit a37384d63797d7234f631f0eb4b69036fd60bf97
1 parent
1b4e772fe3
Exists in
master
and in
6 other branches
出院小结同步儿童高危
Showing 3 changed files with 79 additions and 9 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
a37384d
| ... | ... | @@ -942,7 +942,7 @@ |
| 942 | 942 | public synchronized void setRiskCode(BabyModel model) |
| 943 | 943 | { |
| 944 | 944 | //高危儿童才设置编号 |
| 945 | - if (model.getHighRisk() != null && model.getHighRisk() == 1) | |
| 945 | + if ("216".equals(model.getHospitalId()) && model.getHighRisk() != null && model.getHighRisk() == 1) | |
| 946 | 946 | { |
| 947 | 947 | Long result = Long.valueOf(DateUtil.getYearStr()+"1"); |
| 948 | 948 | BabyModelQuery babyQuery = new BabyModelQuery(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.java
View file @
a37384d
| ... | ... | @@ -17,10 +17,7 @@ |
| 17 | 17 | import com.lyms.platform.permission.service.CouponService; |
| 18 | 18 | import com.lyms.platform.permission.service.UsersService; |
| 19 | 19 | import com.lyms.platform.pojo.*; |
| 20 | -import com.lyms.platform.query.BabyModelQuery; | |
| 21 | -import com.lyms.platform.query.DischargeAbstractBabyQuery; | |
| 22 | -import com.lyms.platform.query.DischargeAbstractMotherQuery; | |
| 23 | -import com.lyms.platform.query.PatientsQuery; | |
| 20 | +import com.lyms.platform.query.*; | |
| 24 | 21 | import org.apache.commons.collections.CollectionUtils; |
| 25 | 22 | import org.apache.commons.lang3.StringUtils; |
| 26 | 23 | import org.springframework.beans.factory.annotation.Autowired; |
| 27 | 24 | |
| ... | ... | @@ -53,8 +50,9 @@ |
| 53 | 50 | |
| 54 | 51 | @Autowired |
| 55 | 52 | private AutoMatchFacade autoMatchFacade; |
| 56 | - | |
| 57 | 53 | @Autowired |
| 54 | + private BasicConfigService basicConfigService; | |
| 55 | + @Autowired | |
| 58 | 56 | private BabyService babyService; |
| 59 | 57 | |
| 60 | 58 | @Autowired |
| 61 | 59 | |
| ... | ... | @@ -77,9 +75,23 @@ |
| 77 | 75 | @Autowired |
| 78 | 76 | private MongoTemplate mongoTemplate; |
| 79 | 77 | |
| 80 | - @Autowired | |
| 81 | - private OrganizationGroupsFacade groupsFacade; | |
| 78 | + static Map<String,String> datas = new HashMap<>(); | |
| 79 | + static { | |
| 80 | + datas.put("zce",""); | |
| 81 | + datas.put("zdyybl",""); | |
| 82 | + datas.put("xzb",""); | |
| 83 | + datas.put("hxdgr",""); | |
| 84 | + datas.put("dcstze",""); | |
| 85 | + datas.put("gl",""); | |
| 86 | + datas.put("xsedxt",""); | |
| 87 | + datas.put("zdpx",""); | |
| 88 | + datas.put("fp",""); | |
| 89 | + datas.put("zx",""); | |
| 90 | + datas.put("qt",""); | |
| 91 | + } | |
| 82 | 92 | |
| 93 | + | |
| 94 | + | |
| 83 | 95 | public DischargeAbstractSaveResult save(DischargeAbstractSaveRequest dischargeAbstractSaveRequest, Integer userId) { |
| 84 | 96 | |
| 85 | 97 | DischargeAbstractSaveResult dischargeAbstractSaveResult = new DischargeAbstractSaveResult(); |
| 86 | 98 | |
| ... | ... | @@ -250,7 +262,64 @@ |
| 250 | 262 | } |
| 251 | 263 | |
| 252 | 264 | |
| 265 | + if(babyModel.getHighRisk() == null && dabm.getIsHighRisk() != null){ //是否是高危儿童 | |
| 266 | + if ("yes".equals(dabm.getIsHighRisk())) | |
| 267 | + { | |
| 268 | + babyModel.setHighRisk(1); | |
| 269 | + if (dabm.getHighRiskResult() != null && dabm.getHighRiskResult().size() > 0) | |
| 270 | + { | |
| 271 | + Map<String, Object> riskMap = dabm.getHighRiskResult(); | |
| 272 | + babyModel.setHighRiskInfo(getRiskId(riskMap)); | |
| 273 | + } | |
| 274 | + } | |
| 275 | + else if ("no".equals(dabm.getIsHighRisk())) | |
| 276 | + { | |
| 277 | + babyModel.setHighRisk(0); | |
| 278 | + } | |
| 279 | + } | |
| 280 | + | |
| 281 | + | |
| 253 | 282 | return babyModel; |
| 283 | + } | |
| 284 | + | |
| 285 | + | |
| 286 | + private List<String> getRiskId(Map<String, Object> riskMap) | |
| 287 | + { | |
| 288 | + List<String> risks = new ArrayList<>(); | |
| 289 | + for (String key : datas.keySet()) | |
| 290 | + { | |
| 291 | + Object value = riskMap.get(key); | |
| 292 | + if (value != null && "true".equals(value.toString())) | |
| 293 | + { | |
| 294 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 295 | + basicConfigQuery.setEnable(1); | |
| 296 | + basicConfigQuery.setTypeId("5b18f8a7422b03d4ad2bf913"); | |
| 297 | + //处理其他自己填写的情况 | |
| 298 | + if ("qt".equals(key)) | |
| 299 | + { | |
| 300 | + Object qtText = riskMap.get("qtText"); | |
| 301 | + if (qtText != null && com.lyms.platform.common.utils.StringUtils.isNotEmpty(qtText.toString())) | |
| 302 | + { | |
| 303 | + basicConfigQuery.setName(qtText.toString()); | |
| 304 | + //所有数据 | |
| 305 | + List<BasicConfig> basicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 306 | + if (CollectionUtils.isNotEmpty(basicConfigList)) { | |
| 307 | + risks.add(basicConfigList.get(0).getId()); | |
| 308 | + } | |
| 309 | + } | |
| 310 | + } | |
| 311 | + else | |
| 312 | + { | |
| 313 | + basicConfigQuery.setName(datas.get(key)); | |
| 314 | + //所有数据 | |
| 315 | + List<BasicConfig> basicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 316 | + if (CollectionUtils.isNotEmpty(basicConfigList)) { | |
| 317 | + risks.add(basicConfigList.get(0).getId()); | |
| 318 | + } | |
| 319 | + } | |
| 320 | + } | |
| 321 | + } | |
| 322 | + return risks; | |
| 254 | 323 | } |
| 255 | 324 | |
| 256 | 325 | public DischargeAbstractQueryResult query(DischargeAbstractQueryRequest dischargeAbstractSaveRequest) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/BabyListTask.java
View file @
a37384d
| ... | ... | @@ -189,7 +189,8 @@ |
| 189 | 189 | result.setFmHospitalName(fmHospitalName); |
| 190 | 190 | |
| 191 | 191 | result.setOpenDisease(model.getOpenDisease() == null || "1".equals(model.getOpenDisease()) ? "未开通" : "开通"); |
| 192 | - | |
| 192 | + result.setCardNo(model.getCardNo()); | |
| 193 | + result.setVcCardNo(model.getVcCardNo()); | |
| 193 | 194 | list.add(result); |
| 194 | 195 | } |
| 195 | 196 | } |