Commit 2be002f5e8e4ab22375118709384057c68bed59f

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 5 changed files

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PremaritalCheckupFacade.java View file @ 2be002f
... ... @@ -268,7 +268,10 @@
268 268  
269 269 checkupResult.setJiaZhuangXian(result.getJiaZhuangXian());
270 270 checkupResult.setJiaZhuangXianDetails(result.getJiaZhuangXianDetails());
  271 + checkupResult.setXiongKuo(result.getXiongKuo());
  272 + checkupResult.setXiongKuoDetails(result.getXiongKuoDetails());
271 273 checkupResult.setFei(result.getFei());
  274 + checkupResult.setFeiDetails(result.getFeiDetails());
272 275 checkupResult.setHeartRate(result.getHeartRate());
273 276 checkupResult.setHeartRhythm(result.getHeartRhythm());
274 277 checkupResult.setZaYin(result.getZaYin());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 2be002f
... ... @@ -23,10 +23,7 @@
23 23 import org.springframework.beans.factory.annotation.Autowired;
24 24 import org.springframework.stereotype.Component;
25 25  
26   -import java.util.ArrayList;
27   -import java.util.HashMap;
28   -import java.util.List;
29   -import java.util.Map;
  26 +import java.util.*;
30 27  
31 28 /**
32 29 * Created by Administrator on 2017/1/16 0016.
33 30  
34 31  
... ... @@ -120,13 +117,30 @@
120 117  
121 118 /* 院内信息 */
122 119 map.put("lastMenses", DateUtil.getyyyy_MM_dd(data.getLastMenses()));
  120 + //孕周(用末次月经去计算)
  121 + map.put("lastMensesWeek", ResolveUtils.getPregnancyWeek(data.getLastMenses(),new Date()));
123 122 //纠正末次月经,取末次月经数据
124 123 map.put("correctionLastMenses", DateUtil.getyyyy_MM_dd(data.getLastMenses()));
  124 + //纠正末次月经孕周
  125 + map.put("correctionLastMensesWeek", ResolveUtils.getPregnancyWeek(data.getLastMenses(),new Date()));
  126 +
125 127 map.put("dueDate", DateUtil.getyyyy_MM_dd(data.getDueDate()));
126 128 map.put("vcCardNo", data.getVcCardNo());
127 129 //条码(暂时去掉)
128 130 //档案编号
129 131 map.put("fileCode", data.getFileCode());
  132 + //建档医生
  133 + String bookbuildingDoctor = "";
  134 + if (StringUtils.isNotEmpty(data.getBookbuildingDoctor()) && FunvCommonUtil.isNumeric(data.getBookbuildingDoctor())){
  135 + Users users = usersService.getUsers(Integer.parseInt(data.getBookbuildingDoctor()));
  136 + if (users!=null && users.getYn()==YnEnums.YES.getId()){
  137 + bookbuildingDoctor = users.getName();
  138 + }
  139 + }
  140 + map.put("bookbuildingDoctor", bookbuildingDoctor);
  141 + //建档日期
  142 + map.put("bookbuildingDate", DateUtil.getyyyy_MM_dd(data.getBookbuildingDate()));
  143 +
130 144 map.put("mremark", data.getMremark());
131 145 //服务类型
132 146 String serviceType = "";
... ... @@ -157,7 +171,6 @@
157 171 return "";
158 172 }
159 173  
160   -
161 174 private void getRisk(String highRisk,String oRisk,Map<String,Object> map){
162 175 HighScoreResult highScoreResult = null;
163 176 if (StringUtils.isNotEmpty(highRisk)){
... ... @@ -246,7 +259,8 @@
246 259 map.put("birth", DateUtil.getyyyy_MM_dd(patients.getBirth()));
247 260 map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI));
248 261 map.put("phone",patients.getPhone());
249   - map.put("fmWeek",patients.getFmWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(patients.getFmWeek()));
  262 + //基本信息孕周
  263 + map.put("fmWeek", ResolveUtils.getPregnancyWeek(patients.getLastMenses(),new Date()));
