|
@@ -7,9 +7,11 @@ import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
|
import com.lantone.qc.pub.util.FastJsonUtils;
|
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
|
import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
|
-
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.regex.Matcher;
|
|
|
+import java.util.regex.Pattern;
|
|
|
|
|
|
/**
|
|
|
* @Description: 有创操作记录文档生成
|
|
@@ -40,13 +42,58 @@ public class TaiZhouInvasiveOperationDocTrans extends ModelDocTrans {
|
|
|
xmlNodeValueMap.put("rec_title=" + contentMap.get("recTitle").toString(), "");
|
|
|
structureMap = OrdinaryAssistant.mapKeyContrast(xmlNodeValueMap, keyContrasts, modeId);
|
|
|
}
|
|
|
-
|
|
|
+ preSolve(contentMap.get("contentText").toString(),structureMap);
|
|
|
InvasiveOperationDoc invasiveOperationDoc = new InvasiveOperationDoc();
|
|
|
invasiveOperationDoc.setStructureMap(structureMap);
|
|
|
|
|
|
return invasiveOperationDoc;
|
|
|
}
|
|
|
+ Map<String, String>preSolve(String content,Map<String, String>structureMap){
|
|
|
+ Pattern p = Pattern.compile("[\\s\\S]*[(?=无)|(?=有)][^,;,;。]{0,3}(?=不适)[\\s\\S]*");
|
|
|
+ Matcher m = p.matcher(content);
|
|
|
+ String result = "";
|
|
|
+ while (m.find()) {
|
|
|
+ result = m.group().trim();
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(result)){
|
|
|
+ structureMap.put("有无记录不良反应","true");
|
|
|
+ }else{
|
|
|
+ structureMap.put("有无记录不良反应","false");
|
|
|
+ }
|
|
|
+
|
|
|
+ if(structureMap.containsKey("术前准备") && null != structureMap.get("术前准备")){
|
|
|
+ String str = structureMap.get("术前准备");
|
|
|
+ structureMap.put("术前准备",getKeyCut(str));
|
|
|
+ }
|
|
|
+ return structureMap;
|
|
|
+ };
|
|
|
|
|
|
- private List<String> keyContrasts = Lists.newArrayList();
|
|
|
+ String getKeyCut(String key){
|
|
|
+ for (String str : keyCut) {
|
|
|
+ if(key.contains(str)){
|
|
|
+ key = key.substring(0, key.indexOf(str));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return key;
|
|
|
+ }
|
|
|
+//"术前准备" -> "操作前检查穿刺部位皮肤完整无破损。核对病人(Time Out):姓名、出生日期、住院号、穿刺部位。核对后签名:"
|
|
|
+ private List<String> keyContrasts = Lists.newArrayList(
|
|
|
+ "本人姓名=姓名",
|
|
|
+ "入院日期=入院时间",
|
|
|
+ "操作项目=操作名称",
|
|
|
+ "临床科室=科别",
|
|
|
+ "出院时情况=出院情况",
|
|
|
+ "事件日期=操作日期",
|
|
|
+ "操作前准备=术前准备",
|
|
|
+ "操作过程=操作步骤",
|
|
|
+ "病历号=病案号",
|
|
|
+ "患者一般情况=一般情况",
|
|
|
+ "注意事项=术后注意",
|
|
|
+ "医生=操作医师签名"
|
|
|
+ );
|
|
|
|
|
|
+ private List<String> keyCut = Lists.newArrayList(
|
|
|
+ "核对病人(Time Out)",
|
|
|
+ "核对后签名"
|
|
|
+ );
|
|
|
}
|