diff --git a/platform-common/src/main/java/com/lyms/platform/common/enums/AbortionEnums.java b/platform-common/src/main/java/com/lyms/platform/common/enums/AbortionEnums.java index 4aa3bfc..b89e8a4 100644 --- a/platform-common/src/main/java/com/lyms/platform/common/enums/AbortionEnums.java +++ b/platform-common/src/main/java/com/lyms/platform/common/enums/AbortionEnums.java @@ -1,5 +1,7 @@ package com.lyms.platform.common.enums; +import com.lyms.platform.common.utils.StringUtils; + /** * 流产方式 * @Author: litao @@ -16,6 +18,19 @@ public enum AbortionEnums { this.name = name; } + + public static String getName(String id) { + if(StringUtils.isEmpty(id)) { + return null; + } + AbortionEnums[] values = AbortionEnums.values(); + for (AbortionEnums value : values) { + if (value.getId().equals(id)) { + return value.getName(); + } + } + return null; + } private String id; private String name; diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java index b31fd88..37e78b7 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java @@ -17,10 +17,7 @@ import com.lyms.platform.common.utils.EnumUtil; import com.lyms.platform.common.utils.SystemConfig; import com.lyms.platform.operate.web.request.*; import com.lyms.platform.operate.web.result.*; -import com.lyms.platform.operate.web.utils.CommonsHelper; -import com.lyms.platform.operate.web.utils.InitDataUtils; -import com.lyms.platform.operate.web.utils.MongoUtil; -import com.lyms.platform.operate.web.utils.ResolveUtils; +import com.lyms.platform.operate.web.utils.*; import com.lyms.platform.permission.model.*; import com.lyms.platform.permission.service.*; import com.lyms.platform.pojo.BabyModel; @@ -90,6 +87,8 @@ public class BabyEarFacade { private MongoUtil mongoUtil; @Autowired private BasicConfigService basicConfigService; + @Autowired + private AntenatalExaminationFacade examinationFacade; //处理儿童person信息 private PersonModel handBabyPerson(BabyModel baby) { @@ -238,14 +237,14 @@ public class BabyEarFacade { earQuery.setBabyPatientId(babyPatientId); List babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(earQuery); - if(CollectionUtils.isNotEmpty(babyPatientExtendEars)){//修改 + if (CollectionUtils.isNotEmpty(babyPatientExtendEars)) {//修改 BabyPatientExtendEar babyPatientExtendEar1 = babyPatientExtendEars.get(0); babyPatientExtendEar.setId(babyPatientExtendEar1.getId()); babyPatientExtendEar.setLastUpdateDate(new Date()); babyPatientExtendEar.setLastUpdateHospitalId(hId); babyPatientExtendEar.setLastUpdateUserId(userId + ""); babyPatientExtendEarService.updateBabyPatientExtendEar(babyPatientExtendEar); - }else{ + } else { babyPatientExtendEar.setCreateDate(new Date()); babyPatientExtendEar.setCreateHospitalId(hId); babyPatientExtendEar.setCreateUserId(userId + ""); @@ -270,22 +269,22 @@ public class BabyEarFacade { BabyPatientExtendEarBirthQuery birthQuery = new BabyPatientExtendEarBirthQuery(); birthQuery.setBabyPatientId(babyPatientId); List babyPatientExtendEarBirths = babyPatientExtendEarBirthService.queryBabyPatientExtendEarBirth(birthQuery); - if(CollectionUtils.isNotEmpty(babyPatientExtendEarBirths)){ + if (CollectionUtils.isNotEmpty(babyPatientExtendEarBirths)) { BabyPatientExtendEarBirth babyPatientExtendEarBirth1 = babyPatientExtendEarBirths.get(0); babyPatientExtendEarBirth.setId(babyPatientExtendEarBirth1.getId()); babyPatientExtendEarBirthService.updateBabyPatientExtendEarBirth(babyPatientExtendEarBirth); - }else{ + } else { babyPatientExtendEarBirth.setId(UUID.randomUUID().toString().replace("-", "")); babyPatientExtendEarBirthService.addBabyPatientExtendEarBirth(babyPatientExtendEarBirth); } BabyPatientExtendEarFamilyQuery familyQuery = new BabyPatientExtendEarFamilyQuery(); familyQuery.setBabyPatientId(babyPatientId); List babyPatientExtendEarFamilies = babyPatientExtendEarFamilyService.queryBabyPatientExtendEarFamily(familyQuery); - if(CollectionUtils.isNotEmpty(babyPatientExtendEarFamilies)){ + if (CollectionUtils.isNotEmpty(babyPatientExtendEarFamilies)) { BabyPatientExtendEarFamily babyPatientExtendEarFamily1 = babyPatientExtendEarFamilies.get(0); babyPatientExtendEarFamily.setId(babyPatientExtendEarFamily1.getId()); babyPatientExtendEarFamilyService.updateBabyPatientExtendEarFamily(babyPatientExtendEarFamily); - }else{ + } else { babyPatientExtendEarFamily.setId(UUID.randomUUID().toString().replace("-", "")); babyPatientExtendEarFamilyService.addBabyPatientExtendEarFamily(babyPatientExtendEarFamily); } @@ -293,11 +292,11 @@ public class BabyEarFacade { BabyPatientExtendEarMotherQuery motherQuery = new BabyPatientExtendEarMotherQuery(); motherQuery.setBabyPatientId(babyPatientId); List babyPatientExtendEarMothers = babyPatientExtendEarMotherService.queryBabyPatientExtendEarMother(motherQuery); - if(CollectionUtils.isNotEmpty(babyPatientExtendEarMothers)){ + if (CollectionUtils.isNotEmpty(babyPatientExtendEarMothers)) { BabyPatientExtendEarMother babyPatientExtendEarMother1 = babyPatientExtendEarMothers.get(0); babyPatientExtendEarMother.setId(babyPatientExtendEarMother1.getId()); babyPatientExtendEarMotherService.updateBabyPatientExtendEarMother(babyPatientExtendEarMother); - }else { + } else { babyPatientExtendEarMother.setId(UUID.randomUUID().toString().replace("-", "")); babyPatientExtendEarMotherService.addBabyPatientExtendEarMother(babyPatientExtendEarMother); } @@ -326,15 +325,17 @@ public class BabyEarFacade { babyEarBase.setAdmissNo(babyPatientExtendEar.getAdmissNo()); babyEarBase.setBarCode(babyPatientExtendEar.getBarCode()); babyEarBase.setCreateUserId(babyPatientExtendEar.getCreateUserId()); + if(StringUtils.isNotEmpty(babyPatientExtendEar.getmHighRiskFactorId())){ + String[] dischargeDiagnosis = babyPatientExtendEar.getmHighRiskFactorId().split(","); + List temp = Arrays.asList(dischargeDiagnosis); + babyEarBase.setDischargeDiagnosisList(examinationFacade.queryRisk(temp, false).getHighRisk()); + } //母亲孕期高危因素 if (babyPatientExtendEar.getmHighRiskFactorId() != null) { String[] highFactors = babyPatientExtendEar.getmHighRiskFactorId().split(","); List ids = Arrays.asList(highFactors); - - HighScoreResult highScoreResult = ResolveUtils.queryRisk(ids, true, basicConfigService); - List> checkList = ResolveUtils.queryHighRisk(highScoreResult); - babyEarBase.setmHighRiskFactorList(checkList); + babyEarBase.setmHighRiskFactorList(examinationFacade.queryRisk(ids, false).getHighRisk()); } //听力高危因素 if (babyPatientExtendEar.getHighRiskCause() != null) { @@ -408,8 +409,39 @@ public class BabyEarFacade { BabyPatientExtendEar babyPatientExtendEar = babyPatientExtendEars.get(0); babyEarBaseView.setAdmissNo(babyPatientExtendEar.getAdmissNo()); babyEarBaseView.setDischargeDiagnosis(babyPatientExtendEar.getDischargeDiagnosis()); - babyEarBaseView.setBarCode(babyPatientExtendEar.getBarCode()); + babyEarBaseView.setBarCode(babyPatientExtendEar.getBarCode()); + babyEarBaseView.setRemark(babyModel.getMremark()); + if (babyModel.getServiceType() == ServiceTypeEnums.STANDARD_SERVICE.getId()) { + babyEarBaseView.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getName()); + } else if (babyModel.getServiceType() == ServiceTypeEnums.ADD_SERVICE.getId()) { + babyEarBaseView.setServiceStatus(ServiceStatusEnums.ADD_OPEN.getName()); + } + babyEarBaseView.setServiceType(ServiceTypeEnums.getTitleById(babyModel.getServiceType())); + + + + /* 诊断指导 */ + String diagnosis = ""; + if (org.apache.commons.lang.StringUtils.isNotEmpty(babyPatientExtendEar.getDischargeDiagnosis())) { + String[] dischargeDiagnosis = babyPatientExtendEar.getmHighRiskFactorId().split(","); + List temp = Arrays.asList(dischargeDiagnosis); + if (CollectionUtils.isNotEmpty(temp)) { + + StringBuilder sb = new StringBuilder(); + + for (String sId : temp) { + sb.append(FunvCommonUtil.getBaseicConfigByid(sId, basicConfigService)).append("、"); + } + if (sb.toString().endsWith("、")) { + diagnosis = sb.substring(0, sb.length() - 1); + } else { + diagnosis = sb.toString(); + } + } + } + babyEarBaseView.setDischargeDiagnosis(diagnosis); + //听力高危因素 if (babyPatientExtendEar.getHighRiskCause() != null) { String[] highFactors = babyPatientExtendEar.getHighRiskCause().split(","); @@ -482,15 +514,36 @@ public class BabyEarFacade { } /** - * 儿童出生信息-数据转换 + * 儿童家庭信息-数据转换 * * @param babyPatientExtendEarFamily 儿童家庭信息 * @return */ public BabyEarFamilyView convertToBabyEarFamilyView(BabyPatientExtendEarFamily babyPatientExtendEarFamily) { BabyEarFamilyView babyEarFamilyView = new BabyEarFamilyView(); - - babyEarFamilyView.setBadLifeHistory(babyPatientExtendEarFamily.getBadLifeHistory()); + if (StringUtils.isNotEmpty(babyPatientExtendEarFamily.getBadLifeHistory())) { + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarFamily.getBadLifeHistory()); + StringBuffer historyStr = new StringBuffer(""); + if (historyJson.containsKey("yesOrNo")) { + int yesOrNo = historyJson.getIntValue("yesOrNo"); + if (yesOrNo == 1) { + historyStr.append("有、"); + if (historyJson.containsKey("type")) { + String type = historyJson.getString("type"); + if ("yinJiu".equals(type)) { + historyStr.append("饮酒、"); + } else if("xiYan".equals(type)){ + historyStr.append("吸烟、"); + }else if("xiDu".equals(type)){ + historyStr.append("吸毒"); + } + } + } else { + historyStr.append("无"); + } + babyEarFamilyView.setBadLifeHistory(historyStr.toString()); + } + } String deafType = "无"; if (babyPatientExtendEarFamily.getDeafType() != null) { @@ -501,14 +554,15 @@ public class BabyEarFacade { babyEarFamilyView.setDeafType(deafType); babyEarFamilyView.setDeatRelationship(babyPatientExtendEarFamily.getDeatRelationship()); + String proximityType = "无"; if (babyPatientExtendEarFamily.getProximityType() != null) { if (babyPatientExtendEarFamily.getProximityType() == 1) { proximityType = "有"; } } - babyEarFamilyView.setProximityType(proximityType); + babyEarFamilyView.setProximityType(proximityType); babyEarFamilyView.setProximityRelationship(babyPatientExtendEarFamily.getProximityRelationship()); return babyEarFamilyView; } @@ -522,15 +576,295 @@ public class BabyEarFacade { public BabyEarMotherView convertToBabyEarMotherView(BabyPatientExtendEarMother babyPatientExtendEarMother) { BabyEarMotherView babyEarMotherView = new BabyEarMotherView(); babyEarMotherView.setGestationAge(babyPatientExtendEarMother.getGestationAge()); - babyEarMotherView.setAbortionHistoryType(babyPatientExtendEarMother.getAbortionHistoryType()); - babyEarMotherView.setViralInfectionHistoryType(babyPatientExtendEarMother.getViralInfectionHistoryType()); - babyEarMotherView.setGenitalInfectionHistoryType(babyPatientExtendEarMother.getGenitalInfectionHistoryType()); - babyEarMotherView.setRadiationHistoryType(babyPatientExtendEarMother.getRadiationHistoryType()); - babyEarMotherView.setDrugAppName(babyPatientExtendEarMother.getDrugAppName()); - babyEarMotherView.setHarmfulSubstanceType(babyPatientExtendEarMother.getHarmfulSubstanceType()); - babyEarMotherView.setBadLifeHistoryType(babyPatientExtendEarMother.getBadLifeHistoryType()); - babyEarMotherView.setMedicalHistoryType(babyPatientExtendEarMother.getMedicalHistoryType()); - babyEarMotherView.setBnormalPregnancyHistoryType(babyPatientExtendEarMother.getBnormalPregnancyHistoryType()); + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getViralInfectionHistoryType())) { + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getViralInfectionHistoryType()); + StringBuffer historyStr = new StringBuffer(""); + if (historyJson.containsKey("fz")) { + boolean fz = historyJson.getBooleanValue("fz"); + if (fz) { + historyStr.append("风疹"); + if (historyJson.containsKey("fzSelected")) { + int fzSelected = historyJson.getIntValue("fzSelected"); + historyStr.append("(孕" + fzSelected + "周)、"); + } + } + } + if (historyJson.containsKey("gxc")) { + boolean gxc = historyJson.getBooleanValue("gxc"); + if (gxc) { + historyStr.append("弓形虫"); + if (historyJson.containsKey("gxcSelected")) { + int gxcSelected = historyJson.getIntValue("gxcSelected"); + historyStr.append("(孕" + gxcSelected + "周)、"); + } + } + } + + if (historyJson.containsKey("jxbbd")) { + boolean jxbbd = historyJson.getBooleanValue("jxbbd"); + if (jxbbd) { + historyStr.append("巨细胞病毒"); + if (historyJson.containsKey("jxbbdSelected")) { + int jxbbdSelected = historyJson.getIntValue("jxbbdSelected"); + historyStr.append("(孕" + jxbbdSelected + "周)、"); + } + } + } + if (historyJson.containsKey("pz")) { + boolean pz = historyJson.getBooleanValue("pz"); + if (pz) { + historyStr.append("疱疹"); + if (historyJson.containsKey("pzSelected")) { + int pzSelected = historyJson.getIntValue("pzSelected"); + historyStr.append("(孕" + pzSelected + "周)、"); + } + } + } + if (historyJson.containsKey("qt")) { + boolean qt = historyJson.getBooleanValue("qt"); + if (qt) { + historyStr.append("其他"); + if (historyJson.containsKey("qtSelected")) { + String qtSelected = historyJson.getString("qtSelected"); + historyStr.append("(" + qtSelected + ")、"); + } + } + } + babyEarMotherView.setViralInfectionHistoryType(historyStr.toString()); + } + + + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getGenitalInfectionHistoryType())) { + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getGenitalInfectionHistoryType()); + StringBuffer historyStr = new StringBuffer(""); + if (historyJson.containsKey("lb")) { + boolean lb = historyJson.getBooleanValue("lb"); + if (lb) { + historyStr.append("淋病"); + if (historyJson.containsKey("lbSelected")) { + int lbSelected = historyJson.getIntValue("lbSelected"); + historyStr.append("(孕" + lbSelected + "周)、"); + } + } + } + if (historyJson.containsKey("gxc")) { + boolean gxc = historyJson.getBooleanValue("gxc"); + if (gxc) { + historyStr.append("弓形虫"); + if (historyJson.containsKey("gxcSelected")) { + int gxcSelected = historyJson.getIntValue("gxcSelected"); + historyStr.append("(孕" + gxcSelected + "周)、"); + } + } + } + + if (historyJson.containsKey("md")) { + boolean md = historyJson.getBooleanValue("md"); + if (md) { + historyStr.append("梅毒"); + if (historyJson.containsKey("mdSelected")) { + int mdSelected = historyJson.getIntValue("mdSelected"); + historyStr.append("(孕" + mdSelected + "周)、"); + } + } + } + if (historyJson.containsKey("jrsz")) { + boolean jrsz = historyJson.getBooleanValue("jrsz"); + if (jrsz) { + historyStr.append("尖锐湿疹"); + if (historyJson.containsKey("jrszSelected")) { + int jrszSelected = historyJson.getIntValue("jrszSelected"); + historyStr.append("(孕" + jrszSelected + "周)、"); + } + } + } + + if (historyJson.containsKey("qt")) { + boolean qt = historyJson.getBooleanValue("qt"); + if (qt) { + historyStr.append("其他"); + if (historyJson.containsKey("qtSelected")) { + String qtSelected = historyJson.getString("qtSelected"); + historyStr.append("(" + qtSelected + ")、"); + } + } + } + babyEarMotherView.setGenitalInfectionHistoryType(historyStr.toString()); + } + + + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getRadiationHistoryType())) { + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getRadiationHistoryType()); + StringBuffer historyStr = new StringBuffer(""); + if (historyJson.containsKey("yesOrNo")) { + int yesOrNo = historyJson.getIntValue("yesOrNo"); + if (yesOrNo == 1) { + historyStr.append("有、"); + if (historyJson.containsKey("other")) { + int other = historyJson.getIntValue("other"); + historyStr.append("(孕" + other + "周)、"); + } + } else { + historyStr.append("无"); + } + } + babyEarMotherView.setRadiationHistoryType(historyStr.toString()); + } + + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getDrugAppName())) { + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getDrugAppName()); + if (historyJson.containsKey("yesOrNo")) { + int yesOrNo = historyJson.getIntValue("yesOrNo"); + if (1 == yesOrNo) { + historyJson.put("yesOrNo", "有"); + } else { + historyJson.put("yesOrNo", "无"); + } + } + babyEarMotherView.setDrugAppName(historyJson.toJSONString()); + } + + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getAbortionHistoryType())) { + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getAbortionHistoryType()); + if (historyJson.containsKey("yesOrNo")) { + int yesOrNo = historyJson.getIntValue("yesOrNo"); + if (1 == yesOrNo) { + historyJson.put("yesOrNo", "有"); + } else { + historyJson.put("yesOrNo", "无"); + } + } + + if (historyJson.containsKey("abortionType")) { + String abortionType = historyJson.getString("abortionType"); + historyJson.put("abortionType",AbortionEnums.getName(abortionType)); + } + babyEarMotherView.setAbortionHistoryType(historyJson.toJSONString()); + } + + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getHarmfulSubstanceType())) { + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getHarmfulSubstanceType()); + if (historyJson.containsKey("yesOrNo")) { + int yesOrNo = historyJson.getIntValue("yesOrNo"); + if (1 == yesOrNo) { + historyJson.put("yesOrNo", "有"); + } else { + historyJson.put("yesOrNo", "无"); + } + } + babyEarMotherView.setHarmfulSubstanceType(historyJson.toJSONString()); + } + + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getBadLifeHistoryType())) { + StringBuffer historyStr = new StringBuffer(""); + + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getBadLifeHistoryType()); + if (historyJson.containsKey("yesOrNo")) { + int yesOrNo = historyJson.getIntValue("yesOrNo"); + if (1 == yesOrNo) { + historyStr.append("有、"); + } else { + historyStr.append("无"); + } + } + if (historyJson.containsKey("type")) { + String type = historyJson.getString("type"); + if ("yinJiu".equals(type)) { + historyStr.append("饮酒、"); + } else if("xiYan".equals(type)){ + historyStr.append("吸烟、"); + }else if("xiDu".equals(type)){ + historyStr.append("吸毒"); + } + } + babyEarMotherView.setBadLifeHistoryType(historyStr.toString()); + } + + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getMedicalHistoryType())) { + StringBuffer historyStr = new StringBuffer(""); + + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getMedicalHistoryType()); + if (historyJson.containsKey("yesOrNo")) { + int yesOrNo = historyJson.getIntValue("yesOrNo"); + if (1 == yesOrNo) { + historyStr.append("有、"); + } else { + historyStr.append("无"); + } + } + + if (historyJson.containsKey("sy")) { + boolean sy = historyJson.getBooleanValue("sy"); + if (sy) { + historyStr.append("肾炎"); + } + } + if (historyJson.containsKey("jzxgnjt")) { + boolean jzxgnjt = historyJson.getBooleanValue("jzxgnjt"); + if (jzxgnjt) { + historyStr.append("甲状腺功能减退、"); + } + } + if (historyJson.containsKey("bxz")) { + boolean bxz = historyJson.getBooleanValue("bxz"); + if (bxz) { + historyStr.append("败血症、"); + } + } + if (historyJson.containsKey("qt")) { + boolean qt = historyJson.getBooleanValue("qt"); + if (qt) { + historyStr.append("其他:"); + } + } + if (historyJson.containsKey("qtText")) { + historyStr.append(historyJson.getString("qtText")); + } + babyEarMotherView.setMedicalHistoryType(historyStr.toString()); + } + + if (StringUtils.isNotEmpty(babyPatientExtendEarMother.getBnormalPregnancyHistoryType())) { + StringBuffer historyStr = new StringBuffer(""); + + JSONObject historyJson = JSONObject.parseObject(babyPatientExtendEarMother.getBnormalPregnancyHistoryType()); + if (historyJson.containsKey("yesOrNo")) { + int yesOrNo = historyJson.getIntValue("yesOrNo"); + if (1 == yesOrNo) { + historyStr.append("有"); + } else { + historyStr.append("无"); + } + } + + if (historyJson.containsKey("rgz")) { + boolean rgz = historyJson.getBooleanValue("rgz"); + if (rgz) { + historyStr.append("妊高症"); + } + } + if (historyJson.containsKey("myxxbh")) { + boolean myxxbh = historyJson.getBooleanValue("myxxbh"); + if (myxxbh) { + historyStr.append("母音血型不和"); + } + } + if (historyJson.containsKey("tegnfych")) { + boolean tegnfych = historyJson.getBooleanValue("tegnfych"); + if (tegnfych) { + historyStr.append("胎儿宫内发育迟缓"); + } + } + if (historyJson.containsKey("qt")) { + boolean qt = historyJson.getBooleanValue("qt"); + if (qt) { + historyStr.append("其他:"); + } + } + if (historyJson.containsKey("qtText")) { + historyStr.append(historyJson.getString("qtText")); + } + babyEarMotherView.setBnormalPregnancyHistoryType(historyStr.toString()); + } return babyEarMotherView; } @@ -547,7 +881,10 @@ public class BabyEarFacade { babyEarBirthView.setBirthWeight(babyPatientExtendEarBirth.getBirthWeight()); babyEarBirthView.setProductNumber(babyPatientExtendEarBirth.getProductNumber() + ""); babyEarBirthView.setBirthWeight(babyPatientExtendEarBirth.getBirthWeight()); - babyEarBirthView.setParturitionType(babyPatientExtendEarBirth.getParturitionType() + ""); + if(babyPatientExtendEarBirth.getParturitionType()!=null){ + String parturitionType = CZFmTypeEnums.getTitle(babyPatientExtendEarBirth.getParturitionType()); + babyEarBirthView.setParturitionType(parturitionType); + } babyEarBirthView.setTireNumber(babyPatientExtendEarBirth.getTireNumber()); babyEarBirthView.setBirthDefectDesc(babyPatientExtendEarBirth.getBirthDefectDesc()); babyEarBirthView.setBirthInjuryPosition(babyPatientExtendEarBirth.getBirthInjuryPosition()); @@ -678,6 +1015,11 @@ public class BabyEarFacade { if (babyEarBase.getNation() != null) { babyEarBaseView.setNation(mongoUtil.findName(babyEarBase.getNation())); } + String docotorId = babyEarBase.getCreateUserId(); + Users users = usersService.getUsers(Integer.parseInt(docotorId == null ? "0" : docotorId)); + if (users != null) { + babyEarBaseView.setCreateUser(users.getName() == null ? "-" : users.getName()); + } babyEarBaseView.setBirth(babyEarBase.getBirth()); babyEarBaseView.setResidence(CommonsHelper.getResidence(babyEarBase.getProvinceId(), babyEarBase.getCityId(), @@ -699,7 +1041,6 @@ public class BabyEarFacade { babyEarBaseView.setfLevel(getBasicConfig(babyEarBase.getfLevelId())); babyEarBaseView.setFproType(getBasicConfig(babyEarBase.getFproTypeId())); babyEarBaseView.setFphone(babyEarBase.getFphone()); - babyEarBaseView.setCreateUser(babyEarBase.getCreateUserId()); babyEarBaseView.setCreateTime(babyEarBase.getCreateTime()); babyEarBaseView.setVcCardNo(babyEarBase.getVcCardNo()); babyEarBaseView.setServiceType(ServiceStatusEnums.getNameById(babyEarBase.getServiceType())); @@ -802,7 +1143,7 @@ public class BabyEarFacade { } data.put("screenDate", DateUtil.getYyyyMmDd(babyPatientExtendEarScreen.getScreenDate())); data.put("nextCheckTime", DateUtil.getYyyyMmDd(babyPatientExtendEarScreen.getNextCheckTime())); - data.put("highRiskCause", babyPatientExtendEarScreen.getHighRiskCause()); + // data.put("highRiskCause", babyPatientExtendEarScreen.getHighRiskCause()); if (StringUtils.isNotEmpty(babyPatientExtendEarScreen.getHighRiskCause()))//听力高危因素文字 HighRiskEnum { StringBuffer hfBuff = new StringBuffer(); @@ -1018,7 +1359,9 @@ public class BabyEarFacade { screenResult.setSrcResult(srcResult); screenResult.setBabyId(earScreen.getBabyId()); screenResult.setSrcType(earScreen.getScreenType() == 1 ? "初筛" : "复筛"); - screenResult.setSrcDoctor(usersService.getUsers(Integer.valueOf(earScreen.getCheckDoctorId())).getName()); + if(StringUtils.isNotEmpty(earScreen.getCheckDoctorId())){ + screenResult.setSrcDoctor(usersService.getUsers(Integer.valueOf(earScreen.getCheckDoctorId())).getName()); + } screenResult.setSrcTime(DateUtil.getyyyy_MM_dd(earScreen.getScreenDate())); earScreenResults.add(screenResult); } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java index 2301e17..1d2a88a 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java @@ -97,6 +97,8 @@ public class BabyEarBase implements IBasicRequestConvert { //新生儿出院诊断 private String dischargeDiagnosis; //听力高危因素 + private List dischargeDiagnosisList; + //听力高危因素 private String highRiskCause; //听力高危因素 private List highRiskCauseList; @@ -149,6 +151,7 @@ public class BabyEarBase implements IBasicRequestConvert { setmLevelId(babyModel.getmLevelId()); setmAge(DateUtil.getAge(babyModel.getMbirth(),babyModel.getBuildDate())+""); setfAge(DateUtil.getAge(babyModel.getFbirth(),babyModel.getBuildDate())+""); + setCreateTime(DateUtil.getyyyy_MM_dd(babyModel.getBuildDate())); setPostCode(""); setSex(babyModel.getSex()); setFname(babyModel.getFname()); @@ -157,6 +160,7 @@ public class BabyEarBase implements IBasicRequestConvert { setfLevelId(babyModel.getfLevelId()); setFproTypeId(babyModel.getFproTypeId()); setHighRiskCause(babyModel.getHighRiskReason()); + setCreateUserId(babyModel.getBuildDoctor()); } @Override @@ -224,6 +228,14 @@ public class BabyEarBase implements IBasicRequestConvert { return fcertTypeId; } + public List getDischargeDiagnosisList() { + return dischargeDiagnosisList; + } + + public void setDischargeDiagnosisList(List dischargeDiagnosisList) { + this.dischargeDiagnosisList = dischargeDiagnosisList; + } + public void setFcertTypeId(String fcertTypeId) { this.fcertTypeId = fcertTypeId; }