|
@@ -18,6 +18,8 @@ import com.lantone.qc.trans.beilun.util.BeiLunOperationRecordHtmlAnalysis;
|
|
import com.lantone.qc.trans.beilun.util.BeiLunPreoperativeHtmlAnalysis;
|
|
import com.lantone.qc.trans.beilun.util.BeiLunPreoperativeHtmlAnalysis;
|
|
import com.lantone.qc.trans.comsis.ModelDocGenerate;
|
|
import com.lantone.qc.trans.comsis.ModelDocGenerate;
|
|
import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.apache.commons.collections.MapUtils;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -28,6 +30,7 @@ import java.util.Set;
|
|
* @author: rengb
|
|
* @author: rengb
|
|
* @time: 2020/3/20 17:11
|
|
* @time: 2020/3/20 17:11
|
|
*/
|
|
*/
|
|
|
|
+@Slf4j
|
|
public class BeiLunOperationDocTrans extends ModelDocTrans {
|
|
public class BeiLunOperationDocTrans extends ModelDocTrans {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -73,11 +76,17 @@ public class BeiLunOperationDocTrans extends ModelDocTrans {
|
|
if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
|
|
if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- operationName = index + "";
|
|
|
|
- OperationDiscussionDoc operationDiscussionDoc = getOperationDiscussionDoc(contentMap);
|
|
|
|
- operationDiscussionDoc.setOperationName(operationName);
|
|
|
|
- retMap.put(operationName, operationDiscussionDoc);
|
|
|
|
- index++;
|
|
|
|
|
|
+ try {
|
|
|
|
+ OperationDiscussionDoc operationDiscussionDoc = getOperationDiscussionDoc(contentMap);
|
|
|
|
+ if (operationDiscussionDoc != null) {
|
|
|
|
+ operationName = index + "";
|
|
|
|
+ operationDiscussionDoc.setOperationName(operationName);
|
|
|
|
+ retMap.put(operationName, operationDiscussionDoc);
|
|
|
|
+ index++;
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return retMap;
|
|
return retMap;
|
|
}
|
|
}
|
|
@@ -92,14 +101,19 @@ public class BeiLunOperationDocTrans extends ModelDocTrans {
|
|
String recTypeId = contentMap.get("recTypeId").toString();
|
|
String recTypeId = contentMap.get("recTypeId").toString();
|
|
BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunOperationHtmlAnalysis();
|
|
BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunOperationHtmlAnalysis();
|
|
Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
- structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationDiscussion_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, operationDiscussion_keyContrasts);
|
|
|
|
+ structureMap.put("记录编号", contentMap.get("recId").toString());
|
|
|
|
+ structureMap.put("病历号", contentMap.get("behospitalCode") == null ? null : contentMap.get("behospitalCode").toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (MapUtils.isNotEmpty(structureMap)) {
|
|
|
|
+ OperationDiscussionDoc operationDiscussionDoc = ModelDocGenerate.operationDiscussionDocGen(structureMap);
|
|
|
|
+ operationDiscussionDoc.setPageData((Map) structureMap);
|
|
|
|
+ return operationDiscussionDoc;
|
|
|
|
+ } else {
|
|
|
|
+ return null;
|
|
}
|
|
}
|
|
-
|
|
|
|
- OperationDiscussionDoc operationDiscussionDoc = ModelDocGenerate.operationDiscussionDocGen(structureMap);
|
|
|
|
- operationDiscussionDoc.setPageData((Map) structureMap);
|
|
|
|
- return operationDiscussionDoc;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private List<String> operationDiscussion_keyContrasts = Lists.newArrayList(
|
|
private List<String> operationDiscussion_keyContrasts = Lists.newArrayList(
|
|
@@ -121,11 +135,17 @@ public class BeiLunOperationDocTrans extends ModelDocTrans {
|
|
if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
|
|
if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- operationName = index + "";
|
|
|
|
- OperationRecordDoc operationRecordDoc = getOperationRecordDoc(contentMap);
|
|
|
|
- operationRecordDoc.setOperationName(operationName);
|
|
|
|
- retMap.put(operationName, operationRecordDoc);
|
|
|
|
- index++;
|
|
|
|
|
|
+ try {
|
|
|
|
+ OperationRecordDoc operationRecordDoc = getOperationRecordDoc(contentMap);
|
|
|
|
+ if (operationRecordDoc != null) {
|
|
|
|
+ operationName = index + "";
|
|
|
|
+ operationRecordDoc.setOperationName(operationName);
|
|
|
|
+ retMap.put(operationName, operationRecordDoc);
|
|
|
|
+ index++;
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return retMap;
|
|
return retMap;
|
|
}
|
|
}
|
|
@@ -140,14 +160,19 @@ public class BeiLunOperationDocTrans extends ModelDocTrans {
|
|
String recTypeId = contentMap.get("recTypeId").toString();
|
|
String recTypeId = contentMap.get("recTypeId").toString();
|
|
BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunOperationRecordHtmlAnalysis();
|
|
BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunOperationRecordHtmlAnalysis();
|
|
Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
- structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationRecord_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, operationRecord_keyContrasts);
|
|
|
|
+ structureMap.put("记录编号", contentMap.get("recId").toString());
|
|
|
|
+ structureMap.put("病历号", contentMap.get("behospitalCode") == null ? null : contentMap.get("behospitalCode").toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (MapUtils.isNotEmpty(structureMap)) {
|
|
|
|
+ OperationRecordDoc operationRecordDoc = ModelDocGenerate.operationRecordDocGen(structureMap);
|
|
|
|
+ operationRecordDoc.setPageData((Map) structureMap);
|
|
|
|
+ return operationRecordDoc;
|
|
|
|
+ } else {
|
|
|
|
+ return null;
|
|
}
|
|
}
|
|
-
|
|
|
|
- OperationRecordDoc operationRecordDoc = ModelDocGenerate.operationRecordDocGen(structureMap);
|
|
|
|
- operationRecordDoc.setPageData((Map) structureMap);
|
|
|
|
- return operationRecordDoc;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private List<String> operationRecord_keyContrasts = Lists.newArrayList(
|
|
private List<String> operationRecord_keyContrasts = Lists.newArrayList(
|
|
@@ -172,11 +197,17 @@ public class BeiLunOperationDocTrans extends ModelDocTrans {
|
|
if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
|
|
if (contentMap.get("xmlText") == null || StringUtil.isBlank(contentMap.get("xmlText").toString())) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- operationName = index + "";
|
|
|
|
- PreoperativeDiscussionDoc preoperativeDiscussionDoc = getPreoperativeDiscussionDoc(contentMap);
|
|
|
|
- preoperativeDiscussionDoc.setOperationName(operationName);
|
|
|
|
- retMap.put(operationName, preoperativeDiscussionDoc);
|
|
|
|
- index++;
|
|
|
|
|
|
+ try {
|
|
|
|
+ PreoperativeDiscussionDoc preoperativeDiscussionDoc = getPreoperativeDiscussionDoc(contentMap);
|
|
|
|
+ if (preoperativeDiscussionDoc != null) {
|
|
|
|
+ operationName = index + "";
|
|
|
|
+ preoperativeDiscussionDoc.setOperationName(operationName);
|
|
|
|
+ retMap.put(operationName, preoperativeDiscussionDoc);
|
|
|
|
+ index++;
|
|
|
|
+ }
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return retMap;
|
|
return retMap;
|
|
}
|
|
}
|
|
@@ -191,14 +222,19 @@ public class BeiLunOperationDocTrans extends ModelDocTrans {
|
|
String recTypeId = contentMap.get("recTypeId").toString();
|
|
String recTypeId = contentMap.get("recTypeId").toString();
|
|
BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunPreoperativeHtmlAnalysis();
|
|
BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunPreoperativeHtmlAnalysis();
|
|
Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
- structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, preoperativeDiscussion_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, preoperativeDiscussion_keyContrasts);
|
|
|
|
+ structureMap.put("记录编号", contentMap.get("recId").toString());
|
|
|
|
+ structureMap.put("病历号", contentMap.get("behospitalCode") == null ? null : contentMap.get("behospitalCode").toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (MapUtils.isNotEmpty(structureMap)) {
|
|
|
|
+ PreoperativeDiscussionDoc preoperativeDiscussionDoc = ModelDocGenerate.preoperativeDiscussionDocGen(structureMap);
|
|
|
|
+ preoperativeDiscussionDoc.setPageData((Map) structureMap);
|
|
|
|
+ return preoperativeDiscussionDoc;
|
|
|
|
+ } else {
|
|
|
|
+ return null;
|
|
}
|
|
}
|
|
-
|
|
|
|
- PreoperativeDiscussionDoc preoperativeDiscussionDoc = ModelDocGenerate.preoperativeDiscussionDocGen(structureMap);
|
|
|
|
- preoperativeDiscussionDoc.setPageData((Map) structureMap);
|
|
|
|
- return preoperativeDiscussionDoc;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private List<String> preoperativeDiscussion_keyContrasts = Lists.newArrayList(
|
|
private List<String> preoperativeDiscussion_keyContrasts = Lists.newArrayList(
|