Browse Source

诊疗计划未填写

chengyao 3 years ago
parent
commit
ea99db0f44

+ 14 - 0
trans/src/main/java/com/lantone/qc/trans/changshaxy/FirstCourseRecordDocTrans.java

@@ -56,6 +56,14 @@ public class FirstCourseRecordDocTrans extends ModelDocTrans {
             if (structureMap.containsKey("诊疗计划") && structureMap.get("诊疗计划").contains("1.2.3.4.")) {
                 structureMap.put("诊疗计划", "");
             }
+            if (structureMap.containsKey("病例分型") && StringUtil.isBlank(removeSpecialChar(structureMap.get("诊疗计划")))) {
+                String think = structureMap.get("病例分型");
+                if(think.contains("诊疗计划")){
+                    structureMap.put("病例分型",think.split("诊疗计划")[0]);
+                    String plan = think.split("诊疗计划")[1];
+                        structureMap.put("诊疗计划",plan);
+                }
+            }
             if (structureMap.containsKey("诊疗计划") && !structureMap.containsKey("记录医生")) {
                 String plan = structureMap.get("诊疗计划");
                 if(plan.contains("。")){
@@ -104,4 +112,10 @@ public class FirstCourseRecordDocTrans extends ModelDocTrans {
             "3.病历分型=病例分型"
     );
 
+    public  String removeSpecialChar(String content) {
+        if (StringUtil.isEmpty(content)) {
+            return "";
+        }
+        return content.replaceAll("[\r\n|\n|\t]", " ").trim();
+    }
 }