|
@@ -3,9 +3,10 @@ package com.lantone.qc.kernel.util;
|
|
import com.google.common.collect.ImmutableMap;
|
|
import com.google.common.collect.ImmutableMap;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
-import com.lantone.qc.pub.Content;
|
|
|
|
|
|
+import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
-import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
|
|
|
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
|
|
+import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
|
|
import com.lantone.qc.pub.model.entity.Diag;
|
|
import com.lantone.qc.pub.model.entity.Diag;
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
import com.lantone.qc.pub.util.SpringContextUtil;
|
|
import com.lantone.qc.pub.util.SpringContextUtil;
|
|
@@ -307,6 +308,7 @@ public class CatalogueUtil {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 判断文本是否包含数字
|
|
* 判断文本是否包含数字
|
|
|
|
+ *
|
|
* @param str
|
|
* @param str
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -370,12 +372,49 @@ public class CatalogueUtil {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 去除两个中文字之间空格
|
|
* 去除两个中文字之间空格
|
|
|
|
+ *
|
|
* @param str
|
|
* @param str
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public static String removeBetweenWordSpace(String str){
|
|
|
|
|
|
+ public static String removeBetweenWordSpace(String str) {
|
|
Pattern pattern = Pattern.compile("(?<=[\\x{4e00}-\\x{9fa5}])\\s(?=[\\x{4e00}-\\x{9fa5}])");
|
|
Pattern pattern = Pattern.compile("(?<=[\\x{4e00}-\\x{9fa5}])\\s(?=[\\x{4e00}-\\x{9fa5}])");
|
|
Matcher m = pattern.matcher(str);
|
|
Matcher m = pattern.matcher(str);
|
|
return m.replaceAll("");
|
|
return m.replaceAll("");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取主刀医师职称(取第一次取到的主刀医师职称)
|
|
|
|
+ *
|
|
|
|
+ * @param inputInfo
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static String getDoctorTitle(InputInfo inputInfo) {
|
|
|
|
+ String title = "";
|
|
|
|
+ RedisUtil redisUtil = SpringContextUtil.getBean("redisUtil");
|
|
|
|
+ Map<String, Object> surgeon = redisUtil.getJsonStringValue(KernelConstants.HOSPITAL_DOCTOR_MAP);
|
|
|
|
+ if (surgeon == null) {
|
|
|
|
+ return title;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
|
|
+ for (OperationDoc operationDoc : operationDocs) {
|
|
|
|
+ OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
|
|
|
|
+ if (operationRecordDoc == null) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ Map<String, String> structureMap = operationRecordDoc.getStructureMap();
|
|
|
|
+ String chiefSurgeon = structureMap.get("主刀医师");
|
|
|
|
+ if (StringUtil.isBlank(chiefSurgeon)){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ Map<String, String> doctor = (Map) surgeon.get(chiefSurgeon);
|
|
|
|
+ if (doctor == null){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ title = doctor.get("professor");
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return title;
|
|
|
|
+ }
|
|
}
|
|
}
|