250 264 map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
251 265 map.put("mremark",patients.getMremark());
252 266  
... ... @@ -256,7 +270,7 @@
256 270 //产检基本信息
257 271 map.put("checkDate",DateUtil.getyyyy_MM_dd(data.getCheckTime()));
258 272 //产检孕周
259   - map.put("cDueWeek",data.getcDueWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(Integer.parseInt(data.getcDueWeek())));
  273 + map.put("cDueWeek", ResolveUtils.getPregnancyWeek(patients.getLastMenses(),data.getCheckTime()));
260 274 String checkDoctor = "";
261 275  
262 276 if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getProdDoctor())){
... ... @@ -274,6 +288,8 @@
274 288 }
275 289 }
276 290 map.put("hospital", hospital);
  291 + //产检劵
  292 + map.put("barCode", data.getBarCode());
277 293 map.put("nextCheckTime",DateUtil.getyyyy_MM_dd(data.getNextCheckTime()));
278 294 /* 初诊信息 */
279 295 //既往史
280 296  
... ... @@ -332,13 +348,31 @@
332 348 cestationInfo = FunvCommonUtil.replace(map1,new StringBuilder(),basicConfigService);
333 349 }
334 350 map.put("cestationInfo", cestationInfo);
335   -
  351 + //丈夫健康情况
  352 + String hHealthInfo = "";
  353 + Map<String, String> hHealthInfoMap = JsonUtil.getMap(data.gethHealthInfo());
  354 + if (MapUtils.isNotEmpty(hHealthInfoMap)){
  355 + if (hHealthInfoMap.get("yesOrNo").equals("yes")){
  356 + hHealthInfo = "健康";
  357 + }else if (hHealthInfoMap.get("yesOrNo").equals("no")){
  358 + hHealthInfo = hHealthInfoMap.get("qt");
  359 + }
  360 + }
  361 + map.put("hHealthInfo", hHealthInfo);
336 362 //孕产史
337 363 map.put("pregnancyTimes", UnitUtils.unitSplice(data.getPregnancyTimes(), UnitConstants.CI));
338 364 map.put("prodTime", UnitUtils.unitSplice(data.getProdTime(),UnitConstants.CI));
339 365 map.put("delivery", UnitUtils.unitSplice(data.getDelivery(),UnitConstants.CI));
340 366 map.put("planedProd", UnitUtils.unitSplice(data.getPlanedProd(),UnitConstants.CI));
341   - map.put("abortion", UnitUtils.unitSplice(data.getAbortion(),UnitConstants.CI));
  367 + //流产
  368 + String abortion = "";
  369 + abortion = UnitUtils.unitSplice(data.getAbortion(),UnitConstants.CI) == null ? "" : (UnitUtils.unitSplice(data.getAbortion(),UnitConstants.CI) + " (自然:" + data.getAbortionZR() + UnitConstants.CI + " 人工:" +
  370 + data.getAbortionRG() + UnitConstants.CI + ")");
  371 + map.put("abortion", abortion);
  372 +
  373 + /*map.put("abortion", UnitUtils.unitSplice(data.getAbortion(),UnitConstants.CI) + " (自然:" + data.getAbortionZR() + UnitConstants.CI + " 人工:" +
  374 + data.getAbortionRG() + UnitConstants.CI);*/
  375 +
342 376 map.put("stillbirth", UnitUtils.unitSplice(data.getStillbirth(),UnitConstants.CI));
343 377 map.put("stillChan", UnitUtils.unitSplice(data.getStillChan(),UnitConstants.CI));
344 378 map.put("neoDeath", UnitUtils.unitSplice(data.getNeoDeath(),UnitConstants.CI));
... ... @@ -346,6 +380,7 @@
346 380  
347 381 map.put("height", UnitUtils.unitSplice(data.getHeight(),UnitConstants.CM));
348 382 map.put("weight", UnitUtils.unitSplice(data.getWeight(),UnitConstants.KG));
  383 + map.put("baricIndex", data.getBaricIndex());
349 384 map.put("yqWeight", UnitUtils.unitSplice(data.getYqWeight(),UnitConstants.KG));
350 385 // 血压
351 386 String ssy = "";
... ... @@ -396,6 +431,10 @@
396 431 fetalPresentation += placenta.getFetalPresentation() == null ? "" : placenta.getFetalPresentation();
397 432 //胎心率
398 433 heartRate += placenta.getHeartRate() == null ? "" : placenta.getHeartRate().toString();
  434 +
  435 + Integer a = (int)Double.parseDouble(heartRate);
  436 + heartRate = String.valueOf(a);
  437 +
