Ver código fonte

Merge remote-tracking branch 'origin/dev-1.2' into dev

louhr 5 anos atrás
pai
commit
35e78bfe57

+ 2 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH02966.java

@@ -38,8 +38,8 @@ public class BEH02966 extends QCCatalogue {
                     "宫缩", "宫口", "胎膜", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜");
         } else if (gender.contains("女")) {
             /* 女性不合理词 */
-            noMatchWords = Lists.newArrayList("睾丸", "阴囊", "阴茎", "精索", "包皮", "附睾", "输精管",
-                    "射精管", "尿道海绵体", "冠状沟", "前列腺", "精阜", "精囊腺");
+            noMatchWords = Lists.newArrayList("睾丸", "阴茎", "精索", "包皮", "附睾", "输精管",
+                    "射精管", "尿道海绵体", "冠状沟",  "精阜", "精囊腺");
         }
         if (noMatchWords == null || noMatchWords.size() == 0) {
             return;

+ 28 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH02988.java

@@ -0,0 +1,28 @@
+package com.lantone.qc.kernel.catalogue.behospitalized;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+/**
+ * @ClassName : BEH02988
+ * @Description :  主诉未填写
+ * @Author : 胡敬
+ * @Date: 2020-06-23 19:35
+ */
+@Component
+public class BEH02988 extends QCCatalogue {
+    @Override
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getBeHospitalizedDoc() == null) {
+            return;
+        }
+        if (inputInfo.getBeHospitalizedDoc().getChiefLabel() == null
+                && StringUtil.isBlank(inputInfo.getBeHospitalizedDoc().getChiefLabel().getText())) {
+            status.set("-1");
+        }
+    }
+}

+ 41 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC0087.java

@@ -1,12 +1,19 @@
 package com.lantone.qc.kernel.catalogue.firstcourserecord;
 
+import com.alibaba.fastjson.JSONArray;
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.client.ChiefPresentSimilarityServiceClient;
+import com.lantone.qc.kernel.structure.ai.ModelAI;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
 import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
 import com.lantone.qc.pub.model.entity.Diag;
+import com.lantone.qc.pub.model.label.CaseCharacteristicLabel;
+import com.lantone.qc.pub.model.label.ChiefLabel;
 import com.lantone.qc.pub.model.label.DiagLabel;
+import com.lantone.qc.pub.util.StringUtil;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
@@ -20,22 +27,55 @@ import java.util.Map;
  */
 @Component
 public class FIRC0087 extends QCCatalogue {
+    @Autowired
+    ChiefPresentSimilarityServiceClient chiefPresentSimilarityServiceClient;
+
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
         FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
         if(firstCourseRecordDoc != null){
             DiagLabel differentialDiagLabel = firstCourseRecordDoc.getDifferentialDiagLabel();
+            CaseCharacteristicLabel casecharLabel = firstCourseRecordDoc.getCaseCharacteristicLabel();
+            DiagLabel initDiagLabel = firstCourseRecordDoc.getInitialDiagLabel();
+
             if(differentialDiagLabel != null){
-                List<Diag> diags = differentialDiagLabel.getDiags();
+//                List<Diag> diags = differentialDiagLabel.getDiags();
+                String diag = initDiagLabel.getDiags().get(0).getHospitalDiagName();
+                String casechar = casecharLabel.getText();
+                String chief = casechar.substring(casechar.indexOf("主诉")+2, casechar.indexOf("现病史"));
+                String present = casechar.substring(casechar.indexOf("现病史")+3, casechar.indexOf("既往史"));
+
+                if (StringUtils.isNotEmpty(differentialDiagLabel.getText())
+                    && (differentialDiagLabel.getText().contains("诊断明确")
+                        || differentialDiagLabel.getText().contains("无需鉴别"))) {
+                    if (chief.contains("术后") || chief.contains("孕") || chief.contains("化疗")
+                        || chief.contains("肿瘤") || chief.contains("癌") || chief.contains("确诊")
+                        || chief.contains("外伤") || chief.contains("摔伤")) {
+                        status.set("0");
+                    }
+                    else if (present.contains(diag)) {
+                        status.set("0");
+                    }
+                    else {
+                        status.set("-1");
+                    }
+                }
+                else if (StringUtils.isEmpty(differentialDiagLabel.getText())) {
+                    status.set("-1");
+                }
+                /*
                 if(diags == null || diags.size()<1){
                     status.set("-1");
                 }
+
                 if (StringUtils.isNotEmpty(differentialDiagLabel.getText())
                         && (differentialDiagLabel.getText().contains("暂缺")
                             || differentialDiagLabel.getText().contains("无") || differentialDiagLabel.getText().contains("诊断"))) {
                     status.set("0");
                 }
+                */
             }
         }
     }
+
 }

+ 2 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/leavehospital/LEA02968.java

@@ -38,8 +38,8 @@ public class LEA02968 extends QCCatalogue {
                     "宫缩", "宫口", "胎膜", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜");
         } else if (gender.contains("女")) {
             /* 女性不合理词 */
-            noMatchWords = Lists.newArrayList("睾丸", "阴囊", "阴茎", "精索", "包皮", "附睾", "输精管",
-                    "射精管", "尿道海绵体", "冠状沟", "前列腺", "精阜", "精囊腺");
+            noMatchWords = Lists.newArrayList("睾丸", "阴茎", "精索", "包皮", "附睾", "输精管",
+                    "射精管", "尿道海绵体", "冠状沟",  "精阜", "精囊腺");
         }
 
         if (noMatchWords == null || noMatchWords.size() == 0) {

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/leavehospital/LEA0508.java

@@ -37,7 +37,7 @@ public class LEA0508 extends QCCatalogue {
 
         SpecialStorageUtil specialStorageUtil = SpringContextUtil.getBean("specialStorageUtil");
         Map<String, Object> surgeon = specialStorageUtil.getJsonStringValue(KernelConstants.HOSPITAL_DOCTOR_MAP);
-        if (surgeon == null) {
+        if (surgeon == null || surgeon.size() == 0) {
             status.set("0");
             return;
         }

+ 2 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR02967.java

@@ -38,8 +38,8 @@ public class THR02967 extends QCCatalogue {
                     "宫缩", "宫口", "胎膜", "输卵管", "卵巢", "输卵管", "阴唇", "阴蒂", "阴道前庭", "前庭大腺", "处女膜");
         } else if (gender.contains("女")) {
             /* 女性不合理词 */
-            noMatchWords = Lists.newArrayList("睾丸", "阴囊", "阴茎", "精索", "包皮", "附睾", "输精管",
-                    "射精管", "尿道海绵体", "冠状沟", "前列腺", "精阜", "精囊腺");
+            noMatchWords = Lists.newArrayList("睾丸", "阴茎", "精索", "包皮", "附睾", "输精管",
+                    "射精管", "尿道海绵体", "冠状沟", "精阜", "精囊腺");
         }
 
         if (noMatchWords == null || noMatchWords.size() == 0) {