|
@@ -8,6 +8,7 @@ import com.lantone.structure.facade.tran.util.CommonAnalysisUtil;
|
|
|
import com.lantone.structure.model.doc.operation.OperationDoc;
|
|
|
import com.lantone.structure.model.doc.operation.OperationRecordDoc;
|
|
|
import com.lantone.structure.model.entity.Intervention;
|
|
|
+import com.lantone.structure.model.entity.OperationIncision;
|
|
|
import com.lantone.structure.model.label.OperationRecordLabel;
|
|
|
import com.lantone.structure.util.MapUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -33,14 +34,15 @@ public class OperationRecordDocTran extends TargetTran {
|
|
|
OperationDoc operationDoc = new OperationDoc();
|
|
|
OperationRecordDoc operationRecordDoc = new OperationRecordDoc();
|
|
|
operationRecordDoc.setText(text);
|
|
|
+ Map<String, String> structureMap = cutWord(text);
|
|
|
+ Map<String, String> retMap = new HashMap<String, String>();
|
|
|
+ CommonAnalysisUtil.mapKeyContrastCommon(structureMap, keyContrasts, retMap);
|
|
|
+ operationRecordDoc.setStructureMap(retMap);
|
|
|
operationDoc.setOperationRecordDoc(operationRecordDoc);
|
|
|
operationDocs.add(operationDoc);
|
|
|
inputInfo.setOperationDocs(operationDocs);
|
|
|
-// aiProcess();
|
|
|
|
|
|
- Map<String, String> structureMap = cutWord(text);
|
|
|
- Map<String, String> retMap = new HashMap<String, String>();
|
|
|
- CommonAnalysisUtil.mapKeyContrastCommon(structureMap, keyContrasts, retMap);
|
|
|
+ aiProcess();
|
|
|
fetchModelData(inputInfo.getOperationDocs(), retMap);
|
|
|
retMap.entrySet().removeIf(entry -> StringUtil.isBlank(entry.getValue()));
|
|
|
retMap.entrySet().removeIf(entry -> !entry.getValue().matches("[\\d]+年[\\d]+月[\\d]+日[\\d]+时[\\d]+分") && "医师签名日期时间".equals(entry.getKey()));
|
|
@@ -52,15 +54,13 @@ public class OperationRecordDocTran extends TargetTran {
|
|
|
OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
|
|
|
if (operationRecordDoc != null) {
|
|
|
int interventionCount = 1;
|
|
|
+ int operationIncisionCount = 1;
|
|
|
StringBuffer interventionString = new StringBuffer();
|
|
|
+ StringBuffer operationIncisionString = new StringBuffer();
|
|
|
OperationRecordLabel operationRecordLabel = operationRecordDoc.getOperationRecordLabel();
|
|
|
if (operationRecordLabel == null) {
|
|
|
return;
|
|
|
}
|
|
|
- //手术目标部位名称
|
|
|
- if (StringUtil.isNotBlank(operationRecordLabel.getOpBottomName())) {
|
|
|
- retMap.put("手术目标部位名称", operationRecordLabel.getOpBottomName());
|
|
|
- }
|
|
|
|
|
|
//介入物名称
|
|
|
if (ListUtil.isNotEmpty(operationRecordLabel.getInterventions())) {
|
|
@@ -82,13 +82,17 @@ public class OperationRecordDocTran extends TargetTran {
|
|
|
}
|
|
|
|
|
|
//手术切口描述
|
|
|
- if (operationRecordLabel.getOperationIncision() != null && StringUtils.isNotEmpty(operationRecordLabel.getOperationIncision().getName())) {
|
|
|
- retMap.put("手术切口描述", operationRecordLabel.getOperationIncision().getName());
|
|
|
- }
|
|
|
+ if (ListUtil.isNotEmpty(operationRecordLabel.getOperationIncision())) {
|
|
|
+ for (OperationIncision operationIncisions : operationRecordLabel.getOperationIncision()) {
|
|
|
+ if (StringUtils.isNotEmpty(operationIncisions.getName())) {
|
|
|
+ if (operationRecordLabel.getOperationIncision().size() > 1) {
|
|
|
+ operationIncisionString.append((operationIncisionCount++) + ".");
|
|
|
+ }
|
|
|
+ operationIncisionString.append(operationIncisions.getName());
|
|
|
+ }
|
|
|
|
|
|
- //出血量(mL)
|
|
|
- if (operationRecordLabel.getBleedQuantity() != null && StringUtils.isNotEmpty(operationRecordLabel.getBleedQuantity().getName())) {
|
|
|
- retMap.put("出血量(mL)", operationRecordLabel.getBleedQuantity().getName());
|
|
|
+ }
|
|
|
+ retMap.put("手术切口描述", operationIncisionString.toString());
|
|
|
}
|
|
|
|
|
|
//输液量(mL)
|
|
@@ -96,11 +100,6 @@ public class OperationRecordDocTran extends TargetTran {
|
|
|
retMap.put("输液量(mL)", operationRecordLabel.getTransfuseQuantity().getName());
|
|
|
}
|
|
|
|
|
|
- //输血量(mL)
|
|
|
- if (operationRecordLabel.getBloodQuantity() != null && StringUtils.isNotEmpty(operationRecordLabel.getBloodQuantity().getName())) {
|
|
|
- retMap.put("输血量(mL)", operationRecordLabel.getBloodQuantity().getName());
|
|
|
- }
|
|
|
-
|
|
|
//术前用药
|
|
|
if (operationRecordLabel.getPreoperativeDrugs() != null && StringUtils.isNotEmpty(operationRecordLabel.getPreoperativeDrugs().getName())) {
|
|
|
retMap.put("术前用药", operationRecordLabel.getPreoperativeDrugs().getName());
|
|
@@ -132,7 +131,7 @@ public class OperationRecordDocTran extends TargetTran {
|
|
|
private Map<String, String> cutWord(String text) {
|
|
|
Map<String, String> sourceMap = Maps.newHashMap();
|
|
|
text = text.replace("年 月 日 时 分", "").replace("第1次手术", "")
|
|
|
- .replace("(包括体位、切口处理经过,病理标本肉眼所见) ", "");
|
|
|
+ .replace("(包括体位、切口处理经过,病理标本肉眼所见)", "");
|
|
|
List<String> titles = CommonAnalysisUtil.sortTitles(
|
|
|
Lists.newArrayList("手术开始时间", "手术结束时间", "术前诊断", "手术名称", "术中诊断", "手 术 者", "手术人员", "助手",
|
|
|
"麻醉方法", "麻醉方式", "麻 醉 者", "麻醉医师", "手术标本", "手术切除标本", "术中并发症", "术中失血量", "术中输血量", "手术简要经过(包括“术中所见”)",
|