Selaa lähdekoodia

病案首页取值添加非空判断

hujing 5 vuotta sitten
vanhempi
commit
5313e27192

+ 13 - 12
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0074.java

@@ -3,10 +3,9 @@ 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.Diag;
 import com.lantone.qc.pub.model.entity.Family;
 import com.lantone.qc.pub.model.label.FamilyLabel;
-import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.pub.util.ListUtil;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
@@ -25,17 +24,19 @@ public class BEH0074 extends QCCatalogue {
             status.set("0");
             return;
         }
-        if (inputInfo.getBeHospitalizedDoc().getFamilyLabel() != null) {
-            FamilyLabel familyLabel = inputInfo.getBeHospitalizedDoc().getFamilyLabel();
-            if (familyLabel == null){
+        FamilyLabel familyLabel = inputInfo.getBeHospitalizedDoc().getFamilyLabel();
+        if (familyLabel == null) {
+            status.set("0");
+            return;
+        }
+        List<Family> families = familyLabel.getFamilies();
+        if (ListUtil.isEmpty(families)) {
+            status.set("0");
+            return;
+        }
+        for (Family family : families) {
+            if (family.getTumour() != null) {
                 status.set("0");
-                return;
-            }
-            List<Family> families = familyLabel.getFamilies();
-            for (Family family : families) {
-                if (family.getTumour() != null) {
-                    status.set("0");
-                }
             }
         }
     }

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0412.java

@@ -20,16 +20,16 @@ import java.util.Map;
 public class BEH0412 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getBeHospitalizedDoc() == null) {
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getFirstPageRecordDoc() == null) {
             return;
         }
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         Map<String, String> firstStructMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-        if(structureMap != null && firstStructMap != null){
+        if (structureMap != null && firstStructMap != null) {
             String contactAddress_bh = structureMap.get("姓名");
             String contactAddress_first = firstStructMap.get(Content.name);
-            if(!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)){
-                if(!contactAddress_first.equals(contactAddress_bh)){
+            if (!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)) {
+                if (!contactAddress_first.equals(contactAddress_bh)) {
                     status.set("-1");
                 }
             }

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0413.java

@@ -20,16 +20,16 @@ import java.util.Map;
 public class BEH0413 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getBeHospitalizedDoc() == null) {
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getFirstPageRecordDoc() == null) {
             return;
         }
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         Map<String, String> firstStructMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-        if(structureMap != null && firstStructMap != null){
+        if (structureMap != null && firstStructMap != null) {
             String contactAddress_bh = structureMap.get("性别");
             String contactAddress_first = firstStructMap.get(Content.gender);
-            if(!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)){
-                if(!contactAddress_first.equals(contactAddress_bh)){
+            if (!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)) {
+                if (!contactAddress_first.equals(contactAddress_bh)) {
                     status.set("-1");
                 }
             }

+ 5 - 5
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0414.java

@@ -20,16 +20,16 @@ import java.util.Map;
 public class BEH0414 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getBeHospitalizedDoc() == null) {
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getFirstPageRecordDoc() == null) {
             return;
         }
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         Map<String, String> firstStructMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-        if(structureMap != null && firstStructMap != null){
-            String contactAddress_bh = structureMap.get("年龄").replace("岁","");
+        if (structureMap != null && firstStructMap != null) {
+            String contactAddress_bh = structureMap.get("年龄").replace("岁", "");
             String contactAddress_first = firstStructMap.get(Content.age);
-            if(!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)){
-                if(!contactAddress_first.equals(contactAddress_bh)){
+            if (!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)) {
+                if (!contactAddress_first.equals(contactAddress_bh)) {
                     status.set("-1");
                 }
             }

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0415.java

@@ -20,16 +20,16 @@ import java.util.Map;
 public class BEH0415 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getBeHospitalizedDoc() == null) {
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getFirstPageRecordDoc() == null) {
             return;
         }
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         Map<String, String> firstStructMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-        if(structureMap != null && firstStructMap != null){
+        if (structureMap != null && firstStructMap != null) {
             String contactAddress_bh = structureMap.get("民族");
             String contactAddress_first = firstStructMap.get(Content.nation);
-            if(!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)){
-                if(!contactAddress_first.equals(contactAddress_bh)){
+            if (!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)) {
+                if (!contactAddress_first.equals(contactAddress_bh)) {
                     status.set("-1");
                 }
             }

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0416.java

@@ -20,16 +20,16 @@ import java.util.Map;
 public class BEH0416 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getBeHospitalizedDoc() == null) {
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getFirstPageRecordDoc() == null) {
             return;
         }
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         Map<String, String> firstStructMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-        if(structureMap != null && firstStructMap != null){
+        if (structureMap != null && firstStructMap != null) {
             String contactAddress_bh = structureMap.get("职业");
             String contactAddress_first = firstStructMap.get(Content.job);
-            if(!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)){
-                if(!contactAddress_first.equals(contactAddress_bh)){
+            if (!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)) {
+                if (!contactAddress_first.equals(contactAddress_bh)) {
                     status.set("-1");
                 }
             }

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0417.java

@@ -20,16 +20,16 @@ import java.util.Map;
 public class BEH0417 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getBeHospitalizedDoc() == null) {
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getFirstPageRecordDoc() == null) {
             return;
         }
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         Map<String, String> firstStructMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-        if(structureMap != null && firstStructMap != null){
+        if (structureMap != null && firstStructMap != null) {
             String contactAddress_bh = structureMap.get("出生地");
             String contactAddress_first = firstStructMap.get(Content.birth_address);
-            if(!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)){
-                if(!contactAddress_first.equals(contactAddress_bh)){
+            if (!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)) {
+                if (!contactAddress_first.equals(contactAddress_bh)) {
                     status.set("-1");
                 }
             }

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0418.java

@@ -20,16 +20,16 @@ import java.util.Map;
 public class BEH0418 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getBeHospitalizedDoc() == null) {
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getFirstPageRecordDoc() == null) {
             return;
         }
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         Map<String, String> firstStructMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-        if(structureMap != null && firstStructMap != null){
+        if (structureMap != null && firstStructMap != null) {
             String marry_bh = structureMap.get("婚姻");
             String marry_first = firstStructMap.get(Content.marry);
-            if(!CatalogueUtil.isEmpty(marry_bh) && !CatalogueUtil.isEmpty(marry_first)){
-                if(!marry_bh.equals(marry_first)){
+            if (!CatalogueUtil.isEmpty(marry_bh) && !CatalogueUtil.isEmpty(marry_first)) {
+                if (!marry_bh.equals(marry_first)) {
                     status.set("-1");
                 }
             }

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0419.java

@@ -19,16 +19,16 @@ import java.util.Map;
 public class BEH0419 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getBeHospitalizedDoc() == null) {
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getFirstPageRecordDoc() == null) {
             return;
         }
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         Map<String, String> firstStructMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-        if(structureMap != null && firstStructMap != null){
+        if (structureMap != null && firstStructMap != null) {
             String contactAddress_bh = structureMap.get("联系地址");
             String contactAddress_first = firstStructMap.get(Content.contact_address);
-            if(!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)){
-                if(!contactAddress_first.equals(contactAddress_bh)){
+            if (!CatalogueUtil.isEmpty(contactAddress_bh) && !CatalogueUtil.isEmpty(contactAddress_first)) {
+                if (!contactAddress_first.equals(contactAddress_bh)) {
                     status.set("-1");
                 }
             }

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0421.java

@@ -19,16 +19,16 @@ import java.util.Map;
 public class BEH0421 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getBeHospitalizedDoc() == null) {
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getFirstPageRecordDoc() == null) {
             return;
         }
         Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         Map<String, String> firstStructMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-        if(structureMap != null && firstStructMap != null){
+        if (structureMap != null && firstStructMap != null) {
             String admisDate_bh = structureMap.get("入院日期");
             String admisDate_first = firstStructMap.get(Content.admisDate);
-            if(!CatalogueUtil.isEmpty(admisDate_bh) && !CatalogueUtil.isEmpty(admisDate_first)){
-                if(!admisDate_bh.equals(admisDate_first)){
+            if (!CatalogueUtil.isEmpty(admisDate_bh) && !CatalogueUtil.isEmpty(admisDate_first)) {
+                if (!admisDate_bh.equals(admisDate_first)) {
                     status.set("-1");
                 }
             }

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0423.java

@@ -19,16 +19,16 @@ import java.util.Map;
 public class BEH0423 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getBeHospitalizedDoc() == null) {
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getFirstPageRecordDoc() == null) {
             return;
         }
         Map<String, String> bhStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         Map<String, String> firstStructMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-        if(bhStructureMap != null && firstStructMap != null){
+        if (bhStructureMap != null && firstStructMap != null) {
             String phone = bhStructureMap.get("电话");
             String contactPhone = firstStructMap.get(Content.contact_phone);
-            if(!CatalogueUtil.isEmpty(phone) && !CatalogueUtil.isEmpty(contactPhone)){
-                if(!phone.equals(contactPhone)){
+            if (!CatalogueUtil.isEmpty(phone) && !CatalogueUtil.isEmpty(contactPhone)) {
+                if (!phone.equals(contactPhone)) {
                     status.set("-1");
                 }
             }

+ 5 - 5
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0439.java

@@ -20,17 +20,17 @@ import java.util.Map;
 public class BEH0439 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         status.set("0");
-        if (inputInfo.getBeHospitalizedDoc() == null) {
+        if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getFirstPageRecordDoc() == null) {
             return;
         }
         Map<String, String> bhMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
         Map<String, String> fprMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
-        if(bhMap != null && fprMap != null){
+        if (bhMap != null && fprMap != null) {
             String birthDate_bh = bhMap.get("出生日期");
             String birthDate_fpr = fprMap.get("出生日期");
-            if(birthDate_bh != null && birthDate_fpr != null){
-                if(!CatalogueUtil.isEmpty(birthDate_bh) && !CatalogueUtil.isEmpty(birthDate_fpr)){
-                    if(!DateUtil.format(DateUtil.parseDate(birthDate_bh),DateUtil.DATE_FORMAT).equals(DateUtil.format(DateUtil.parseDate(birthDate_fpr),DateUtil.DATE_FORMAT))){
+            if (birthDate_bh != null && birthDate_fpr != null) {
+                if (!CatalogueUtil.isEmpty(birthDate_bh) && !CatalogueUtil.isEmpty(birthDate_fpr)) {
+                    if (!DateUtil.format(DateUtil.parseDate(birthDate_bh), DateUtil.DATE_FORMAT).equals(DateUtil.format(DateUtil.parseDate(birthDate_fpr), DateUtil.DATE_FORMAT))) {
                         status.set("-1");
                     }
                 }