From 6ce307d81038bc4f8cf9efd77d3234feb68706ab Mon Sep 17 00:00:00 2001 From: gengxiaokai Date: Tue, 11 Sep 2018 14:06:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=A6=E7=9A=87=E5=B2=9B=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E5=85=AC=E5=8D=AB=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lyms/hospitalapi/qhdfy/QhdJbgwInterface.java | 61 +++++++++++++++++----- 1 file changed, 47 insertions(+), 14 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdJbgwInterface.java b/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdJbgwInterface.java index ca55478..e6c3290 100644 --- a/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdJbgwInterface.java +++ b/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdJbgwInterface.java @@ -115,7 +115,7 @@ public class QhdJbgwInterface { Double wh = Double.parseDouble(aList.get(0).getHeight()) / 100; Double shen = wh * wh; Double bmi = Double.parseDouble(aList.get(0).getWeight()) / shen; - map.put("BMI",bmi.toString()); + map.put("BMI",String.valueOf(bmi)); } String ssy = ""; String szy = ""; @@ -234,7 +234,12 @@ public class QhdJbgwInterface { String cDueWeek = ResolveUtils.getPregnancyWeek(patients.getLastMenses(), antExChuModel.getCheckTime()); int week = Integer.parseInt(cDueWeek.substring(1, cDueWeek.indexOf("周"))); - int day = Integer.parseInt(cDueWeek.substring(cDueWeek.indexOf("+")+1, cDueWeek.indexOf("天"))); + int status = cDueWeek.indexOf("+"); + Integer day = null; + if(-1 != status){ + day = (int)Integer.parseInt(cDueWeek.substring(cDueWeek.indexOf("+")+1, cDueWeek.indexOf("天"))); + } + Map map = new HashMap(); //增加孕产登记 if("农业户口".equals(getBasicConfig(patients.getPcensusTypeId()))){ @@ -286,7 +291,9 @@ public class QhdJbgwInterface { map.put("NAME",patients.getUsername()); map.put("FOLLOWUPDATE",DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); map.put("GESTWEEKS",String.valueOf(week)); - map.put("GESTDAYS",String.valueOf(day)); + if(day != null){ + map.put("GESTDAYS",String.valueOf(day)); + } map.put("AGE",DateUtil.getAge(patients.getBirth()).toString()); map.put("HUSBANDNAME",patients.getHusbandName()); map.put("HUSBANDTELNO",patients.getHusbandPhone()); @@ -324,7 +331,7 @@ public class QhdJbgwInterface { } map.put("HEIGHT",antExChuModel.getHeight()); map.put("WEIGHT",antExChuModel.getWeight()); - if(antExChuModel.getHeight() != null && antExChuModel.getWeight() != null){ + if(StringUtils.isNotEmpty(antExChuModel.getHeight()) && StringUtils.isNotEmpty(antExChuModel.getWeight())){ Double wh = Double.parseDouble(antExChuModel.getHeight()) / 100; Double shen = wh * wh; Double bmi = Double.parseDouble(antExChuModel.getWeight()) / shen; @@ -404,7 +411,7 @@ public class QhdJbgwInterface { map.put("ALB",antExChuModel.getAlbumin()); map.put("TBI",antExChuModel.getTotalBilirubin()); if(antExChuModel.getJhBilirubin() != null && antExChuModel.getTotalBilirubin() != null){ - int jh = Integer.parseInt(antExChuModel.getTotalBilirubin()) - Integer.parseInt(antExChuModel.getJhBilirubin()); + double jh = Double.parseDouble(antExChuModel.getTotalBilirubin()) - Double.parseDouble(antExChuModel.getJhBilirubin()); map.put("DBIL",String.valueOf(jh)); } map.put("BUN",antExChuModel.getXnsd()); @@ -474,15 +481,30 @@ public class QhdJbgwInterface { } map.put("HEIGHT",antExChuModel.getHeight()); map.put("WEIGHT",antExChuModel.getWeight()); - if(antExChuModel.getHeight() != null && antExChuModel.getWeight() != null){ + if(StringUtils.isNotEmpty(antExChuModel.getHeight()) && StringUtils.isNotEmpty(antExChuModel.getWeight())){ Double wh = Double.parseDouble(antExChuModel.getHeight()) / 100; Double shen = wh * wh; Double bmi = Double.parseDouble(antExChuModel.getWeight()) / shen; map.put("BMI",bmi.toString()); } - map.put("REGISTERPASTHISTORY",antExChuModel.getPastHistory()); - map.put("REGISTERFAMILYHISTORY",antExChuModel.getFamilyHistory()); - map.put("GESTATIONSTATUS",antExChuModel.getCestationInfo()); + String pastHistory=""; + if(StringUtils.isNotEmpty(antExChuModel.getPastHistory())){ + Map map1 = JsonUtil.jkstr2Obj(antExChuModel.getPastHistory(), Map.class); + pastHistory = FunvCommonUtil.replace(map1, new StringBuilder(), basicConfigService); + } + map.put("REGISTERPASTHISTORY",pastHistory); + String familyHistory=""; + if(StringUtils.isNotEmpty(antExChuModel.getFamilyHistory())){ + Map map1 = JsonUtil.jkstr2Obj(antExChuModel.getFamilyHistory(), Map.class); + familyHistory = FunvCommonUtil.replace(map1, new StringBuilder(), basicConfigService); + } + map.put("REGISTERFAMILYHISTORY",familyHistory); + String cestationInfo=""; + if(StringUtils.isNotEmpty(antExChuModel.getCestationInfo())){ + Map map1 = JsonUtil.jkstr2Obj(antExChuModel.getCestationInfo(), Map.class); + cestationInfo = FunvCommonUtil.replace(map1, new StringBuilder(), basicConfigService); + } + map.put("GESTATIONSTATUS",cestationInfo); mList.add(map); }catch (Exception e){ e.printStackTrace(); @@ -529,14 +551,20 @@ public class QhdJbgwInterface { } String cDueWeek = ResolveUtils.getPregnancyWeek(patients.getLastMenses(), data.getCheckDate()); int week = Integer.parseInt(cDueWeek.substring(1, cDueWeek.indexOf("周"))); - int day = Integer.parseInt(cDueWeek.substring(cDueWeek.indexOf("+") + 1, cDueWeek.indexOf("天"))); + int status = cDueWeek.indexOf("+"); + Integer day = null; + if(-1 != status){ + day = (int)Integer.parseInt(cDueWeek.substring(cDueWeek.indexOf("+")+1, cDueWeek.indexOf("天"))); + } Map map = new HashMap(); map.put("MATERNALFOLLOWUPID",data.getId()); map.put("MATERNALINFOID",patients.getId()); map.put("NAME",patients.getUsername()); map.put("FOLLOWUPDATE",DateUtil.getyyyy_MM_dd(data.getCheckDate())); map.put("GESTWEEKS",String.valueOf(week)); - map.put("GESTDAYS",String.valueOf(day)); + if(day != null) { + map.put("GESTDAYS", String.valueOf(day)); + } map.put("WEIGHT",String.valueOf(data.getWeight())); map.put("CHIEFCOMPLAINT",data.getChiefComplaint()); map.put("FUNDUSHEIGHT",data.getGongGao()); @@ -700,7 +728,11 @@ public class QhdJbgwInterface { String cDueWeek = data.getDueWeek(); int week = Integer.parseInt(cDueWeek.substring(1, cDueWeek.indexOf("周"))); - int day = Integer.parseInt(cDueWeek.substring(cDueWeek.indexOf("+") + 1, cDueWeek.indexOf("天"))); + int status = cDueWeek.indexOf("+"); + Integer day = null; + if(-1 != status){ + day = (int)Integer.parseInt(cDueWeek.substring(cDueWeek.indexOf("+")+1, cDueWeek.indexOf("天"))); + } Map map = new HashMap(); map.put("MATERNALCHILDBIRTHID", data.getId()); map.put("MATERNALINFOID", patients.getId()); @@ -734,8 +766,9 @@ public class QhdJbgwInterface { map.put("LABORTIME", temp.getDueTime()); map.put("GESTTEEKS", String.valueOf(week)); - map.put("GESTDAYS", String.valueOf(day)); - + if(day != null) { + map.put("GESTDAYS", String.valueOf(day)); + } Map mapcc = new HashMap<>(); findProcess(data.getProdprocess(), mapcc); if (StringUtils.isNotEmpty(mapcc.get("one").toString())) { -- 1.8.3.1