Sfoglia il codice sorgente

北仑首次病程录解析html修改

huj 4 anni fa
parent
commit
0d60f2d25b

+ 4 - 4
trans/src/main/java/com/lantone/qc/trans/beilun/util/BeiLunFirstCourseRecordHtmlAnalysis.java

@@ -38,13 +38,13 @@ public class BeiLunFirstCourseRecordHtmlAnalysis implements BeiLunHtmlAnalysis {
                         text += lines[i];
                     }
                     //htmlContent = lines[1];
-                    String date = CommonAnalysisUtil.extractDate(htmlContent);
+                    String date = CommonAnalysisUtil.extractDate(text);
                     if (StringUtil.isNotBlank(date)) {
                         structureMap.put("时间", date);
-                        htmlContent = htmlContent.replace(date, "");
+                        text = text.replace(date, "");
                     }
-                    htmlContent = htmlContent.replaceAll("[   ]", " ");
-                    CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
+                    text = text.replaceAll("[   ]", " ");
+                    CommonAnalysisUtil.html2StructureMap(titles, text, structureMap);
                 }
             }
             if (structureMap.containsKey("(一)病历特点")) {

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

@@ -141,9 +141,10 @@ public class CommonAnalysisUtil {
         beforeTitle = titles.get(Math.max(depth - 1, 0));
         title = titles.get(Math.min(depth, titles.size() - 1));
         if (depth == titles.size()) {
-            if (line.contains("\n")) {
+            /*if (line.contains("\n")) {
                 line = line.split("\n")[0];
             }
+            */
             value = line;
             structureMap.put(beforeTitle, value.trim());
             return;