Commit 8a21b15b2d52b6ed4fc4a5add0ff1131f1d0ed4a

Authored by yangfei
1 parent 1ee5fb698a

初诊数据同步和根据时间查询

Showing 9 changed files with 700 additions and 313 deletions

platform-common/src/main/java/com/lyms/platform/common/constants/UnitConstants.java View file @ 8a21b15
... ... @@ -32,6 +32,8 @@
32 32 public static final String WENDU = " ℃";
33 33 public static final String WSSD = " IU/日";
34 34 public static final String DAY = " 天";
  35 + public static final String BMI = " Kg/m²";
  36 +
35 37  
36 38  
37 39 }
platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java View file @ 8a21b15
... ... @@ -297,11 +297,11 @@
297 297 }
298 298  
299 299  
300   - public static String unitHandle(String value, String unit) {
301   - if (org.apache.commons.lang.StringUtils.isNotEmpty(value)) {
302   - return value + unit;
  300 + public static String unitHandle(Object value, String unit) {
  301 + if (value==null || "/".equals(value)){
  302 + return null;
303 303 }
304   - return "";
  304 + return value.toString() + unit;
305 305 }
306 306  
307 307 public static <T> List<T> covertToList(String s, Class<T> clazz) {
platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java View file @ 8a21b15
... ... @@ -27,50 +27,9 @@
27 27 //该字段是针对聊城东昌区妇幼保健医院保存当天孕妇的lis检查项
28 28 private String lisCheckItems;
29 29  
30   -
31   - public Integer getFirst() {
32   - return first;
33   - }
34   -
35   - public void setFirst(Integer first) {
36   - this.first = first;
37   - }
38   -
39   - public String getLisCheckItems() {
40   - return lisCheckItems;
41   - }
42   -
43   - public void setLisCheckItems(String lisCheckItems) {
44   - this.lisCheckItems = lisCheckItems;
45   - }
46   -
47   - public String getGenRemark() {
48   - return genRemark;
49   - }
50   -
51   - public void setGenRemark(String genRemark) {
52   - this.genRemark = genRemark;
53   - }
54   -
55   - public String getGynRemark() {
56   - return gynRemark;
57   - }
58   -
59   - public void setGynRemark(String gynRemark) {
60   - this.gynRemark = gynRemark;
61   - }
62   -
63 30 /** 是否打印过 1=已打印 有这个字段就算打印 */
64 31 private Integer isPrient;
65 32  
66   - public Integer getIsPrient() {
67   - return isPrient;
68   - }
69   -
70   - public void setIsPrient(Integer isPrient) {
71   - this.isPrient = isPrient;
72   - }
73   -
74 33 /** 处理意见 */
75 34 private Map<String, List<String>> treatmentOpinion2;
76 35 private List<String> treatmentOpinion2Types;
... ... @@ -79,37 +38,6 @@
79 38 /** 胎动备注 */
80 39 private String quickenRemark;
81 40  
82   - public String getQuicken() {
83   - return quicken;
84   - }
85   -
86   - public void setQuicken(String quicken) {
87   - this.quicken = quicken;
88   - }
89   -
90   - public String getQuickenRemark() {
91   - return quickenRemark;
92   - }
93   -
94   - public void setQuickenRemark(String quickenRemark) {
95   - this.quickenRemark = quickenRemark;
96   - }
97   -
98   - public List<String> getTreatmentOpinion2Types() {
99   - return treatmentOpinion2Types;
100   - }
101   -
102   - public Map<String, List<String>> getTreatmentOpinion2() {
103   - return treatmentOpinion2;
104   - }
105   -
106   - public void setTreatmentOpinion2(Map<String, List<String>> treatmentOpinion2) {
107   - this.treatmentOpinion2 = treatmentOpinion2;
108   - }
109   -
110   - public void setTreatmentOpinion2Types(List<String> treatmentOpinion2Types) {
111   - this.treatmentOpinion2Types = treatmentOpinion2Types;
112   - }
113 41 //条码
114 42 private String barCode;
115 43 private String id;
... ... @@ -132,6 +60,7 @@
132 60 //末次月经
133 61 private Date lastMenses;
134 62 private String cDueWeek;
  63 + //丙肝
135 64 private String bg;
136 65 // 既往史
137 66 private String pastHistory ;
... ... @@ -189,6 +118,7 @@
189 118 private String tireNumber1;
190 119 //梅毒血清实验结果
191 120 private String syjg;
  121 +
192 122 private List placentas;
193 123 //心脏
194 124 private String heart;
195 125  
... ... @@ -312,8 +242,181 @@
312 242 //载脂蛋白B(ApoB)
313 243 public String apolipb;
314 244 //心电图
315   - public String electr;
  245 + public String electr;/*//心率
  246 + private double heartRate;
  247 + //胎方位
  248 + private String fetalPosition;
  249 + //胎先露
  250 + private String fetalPresentation;
  251 + // 衔接
  252 + private String join;*/
  253 + //高危因素
  254 + private String highrisk ;
  255 + //高危评分
  256 + private String highriskSocre;
  257 + // 其他高危
  258 + private String otherHighRisk;
  259 + //高危补充说明
  260 + private String highriskDesc;
  261 + // 诊断
  262 + private String diagnosis;
  263 + //处理意见
  264 + private String treatOpinion;
  265 + //指导意见
  266 + private String dirOpinion;
  267 + //产检 医生
  268 + private String prodDoctor;
  269 + //产检日期
  270 + private Date checkTime;
  271 + //下次产检时间
  272 + private Date nextCheckTime;
  273 + private Integer yn;
  274 + //血红蛋白值
  275 + private String xhdb ;
  276 + //白细胞计数值
  277 + private String bxbjs ;
  278 + //血小板
  279 + private String platelet;
  280 + // 血常规其他
  281 + private String chgOther ;
  282 + // 尿蛋白
  283 + private String ndb;
  284 + //尿糖
  285 + private String nt;
  286 + //尿同体
  287 + private String urineKetone ;
  288 + // 尿潜血
  289 + private String bld ;
  290 + //尿常规其他
  291 + private String ncgOther;
  292 + //ABO
  293 + private String abo ;
  294 + // rh
  295 + private String rh ;
  296 + // 血糖1
  297 + private String bloodSugar;
  298 + // 血糖2
  299 + private String bloodSugar2;
  300 + // 血糖3
  301 + private String bloodSugar3;
  302 + // 血糖4
  303 + private String bloodSugar4;
  304 + //B超
  305 + private String bChao ;
  306 + //胎数
  307 + private String tireNumber ;
  308 + //血清谷丙转氨酶
  309 + private String xqgbzam ;
  310 + //血清谷草转氨酶
  311 + private String xqgczam ;
  312 + //白蛋白
  313 + private String albumin ;
  314 + //总胆红素
  315 + private String totalBilirubin;
  316 + // 结合胆红素
  317 + private String jhBilirubin ;
  318 + //乙肝表面抗原
  319 + private String ygbmky;
  320 + //乙肝表面抗体
  321 + private String ygbmkt;
  322 + //乙肝e抗原
  323 + private String ygeky;
  324 + //乙肝e抗体
  325 + private String ygekt;
  326 + // 乙肝核心抗体
  327 + private String yghxkt;
  328 + // 血清肌
  329 + private String xqjq;
  330 + // 血尿素氮
  331 + private String xnsd;
  332 + // 梅毒血清实验
  333 +// private String mdxqsy;
  334 + // hit抗体检测
  335 + private String hivkt;
  336 + // 阴道分泌物
  337 + private String ydfmw;
  338 + // 阴道清洁度
  339 + private String ydqjd;
316 340  
  341 + private Date modified;
  342 + //操作人
  343 + private Integer operator;
  344 +
  345 +
  346 + public Integer getFirst() {
  347 + return first;
  348 + }
  349 +
  350 + public void setFirst(Integer first) {
  351 + this.first = first;
  352 + }
  353 +
  354 + public String getLisCheckItems() {
  355 + return lisCheckItems;
  356 + }
  357 +
  358 + public void setLisCheckItems(String lisCheckItems) {
  359 + this.lisCheckItems = lisCheckItems;
  360 + }
  361 +
  362 + public String getGenRemark() {
  363 + return genRemark;
  364 + }
  365 +
  366 + public void setGenRemark(String genRemark) {
  367 + this.genRemark = genRemark;
  368 + }
  369 +
  370 + public String getGynRemark() {
  371 + return gynRemark;
  372 + }
  373 +
  374 + public void setGynRemark(String gynRemark) {
  375 + this.gynRemark = gynRemark;
  376 + }
  377 +
  378 +
  379 + public Integer getIsPrient() {
  380 + return isPrient;
  381 + }
  382 +
  383 + public void setIsPrient(Integer isPrient) {
  384 + this.isPrient = isPrient;
  385 + }
  386 +
  387 +
  388 + public String getQuicken() {
  389 + return quicken;
  390 + }
  391 +
  392 + public void setQuicken(String quicken) {
  393 + this.quicken = quicken;
  394 + }
  395 +
  396 + public String getQuickenRemark() {
  397 + return quickenRemark;
  398 + }
  399 +
  400 + public void setQuickenRemark(String quickenRemark) {
  401 + this.quickenRemark = quickenRemark;
  402 + }
  403 +
  404 + public List<String> getTreatmentOpinion2Types() {
  405 + return treatmentOpinion2Types;
  406 + }
  407 +
  408 + public Map<String, List<String>> getTreatmentOpinion2() {
  409 + return treatmentOpinion2;
  410 + }
  411 +
  412 + public void setTreatmentOpinion2(Map<String, List<String>> treatmentOpinion2) {
  413 + this.treatmentOpinion2 = treatmentOpinion2;
  414 + }
  415 +
  416 + public void setTreatmentOpinion2Types(List<String> treatmentOpinion2Types) {
  417 + this.treatmentOpinion2Types = treatmentOpinion2Types;
  418 + }
  419 +
317 420 public String getTtita() {
318 421 return ttita;
319 422 }
... ... @@ -838,80 +941,6 @@
838 941 this.hHealthInfo = hHealthInfo;
839 942 }
840 943  
841   - /*//心率
842   - private double heartRate;
843   - //胎方位
844   - private String fetalPosition;
845   - //胎先露
846   - private String fetalPresentation;
847   - // 衔接
848   - private String join;*/
849   - //高危因素
850   - private String highrisk ;
851   - //高危评分
852   - private String highriskSocre;
853   - // 其他高危
854   - private String otherHighRisk;
855   - //高危补充说明
856   - private String highriskDesc;
857   - // 诊断
858   - private String diagnosis;
859   - //处理意见
860   - private String treatOpinion;
861   - //指导意见
862   - private String dirOpinion;
863   - //产检 医生
864   - private String prodDoctor;
865   - //产检日期
866   - private Date checkTime;
867   - //下次产检时间
868   - private Date nextCheckTime;
869   - private Integer yn;
870   - //血红蛋白值
871   - private String xhdb ;
872   - //白细胞计数值
873   - private String bxbjs ;
874   - //血小板
875   - private String platelet;
876   - // 血常规其他
877   - private String chgOther ;
878   - // 尿蛋白
879   - private String ndb;
880   - //尿糖
881   - private String nt;
882   - //尿同体
883   - private String urineKetone ;
884   - // 尿潜血
885   - private String bld ;
886   - //尿常规其他
887   - private String ncgOther;
888   - //ABO
889   - private String abo ;
890   - // rh
891   - private String rh ;
892   - // 血糖1
893   - private String bloodSugar;
894   - // 血糖2
895   - private String bloodSugar2;
896   - // 血糖3
897   - private String bloodSugar3;
898   - // 血糖4
899   - private String bloodSugar4;
900   - //B超
901   - private String bChao ;
902   - //胎数
903   - private String tireNumber ;
904   - //血清谷丙转氨酶
905   - private String xqgbzam ;
906   - //血清谷草转氨酶
907   - private String xqgczam ;
908   - //白蛋白
909   - private String albumin ;
910   - //总胆红素
911   - private String totalBilirubin;
912   - // 结合胆红素
913   - private String jhBilirubin ;
914   -
915 944 public Date getModified() {
916 945 return modified;
917 946 }
... ... @@ -919,33 +948,6 @@
919 948 public void setModified(Date modified) {
920 949 this.modified = modified;
921 950 }
922   -
923   - //乙肝表面抗原
924   - private String ygbmky;
925   - //乙肝表面抗体
926   - private String ygbmkt;
927   - //乙肝e抗原
928   - private String ygeky;
929   - //乙肝e抗体
930   - private String ygekt;
931   - // 乙肝核心抗体
932   - private String yghxkt;
933   - // 血清肌
934   - private String xqjq;
935   - // 血尿素氮
936   - private String xnsd;
937   - // 梅毒血清实验
938   -// private String mdxqsy;
939   - // hit抗体检测
940   - private String hivkt;
941   - // 阴道分泌物
942   - private String ydfmw;
943   - // 阴道清洁度
944   - private String ydqjd;
945   -
946   - private Date modified;
947   - //操作人
948   - private Integer operator;
949 951  
950 952 public Integer getOperator() {
951 953 return operator;
platform-job-index/src/main/java/com/lyms/platform/job/index/restore/data/ConvertHelper.java View file @ 8a21b15
1 1 package com.lyms.platform.job.index.restore.data;
2 2  
  3 +import com.lyms.platform.biz.service.BasicConfigService;
3 4 import com.lyms.platform.common.constants.UnitConstants;
4 5 import com.lyms.platform.common.enums.*;
5   -import com.lyms.platform.common.utils.DateUtil;
6   -import com.lyms.platform.common.utils.JsonUtil;
7   -import com.lyms.platform.common.utils.ReflectionUtils;
8   -import com.lyms.platform.common.utils.StringUtils;
  6 +import com.lyms.platform.common.utils.*;
9 7 import com.lyms.platform.job.index.model.Placenta;
10 8 import com.lyms.platform.permission.model.Organization;
11 9 import com.lyms.platform.pojo.*;
12 10 import com.lyms.platform.pojo.Patients;
13 11 import com.lymsh.mommybaby.maindata.model.*;
  12 +import net.sf.json.JSONObject;
14 13 import org.apache.commons.collections.CollectionUtils;
  14 +import org.apache.commons.collections.MapUtils;
15 15 import org.springframework.core.io.ClassPathResource;
16 16 import org.springframework.core.io.support.EncodedResource;
17 17 import org.springframework.core.io.support.PropertiesLoaderUtils;
... ... @@ -52,7 +52,6 @@
52 52 content.put("fyyw", "服用药物");
53 53 content.put("jcydyhwz", "接触有毒有害物质");
54 54 content.put("jcfsx", "接触放射线");
55   - content.put("jcydyhwz", "接触有毒有害物质");
56 55 content.put("fzym", "风疹疫苗");
57 56 content.put("ygym", "乙肝疫苗");
58 57 content.put("mzym", "麻疹疫苗");
... ... @@ -77,7 +76,6 @@
77 76 content.put("xm", "胸闷");
78 77 content.put("fz", "浮肿");
79 78 content.put("ydcx", "阴道出血");
80   - content.put("ft", "腹痛");
81 79 content.put("tt", "头痛");
82 80 content.put("ft", "腹痛");
83 81  
... ... @@ -206,7 +204,7 @@
206 204 bregma = "未闭合";
207 205 String one = map.get("wbhcc1") == null ? "" : map.get("wbhcc1").toString();
208 206 String two = map.get("wbhcc2") == null ? "" : map.get("wbhcc2").toString();
209   - bregma = bregma+":"+one + "cm - " + two + "cm";
  207 + bregma = bregma + ":" + one + "cm - " + two + "cm";
210 208 }
211 209 }
212 210 babyPaedia.setBregma(bregma);
... ... @@ -282,7 +280,7 @@
282 280 babyCheckCommonly.setGrowthEvaluate(sb.toString());
283 281 }
284 282 }
285   - babyCheckCommonly.setHead(com.lyms.platform.common.utils.StringUtils.unitHandle(babyCheckModel.getHead(), UnitConstants.CM));
  283 + babyCheckCommonly.setHead(StringUtils.unitHandle(babyCheckModel.getHead(), UnitConstants.CM));
