Explorar o código

北仑trans层查房记录修改

huj %!s(int64=4) %!d(string=hai) anos
pai
achega
5970a5349b

+ 12 - 6
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunThreeLevelWardDocTrans.java

@@ -16,6 +16,9 @@ import com.lantone.qc.pub.model.vo.MedrecVo;
 import com.lantone.qc.pub.util.SpringContextUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
+import com.lantone.qc.trans.beilun.util.BeiLunConsultationHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
+import com.lantone.qc.trans.beilun.util.BeiLunThreeLevelWardHtmlAnalysis;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
 import com.lantone.qc.trans.comsis.Preproc;
 import lombok.Setter;
@@ -56,16 +59,18 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
 
     private void classifyThreeLevelWardDoc(ThreeLevelWardDoc threeLevelWardDoc, Map<String, Object> contentMap) {
         String content = contentMap.get("xmlText").toString();
-        Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
-        xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
         String recTitle = contentMap.get("recTitle").toString();
+        String recTypeId = contentMap.get("recTypeId").toString();
+        BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunThreeLevelWardHtmlAnalysis();
+        Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
+
         if (recTitles.contains(recTitle)) {
-            xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
+            sourceMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
         }
-        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts);
-        structureMap.put("查房日期", structureMap.get("记录时间"));
+        Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
+        //structureMap.put("查房日期", structureMap.get("记录时间"));
 
-        Map<String, String> cutWordMap = Maps.newHashMap();
+        /*Map<String, String> cutWordMap = Maps.newHashMap();
         String text = CxXmlUtil.getXmlText(content);
         if (StringUtil.isNotBlank(text)) {
             if (StringUtil.isBlank(structureMap.get("病情记录"))) {
@@ -88,6 +93,7 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
                 }
             }
         }
+         */
 
         //总的查房记录 汇总
         ThreeLevelWardDoc allDoctorWradDoc = new ThreeLevelWardDoc();

+ 3 - 1
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunThreeLevelWardHtmlAnalysis.java

@@ -22,10 +22,12 @@ public class BeiLunThreeLevelWardHtmlAnalysis implements BeiLunHtmlAnalysis {
     public Map<String, String> analysis(String... args) {
         String html = args[0];
         String recTitle = args[1];
+        String recTypeId = args[1];
         Map<String, String> structureMap = Maps.newLinkedHashMap();
         String htmlText = CommonAnalysisUtil.html2String(html);
         CommonAnalysisUtil.extractWardInfo(htmlText, structureMap);
-        structureMap.put("rec_title=", "5254");
+        BeiLunHtmlAnalysisUtil.insertModuleId(recTypeId, structureMap);
+        //structureMap.put("rec_title=", "5254");
         return structureMap;
     }
 

+ 2 - 3
trans/src/main/java/com/lantone/qc/trans/beilun/util/CommonAnalysisUtil.java

@@ -310,11 +310,10 @@ public class CommonAnalysisUtil {
     /**
      * 抽取自定义病程录信息
      *
-     * @param html
+     * @param htmlText
      * @param structureMap
      */
-    public static void extractWardInfo(String html, Map<String, String> structureMap) {
-        String htmlText = CommonAnalysisUtil.html2String(html);
+    public static void extractWardInfo(String htmlText, Map<String, String> structureMap) {
         if (StringUtil.isNotBlank(htmlText)) {
             htmlText = htmlText.replaceAll("[   ]", " ");
             String date = extractDate(htmlText);