|
@@ -4,11 +4,14 @@ import com.google.common.collect.Lists;
|
|
|
import com.lantone.qc.dbanaly.facade.yiwu.YiWuXmlUtil;
|
|
|
import com.lantone.qc.dbanaly.util.ModuleMappingUtil;
|
|
|
import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
|
|
|
+import com.lantone.qc.pub.model.label.LeaveHospitalDoctorAdviceLabel;
|
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
|
import com.lantone.qc.pub.util.FastJsonUtils;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
|
import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
|
|
|
import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -30,8 +33,8 @@ public class YiWuLeaveHospitalDocTrans extends ModelDocTrans {
|
|
|
structureMap = (Map) FastJsonUtils.getJsonToMap(content);
|
|
|
} else {
|
|
|
Map<String, String> sourceMap = YiWuXmlUtil.xmlToMap(content);
|
|
|
- List<String> titles = Lists.newArrayList( "入院时间","出院时间","住院天数","入院诊断","出院诊断","出院诊断"
|
|
|
- ,"入院情况","住院经过","出院情况","出院医嘱","医师签名","签名时间","主诉","诊疗过程","医师签名时间");
|
|
|
+ List<String> titles = Lists.newArrayList("入院时间", "出院时间", "住院天数", "入院诊断", "出院诊断", "出院诊断"
|
|
|
+ , "入院情况", "住院经过", "出院情况", "出院医嘱", "医师签名", "签名时间", "主诉", "诊疗过程", "医师签名时间");
|
|
|
String text = sourceMap.get("原始文本");
|
|
|
List<String> sortTitles = CommonAnalysisUtil.sortTitles(titles, text);
|
|
|
CommonAnalysisUtil.cutByTitles(text, sortTitles, 0, sourceMap);
|
|
@@ -43,9 +46,18 @@ public class YiWuLeaveHospitalDocTrans extends ModelDocTrans {
|
|
|
LeaveHospitalDoc leaveHospitalDoc = new LeaveHospitalDoc();
|
|
|
leaveHospitalDoc.setStructureMap(structureMap);
|
|
|
leaveHospitalDoc.setPageData((Map) structureMap);
|
|
|
+ if (StringUtil.isNotEmpty(structureMap.get("原始文本"))) {
|
|
|
+ leaveHospitalDoc.setText(structureMap.get("原始文本"));
|
|
|
+ }
|
|
|
if (structureMap.containsKey("记录医生") && "记录医师".equals(structureMap.get("记录医生"))) {
|
|
|
structureMap.put("记录医生", "");
|
|
|
}
|
|
|
+ if (StringUtils.isNotEmpty(structureMap.get("出院医嘱"))) {
|
|
|
+ LeaveHospitalDoctorAdviceLabel leaveHospitalDoctorAdviceLabel = new LeaveHospitalDoctorAdviceLabel();
|
|
|
+ leaveHospitalDoctorAdviceLabel.setText(structureMap.get("出院医嘱"));
|
|
|
+ leaveHospitalDoctorAdviceLabel.setAiText(structureMap.get("出院医嘱"));
|
|
|
+ leaveHospitalDoc.setLeaveHospitalDoctorAdviceLabel(leaveHospitalDoctorAdviceLabel);
|
|
|
+ }
|
|
|
|
|
|
return leaveHospitalDoc;
|
|
|
}
|