|
@@ -14,16 +14,10 @@ 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;
|
|
-import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysis;
|
|
|
|
-import com.lantone.qc.trans.beilun.util.BeiLunHtmlAnalysisUtil;
|
|
|
|
-import com.lantone.qc.trans.beilun.util.BeiLunOperationHtmlAnalysis;
|
|
|
|
-import com.lantone.qc.trans.beilun.util.BeiLunOperationRecordHtmlAnalysis;
|
|
|
|
-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 lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.collections.MapUtils;
|
|
import org.apache.commons.collections.MapUtils;
|
|
-import org.jsoup.Jsoup;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -102,37 +96,18 @@ public class XiamenOperationDocTrans 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();
|
|
Map<String, String> structureMap = null;
|
|
Map<String, String> structureMap = null;
|
|
- OperationDiscussionDoc operationDiscussionDoc = new OperationDiscussionDoc();
|
|
|
|
|
|
+ OperationDiscussionDoc operationDiscussionDoc = null;
|
|
if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
if (MapUtils.isNotEmpty(structureMap)) {
|
|
if (MapUtils.isNotEmpty(structureMap)) {
|
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(structureMap, operationDiscussion_keyContrasts, "18");
|
|
operationDiscussionDoc = ModelDocGenerate.operationDiscussionDocGen(structureMap);
|
|
operationDiscussionDoc = ModelDocGenerate.operationDiscussionDocGen(structureMap);
|
|
operationDiscussionDoc.setText(content);
|
|
operationDiscussionDoc.setText(content);
|
|
operationDiscussionDoc.setPageData((Map) structureMap);
|
|
operationDiscussionDoc.setPageData((Map) structureMap);
|
|
- return operationDiscussionDoc;
|
|
|
|
- } else {
|
|
|
|
- return null;
|
|
|
|
- }
|
|
|
|
- } 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);
|
|
|
|
- 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 = ModelDocGenerate.operationDiscussionDocGen(structureMap);
|
|
|
|
- String text = BeiLunHtmlAnalysisUtil.blockDivToStr(Jsoup.parse(content).selectFirst("body").child(0), true);
|
|
|
|
- operationDiscussionDoc.setText(text);
|
|
|
|
- operationDiscussionDoc.setPageData((Map) structureMap);
|
|
|
|
- return operationDiscussionDoc;
|
|
|
|
- } else {
|
|
|
|
- return null;
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ return operationDiscussionDoc;
|
|
}
|
|
}
|
|
|
|
|
|
private List<String> operationDiscussion_keyContrasts = Lists.newArrayList(
|
|
private List<String> operationDiscussion_keyContrasts = Lists.newArrayList(
|
|
@@ -178,20 +153,9 @@ public class XiamenOperationDocTrans extends ModelDocTrans {
|
|
Map<String, String> structureMap = null;
|
|
Map<String, String> structureMap = null;
|
|
if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
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);
|
|
|
|
- //含有手术情况知情书时间特殊处理
|
|
|
|
- if (sourceMap.containsKey("时间") && sourceMap.get("时间").contains("宁波市北仑区人民医院")) {
|
|
|
|
- sourceMap.put("时间", sourceMap.get("时间").substring(0, sourceMap.get("时间").indexOf("宁波市北仑区人民医院")));
|
|
|
|
- }
|
|
|
|
- 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());
|
|
|
|
- }
|
|
|
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(structureMap, operationRecord_keyContrasts, "17");
|
|
|
|
+ }
|
|
|
|
+ if (MapUtils.isNotEmpty(structureMap)) {
|
|
List<String> titles = Lists.newArrayList("手术开始时间", "手术结束时间");
|
|
List<String> titles = Lists.newArrayList("手术开始时间", "手术结束时间");
|
|
for (String title : titles) {
|
|
for (String title : titles) {
|
|
eliminateDate(structureMap, title);
|
|
eliminateDate(structureMap, title);
|
|
@@ -202,8 +166,6 @@ public class XiamenOperationDocTrans extends ModelDocTrans {
|
|
if (structureMap.containsKey("接生者")) {
|
|
if (structureMap.containsKey("接生者")) {
|
|
structureMap.put("接生者", structureMap.get("接生者").replace("\n", "").replaceAll("接生者签名", ""));
|
|
structureMap.put("接生者", structureMap.get("接生者").replace("\n", "").replaceAll("接生者签名", ""));
|
|
}
|
|
}
|
|
- }
|
|
|
|
- if (MapUtils.isNotEmpty(structureMap)) {
|
|
|
|
OperationRecordDoc operationRecordDoc = ModelDocGenerate.operationRecordDocGen(structureMap);
|
|
OperationRecordDoc operationRecordDoc = ModelDocGenerate.operationRecordDocGen(structureMap);
|
|
operationRecordDoc.setPageData((Map) structureMap);
|
|
operationRecordDoc.setPageData((Map) structureMap);
|
|
return operationRecordDoc;
|
|
return operationRecordDoc;
|
|
@@ -255,16 +217,7 @@ public class XiamenOperationDocTrans extends ModelDocTrans {
|
|
Map<String, String> structureMap = null;
|
|
Map<String, String> structureMap = null;
|
|
if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
|
|
structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
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);
|
|
|
|
- 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());
|
|
|
|
- }
|
|
|
|
|
|
+ structureMap = OrdinaryAssistant.mapKeyContrast(structureMap, preoperativeDiscussion_keyContrasts, "11");
|
|
}
|
|
}
|
|
List<String> titles = Lists.newArrayList("讨论时间", "手术指征", "注意事项", "术前诊断", "医生签名", "风险及防范措施", "可替代方案", "术前准备", "参加人员");
|
|
List<String> titles = Lists.newArrayList("讨论时间", "手术指征", "注意事项", "术前诊断", "医生签名", "风险及防范措施", "可替代方案", "术前准备", "参加人员");
|
|
if (structureMap.containsKey("简要病情")) {
|
|
if (structureMap.containsKey("简要病情")) {
|
|
@@ -352,20 +305,20 @@ public class XiamenOperationDocTrans extends ModelDocTrans {
|
|
|
|
|
|
private OperationInformedConsentDoc getOperationInformedConsentDoc(Map<String, Object> contentMap) {
|
|
private OperationInformedConsentDoc getOperationInformedConsentDoc(Map<String, Object> contentMap) {
|
|
String modeId = "16";
|
|
String modeId = "16";
|
|
-// String content = contentMap.get("xmlText").toString();
|
|
|
|
-// Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
|
|
|
|
-// xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
|
-// xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
|
-// Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationInformedConsent_keyContrasts, modeId);
|
|
|
|
-//
|
|
|
|
-// String text = CxXmlUtil.getXmlText(content);
|
|
|
|
-// Map<String, String> cutWordMap = Preproc.getCutWordMap(true, operationInformedConsent_sourceTitles, text);
|
|
|
|
-// cutWordMap.putAll(structureMap);
|
|
|
|
-//
|
|
|
|
-// OperationInformedConsentDoc operationInformedConsentDoc = ModelDocGenerate.operationInformedConsentDocGen(cutWordMap);
|
|
|
|
|
|
+ // String content = contentMap.get("xmlText").toString();
|
|
|
|
+ // Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
|
|
|
|
+ // xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
|
+ // xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
|
+ // Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationInformedConsent_keyContrasts, modeId);
|
|
|
|
+ //
|
|
|
|
+ // String text = CxXmlUtil.getXmlText(content);
|
|
|
|
+ // Map<String, String> cutWordMap = Preproc.getCutWordMap(true, operationInformedConsent_sourceTitles, text);
|
|
|
|
+ // cutWordMap.putAll(structureMap);
|
|
|
|
+ //
|
|
|
|
+ // OperationInformedConsentDoc operationInformedConsentDoc = ModelDocGenerate.operationInformedConsentDocGen(cutWordMap);
|
|
OperationInformedConsentDoc operationInformedConsentDoc = new OperationInformedConsentDoc();
|
|
OperationInformedConsentDoc operationInformedConsentDoc = new OperationInformedConsentDoc();
|
|
-// operationInformedConsentDoc.setText(text);
|
|
|
|
-// operationInformedConsentDoc.setPageData((Map) cutWordMap);
|
|
|
|
|
|
+ // operationInformedConsentDoc.setText(text);
|
|
|
|
+ // operationInformedConsentDoc.setPageData((Map) cutWordMap);
|
|
|
|
|
|
return operationInformedConsentDoc;
|
|
return operationInformedConsentDoc;
|
|
}
|
|
}
|
|
@@ -427,20 +380,20 @@ public class XiamenOperationDocTrans extends ModelDocTrans {
|
|
|
|
|
|
private OperationSafetyChecklistDoc getOperationSafetyChecklistDoc(Map<String, Object> contentMap) {
|
|
private OperationSafetyChecklistDoc getOperationSafetyChecklistDoc(Map<String, Object> contentMap) {
|
|
String modeId = "21";
|
|
String modeId = "21";
|
|
-// String content = contentMap.get("xmlText").toString();
|
|
|
|
-// Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
|
|
|
|
-// xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
|
-// xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
|
-// Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationSafetyChecklist_keyContrasts, modeId);
|
|
|
|
-//
|
|
|
|
-// String text = CxXmlUtil.getXmlText(content);
|
|
|
|
-// Map<String, String> cutWordMap = Preproc.getCutWordMap(true, operationSafetyChecklist_sourceTitles, text);
|
|
|
|
-// cutWordMap.putAll(structureMap);
|
|
|
|
-
|
|
|
|
-// OperationSafetyChecklistDoc operationSafetyChecklistDoc = ModelDocGenerate.operationSafetyChecklistDocGen(cutWordMap);
|
|
|
|
|
|
+ // String content = contentMap.get("xmlText").toString();
|
|
|
|
+ // Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(content);
|
|
|
|
+ // xmlNodeValueMap.put("mode_id=" + contentMap.get("modeId").toString(), "");
|
|
|
|
+ // xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
|
+ // Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, operationSafetyChecklist_keyContrasts, modeId);
|
|
|
|
+ //
|
|
|
|
+ // String text = CxXmlUtil.getXmlText(content);
|
|
|
|
+ // Map<String, String> cutWordMap = Preproc.getCutWordMap(true, operationSafetyChecklist_sourceTitles, text);
|
|
|
|
+ // cutWordMap.putAll(structureMap);
|
|
|
|
+
|
|
|
|
+ // OperationSafetyChecklistDoc operationSafetyChecklistDoc = ModelDocGenerate.operationSafetyChecklistDocGen(cutWordMap);
|
|
OperationSafetyChecklistDoc operationSafetyChecklistDoc = new OperationSafetyChecklistDoc();
|
|
OperationSafetyChecklistDoc operationSafetyChecklistDoc = new OperationSafetyChecklistDoc();
|
|
-// operationSafetyChecklistDoc.setText(text);
|
|
|
|
-// operationSafetyChecklistDoc.setPageData((Map) cutWordMap);
|
|
|
|
|
|
+ // operationSafetyChecklistDoc.setText(text);
|
|
|
|
+ // operationSafetyChecklistDoc.setPageData((Map) cutWordMap);
|
|
|
|
|
|
return operationSafetyChecklistDoc;
|
|
return operationSafetyChecklistDoc;
|
|
}
|
|
}
|