399 438 join = placenta.getJoin();
400 439 }
401 440  
... ... @@ -411,6 +450,10 @@
411 450 }
412 451 }
413 452 heartRate += placenta.get("heartRate") == null ? "" : placenta.get("heartRate");
  453 +
  454 + Integer a = (int)Double.parseDouble(heartRate);
  455 + heartRate = String.valueOf(a);
  456 +
414 457 fetalPresentation += placenta.get("fetalPresentation") == null ? "" : placenta.get("fetalPresentation");
415 458 join = placenta.get("join");
416 459 }
417 460  
418 461  
419 462  
... ... @@ -432,24 +475,24 @@
432 475 map.put("platelet",UnitUtils.unitSplice(data.getPlatelet(),UnitConstants.TEN_LKG));
433 476 map.put("chgOther",data.getChgOther());
434 477  
435   - map.put("ndb",data.getNdb());
  478 + map.put("ndb",FunvCommonUtil.checkYiGan(data.getNdb()));
436 479 map.put("nt",data.getNt());
437 480 map.put("urineKetone",data.getUrineKetone());
438 481 map.put("bld",data.getBld());
439 482 map.put("ncgOther",data.getNcgOther());
440 483  
441 484 map.put("abo",FunvCommonUtil.getBaseicConfigByid(data.getAbo(), basicConfigService));
442   - map.put("rh",data.getRh());
443   - map.put("bloodSugar",data.getBloodSugar());
  485 + map.put("rh",FunvCommonUtil.checkYiGan(data.getRh()));
  486 + map.put("bloodSugar",UnitUtils.unitSplice(data.getBloodSugar(),UnitConstants.MMOLL));
444 487 map.put("xqgbzam",UnitUtils.unitSplice(data.getXqgbzam(), UnitConstants.UL));
445 488 map.put("xqgczam",UnitUtils.unitSplice(data.getXqgczam(), UnitConstants.UL));
446 489 map.put("albumin",UnitUtils.unitSplice(data.getAlbumin(), UnitConstants.GL));
447 490 map.put("totalBilirubin",UnitUtils.unitSplice(data.getTotalBilirubin(), UnitConstants.UMOLL));
448 491 map.put("jhBilirubin",UnitUtils.unitSplice(data.getJhBilirubin(), UnitConstants.UMOLL));
449   - map.put("bg",data.getBg());
  492 + map.put("bg",FunvCommonUtil.checkYiGan(data.getBg()));
450 493  
451 494 map.put("ygbmky",FunvCommonUtil.checkYiGan(data.getYgbmky()));
452   - map.put("ygbmkt",FunvCommonUtil.checkYiGan(data.getYgbmky()));
  495 + map.put("ygbmkt",FunvCommonUtil.checkYiGan(data.getYgbmkt()));
453 496 map.put("ygeky",FunvCommonUtil.checkYiGan(data.getYgeky()));
454 497 map.put("ygekt",FunvCommonUtil.checkYiGan(data.getYgekt()));
455 498 map.put("yghxkt",FunvCommonUtil.checkYiGan(data.getYghxkt()));
456 499  
457 500  
458 501  
... ... @@ -544,14 +587,16 @@
544 587 map.put("id",data.getId());
545 588 map.put("username",patients.getUsername());
546 589 map.put("birth",DateUtil.getyyyy_MM_dd(patients.getBirth()));
547   - map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI));
  590 + map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()), UnitConstants.SUI));
548 591 map.put("phone",patients.getPhone());
549   - map.put("fmWeek",patients.getFmWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(patients.getFmWeek()));
  592 + map.put("fmWeek", ResolveUtils.getPregnancyWeek(patients.getLastMenses(), new Date()));
550 593 map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
551 594 map.put("mremark",patients.getMremark());
552 595  
553   - getRisk(data.getRiskFactor(),data.getOtherRisk(),map);
  596 + map.put("barCode",data.getBarCode());
554 597  
  598 + getRisk(data.getRiskFactor(), data.getOtherRisk(), map);
  599 +
