|
@@ -8,6 +8,7 @@ import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
|
|
import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
|
|
import com.lantone.qc.pub.model.doc.operation.PreoperativeDiscussionDoc;
|
|
import com.lantone.qc.pub.model.doc.operation.PreoperativeDiscussionDoc;
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
|
|
+import com.lantone.qc.pub.util.FastJsonUtils;
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
@@ -83,12 +84,17 @@ public class BeiLunOperationDocTrans extends ModelDocTrans {
|
|
|
|
|
|
private OperationDiscussionDoc getOperationDiscussionDoc(Map<String, Object> contentMap) {
|
|
private OperationDiscussionDoc getOperationDiscussionDoc(Map<String, Object> contentMap) {
|
|
String content = contentMap.get("xmlText").toString();
|
|
String content = contentMap.get("xmlText").toString();
|
|
- String recTitle = contentMap.get("recTitle").toString();
|
|
|
|
- String recTypeId = contentMap.get("recTypeId").toString();
|
|
|
|
- BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunOperationHtmlAnalysis();
|
|
|
|
- Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
|
|
- Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationDiscussion_keyContrasts);
|
|
|
|
- structureMap.put("记录编号", contentMap.get("recId").toString());
|
|
|
|
|
|
+ Map<String, String> structureMap = null;
|
|
|
|
+ if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
|
|
+ structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
|
+ } else {
|
|
|
|
+ String recTitle = contentMap.get("recTitle").toString();
|
|
|
|
+ String recTypeId = contentMap.get("recTypeId").toString();
|
|
|
|
+ BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunOperationHtmlAnalysis();
|
|
|
|
+ Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationDiscussion_keyContrasts);
|
|
|
|
+ structureMap.put("记录编号", contentMap.get("recId").toString());
|
|
|
|
+ }
|
|
|
|
|
|
OperationDiscussionDoc operationDiscussionDoc = ModelDocGenerate.operationDiscussionDocGen(structureMap);
|
|
OperationDiscussionDoc operationDiscussionDoc = ModelDocGenerate.operationDiscussionDocGen(structureMap);
|
|
operationDiscussionDoc.setPageData((Map) structureMap);
|
|
operationDiscussionDoc.setPageData((Map) structureMap);
|
|
@@ -125,12 +131,17 @@ public class BeiLunOperationDocTrans extends ModelDocTrans {
|
|
|
|
|
|
private OperationRecordDoc getOperationRecordDoc(Map<String, Object> contentMap) {
|
|
private OperationRecordDoc getOperationRecordDoc(Map<String, Object> contentMap) {
|
|
String content = contentMap.get("xmlText").toString();
|
|
String content = contentMap.get("xmlText").toString();
|
|
- String recTitle = contentMap.get("recTitle").toString();
|
|
|
|
- String recTypeId = contentMap.get("recTypeId").toString();
|
|
|
|
- BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunOperationRecordHtmlAnalysis();
|
|
|
|
- Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
|
|
- Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationRecord_keyContrasts);
|
|
|
|
- structureMap.put("记录编号", contentMap.get("recId").toString());
|
|
|
|
|
|
+ Map<String, String> structureMap = null;
|
|
|
|
+ if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
|
|
+ structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
|
+ } else {
|
|
|
|
+ String recTitle = contentMap.get("recTitle").toString();
|
|
|
|
+ String recTypeId = contentMap.get("recTypeId").toString();
|
|
|
|
+ BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunOperationRecordHtmlAnalysis();
|
|
|
|
+ Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationRecord_keyContrasts);
|
|
|
|
+ structureMap.put("记录编号", contentMap.get("recId").toString());
|
|
|
|
+ }
|
|
|
|
|
|
OperationRecordDoc operationRecordDoc = ModelDocGenerate.operationRecordDocGen(structureMap);
|
|
OperationRecordDoc operationRecordDoc = ModelDocGenerate.operationRecordDocGen(structureMap);
|
|
operationRecordDoc.setPageData((Map) structureMap);
|
|
operationRecordDoc.setPageData((Map) structureMap);
|
|
@@ -169,12 +180,17 @@ public class BeiLunOperationDocTrans extends ModelDocTrans {
|
|
|
|
|
|
private PreoperativeDiscussionDoc getPreoperativeDiscussionDoc(Map<String, Object> contentMap) {
|
|
private PreoperativeDiscussionDoc getPreoperativeDiscussionDoc(Map<String, Object> contentMap) {
|
|
String content = contentMap.get("xmlText").toString();
|
|
String content = contentMap.get("xmlText").toString();
|
|
- String recTitle = contentMap.get("recTitle").toString();
|
|
|
|
- String recTypeId = contentMap.get("recTypeId").toString();
|
|
|
|
- BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunPreoperativeHtmlAnalysis();
|
|
|
|
- Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
|
|
- Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, preoperativeDiscussion_keyContrasts);
|
|
|
|
- structureMap.put("记录编号", contentMap.get("recId").toString());
|
|
|
|
|
|
+ Map<String, String> structureMap = null;
|
|
|
|
+ if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
|
|
+ structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
|
+ } else {
|
|
|
|
+ String recTitle = contentMap.get("recTitle").toString();
|
|
|
|
+ String recTypeId = contentMap.get("recTypeId").toString();
|
|
|
|
+ BeiLunHtmlAnalysis beiLunHtmlAnalysis = new BeiLunPreoperativeHtmlAnalysis();
|
|
|
|
+ Map<String, String> sourceMap = beiLunHtmlAnalysis.analysis(content, recTitle, recTypeId);
|
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, preoperativeDiscussion_keyContrasts);
|
|
|
|
+ structureMap.put("记录编号", contentMap.get("recId").toString());
|
|
|
|
+ }
|
|
|
|
|
|
PreoperativeDiscussionDoc preoperativeDiscussionDoc = ModelDocGenerate.preoperativeDiscussionDocGen(structureMap);
|
|
PreoperativeDiscussionDoc preoperativeDiscussionDoc = ModelDocGenerate.preoperativeDiscussionDocGen(structureMap);
|
|
preoperativeDiscussionDoc.setPageData((Map) structureMap);
|
|
preoperativeDiscussionDoc.setPageData((Map) structureMap);
|