286 284 babyCheckCommonly.setHeight(com.lyms.platform.common.utils.StringUtils.unitHandle(babyCheckModel.getHeight(), UnitConstants.CM));
287 285 babyCheckCommonly.setHeightWeight(babyCheckModel.getHeightWeight());
288 286 String bregma = "";
289 287  
... ... @@ -292,10 +290,10 @@
292 290 if ("yes".equals(yesOrNo)) {
293 291 bregma = "闭合";
294 292 } else if ("no".equals(yesOrNo)) {
295   - bregma = "未闭合";
  293 + bregma = "未闭合";
296 294 String one = map.get("wbhcc1") == null ? "" : map.get("wbhcc1").toString();
297 295 String two = map.get("wbhcc2") == null ? "" : map.get("wbhcc2").toString();
298   - bregma = bregma+":"+one + "cm - " + two + "cm";
  296 + bregma = bregma + ":" + one + "cm - " + two + "cm";
299 297 }
300 298 }
301 299 babyCheckCommonly.setBregma(bregma);
302 300  
... ... @@ -589,12 +587,12 @@
589 587 }
590 588  
591 589 /**
592   - * 转换检查报告
  590 + * 初诊:转换检查报告
593 591 *
594 592 * @param antExChuModel
595 593 * @return
596 594 */
597   - public static Reports convertAntExChu(AntExChuModel antExChuModel, Date lastMenses, Map map, String doctorUserName) {
  595 + public static Reports convertAntEx(AntExChuModel antExChuModel, Date lastMenses, BasicConfigService basicConfigService,Map map, String doctorUserName) {
598 596 Reports reports = new Reports();
599 597 //孕期类型
600 598 reports.setType(1);
601 599  
602 600  
603 601  
604 602  
605 603  
606 604  
607 605  
608 606  
609 607  
610 608  
... ... @@ -611,44 +609,384 @@
611 609 reports.setNextCheckTime(antExChuModel.getNextCheckTime());
612 610 reports.setWeeks(DateUtil.getWeek(lastMenses, antExChuModel.getCheckTime()));
613 611 reports.setResult(convertAntExChuResult(antExChuModel, map, doctorUserName));
  612 + reports.setMomResult(convertNewAntExChuResult(antExChuModel, basicConfigService,map, doctorUserName));
614 613  
615 614 return reports;
616 615 }
617 616  
618 617 /**
619   - * 转换检查报告
  618 + * 复诊:转换检查报告
620 619 *
621   - * @param antExChuModel
  620 + * @param antExFuModel
622 621 * @return
623 622 */
624   - public static Reports convertAntExChu(AntenatalExaminationModel antExChuModel, Date lastMenses,
625   - Map<String, String> rhMap, String doctorUserName) {
  623 + public static Reports convertAntExFu(AntenatalExaminationModel antExFuModel, Date lastMenses,
  624 + Map<String, String> rhMap, String doctorUserName) {
626 625 Reports reports = new Reports();
627 626 //孕期类型
628 627 reports.setType(1);
629   - reports.setPhysicalTime(antExChuModel.getCheckDate());
630   - reports.setForeignId(antExChuModel.getId());
  628 + reports.setPhysicalTime(antExFuModel.getCheckDate());
  629 + reports.setForeignId(antExFuModel.getId());
631 630 reports.setDesignation("复诊");
632   - reports.setCreated(antExChuModel.getCreated());
633   - reports.setModified(antExChuModel.getModified());
634   - reports.setYn(antExChuModel.getYn());
  631 + reports.setCreated(antExFuModel.getCreated());
  632 + reports.setModified(antExFuModel.getModified());
  633 + reports.setYn(antExFuModel.getYn());
635 634 reports.setPublishId(0);
636 635 //产检报告
637 636 reports.setCheckType(3);
638 637 reports.setPublishName(AUTO_WORKER);
639   - reports.setNextCheckTime(antExChuModel.getNextCheckTime());
  638 + reports.setNextCheckTime(antExFuModel.getNextCheckTime());
640 639  
641   - reports.setWeeks(DateUtil.getWeek(lastMenses, antExChuModel.getCheckDate()));
642   - reports.setResult(convertAntExResult(antExChuModel, rhMap, doctorUserName));
  640 + reports.setWeeks(DateUtil.getWeek(lastMenses, antExFuModel.getCheckDate()));
  641 + reports.setResult(convertAntExResult(antExFuModel, rhMap, doctorUserName));
643 642 return reports;
644 643 }
645 644  
  645 +
646 646 /**
647   - * 把初诊转换成json
  647 + * 新版初诊:转换成json
648 648 *
649 649 * @param antExChuModel
650 650 * @return
651 651 */
  652 + private static String convertNewAntExChuResult(AntExChuModel antExChuModel, BasicConfigService basicConfigService, Map<String, String> bgMap, String doctorUserName) {
  653 +
  654 +
  655 + String antChuStr = JsonUtil.obj2JsonString(antExChuModel);
  656 + JSONObject antChuJson = JsonUtil.getObj(antChuStr);
  657 +
  658 + //孕期当前体重
  659 + antChuJson.put("weight", StringUtils.unitHandle(antExChuModel.getWeight(), UnitConstants.KG));
  660 + //孕前体重
  661 + antChuJson.put("yqWeight", StringUtils.unitHandle(antExChuModel.getYqWeight(), UnitConstants.KG));
  662 + //宫高
  663 + antChuJson.put("gonggao", StringUtils.unitHandle(antExChuModel.getGonggao(), UnitConstants.CM));
  664 + //腹围
  665 + antChuJson.put("fuwei", StringUtils.unitHandle(antExChuModel.getFuwei(), UnitConstants.CM));
  666 + //身高
  667 + antChuJson.put("height", StringUtils.unitHandle(antExChuModel.getHeight(), UnitConstants.CM));
  668 + //既往史
  669 + String pastHistory = "";
  670 + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExChuModel.getPastHistory())) {
  671 + Map map1 = JsonUtil.jkstr2Obj(antExChuModel.getPastHistory(), Map.class);
  672 + pastHistory = FunvCommonUtil.replace(map1, new StringBuilder(), basicConfigService);
  673 + }
  674 + antChuJson.put("pastHistory", pastHistory);
  675 + //家族史
  676 + String familyHistory = "";
  677 + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExChuModel.getFamilyHistory())) {
  678 + Map map1 = JsonUtil.jkstr2Obj(antExChuModel.getFamilyHistory(), Map.class);
  679 + familyHistory = FunvCommonUtil.replace(map1, new StringBuilder(), basicConfigService);
  680 + }
  681 + antChuJson.put("familyHistory", familyHistory);
  682 + //个人史
  683 + String personalHistory = "";
  684 + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExChuModel.getPersonalHistory())) {
  685 + Map map1 = JsonUtil.jkstr2Obj(antExChuModel.getPersonalHistory(), Map.class);
  686 + personalHistory = FunvCommonUtil.replace(map1, new StringBuilder(), basicConfigService);
  687 + }
  688 + antChuJson.put("personalHistory", personalHistory);
  689 + //疫苗接种史
  690 + String ymjzHistory = "";
  691 + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExChuModel.getYmjzHistory())) {
  692 + Map map1 = JsonUtil.jkstr2Obj(antExChuModel.getYmjzHistory(), Map.class);
  693 + ymjzHistory = FunvCommonUtil.replace(map1, new StringBuilder(), basicConfigService);
  694 + }
  695 + antChuJson.put("ymjzHistory", ymjzHistory);
  696 + //药物过敏史
  697 + String ywgmHistory = "";
  698 + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExChuModel.getYwgmHistory())) {
  699 + Map map1 = JsonUtil.jkstr2Obj(antExChuModel.getYwgmHistory(), Map.class);
  700 + ywgmHistory = FunvCommonUtil.replace(map1, new StringBuilder(), basicConfigService);
  701 + }
  702 + antChuJson.put("ywgmHistory", ywgmHistory);
  703 + //妇科手术史
  704 + String fksxHistory = "";
  705 + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExChuModel.getFksxHistory())) {
  706 + Map map1 = JsonUtil.jkstr2Obj(antExChuModel.getFksxHistory(), Map.class);
  707 + fksxHistory = FunvCommonUtil.replace(map1, new StringBuilder(), basicConfigService);
  708 + }
  709 + antChuJson.put("fksxHistory", fksxHistory);
  710 + //叶酸服用
  711 + String ysfyHistory = "";
  712 + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExChuModel.getYsfyHistory())) {
  713 + Map map1 = JsonUtil.jkstr2Obj(antExChuModel.getYsfyHistory(), Map.class);
  714 + ysfyHistory = FunvCommonUtil.replace(map1, new StringBuilder(), basicConfigService);
  715 + }
  716 + antChuJson.put("ysfyHistory", ysfyHistory);
  717 + //本次妊娠情况
  718 + String cestationInfo = "";
  719 + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExChuModel.getCestationInfo())) {
  720 + Map map1 = JsonUtil.jkstr2Obj(antExChuModel.getCestationInfo(), Map.class);
  721 + cestationInfo = FunvCommonUtil.replace(map1, new StringBuilder(), basicConfigService);
  722 + }
  723 + antChuJson.put("cestationInfo", cestationInfo);
  724 + //孕产史
  725 + //孕次
  726 + antChuJson.put("pregnancyTimes", StringUtils.unitHandle(antExChuModel.getPregnancyTimes(), UnitConstants.CI));
  727 + //产次
  728 + antChuJson.put("prodTime", StringUtils.unitHandle(antExChuModel.getProdTime(), UnitConstants.CI));
  729 + //顺产
  730 + antChuJson.put("delivery", StringUtils.unitHandle(antExChuModel.getDelivery(), UnitConstants.CI));
  731 + //破宫产
  732 + antChuJson.put("planedProd", StringUtils.unitHandle(antExChuModel.getPlanedProd(), UnitConstants.CI));
  733 + //引产
  734 + antChuJson.put("yinchan", StringUtils.unitHandle(antExChuModel.getYinchan(), UnitConstants.CI));
  735 + //死胎
  736 + antChuJson.put("stillbirth", StringUtils.unitHandle(antExChuModel.getStillbirth(), UnitConstants.CI));
  737 + //死产
  738 + antChuJson.put("stillChan", StringUtils.unitHandle(antExChuModel.getStillChan(), UnitConstants.CI));
  739 + //新生儿死亡
  740 + antChuJson.put("neoDeath", StringUtils.unitHandle(antExChuModel.getNeoDeath(), UnitConstants.CI));
  741 + //出生缺陷
  742 + antChuJson.put("birthDefect", StringUtils.unitHandle(antExChuModel.getBirthDefect(), UnitConstants.CI));
  743 + //身高
  744 + antChuJson.put("height", StringUtils.unitHandle(antExChuModel.getHeight(), UnitConstants.CM));
  745 + //体重
  746 + antChuJson.put("weight", StringUtils.unitHandle(antExChuModel.getWeight(), UnitConstants.KG));
  747 + //体重指数
  748 + antChuJson.put("baricIndex", antExChuModel.getBaricIndex());
  749 + //孕前体重
  750 + antChuJson.put("yqWeight", StringUtils.unitHandle(antExChuModel.getYqWeight(), UnitConstants.KG));
  751 + // 血压
  752 + String ssy = "";
  753 + String szy = "";
  754 + Map<String, String> chBpMap = JsonUtil.getMap(antExChuModel.getBp());
  755 + if (MapUtils.isNotEmpty(chBpMap)) {
  756 + ssy = chBpMap.get("ssy");
  757 + szy = chBpMap.get("szy");
  758 + }
  759 + //血压
  760 + antChuJson.put("bp", StringUtils.unitHandle(ssy + "/" + szy, UnitConstants.MMHG));
  761 +
  762 + //流产
  763 + StringBuffer abortion = new StringBuffer();
  764 + if (antExChuModel.getAbortion() != null) {
  765 + boolean isAppend = false;
  766 + abortion.append(StringUtils.unitHandle(antExChuModel.getAbortion(), UnitConstants.CI) == null ? "" : StringUtils.unitHandle(antExChuModel.getAbortion(), UnitConstants.CI));
  767 + if (antExChuModel.getAbortionZR() != null || antExChuModel.getAbortionRG() != null || antExChuModel.getYaowu() != null) {
  768 + isAppend = true;
  769 + abortion.append("(");
  770 + }
  771 + if (antExChuModel.getAbortionZR() != null) {
  772 + abortion.append("自然:" + antExChuModel.getAbortionZR() + UnitConstants.CI);
  773 + }
  774 +
  775 + if (antExChuModel.getAbortionRG() != null) {
  776 + abortion.append(" 人工:" + antExChuModel.getAbortionRG() + UnitConstants.CI + "");
  777 + }
  778 +
  779 + if (antExChuModel.getYaowu() != null) {
  780 + abortion.append(" 药物:" + antExChuModel.getYaowu() + UnitConstants.CI + "");
  781 + }
  782 + if (isAppend) {
  783 + abortion.append(")");
  784 + }
  785 + }
  786 + //流产
  787 + antChuJson.put("abortion", abortion);
  788 + try {
  789 + //国家高危+自定义高危
  790 + List highrisks = JsonUtil.toList(antExChuModel.getHighrisk(), List.class);
  791 + if (CollectionUtils.isNotEmpty(highrisks)) {
  792 + StringBuilder sb = new StringBuilder();
  793 + for (Object str : highrisks) {
  794 + if (null != str && StringUtils.isNotEmpty(str.toString())) {
  795 + String val = bgMap.get(str.toString());
  796 + if (org.apache.commons.lang.StringUtils.isNotEmpty(val)) {
  797 + sb.append(val).append("、");
  798 + }
  799 + }
  800 + }
  801 + List<Map> otherHighRisks = new ArrayList<>();
  802 + String ot = antExChuModel.getOtherHighRisk();
  803 + if (StringUtils.isNotEmpty(ot) && ot.startsWith("[") && antExChuModel.getOtherHighRisk().endsWith("]")) {
  804 + List list3 = JsonUtil.toList(ot, Map.class);
  805 + otherHighRisks.addAll(list3);
  806 + } else if (org.apache.commons.lang.StringUtils.isNotEmpty(ot)) {
  807 + Map otherMap = JsonUtil.jkstr2Obj(ot, Map.class);
  808 + otherHighRisks.add(otherMap);
  809 + }
  810 + if (CollectionUtils.isNotEmpty(otherHighRisks)) {
  811 + for (Map ma : otherHighRisks) {
  812 + Object rh = ma.get("fxysu");
  813 + if (null != rh && StringUtils.isNotEmpty(rh.toString())) {
  814 + sb.append(rh);
  815 + }
  816 + }
  817 + }
  818 + //高危因素
  819 + antChuJson.put("riskFactor", sb.toString());
  820 + }
  821 + } catch (Exception e) {
  822 + e.printStackTrace();
  823 + }
  824 +
  825 + try {
  826 + //胎盘
  827 + if (CollectionUtils.isNotEmpty(antExChuModel.getPlacentas())) {
  828 + String heartRateVal = "", fetalPositionVal = "", fetalPresentationVal = "", joinVal = "";
  829 + for (int j = 0; j < antExChuModel.getPlacentas().size(); j++) {
  830 + LinkedHashMap map = (LinkedHashMap) antExChuModel.getPlacentas().get(j);
  831 + if (null != map) {
  832 + //胎先露、胎方位、胎心率和衔接
  833 + String heartRate = String.valueOf(map.get("heartRate"));
  834 + String fetalPosition = String.valueOf(map.get("fetalPosition"));
  835 + String fetalPresentation = String.valueOf(map.get("fetalPresentation"));
  836 + String join = String.valueOf(map.get("join"));
  837 + if (!"null".equals(heartRate) && StringUtils.isNotEmpty(heartRate)) {
  838 + heartRateVal += heartRate + "次/分" + ",";
  839 + }
  840 + if (!"null".equals(fetalPosition) && StringUtils.isNotEmpty(fetalPosition)) {
  841 + fetalPositionVal += FetalPositionEnums.getTitle(fetalPosition) + ",";
  842 + }
  843 + if (!"null".equals(fetalPresentation) && StringUtils.isNotEmpty(fetalPresentation)) {
  844 + fetalPresentationVal += FetalEnums.getTitle(fetalPresentation) + ",";
  845 + }
  846 + if (!"null".equals(join) && StringUtils.isNotEmpty(join)) {
  847 + joinVal += JoinEnums.getTitle(join) + ",";
  848 + }
  849 + }
  850 + }
  851 + if (heartRateVal.endsWith(",")) {
  852 + heartRateVal = heartRateVal.substring(0, heartRateVal.length() - 1);
  853 + }
  854 + if (fetalPositionVal.endsWith(",")) {
  855 + fetalPositionVal = fetalPositionVal.substring(0, fetalPositionVal.length() - 1);
  856 + }
  857 + if (fetalPresentationVal.endsWith(",")) {
  858 + fetalPresentationVal = fetalPresentationVal.substring(0, fetalPresentationVal.length() - 1);
  859 + }
  860 + //胎心率
  861 + if (StringUtils.isNotEmpty(heartRateVal)) {
  862 + antChuJson.put("heartRateVal", heartRateVal);
  863 + }
  864 + //胎方位
  865 + if (StringUtils.isNotEmpty(fetalPositionVal)) {
  866 + antChuJson.put("fetalPositionVal", fetalPositionVal);
  867 + }
  868 + //胎先露
  869 + if (StringUtils.isNotEmpty(fetalPresentationVal)) {
  870 + antChuJson.put("fetalPresentationVal", fetalPresentationVal);
  871 + }
  872 + }
  873 + } catch (Exception e) {
  874 + e.printStackTrace();
  875 + }
  876 +
  877 +
  878 + /* 辅助检查:血常规 */
  879 + antChuJson.put("xhdb", StringUtils.unitHandle(antExChuModel.getXhdb(), UnitConstants.GL));
  880 + antChuJson.put("bxbjs", StringUtils.unitHandle(antExChuModel.getBxbjs(), UnitConstants.TEN_LKG));
  881 + antChuJson.put("platelet", StringUtils.unitHandle(antExChuModel.getPlatelet(), UnitConstants.TEN_LKG));
  882 + antChuJson.put("chgOther", antExChuModel.getChgOther());
  883 + /* 辅助检查:尿常规 */
  884 + antChuJson.put("ndb", antExChuModel.getNdb());
  885 + antChuJson.put("nt", antExChuModel.getNt());
  886 + antChuJson.put("urineKetone", antExChuModel.getUrineKetone());
  887 + antChuJson.put("bld", antExChuModel.getBld());
  888 + antChuJson.put("ncgOther", antExChuModel.getNcgOther());
  889 + //血糖
  890 + antChuJson.put("bloodSugar", StringUtils.unitHandle(antExChuModel.getBloodSugar(), UnitConstants.MMOLL));
  891 + /**肝功能**/
  892 + antChuJson.put("xqgbzam", StringUtils.unitHandle(antExChuModel.getXqgbzam(), UnitConstants.UL));
  893 + antChuJson.put("xqgczam", StringUtils.unitHandle(antExChuModel.getXqgczam(), UnitConstants.UL));
  894 + antChuJson.put("albumin", StringUtils.unitHandle(antExChuModel.getAlbumin(), UnitConstants.GL));
  895 + antChuJson.put("totalBilirubin", StringUtils.unitHandle(antExChuModel.getTotalBilirubin(), UnitConstants.UMOLL));
  896 + antChuJson.put("jhBilirubin", StringUtils.unitHandle(antExChuModel.getJhBilirubin(), UnitConstants.UMOLL));
  897 + antChuJson.put("bg", FunvCommonUtil.checkYiGan(antExChuModel.getBg()));
  898 + /**乙肝五项**/
  899 + antChuJson.put("ygbmky", FunvCommonUtil.checkYiGan(antExChuModel.getYgbmky()));
  900 + antChuJson.put("ygbmkt", FunvCommonUtil.checkYiGan(antExChuModel.getYgbmkt()));
  901 + antChuJson.put("ygeky", FunvCommonUtil.checkYiGan(antExChuModel.getYgeky()));
  902 + antChuJson.put("ygekt", FunvCommonUtil.checkYiGan(antExChuModel.getYgekt()));
  903 + antChuJson.put("yghxkt", FunvCommonUtil.checkYiGan(antExChuModel.getYghxkt()));
  904 + /**肾功能**/
  905 + antChuJson.put("xqjq", StringUtils.unitHandle(antExChuModel.getXqjq(), UnitConstants.UMOLL));
  906 + antChuJson.put("xnsd", StringUtils.unitHandle(antExChuModel.getXnsd(), UnitConstants.MMOLL));
  907 + /**梅毒血清实验 HIV**/
  908 + antChuJson.put("syjg", FunvCommonUtil.checkYiGan(antExChuModel.getSyjg()));
  909 + antChuJson.put("hivkt", FunvCommonUtil.checkYiGan(antExChuModel.getHivkt()));
  910 + antChuJson.put("bChao", antExChuModel.getbChao());
  911 +
  912 +
  913 +
  914 + //孕前体重指数 yqWeight
  915 + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(antExChuModel.getYqWeight()) && com.lyms.platform.common.utils.StringUtils.isNotEmpty(antExChuModel.getHeight())) {
  916 + try {
  917 + //体重指数计算规则:孕前体重/身高(单位米)的平方
  918 + java.text.DecimalFormat df = new java.text.DecimalFormat("#.#");
  919 + double tzzs = Double.parseDouble(antExChuModel.getYqWeight()) / Math.pow(Double.parseDouble(antExChuModel.getHeight()) / 100, 2);
  920 + antChuJson.put("tzzs", StringUtils.unitHandle(df.format(tzzs), UnitConstants.BMI));
  921 + } catch (Exception e) {
  922 + ExceptionUtils.catchException(e, "体重指数计算错误");
  923 + }
  924 + }
  925 +
  926 +
  927 + /* 诊断指导 */
  928 + String diagnosis = "";
  929 + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExChuModel.getDiagnosis())) {
  930 + List<String> temp = JsonUtil.toList(antExChuModel.getDiagnosis(), String.class);
  931 + if (CollectionUtils.isNotEmpty(temp)) {
  932 +
  933 + StringBuilder sb = new StringBuilder();
  934 +
  935 + for (String sId : temp) {
  936 + sb.append(FunvCommonUtil.getBaseicConfigByid(sId, basicConfigService)).append(",");
  937 + }
  938 + if (sb.toString().endsWith(",")) {
  939 + diagnosis = sb.substring(0, sb.length() - 1);
  940 + } else {
  941 + diagnosis = sb.toString();
  942 + }
  943 + }
  944 + }
  945 + //诊断
  946 + antChuJson.put("diagnosis", diagnosis);
  947 + //处理意见
  948 + antChuJson.put("treatOpinion", antExChuModel.getTreatOpinion());
  949 + //指导意见
  950 + antChuJson.put("dirOpinion", antExChuModel.getDirOpinion());
  951 + //医生
  952 + antChuJson.put("prodDoctorStr",doctorUserName);
  953 +
  954 + return antChuJson.toString();
  955 + }
  956 +
  957 + /**
  958 + * 将数据转换为中文
  959 + * @param antChuJson
  960 + * @return
  961 + */
  962 + private static String convertAntExChuChine(JSONObject antChuJson){
  963 + Iterator<String> sIterator = antChuJson.keys();
  964 + List list = new ArrayList();
  965 + while(sIterator.hasNext()){
  966 + // 获得key
  967 + String key = sIterator.next();
  968 + // 获取值
  969 + String value = antChuJson.getString(key);
  970 + //获取中文
  971 + String chineStr = properties.getProperty(key);
  972 +
  973 + if(StringUtils.isNotEmpty(chineStr)){
  974 + Map<String, Object> dataMap1 = new HashMap<>();
  975 + dataMap1.put("k", chineStr);
  976 + dataMap1.put("v", value);
  977 + list.add(dataMap1);
  978 + }
  979 + }
  980 + return JsonUtil.array2JsonString(list);
  981 + }
  982 +
  983 +
  984 + /**
  985 + * 初诊:转换成json
  986 + *
  987 + * @param antExChuModel
  988 + * @return
  989 + */