555 600 //产检基本信息
556 601 map.put("checkDate",DateUtil.getyyyy_MM_dd(data.getCheckDate()));
557 602 map.put("currentDueDate",data.getCurrentDueDate());
... ... @@ -575,7 +620,8 @@
575 620 }
576 621 map.put("hospital", hospital);
577 622 map.put("nextCheckTime",DateUtil.getyyyy_MM_dd(data.getNextCheckTime()));
578   - map.put("cDueWeek", data.getcDueWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(Integer.parseInt(data.getcDueWeek())));
  623 + map.put("cDueWeek",ResolveUtils.getPregnancyWeek(patients.getLastMenses(),data.getCheckDate()));
  624 +// map.put("cDueWeek", data.getcDueWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(Integer.parseInt(data.getcDueWeek())));
579 625  
580 626 /* 复诊信息 */
581 627 map.put("chiefComplaint", data.getChiefComplaint());
... ... @@ -625,7 +671,7 @@
625 671 /* 辅助信息 */
626 672 map.put("hemoglobin", UnitUtils.unitSplice(data.getHemoglobin(), UnitConstants.GL));
627 673 map.put("urineProtein",data.getUrineProtein());
628   - map.put("bloodSugar", UnitUtils.unitSplice(data.getUrineProtein(), UnitConstants.MMOLL));
  674 + map.put("bloodSugar", UnitUtils.unitSplice(data.getBloodSugar(), UnitConstants.MMOLL));
629 675 map.put("bChao",data.getbChao());
630 676  
631 677 /* 诊断指导 */
... ... @@ -1325,8 +1371,6 @@
1325 1371 br.setData(map);
1326 1372 return br;
1327 1373 }
1328   -
1329   -
1330 1374  
1331 1375 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java View file @ 2be002f
... ... @@ -168,7 +168,7 @@
168 168 content.put("jsjbs", "精神疾病史");
169 169 content.put("xtjx", "先天畸形");
170 170 content.put("xtyx", "先天愚型");
171   - content.put("ny", "聋哑");
  171 + content.put("ly", "聋哑");
172 172 content.put("mr", "盲人");
173 173 content.put("cel", "唇腭裂");
174 174 content.put("xyb", "血友病");
175 175  
176 176  
177 177  
178 178  
179 179  
180 180  
... ... @@ -177,27 +177,66 @@
177 177 content.put("st", "双胎");
178 178 content.put("gb", "肝病");
179 179 content.put("jh", "结核");
  180 + content.put("gxy", "高血压");
  181 + content.put("tnb", "糖尿病");
180 182  
181 183 content.put("xy", "吸烟");
182 184 content.put("yj", "饮酒");
183 185 content.put("fyyw", "服用药物");
184   - content.put("jcydyhwz", "接触有毒有害物质");
  186 + content.put("jcydwz", "接触有毒有害物质");
185 187 content.put("jcfsx", "接触放射线");
186 188  
  189 + content.put("fzym", "风疹疫苗");
  190 + content.put("ygym", "乙肝疫苗");
  191 + content.put("mzym", "麻疹疫苗");
  192 + content.put("psfym", "破伤风疫苗");
  193 +
187 194 content.put("qmsgm", "青霉素过敏");
188 195 content.put("xfmsgm", "先锋霉素过敏");
189   - content.put("halywgm", "磺胺类药物过敏");
  196 + content.put("halyw", "磺胺类药物过敏");
  197 + content.put("tb", "头孢");
190 198  
  199 + content.put("pgc", "剖宫产");
  200 + content.put("zgjlbc", "子宫肌瘤剥除");
  201 + content.put("lwqc", "阑尾切除");
  202 + content.put("ywrsss", "异位妊娠手术");
  203 +
  204 + content.put("yq1", "孕前1个月");
  205 + content.put("yq2", "孕前2个月");
  206 + content.put("yq3", "孕前3个月");
  207 + content.put("yzq1", "孕早期1个月");
  208 + content.put("yzq2", "孕早期2个月");
  209 + content.put("yzq3", "孕早期3个月");
  210 +
  211 + content.put("ex", "恶心");
  212 + content.put("ot", "呕吐");
  213 + content.put("yh", "眼花");
  214 + content.put("xm", "胸闷");
  215 + content.put("fz", "浮肿");
  216 + content.put("ydcx", "阴道出血");
  217 + content.put("ft", "腹痛");
  218 + content.put("tt", "头痛");
  219 + content.put("ft", "腹痛");
  220 +
