|
@@ -36,7 +36,7 @@ public class OperationAI extends ModelAI {
|
|
|
/**
|
|
|
*
|
|
|
*/
|
|
|
- public static List<String> medicalTextType = Arrays.asList("CourseAfterOperation_cx", "CourseRecordSRR","Taizhou_before_surgery");
|
|
|
+ public static List<String> medicalTextType = Arrays.asList("CourseAfterOperation_cx", "CourseRecordSRR", "Taizhou_before_surgery");
|
|
|
public static String entityRelationObject = "entity_relation_object";
|
|
|
public static String outputs = "outputs";
|
|
|
public static String content = "content";
|
|
@@ -54,35 +54,35 @@ public class OperationAI extends ModelAI {
|
|
|
//部位
|
|
|
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
- if(StringUtil.isNotEmpty(structureMap.get("拟实施手术及操作名称"))){
|
|
|
- String opName = "拟实施手术及操作名称:"+structureMap.get("拟实施手术及操作名称");
|
|
|
- putContent(crfContent, medicalTextType.get(2),opName,Content.surgicalSite);
|
|
|
+ if (StringUtil.isNotEmpty(structureMap.get("拟实施手术及操作名称"))) {
|
|
|
+ String opName = "拟实施手术及操作名称:" + structureMap.get("拟实施手术及操作名称");
|
|
|
+ putContent(crfContent, medicalTextType.get(2), opName, Content.surgicalSite);
|
|
|
}
|
|
|
//手术禁忌 = 手术指征 || 术前准备
|
|
|
//手术禁忌 = 诊断依据 || 术前准备 || "药物、食物过敏史
|
|
|
String opFlag = structureMap.get("手术指征");
|
|
|
- if(StringUtil.isNotEmpty(opFlag)){
|
|
|
- sb.append("手术指征:"+opFlag+"\n");
|
|
|
+ if (StringUtil.isNotEmpty(opFlag)) {
|
|
|
+ sb.append("手术指征:" + opFlag + "\n");
|
|
|
}
|
|
|
|
|
|
String preCase = structureMap.get("术前准备");
|
|
|
- if(StringUtil.isNotEmpty(preCase)){
|
|
|
- sb.append("术前准备:"+preCase+"\n");
|
|
|
+ if (StringUtil.isNotEmpty(preCase)) {
|
|
|
+ sb.append("术前准备:" + preCase + "\n");
|
|
|
}
|
|
|
|
|
|
String simCase = structureMap.get("诊断依据");
|
|
|
- if(StringUtil.isNotEmpty(simCase)){
|
|
|
- sb.append("简要病情:"+simCase+"\n");
|
|
|
+ if (StringUtil.isNotEmpty(simCase)) {
|
|
|
+ sb.append("简要病情:" + simCase + "\n");
|
|
|
}
|
|
|
|
|
|
String pillCase = structureMap.get("药物、食物过敏史");
|
|
|
- if(StringUtil.isNotEmpty(pillCase) && StringUtil.isEmpty(simCase)){
|
|
|
- sb.append("药物、食物过敏史:"+pillCase+"\n");
|
|
|
+ if (StringUtil.isNotEmpty(pillCase) && StringUtil.isEmpty(simCase)) {
|
|
|
+ sb.append("药物、食物过敏史:" + pillCase + "\n");
|
|
|
}
|
|
|
|
|
|
- if(StringUtil.isNotEmpty(sb.toString())){
|
|
|
+ if (StringUtil.isNotEmpty(sb.toString())) {
|
|
|
text = sb.toString();
|
|
|
- putContent(crfContent, medicalTextType.get(2),text,Content.preoperativeDiscussion);
|
|
|
+ putContent(crfContent, medicalTextType.get(2), text, Content.preoperativeDiscussion);
|
|
|
}
|
|
|
}
|
|
|
if (operationDocs.get(i).getOperationRecordDoc() != null) {
|
|
@@ -91,6 +91,10 @@ public class OperationAI extends ModelAI {
|
|
|
//存放抓取的药品
|
|
|
String content = CatalogueUtil.structureMapJoin(structureMap, Lists.newArrayList("手术经过及处理", "手术中用药(化疗等药物)"));
|
|
|
putContent(crfContent, medicalTextType.get(1), content, "手术记录" + i + "药物");
|
|
|
+
|
|
|
+ /***************************** 后结构化数据处理(一般手术记录)****************************************/
|
|
|
+ String text = operationRecordDoc.getText();
|
|
|
+ putContent(crfContent, medicalTextType.get(1), text, Content.operationRecord);
|
|
|
}
|
|
|
if (operationDocs.get(i).getOperationDiscussionDoc() != null) {
|
|
|
OperationDiscussionDoc operationDiscussionDoc = operationDocs.get(i).getOperationDiscussionDoc();
|
|
@@ -112,9 +116,9 @@ public class OperationAI extends ModelAI {
|
|
|
if (midData.get(Content.surgicalSite) == null) {
|
|
|
continue;
|
|
|
}
|
|
|
- putPreoperativeDiscussionCrfData(midData.getJSONObject(Content.preoperativeDiscussion),inputInfo);
|
|
|
+ putPreoperativeDiscussionCrfData(midData.getJSONObject(Content.preoperativeDiscussion), inputInfo);
|
|
|
PreoperativeDiscussionLabel preoperativeDiscussionLabel = inputInfo.getOperationDocs().get(0).getPreoperativeDiscussionDoc().getPreoperativeDiscussionLabel();
|
|
|
- putPreoperativeDiscussionCrfData(midData.getJSONObject(Content.surgicalSite),inputInfo);
|
|
|
+ putPreoperativeDiscussionCrfData(midData.getJSONObject(Content.surgicalSite), inputInfo);
|
|
|
PreoperativeDiscussionLabel preoperativeDiscussionLabelRe = inputInfo.getOperationDocs().get(0).getPreoperativeDiscussionDoc().getPreoperativeDiscussionLabel();
|
|
|
preoperativeDiscussionLabel.setOpBottomName(preoperativeDiscussionLabelRe.getOpBottomName());
|
|
|
inputInfo.getOperationDocs().get(0).getPreoperativeDiscussionDoc().setPreoperativeDiscussionLabel(preoperativeDiscussionLabel);
|
|
@@ -190,6 +194,7 @@ public class OperationAI extends ModelAI {
|
|
|
|
|
|
/**
|
|
|
* 存放抓取的药品
|
|
|
+ *
|
|
|
* @param jsonObject
|
|
|
*/
|
|
|
public List<Drug> putDrugCrfData(JSONObject jsonObject) {
|
|
@@ -207,7 +212,7 @@ public class OperationAI extends ModelAI {
|
|
|
*
|
|
|
* @param jsonObject
|
|
|
*/
|
|
|
- public void putPreoperativeDiscussionCrfData(JSONObject jsonObject,InputInfo inputInfo) {
|
|
|
+ public void putPreoperativeDiscussionCrfData(JSONObject jsonObject, InputInfo inputInfo) {
|
|
|
if (jsonObject == null) {
|
|
|
return;
|
|
|
}
|