|
@@ -2,6 +2,7 @@ package com.lantone.qc.trans.taizhou.util;
|
|
|
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import com.lantone.qc.trans.comsis.XmlUtil;
|
|
|
import com.lantone.qc.trans.util.http.db.DBUtil;
|
|
|
import org.dom4j.Document;
|
|
|
import org.dom4j.DocumentHelper;
|
|
@@ -35,7 +36,7 @@ public class TzXmlUtil {
|
|
|
public static Map<String, String> getXmlToMapForTZ(String xml) {
|
|
|
Map<String, String> retMap = Maps.newHashMap();
|
|
|
try {
|
|
|
- Document doc = DocumentHelper.parseText(xml);
|
|
|
+ Document doc = DocumentHelper.parseText(XmlUtil.xmlErrorCorrection(xml));
|
|
|
List<Element> emrTermElements = doc.getRootElement().element("TermList").elements("EMR-TERM");
|
|
|
emrTermElements.forEach(emrTermElement -> {
|
|
|
if(retMap == null || StringUtil.isEmpty(retMap.get(StringUtil.removeBlank(emrTermElement.attributeValue("ename"))))){
|
|
@@ -48,7 +49,7 @@ public class TzXmlUtil {
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- return retMap;
|
|
|
+ return XmlUtil.correctMapOfXml(retMap);
|
|
|
}
|
|
|
|
|
|
|