191 221 jiwangshicontent.put("26cac65c-a040-4898-b7da-8deed3ba0ec3", "循环系统类");
192 222 jiwangshicontent.put("b26889c5-d2a7-4ae1-af32-84f92440e05f", "呼吸系统类");
193 223 jiwangshicontent.put("e6e5daab-5912-4465-91dc-030263c7f4c2", "泌尿系统类");
194 224 jiwangshicontent.put("7d0c5625-966b-46cc-8642-6567b18f65a0", "消化系统类");
195 225 jiwangshicontent.put("d5de523a-9243-4eeb-9849-15fcf7d55f15", "代谢营养类");
  226 + jiwangshicontent.put("fc5d5131-2fdc-4340-a26e-479efbca9e4d", "内分泌系统类");
  227 + jiwangshicontent.put("efeae2f4-13ea-4c7d-a7b5-5e50ef3a0978", "血液系统类");
196 228 jiwangshicontent.put("57e4bedbf0f0baa1bee496cd", "其他");
197 229 }
198 230  
199 231 private static final String YES_OR_NO = "yesOrNo";
200 232  
  233 + /**
  234 + * 解析病史方法(注意:逗号使用的是中文逗号)
  235 + * @param map
  236 + * @param sb
  237 + * @param basicConfigService
  238 + * @return
  239 + */
201 240 public static String replace(Map map, StringBuilder sb,BasicConfigService basicConfigService) {
202 241 if (null == map) {
203 242 return null;
... ... @@ -212,7 +251,7 @@
212 251 }
213 252 if ("true".equals(ma.getValue() + "")) {
214 253 if (content.containsKey(ma.getKey())) {
215   - sb.append(content.get(ma.getKey())).append(',');
  254 + sb.append(content.get(ma.getKey())).append('');
216 255 }
217 256 }
218 257 if (jiwangshicontent.containsKey(ma.getKey())){
219 258  
... ... @@ -257,10 +296,10 @@
257 296 for (String id : ids){
258 297 BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(id);
259 298 if (basicConfig!=null){
260   - sb.append(basicConfig.getName()).append(",");
  299 + sb.append(basicConfig.getName()).append("");
261 300 }
262 301 }
263   - if (sb.toString().endsWith(",")) {
  302 + if (sb.toString().endsWith("")) {
264 303 String ss = sb.substring(0, sb.length() - 1);
265 304 sb = new StringBuilder(ss);
266 305 }
... ... @@ -277,7 +316,7 @@
277 316 if (map.containsKey("qtText")) {
278 317 sb.append(map.get("qtText"));
279 318 }
280   - if (sb.toString().endsWith(",")) {
  319 + if (sb.toString().endsWith("")) {
281 320 return sb.substring(0, sb.length() - 1);
282 321 }
283 322 } else if ("no".equals(map.get(YES_OR_NO))) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/ResolveUtils.java View file @ 2be002f
... ... @@ -2,6 +2,7 @@
2 2  
3 3 import com.lyms.platform.biz.service.BasicConfigService;
4 4 import com.lyms.platform.common.enums.RiskDefaultTypeEnum;
  5 +import com.lyms.platform.common.utils.DateUtil;
5 6 import com.lyms.platform.common.utils.JsonUtil;
6 7 import com.lyms.platform.operate.web.result.HighScoreResult;
7 8 import com.lyms.platform.pojo.BasicConfig;
... ... @@ -334,6 +335,17 @@
334 335 return mapList;
335 336 }
336 337  
  338 + //返回孕周(需要计算)
  339 + public static String getPregnancyWeek(Date start,Date end){
  340 +
  341 + int day = DateUtil.daysBetween(start,end);
  342 +
  343 + if (day==-1){
  344 + return "";
  345 + }
  346 +
  347 + return com.lyms.platform.common.utils.StringUtils.dueWeek(day);
  348 + }
337 349  
338 350  
339 351  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/UnitConstants.java View file @ 2be002f
... ... @@ -16,7 +16,7 @@
16 16 public static final String MMOLL = " mmol/L";
17 17 public static final String CI = " 次";
18 18 public static final String UL = " U/L";
19   - public static final String TEN_LKG = " 10^9/Lkg";
  19 + public static final String TEN_LKG = " 10^9/L";
20 20 public static final String UMOLL = " umol/L";
21 21 public static final String ZHEN = " 针";
22 22 public static final String ML = " ml";