Browse Source

规则更新

rengb 5 năm trước cách đây
mục cha
commit
633b61322f

+ 13 - 9
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0039.java

@@ -3,7 +3,7 @@ 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.model.entity.AllergyFood;
+import com.lantone.qc.pub.model.entity.Allergy;
 import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
@@ -21,18 +21,22 @@ public class BEH0039 extends QCCatalogue {
     @Override
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status = "0";
-        List<AllergyFood> allergyFoods = inputInfo.getBeHospitalizedDoc().getPastLabel().getAllergyFoods();
-        if (ListUtil.isEmpty(allergyFoods)) {
+        List<Allergy> allergies = inputInfo.getBeHospitalizedDoc().getPastLabel().getAllergies();
+        if (ListUtil.isEmpty(allergies)) {
             return;
         }
-        for (AllergyFood allergyFood : allergyFoods) {
-            if (allergyFood == null || StringUtil.isBlank(allergyFood.getName())) {
+        for (Allergy allergy : allergies) {
+            if (allergy == null
+                    || StringUtil.isBlank(allergy.getName())
+                    || allergy.getAllergyFood() == null
+                    || StringUtil.isBlank(allergy.getAllergyFood().getName())) {
                 continue;
             }
-            if ((allergyFood.getNegative() == null || StringUtil.isBlank(allergyFood.getNegative().getName()))
-                    && (allergyFood.getPd() == null || StringUtil.isBlank(allergyFood.getPd().getName()))
-                    && (allergyFood.getDegree() == null || StringUtil.isBlank(allergyFood.getDegree().getName()))) {
-                info += allergyFood.getName() + " ";
+            if ((allergy.getNegative() == null || StringUtil.isBlank(allergy.getNegative().getName()))
+                    && (allergy.getAllergyFood().getPd() == null || StringUtil.isBlank(allergy.getAllergyFood().getPd().getName()))
+                    && (allergy.getAllergyFood().getDegree() == null || StringUtil.isBlank(allergy.getAllergyFood().getDegree().getName()))
+                    && (allergy.getAllergyFood().getAllergyDesc() == null || StringUtil.isBlank(allergy.getAllergyFood().getAllergyDesc().getName()))) {
+                info += allergy.getAllergyFood().getName() + " ";
             }
         }
         if (StringUtil.isNotBlank(info)) {

+ 13 - 9
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0040.java

@@ -3,7 +3,7 @@ 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.model.entity.AllergyMedicine;
+import com.lantone.qc.pub.model.entity.Allergy;
 import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import org.springframework.stereotype.Component;
@@ -21,18 +21,22 @@ public class BEH0040 extends QCCatalogue {
     @Override
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status = "0";
-        List<AllergyMedicine> allergyMedicines = inputInfo.getBeHospitalizedDoc().getPastLabel().getAllergyMedicines();
-        if (ListUtil.isEmpty(allergyMedicines)) {
+        List<Allergy> allergies = inputInfo.getBeHospitalizedDoc().getPastLabel().getAllergies();
+        if (ListUtil.isEmpty(allergies)) {
             return;
         }
-        for (AllergyMedicine allergyMedicine : allergyMedicines) {
-            if (allergyMedicine == null || StringUtil.isBlank(allergyMedicine.getName())) {
+        for (Allergy allergy : allergies) {
+            if (allergy == null
+                    || StringUtil.isBlank(allergy.getName())
+                    || allergy.getAllergyMedicine() == null
+                    || StringUtil.isBlank(allergy.getAllergyMedicine().getName())) {
                 continue;
             }
-            if ((allergyMedicine.getNegative() == null || StringUtil.isBlank(allergyMedicine.getNegative().getName()))
-                    && (allergyMedicine.getPd() == null || StringUtil.isBlank(allergyMedicine.getPd().getName()))
-                    && (allergyMedicine.getDegree() == null || StringUtil.isBlank(allergyMedicine.getDegree().getName()))) {
-                info += allergyMedicine.getName() + " ";
+            if ((allergy.getNegative() == null || StringUtil.isBlank(allergy.getNegative().getName()))
+                    && (allergy.getAllergyMedicine().getPd() == null || StringUtil.isBlank(allergy.getAllergyMedicine().getPd().getName()))
+                    && (allergy.getAllergyMedicine().getDegree() == null || StringUtil.isBlank(allergy.getAllergyMedicine().getDegree().getName()))
+                    && (allergy.getAllergyMedicine().getAllergyDesc() == null || StringUtil.isBlank(allergy.getAllergyMedicine().getAllergyDesc().getName()))) {
+                info += allergy.getAllergyMedicine().getName() + " ";
             }
         }
         if (StringUtil.isNotBlank(info)) {