652 990 private static String convertAntExChuResult(AntExChuModel antExChuModel, Map<String, String> bgMap,
653 991 String doctorUserName) {
654 992 List list = new ArrayList();
655 993  
656 994  
657 995  
658 996  
659 997  
660 998  
661 999  
662 1000  
663 1001  
664 1002  
665 1003  
666 1004  
... ... @@ -741,122 +1079,119 @@
741 1079 }
742 1080 list.add(dataMap);
743 1081 continue;
744   - } else
745   - //高危
746   - if ("高危因素".equals(key)) {
747   - List map = null;
748   - try {
749   - map = JsonUtil.toList(antExChuModel.getHighrisk(), List.class);
750   - } catch (Exception e) {
751   - }
  1082 + } else if ("高危因素".equals(key)) {//高危
  1083 + List map = null;
  1084 + try {
  1085 + map = JsonUtil.toList(antExChuModel.getHighrisk(), List.class);
  1086 + } catch (Exception e) {
  1087 + }
752 1088  
753 1089  
754   - if (CollectionUtils.isNotEmpty(map)) {
755   - StringBuilder sb = new StringBuilder();
756   - for (Object str : map) {
757   - if (null != str && org.apache.commons.lang.StringUtils.isNotEmpty(str.toString())) {
758   - String val = bgMap.get(str.toString());
759   - if (org.apache.commons.lang.StringUtils.isNotEmpty(val)) {
760   - sb.append(val).append("、");
761   - }
  1090 + if (CollectionUtils.isNotEmpty(map)) {
  1091 + StringBuilder sb = new StringBuilder();
  1092 + for (Object str : map) {
  1093 + if (null != str && org.apache.commons.lang.StringUtils.isNotEmpty(str.toString())) {
  1094 + String val = bgMap.get(str.toString());
  1095 + if (org.apache.commons.lang.StringUtils.isNotEmpty(val)) {
  1096 + sb.append(val).append("、");
762 1097 }
763 1098 }
  1099 + }
764 1100  
765   - List<Map> otherHighRisks = new ArrayList<>();
766   - List list3 = null;
767   - String ot = antExChuModel.getOtherHighRisk();
768   - if (org.apache.commons.lang.StringUtils.isNotEmpty(ot) && ot.startsWith("[") && antExChuModel.getOtherHighRisk().endsWith("]")) {
769   - list3 = JsonUtil.toList(ot, Map.class);
770   - otherHighRisks.addAll(list3);
771   - } else if (org.apache.commons.lang.StringUtils.isNotEmpty(ot)) {
772   - Map otherMap = JsonUtil.jkstr2Obj(ot, Map.class);
773   - otherHighRisks.add(otherMap);
774   - }
  1101 + List<Map> otherHighRisks = new ArrayList<>();
  1102 + List list3 = null;
  1103 + String ot = antExChuModel.getOtherHighRisk();
  1104 + if (StringUtils.isNotEmpty(ot) && ot.startsWith("[") && antExChuModel.getOtherHighRisk().endsWith("]")) {
  1105 + list3 = JsonUtil.toList(ot, Map.class);
  1106 + otherHighRisks.addAll(list3);
  1107 + } else if (org.apache.commons.lang.StringUtils.isNotEmpty(ot)) {
  1108 + Map otherMap = JsonUtil.jkstr2Obj(ot, Map.class);
  1109 + otherHighRisks.add(otherMap);
  1110 + }
775 1111  
776   - if (CollectionUtils.isNotEmpty(otherHighRisks)) {
777   - for (Map ma : otherHighRisks) {
778   - Object rh = ma.get("fxysu");
779   - if (null != rh && StringUtils.isNotEmpty(rh.toString())) {
780   - sb.append(rh);
781   - }
  1112 + if (CollectionUtils.isNotEmpty(otherHighRisks)) {
  1113 + for (Map ma : otherHighRisks) {
  1114 + Object rh = ma.get("fxysu");
  1115 + if (null != rh && StringUtils.isNotEmpty(rh.toString())) {
  1116 + sb.append(rh);
782 1117 }
783 1118 }
784   - //低压
785   - java.util.Map<String, Object> dataMap1 = new HashMap<>();
786   - dataMap1.put("k", key);
787   - dataMap1.put("v", sb.toString());
788   - list.add(dataMap1);
789 1119 }
790   - continue;
791   - } else if ("胎盘".equals(key)) {
792   - if (CollectionUtils.isNotEmpty(antExChuModel.getPlacentas())) {
793   - String heartRateVal = "", fetalPositionVal = "", fetalPresentationVal = "", joinVal = "";
794   - for (int j = 0; j < antExChuModel.getPlacentas().size(); j++) {
795   - LinkedHashMap map = (LinkedHashMap) antExChuModel.getPlacentas().get(j);
796   - if (null != map) {
797   - //胎先露、胎方位、胎心率和衔接
798   - String heartRate = String.valueOf(map.get("heartRate"));
799   - String fetalPosition = String.valueOf(map.get("fetalPosition"));
800   - String fetalPresentation = String.valueOf(map.get("fetalPresentation"));
801   - String join = String.valueOf(map.get("join"));
802   - if (!"null".equals(heartRate) && StringUtils.isNotEmpty(heartRate)) {
803   - heartRateVal += heartRate + "次/分" + ",";
804   - }
805   - if (!"null".equals(fetalPosition) && StringUtils.isNotEmpty(fetalPosition)) {
806   - fetalPositionVal += FetalPositionEnums.getTitle(fetalPosition) + ",";
807   - }
808   - if (!"null".equals(fetalPresentation) && StringUtils.isNotEmpty(fetalPresentation)) {
809   - fetalPresentationVal += FetalEnums.getTitle(fetalPresentation) + ",";
810   - }
811   - if (!"null".equals(join) && StringUtils.isNotEmpty(join)) {
812   - joinVal += JoinEnums.getTitle(join) + ",";
813   - }
  1120 + java.util.Map<String, Object> dataMap1 = new HashMap<>();
  1121 + dataMap1.put("k", key);
  1122 + dataMap1.put("v", sb.toString());
  1123 + list.add(dataMap1);
  1124 + }
  1125 + continue;
  1126 + } else if ("胎盘".equals(key)) {
  1127 + if (CollectionUtils.isNotEmpty(antExChuModel.getPlacentas())) {
  1128 + String heartRateVal = "", fetalPositionVal = "", fetalPresentationVal = "", joinVal = "";
  1129 + for (int j = 0; j < antExChuModel.getPlacentas().size(); j++) {
  1130 + LinkedHashMap map = (LinkedHashMap) antExChuModel.getPlacentas().get(j);
  1131 + if (null != map) {
  1132 + //胎先露、胎方位、胎心率和衔接
  1133 + String heartRate = String.valueOf(map.get("heartRate"));
  1134 + String fetalPosition = String.valueOf(map.get("fetalPosition"));
  1135 + String fetalPresentation = String.valueOf(map.get("fetalPresentation"));
  1136 + String join = String.valueOf(map.get("join"));
  1137 + if (!"null".equals(heartRate) && StringUtils.isNotEmpty(heartRate)) {
  1138 + heartRateVal += heartRate + "次/分" + ",";
814 1139 }
  1140 + if (!"null".equals(fetalPosition) && StringUtils.isNotEmpty(fetalPosition)) {
  1141 + fetalPositionVal += FetalPositionEnums.getTitle(fetalPosition) + ",";
  1142 + }
  1143 + if (!"null".equals(fetalPresentation) && StringUtils.isNotEmpty(fetalPresentation)) {
  1144 + fetalPresentationVal += FetalEnums.getTitle(fetalPresentation) + ",";
  1145 + }
  1146 + if (!"null".equals(join) && StringUtils.isNotEmpty(join)) {
  1147 + joinVal += JoinEnums.getTitle(join) + ",";
  1148 + }
815 1149 }
816   - if (heartRateVal.endsWith(",")) {
817   - heartRateVal = heartRateVal.substring(0, heartRateVal.length() - 1);
818   - }
819   - if (fetalPositionVal.endsWith(",")) {
820   - fetalPositionVal = fetalPositionVal.substring(0, fetalPositionVal.length() - 1);
821   - }
822   - if (fetalPresentationVal.endsWith(",")) {
823   - fetalPresentationVal = fetalPresentationVal.substring(0, fetalPresentationVal.length() - 1);
824   - }
825   - if (joinVal.endsWith(",")) {
826   - joinVal = joinVal.substring(0, joinVal.length() - 1);
827   - }
  1150 + }
  1151 + if (heartRateVal.endsWith(",")) {
  1152 + heartRateVal = heartRateVal.substring(0, heartRateVal.length() - 1);
  1153 + }
  1154 + if (fetalPositionVal.endsWith(",")) {
  1155 + fetalPositionVal = fetalPositionVal.substring(0, fetalPositionVal.length() - 1);
  1156 + }
  1157 + if (fetalPresentationVal.endsWith(",")) {
  1158 + fetalPresentationVal = fetalPresentationVal.substring(0, fetalPresentationVal.length() - 1);
  1159 + }
  1160 + if (joinVal.endsWith(",")) {
  1161 + joinVal = joinVal.substring(0, joinVal.length() - 1);
  1162 + }
828 1163  
829   - //胎心率
830   - if (StringUtils.isNotEmpty(heartRateVal)) {
831   - java.util.Map<String, Object> dataMap1 = new HashMap<>();
832   - dataMap1.put("k", "胎心率");
833   - dataMap1.put("v", heartRateVal);
834   - list.add(dataMap1);
835   - }
836   - //胎心率
837   - if (StringUtils.isNotEmpty(fetalPositionVal)) {
838   - java.util.Map<String, Object> dataMap2 = new HashMap<>();
839   - dataMap2.put("k", "胎方位");
840   - dataMap2.put("v", fetalPositionVal);
841   - list.add(dataMap2);
842   - }
  1164 + //胎心率
  1165 + if (StringUtils.isNotEmpty(heartRateVal)) {
  1166 + java.util.Map<String, Object> dataMap1 = new HashMap<>();
  1167 + dataMap1.put("k", "胎心率");
  1168 + dataMap1.put("v", heartRateVal);
  1169 + list.add(dataMap1);
  1170 + }
  1171 + //胎心率
  1172 + if (StringUtils.isNotEmpty(fetalPositionVal)) {
  1173 + java.util.Map<String, Object> dataMap2 = new HashMap<>();
  1174 + dataMap2.put("k", "胎方位");
  1175 + dataMap2.put("v", fetalPositionVal);
  1176 + list.add(dataMap2);
  1177 + }
843 1178  
844   - //胎先露
845   - if (StringUtils.isNotEmpty(fetalPresentationVal)) {
846   - java.util.Map<String, Object> dataMap3 = new HashMap<>();
847   - dataMap3.put("k", "胎先露");
848   - dataMap3.put("v", fetalPresentationVal);
849   - list.add(dataMap3);
850   - }
851   - if (StringUtils.isNotEmpty(joinVal)) {
852   - java.util.Map<String, Object> dataMap4 = new HashMap<>();
853   - dataMap4.put("k", "衔接");
854   - dataMap4.put("v", joinVal);
855   - list.add(dataMap4);
856   - }
  1179 + //胎先露
  1180 + if (StringUtils.isNotEmpty(fetalPresentationVal)) {
  1181 + java.util.Map<String, Object> dataMap3 = new HashMap<>();
  1182 + dataMap3.put("k", "胎先露");
  1183 + dataMap3.put("v", fetalPresentationVal);
  1184 + list.add(dataMap3);
857 1185 }
858   - continue;
  1186 + if (StringUtils.isNotEmpty(joinVal)) {
  1187 + java.util.Map<String, Object> dataMap4 = new HashMap<>();
  1188 + dataMap4.put("k", "衔接");
  1189 + dataMap4.put("v", joinVal);
  1190 + list.add(dataMap4);
  1191 + }
859 1192 }
  1193 + continue;
  1194 + }
860 1195 dataMap.put("k", key);
861 1196 if ("产检医生".equals(key)) {
862 1197 obj = doctorUserName;
... ... @@ -882,6 +1217,14 @@
882 1217 return JsonUtil.array2JsonString(list);
883 1218 }
884 1219  
  1220 + /**
  1221 + * 复诊:转换json
  1222 + *
  1223 + * @param antExChuModel
  1224 + * @param hrMap
  1225 + * @param doctorUserName
  1226 + * @return
  1227 + */
885 1228 private static String convertAntExResult(AntenatalExaminationModel antExChuModel, Map<String, String> hrMap,
886 1229 String doctorUserName) {
887 1230 List list = new ArrayList();
... ... @@ -899,7 +1242,6 @@
899 1242 } catch (Exception e) {
900 1243 }
901 1244 if (null != map) {
902   -
903 1245 String ssy = null;
904 1246 String szy = null;
905 1247 Object obj1 = map.get("ssy");
... ... @@ -1117,7 +1459,7 @@
1117 1459 antExChuModel.setYsfyHistory("{\"yesOrNo\":\"yes\",\"yzq3\":true}");
1118 1460 antExChuModel.setBp("{\"ssy\":70,\"szy\":120}");
1119 1461 antExChuModel.setFuwei("11");
1120   - System.out.println(convertAntExChu(antExChuModel, null, null, "").getResult());
  1462 + // System.out.println(convertAntEx(antExChuModel, null, null, "").getResult());
1121 1463  
1122 1464  
1123 1465 AntenatalExaminationModel antenatalExaminationModel = new AntenatalExaminationModel();
... ... @@ -1130,7 +1472,7 @@
1130 1472 list.add(placenta);
1131 1473 antenatalExaminationModel.setTireData(list);
1132 1474  
1133   - System.out.print(convertAntExChu(antenatalExaminationModel, null, null, "").getResult());
  1475 + System.out.print(convertAntExFu(antenatalExaminationModel, null, null, "").getResult());
1134 1476 }
1135 1477  
1136 1478 private static String replace(Map map, StringBuilder sb) {
platform-job-index/src/main/java/com/lyms/platform/job/index/restore/data/SyncDataWork.java View file @ 8a21b15
... ... @@ -55,6 +55,8 @@
55 55 * 孕妇建档
56 56 */
57 57 private YunBookbuildingService yunBookbuildingService;
  58 + @Autowired
  59 + private BasicConfigService basicConfigService;
58 60 /**
59 61 * 工作线程池
60 62 */
... ... @@ -86,8 +88,6 @@
86 88 @Autowired
87 89 private RegionsService mamiregionsService;
88 90 @Autowired
89   - private BasicConfigService basicConfigService;
90   - @Autowired
91 91 private DoctorUsersService doctorUsersService;
92 92 @Autowired
93 93 private ReportsService reportsService;
... ... @@ -613,7 +613,7 @@
613 613 }
614 614 }
615 615  
616   - Reports reports = ConvertHelper.convertAntExChu(antExChuModel1, patients.getLastMenses(),
  616 + Reports reports = ConvertHelper.convertAntEx(antExChuModel1, patients.getLastMenses(),basicConfigService,
617 617 bgHighRisk, doctorUserName);
618 618 logger.info("query handleDoctorMemeber" + patients.getId() + ". antex chu:" + antExChuModel1.getId());
619 619 handleDoctorMemeber(reports, antExChuModel1.getProdDoctor(), mamiPatient, patients, stopWatch3);
... ... @@ -716,7 +716,7 @@
716 716 //处理复诊高危
717 717 handRiskFu(ant, mamiPatient.getId());
718 718  
719   - Reports reports = ConvertHelper.convertAntExChu(ant, patients.getLastMenses(),
  719 + Reports reports = ConvertHelper.convertAntExFu(ant, patients.getLastMenses(),
720 720 bgHighRisk, doctorUserName);
721 721  
722 722 logger.info("handleDoctorMemeber antex" + patients.getId() + ". antex id:" + ant.getId());
platform-job-index/src/main/resources/conf.properties View file @ 8a21b15
... ... @@ -57,5 +57,5 @@
57 57 report.db.username=LYMS_ODS
58 58 report.db.password=Welcome1
59 59  
60   -file.path=c://data/lastsynctime.txt
  60 +file.path=C:/datadata/lastsynctime.txt
platform-job-index/src/main/resources/lable.properties View file @ 8a21b15
... ... @@ -51,4 +51,34 @@
51 51 checkDoctor=产检医生
52 52 highrisk=高危因素
53 53 riskFactor=高危因素
  54 +heartRateVal=胎心
  55 +fetalPositionVal=胎位
  56 +fetalPresentationVal=先露
  57 +xhdb=血红蛋白
  58 +bxbjs=白细胞
  59 +platelet=血小板
  60 +chgOther=血常规其他
  61 +ndb=尿蛋白
  62 +nt=尿糖
  63 +urineKetone=尿同体
  64 +bld=尿潜血
  65 +ncgOther=尿常规其他
  66 +xqgbzam=血清谷丙转氨酶
  67 +xqgczam=血清谷草转氨酶
  68 +albumin=白蛋白
  69 +totalBilirubin=总胆红素
  70 +jhBilirubin=结合胆红素
  71 +bg=丙肝
  72 +ygbmky=乙肝表面抗原
  73 +ygbmkt=乙肝表面抗体
  74 +ygeky=乙肝e抗原
  75 +ygekt=乙肝e抗体
  76 +yghxkt=乙肝核心抗体
  77 +xqjq=血清肌
  78 +xnsd=血尿素氮
  79 +syjg=梅毒实验结果
  80 +hivkt=HIV抗体检测
  81 +tzzs=孕前BMI
  82 +treatOpinion=处理
  83 +prodDoctorStr=医生
platform-job-index/src/main/webapp/WEB-INF/lib/mainData.jar View file @ 8a21b15

No preview for this file type

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java View file @ 8a21b15
... ... @@ -88,6 +88,16 @@
88 88 String hospitalId = autoMatchFacade.getHospitalId(userId);
89 89 PatientsQuery patientsQuery = new PatientsQuery();
90 90 patientsQuery.setYn(YnEnums.YES.getId());
  91 + //最后一次检查时间
  92 + if (StringUtils.isNotEmpty(riskPatientsQueryRequest.getLastCTime())) {
  93 + String nextDateStr = riskPatientsQueryRequest.getLastCTime();
  94 + String[] dates = nextDateStr.split(" - ");
  95 +
  96 + patientsQuery.setLastCTimeStart(DateUtil.parseYMD(dates[0]));
  97 + if (dates.length == 2) {
  98 + patientsQuery.setLastCTimeEnd(DateUtil.parseYMD(dates[1]));
  99 + }
  100 + }
91 101  
92 102 List buildType = new ArrayList();
93 103 buildType.add(0);