|
@@ -18,6 +18,8 @@ import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
|
|
|
import com.lantone.qc.trans.beilun.util.BeiLunThreeLevelWardHtmlAnalysis;
|
|
|
import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
|
import lombok.Setter;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.collections.MapUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import java.util.Calendar;
|
|
@@ -32,6 +34,7 @@ import java.util.regex.Pattern;
|
|
|
* @author: rengb
|
|
|
* @time: 2020/3/17 13:27
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@Setter
|
|
|
public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
|
|
|
|
|
@@ -43,7 +46,11 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
|
|
|
ThreeLevelWardDoc threeLevelWardDoc = new ThreeLevelWardDoc();
|
|
|
List<Map<String, Object>> contentMaps = (List) medrecVo.getContent().get("content");
|
|
|
contentMaps.forEach(contentMap -> {
|
|
|
- classifyThreeLevelWardDoc(threeLevelWardDoc, contentMap);
|
|
|
+ try {
|
|
|
+ classifyThreeLevelWardDoc(threeLevelWardDoc, contentMap);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ }
|
|
|
});
|
|
|
retList.add(threeLevelWardDoc);
|
|
|
return retList;
|
|
@@ -59,9 +66,14 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
|
|
|
String recTypeId = contentMap.get("recTypeId").toString();
|
|
|
BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunThreeLevelWardHtmlAnalysis();
|
|
|
Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
|
- structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
|
|
|
- structureMap.put("记录编号", contentMap.get("recId").toString());
|
|
|
- structureMap.put("病历号", contentMap.get("behospitalCode") == null ? null : contentMap.get("behospitalCode").toString());
|
|
|
+ if (MapUtils.isNotEmpty(sourceMap)) {
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
|
|
|
+ structureMap.put("记录编号", contentMap.get("recId").toString());
|
|
|
+ structureMap.put("病历号", contentMap.get("behospitalCode") == null ? null : contentMap.get("behospitalCode").toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (MapUtils.isEmpty(structureMap)) {
|
|
|
+ return;
|
|
|
}
|
|
|
//structureMap.put("查房日期", structureMap.get("记录时间"));
|
|
|
|