瀏覽代碼

颅脑昏迷、新生儿入院体重、离院方式调整

liuqq 3 年之前
父節點
當前提交
bafa3c5f57

+ 5 - 9
src/main/java/com/diagbot/facade/data/AMedicalRecordFacade.java

@@ -10,12 +10,8 @@ import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.data.AMedicalRecordDTO;
 import com.diagbot.dto.data.AMrContentDTO;
 import com.diagbot.entity.*;
-import com.diagbot.enums.data.BehospitalWayXmlEnum;
+import com.diagbot.enums.data.*;
 import com.diagbot.enums.IsDeleteEnum;
-import com.diagbot.enums.data.FamousFamilyEnum;
-import com.diagbot.enums.data.NationalityEnum;
-import com.diagbot.enums.data.OccupationEnum;
-import com.diagbot.enums.data.RelationshipEnum;
 import com.diagbot.facade.*;
 import com.diagbot.service.impl.MedicalRecordServiceImpl;
 import com.diagbot.service.impl.QcAbnormalServiceImpl;
@@ -413,7 +409,7 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
         } else if(YWDateUtils.isDate(paramsObj.getString("质控日期"), "yyyy年MM月dd日")){
             aHomePageVO.setQcDate(paramsObj.getString("质控日期").replaceAll("[\u4e00-\u9fa5]", "-"));
         }
-        aHomePageVO.setLeaveHospitalType(paramsObj.getString("离院方式"));
+        aHomePageVO.setLeaveHospitalType(LeaveHospitalTypeEnum.getName(paramsObj.getString("离院方式")));
         aHomePageVO.setAcceptOrgCode(paramsObj.getString("接收机构名称"));
         aHomePageVO.setAgainBehospitalPlan(paramsObj.getString("三十一天内再住院计划"));
         aHomePageVO.setAgainBehospitalGoal(paramsObj.getString("再住院目的"));
@@ -567,15 +563,15 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
         Long qcTypeId = Long.valueOf("0");
         String behDeptId = behospitalInfo.getBehDeptId();
         String recTypeId = medicalRecord.getRecTypeId();
-        if (recTypeId.contains("RJBL") || recTypeId.contains("24XSCRYJL")) {
+        if (recTypeId.contains("RJBL") || recTypeId.contains("24XSCRYJL") || recTypeId.contains("24XSCRYJL1")) {
             if (behDeptId.equals("52425")) {
                 /**妇科(住)日间病历、24小时出入院记录的病历模板,映射妇科日间*/
                 behDeptId = "52883";
             } else if (behDeptId.equals("51944")) {
                 /**乳腺外科日间病历、24小时出入院记录的病历模板,映射乳腺外科日间日间*/
                 behDeptId = "52923";
-            } else if (behDeptId.equals("52424") || behDeptId.equals("52643")) {
-                /**儿科日间病历、24小时出入院记录的病历模板、小儿外科住,映射儿科日间*/
+            } else if (behDeptId.equals("52424") || behDeptId.equals("52643") || behDeptId.equals("51766")) {
+                /**儿科日间病历、24小时出入院记录的病历模板、小儿外科住、新生儿科,映射儿科日间*/
                 behDeptId = "52903";
             }
         }

+ 28 - 8
src/main/java/com/diagbot/util/YiWuFirstPageRecordXmlUtil.java

@@ -90,6 +90,10 @@ public class YiWuFirstPageRecordXmlUtil {
                     }
                 }
             }
+            if(containsAgeText && containsWeightText){
+                String weightText= text.substring(text.indexOf("新生儿入院体重"), text.indexOf("出生地"));
+                structureMap.put("新生儿入院体重",weightText.substring(weightText.indexOf("重")+1, weightText.indexOf("克")));
+            }
         }
     }
 
@@ -115,15 +119,31 @@ public class YiWuFirstPageRecordXmlUtil {
                     }
                 }
 
-            /*if(StringUtil.isNotBlank(text) && text.contains("颅脑损伤患者昏迷时间")){
-                String tempText = "";
-                tempText=text.substring(text.indexOf("颅脑损伤患者昏迷时间"),text.indexOf("入院后"));
-                Pattern p=Pattern.compile("\\d+");
-                Matcher m=p.matcher(tempText);
-                if (m.find()) {
-                    structureMap.put("颅脑损伤患者昏迷前天数",m.find(text.indexOf("天")));
+                if(StringUtil.isNotBlank(text) && text.contains("颅脑损伤患者昏迷时间")){
+                    String tempText = "";
+                    tempText=text.substring(text.indexOf("颅脑损伤患者昏迷时间"),text.indexOf("重症监护室名称"));
+                    String tempBeforeText=tempText.substring(tempText.indexOf("入院前"),tempText.indexOf("入院后")).trim();
+                    String tempAfterText=tempText.substring(tempText.indexOf("入院后")).trim();
+                    Pattern p=Pattern.compile("\\d+");
+                    if(p.matcher(tempBeforeText.substring(tempBeforeText.indexOf("天")-1,tempBeforeText.indexOf("天"))).find()){
+                        structureMap.put("颅脑损伤患者昏迷前天数",tempBeforeText.substring(tempBeforeText.indexOf("天")-1,tempBeforeText.indexOf("天")));
+                    }
+                    if(p.matcher(tempBeforeText.substring(tempBeforeText.indexOf("小时")-1,tempBeforeText.indexOf("小时"))).find()){
+                        structureMap.put("颅脑损伤患者昏迷前小时",tempBeforeText.substring(tempBeforeText.indexOf("小时")-1,tempBeforeText.indexOf("小时")));
+                    }
+                    if(p.matcher(tempBeforeText.substring(tempBeforeText.indexOf("分钟")-1,tempBeforeText.indexOf("分钟"))).find()){
+                        structureMap.put("颅脑损伤患者昏迷前分钟",tempBeforeText.substring(tempBeforeText.indexOf("分钟")-1,tempBeforeText.indexOf("分钟")));
+                    }
+                    if(p.matcher(tempAfterText.substring(tempAfterText.indexOf("天")-1,tempAfterText.indexOf("天"))).find()){
+                        structureMap.put("颅脑损伤患者昏迷后天数",tempAfterText.substring(tempAfterText.indexOf("天")-1,tempAfterText.indexOf("天")));
+                    }
+                    if(p.matcher(tempAfterText.substring(tempAfterText.indexOf("小时")-1,tempAfterText.indexOf("小时"))).find()){
+                        structureMap.put("颅脑损伤患者昏迷后小时",tempAfterText.substring(tempAfterText.indexOf("小时")-1,tempAfterText.indexOf("小时")));
+                    }
+                    if(p.matcher(tempAfterText.substring(tempAfterText.indexOf("分钟")-1,tempAfterText.indexOf("分钟"))).find()){
+                        structureMap.put("颅脑损伤患者昏迷后分钟",tempAfterText.substring(tempAfterText.indexOf("分钟")-1,tempAfterText.indexOf("分钟")));
+                    }
                 }
-            }*/
             }
         }catch (Exception e){
             structureMap.put("抢救次数",0);