Commit 2849a8e992c62c3da1bc32b4e47b9cc6c5f7a1a8
1 parent
f4386f7c40
Exists in
master
and in
6 other branches
修改初诊高危因素
Showing 1 changed file with 93 additions and 45 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
2849a8e
| ... | ... | @@ -151,7 +151,50 @@ |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | |
| 154 | + private void getRisk(String highRisk,String oRisk,Map<String,Object> map){ | |
| 155 | + HighScoreResult highScoreResult = null; | |
| 156 | + if (StringUtils.isNotEmpty(highRisk)){ | |
| 157 | + List<String> ids = JsonUtil.toList(highRisk, String.class); | |
| 158 | + if (CollectionUtils.isNotEmpty(ids)){ | |
| 159 | + highScoreResult = ResolveUtils.queryRisk(ids, true, basicConfigService); | |
| 160 | + } | |
| 161 | + } | |
| 162 | + Integer score = 0; | |
| 163 | + if (highScoreResult.getScore()!=null){ | |
| 164 | + score = highScoreResult.getScore(); | |
| 165 | + } | |
| 154 | 166 | |
| 167 | + List<Map<String, Object>> list = ResolveUtils.queryHighRisk(highScoreResult); | |
| 168 | + | |
| 169 | + Map<String,Object> otherRisk = null; | |
| 170 | + if (StringUtils.isNotEmpty(oRisk) && !"{}".equals(oRisk)){ | |
| 171 | + otherRisk = new HashMap<>(); | |
| 172 | + ResolveUtils.queryOtherRisk(oRisk,otherRisk,basicConfigService); | |
| 173 | + } | |
| 174 | + | |
| 175 | + Map<String,Object> otherMap = new HashMap<>(); | |
| 176 | + | |
| 177 | + if (otherRisk!=null){ | |
| 178 | + if (otherRisk.get("name")!=null){ | |
| 179 | + otherMap.put("name",otherRisk.get("name")); | |
| 180 | + } | |
| 181 | + if (otherRisk.get("color")!=null){ | |
| 182 | + otherMap.put("color",otherRisk.get("color")); | |
| 183 | + } | |
| 184 | + if (otherRisk.get("score")!=null){ | |
| 185 | + String s = (String)otherRisk.get("score"); | |
| 186 | + if (FunvCommonUtil.isNumeric(s)){ | |
| 187 | + score = score + Integer.parseInt(s); | |
| 188 | + } | |
| 189 | + } | |
| 190 | + list.add(otherMap); | |
| 191 | + } | |
| 192 | + | |
| 193 | + map.put("score",UnitUtils.unitSplice(score,UnitConstants.FEN)); | |
| 194 | + map.put("highRisk",list); | |
| 195 | + } | |
| 196 | + | |
| 197 | + | |
| 155 | 198 | public BaseObjectResponse findAntExChu(String id){ |
| 156 | 199 | |
| 157 | 200 | BaseObjectResponse br = new BaseObjectResponse(); |
| 158 | 201 | |
| ... | ... | @@ -195,47 +238,49 @@ |
| 195 | 238 | map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
| 196 | 239 | map.put("mremark",patients.getMremark()); |
| 197 | 240 | |
| 198 | - HighScoreResult highScoreResult = null; | |
| 199 | - if (StringUtils.isNotEmpty(data.getHighrisk())){ | |
| 200 | - List<String> ids = JsonUtil.toList(data.getHighrisk(), String.class); | |
| 201 | - if (CollectionUtils.isNotEmpty(ids)){ | |
| 202 | - highScoreResult = ResolveUtils.queryRisk(ids, true, basicConfigService); | |
| 203 | - } | |
| 204 | - } | |
| 205 | - Integer score = 0; | |
| 206 | - if (highScoreResult.getScore()!=null){ | |
| 207 | - score = highScoreResult.getScore(); | |
| 208 | - } | |
| 241 | + //处理高危因素 | |
| 242 | + getRisk(data.getHighrisk(),data.getOtherHighRisk(),map); | |
| 243 | +// HighScoreResult highScoreResult = null; | |
| 244 | +// if (StringUtils.isNotEmpty(data.getHighrisk())){ | |
| 245 | +// List<String> ids = JsonUtil.toList(data.getHighrisk(), String.class); | |
| 246 | +// if (CollectionUtils.isNotEmpty(ids)){ | |
| 247 | +// highScoreResult = ResolveUtils.queryRisk(ids, true, basicConfigService); | |
| 248 | +// } | |
| 249 | +// } | |
| 250 | +// Integer score = 0; | |
| 251 | +// if (highScoreResult.getScore()!=null){ | |
| 252 | +// score = highScoreResult.getScore(); | |
| 253 | +// } | |
| 254 | +// | |
| 255 | +// List<Map<String, Object>> list = ResolveUtils.queryHighRisk(highScoreResult); | |
| 256 | +// | |
| 257 | +// Map<String,Object> otherRisk = null; | |
| 258 | +// if (StringUtils.isNotEmpty(data.getOtherHighRisk()) && !"{}".equals(data.getOtherHighRisk())){ | |
| 259 | +// otherRisk = new HashMap<>(); | |
| 260 | +// ResolveUtils.queryOtherRisk(data.getOtherHighRisk(),otherRisk,basicConfigService); | |
| 261 | +// } | |
| 262 | +// | |
| 263 | +// Map<String,Object> otherMap = new HashMap<>(); | |
| 264 | +// | |
| 265 | +// if (otherRisk!=null){ | |
| 266 | +// if (otherRisk.get("name")!=null){ | |
| 267 | +// otherMap.put("name",otherRisk.get("name")); | |
| 268 | +// } | |
| 269 | +// if (otherRisk.get("color")!=null){ | |
| 270 | +// otherMap.put("color",otherRisk.get("color")); | |
| 271 | +// } | |
| 272 | +// if (otherRisk.get("score")!=null){ | |
| 273 | +// String s = (String)otherRisk.get("score"); | |
| 274 | +// if (FunvCommonUtil.isNumeric(s)){ | |
| 275 | +// score = score + Integer.parseInt(s); | |
| 276 | +// } | |
| 277 | +// } | |
| 278 | +// list.add(otherMap); | |
| 279 | +// } | |
| 280 | +// | |
| 281 | +// map.put("score",score); | |
| 282 | +// map.put("highRisk",list); | |
| 209 | 283 | |
| 210 | - List<Map<String, Object>> list = ResolveUtils.queryHighRisk(highScoreResult); | |
| 211 | - | |
| 212 | - Map<String,Object> otherRisk = null; | |
| 213 | - if (StringUtils.isNotEmpty(data.getOtherHighRisk()) && !"{}".equals(data.getOtherHighRisk())){ | |
| 214 | - otherRisk = new HashMap<>(); | |
| 215 | - ResolveUtils.queryOtherRisk(data.getOtherHighRisk(),otherRisk,basicConfigService); | |
| 216 | - } | |
| 217 | - | |
| 218 | - Map<String,Object> otherMap = new HashMap<>(); | |
| 219 | - | |
| 220 | - if (otherRisk!=null){ | |
| 221 | - if (otherRisk.get("name")!=null){ | |
| 222 | - otherMap.put("name",otherRisk.get("name")); | |
| 223 | - } | |
| 224 | - if (otherRisk.get("color")!=null){ | |
| 225 | - otherMap.put("color",otherRisk.get("color")); | |
| 226 | - } | |
| 227 | - if (otherRisk.get("score")!=null){ | |
| 228 | - String s = (String)otherRisk.get("score"); | |
| 229 | - if (FunvCommonUtil.isNumeric(s)){ | |
| 230 | - score = score + Integer.parseInt(s); | |
| 231 | - } | |
| 232 | - } | |
| 233 | - list.add(otherMap); | |
| 234 | - } | |
| 235 | - | |
| 236 | - map.put("score",score); | |
| 237 | - map.put("highRisk",list); | |
| 238 | - | |
| 239 | 284 | //产检基本信息 |
| 240 | 285 | map.put("checkDate",DateUtil.getyyyy_MM_dd(data.getCheckTime())); |
| 241 | 286 | //TODO 产检孕周 |
| ... | ... | @@ -528,7 +573,10 @@ |
| 528 | 573 | map.put("fmWeek",patients.getFmWeek()); |
| 529 | 574 | map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
| 530 | 575 | map.put("mremark",patients.getMremark()); |
| 531 | - HighScoreResult highScoreResult = null; | |
| 576 | + | |
| 577 | + getRisk(data.getRiskFactor(),data.getOtherRisk(),map); | |
| 578 | + | |
| 579 | +/* HighScoreResult highScoreResult = null; | |
| 532 | 580 | if (StringUtils.isNotEmpty(data.getRiskFactor())){ |
| 533 | 581 | List<String> ids = JsonUtil.toList(data.getRiskFactor(), String.class); |
| 534 | 582 | if (CollectionUtils.isNotEmpty(ids)){ |
| ... | ... | @@ -541,7 +589,7 @@ |
| 541 | 589 | if (StringUtils.isNotEmpty(data.getOtherRisk()) && !"{}".equals(data.getOtherRisk())){ |
| 542 | 590 | ResolveUtils.queryOtherRisk(data.getOtherRisk(),otherRisk,basicConfigService); |
| 543 | 591 | } |
| 544 | - map.put("otherHighRisk",otherRisk); | |
| 592 | + map.put("otherHighRisk",otherRisk);*/ | |
| 545 | 593 | //产检基本信息 |
| 546 | 594 | map.put("checkDate",DateUtil.getyyyy_MM_dd(data.getCheckDate())); |
| 547 | 595 | map.put("currentDueDate",data.getCurrentDueDate()); |
| ... | ... | @@ -697,7 +745,7 @@ |
| 697 | 745 | highScoreResult = ResolveUtils.queryRisk(patients.getRiskFactorId(),true,basicConfigService); |
| 698 | 746 | } |
| 699 | 747 | |
| 700 | - map.put("riskFactor", highScoreResult); | |
| 748 | + map.put("riskFactor", ResolveUtils.queryHighRisk(highScoreResult)); | |
| 701 | 749 | map.put("riskScore", UnitUtils.unitSplice(patients.getRiskScore(),UnitConstants.FEN)); |
| 702 | 750 | |
| 703 | 751 | map.put("deliveryDate", data.getDueDate()); |
| ... | ... | @@ -1045,7 +1093,7 @@ |
| 1045 | 1093 | highScoreResult = ResolveUtils.queryRisk(patients.getRiskFactorId(),true,basicConfigService); |
| 1046 | 1094 | } |
| 1047 | 1095 | |
| 1048 | - map.put("riskFactor", highScoreResult); | |
| 1096 | + map.put("riskFactor", ResolveUtils.queryHighRisk(highScoreResult)); | |
| 1049 | 1097 | map.put("riskScore",UnitUtils.unitSplice(patients.getRiskScore(),UnitConstants.FEN)); |
| 1050 | 1098 | /* 复查信息 */ |
| 1051 | 1099 | map.put("checkTime",DateUtil.getyyyy_MM_dd(data.getCheckTime())); |
| ... | ... | @@ -1172,7 +1220,7 @@ |
| 1172 | 1220 | if (CollectionUtils.isNotEmpty(patients.getRiskFactorId())){ |
| 1173 | 1221 | highScoreResult = ResolveUtils.queryRisk(patients.getRiskFactorId(),true,basicConfigService); |
| 1174 | 1222 | } |
| 1175 | - map.put("riskFactor",highScoreResult); | |
| 1223 | + map.put("riskFactor",ResolveUtils.queryHighRisk(highScoreResult)); | |
| 1176 | 1224 | map.put("riskScore",UnitUtils.unitSplice(patients.getRiskScore(),UnitConstants.FEN)); |
| 1177 | 1225 | map.put("leaveHospitalDate", DateUtil.getyyyy_MM_dd(data.getLeaveHospitalDate())); |
| 1178 | 1226 | map.put("afterMakeBabyDays", data.getAfterMakeBabyDays()==null?"":"产后"+data.getAfterMakeBabyDays()+"天"); |