diff --git a/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java b/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java index 039e249..5bd9589 100644 --- a/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java +++ b/platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java @@ -114,7 +114,7 @@ public class QhdfyFmService { try { String sql ="select "+cloumns+" from JHMK_FMJL where " + " CONVERT(DATETIME,left(SSRQ,8)+' '+RIGHT(SSRQ,8),20) > CONVERT(DATETIME,'"+start+"', 120) and CONVERT(DATETIME,left(SSRQ,8)+' '+RIGHT(SSRQ,8),20) <= CONVERT(DATETIME,'"+end+"', 120)" + - " and SYXH not in (select SYXH from JHMK_FMJL where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and SH is not null" + + " and SYXH not in (select SYXH from JHMK_FMJL where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and SH is not null and CCQK is not null and CCQK <> '' " + " and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ')) "; if (StringUtils.isNotEmpty(syxh)) @@ -127,6 +127,11 @@ public class QhdfyFmService { if (CollectionUtils.isNotEmpty(list)) { for (FmItem item : list) { try { + + if (!("活产".equals(item.getCcqk()) || "死胎".equals(item.getCcqk()))) + { + continue; + } ExceptionUtils.catchException("item===" + item); String dueDateStr = item.getSsrq(); if (!StringUtils.isNotEmpty(dueDateStr)) { @@ -223,7 +228,7 @@ public class QhdfyFmService { baby.setDeformity("无".equals(item.getJx()) ? 0 : 1); //畸形 0非畸形 1畸形 baby.setAsphyxiaM(item.getZx()); //窒息分钟 baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(item.getCcqk())); // 妊娠结局 - baby.setBabyHealthy(item.getYeqk()); //新生儿疾病 + //baby.setBabyHealthy(item.getYeqk()); //新生儿疾病 baby.setDueTime(fmt1.format(dueDate));//分娩时间 babies.add(baby); deliverAddRequest.setFmHospital("216"); //设置为秦皇岛分娩医院 @@ -244,7 +249,6 @@ public class QhdfyFmService { saveFmrecord(item.getSyxh()); } - } catch (Exception e) { ExceptionUtils.catchException(e, "数据异常"); @@ -253,7 +257,7 @@ public class QhdfyFmService { } } - String sql1="select * from JHMK_FMJL where JSZ is not null and SC is not null and TZ is not null and YFZ is not null " + + String sql1="select * from JHMK_FMJL where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and CCQK is not null and CCQK <> '' " + " and SH is not null and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ') and " + " CONVERT(DATETIME,left(SSRQ,8)+' '+RIGHT(SSRQ,8),20) > CONVERT(DATETIME,'"+start+"', 120) and CONVERT(DATETIME,left(SSRQ,8)+' '+RIGHT(SSRQ,8),20) <= CONVERT(DATETIME,'"+end+"', 120)"; @@ -292,6 +296,11 @@ public class QhdfyFmService { List items = maps.get(key); FmItem item = items.get(0); + if (!("活产".equals(item.getCcqk()) || "死胎".equals(item.getCcqk()))) + { + continue; + } + String dueDateStr = item.getSsrq(); if (!StringUtils.isNotEmpty(dueDateStr)) { @@ -417,10 +426,12 @@ public class QhdfyFmService { baby.setBabyGender("男".equals(item1.getYexb()) ? "1" : "0"); baby.setBabyHeight(item1.getSc());//新生儿生长 baby.setBabyWeight(item1.getTz());//新生儿重量 - baby.setDeformity("无".equals(item1.getJx()) ? 0 : 1); //畸形 0非畸形 1畸形 baby.setAsphyxiaM(item1.getZx()); //窒息分钟 + + baby.setDeformity("无".equals(item1.getJx()) ? 0 : 1); //畸形 0非畸形 1畸形 + baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(item1.getCcqk())); // 妊娠结局 - baby.setBabyHealthy(item1.getYeqk()); //新生儿疾病 +// baby.setBabyHealthy(item1.getYeqk()); //新生儿疾病 baby.setDueTime(fmt1.format(dueDate1));//分娩时间 babies.add(baby); @@ -482,6 +493,12 @@ public class QhdfyFmService { public void buildBaby(FmItem item,FmPatInfo patInfo, Date dueDate) { try{ + // O("活产", "0"),O1("死胎", "1"),O2("浸软胎", "2"),O3("死产", "3"); + if (!"活产".equals(item.getCcqk())) + { + return; + } + UsersQuery usersQuery = new UsersQuery(); usersQuery.setYn(YnEnums.YES.getId()); usersQuery.setName("产房");