浏览代码

出院小结加死亡记录条件

kongwz 5 年之前
父节点
当前提交
df044345ad

+ 10 - 18
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0018.java

@@ -24,29 +24,21 @@ import java.util.List;
 public class BEH0018 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
         PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
-        List<Clinical> clinicals = presentLabel.getClinicals();
-        if(clinicals.size()>0){
-            for (Clinical clinical:clinicals) {
-                List<PD> timestamp = clinical.getTimestamp();
-                if(timestamp != null){
-                    for (PD pd:timestamp) {
-                        if(!CatalogueUtil.isEmpty(pd.getName())){
-                            if(pd.getName().contains("天") || pd.getName().contains("周")|| pd.getName().contains("月")
-                            || pd.getName().contains("时") || pd.getName().contains("半年") || pd.getName().contains("秒")
-                            || pd.getName().contains("日")){
-                                status.set("0");
-                                break;
-                            }
-                        }
-                    }
-                    if(status.get().equals("0")){
+        List<PD> pds = presentLabel.getPds();
+        if(pds != null && pds.size()>0){
+            for (PD pd:pds) {
+                String pdName = pd.getName();
+                if(!CatalogueUtil.isEmpty(pdName)){
+                    if(pdName.contains("天") || pdName.contains("周")|| pdName.contains("月")
+                            || pdName.contains("时") || pdName.contains("半年") || pdName.contains("秒")
+                            || pdName.contains("日")){
+                        status.set("0");
                         break;
                     }
                 }
             }
-        }else {
-            status.set("0");
         }
+
     }
 }
 

+ 6 - 9
kernel/src/main/java/com/lantone/qc/kernel/catalogue/behospitalized/BEH0445.java

@@ -4,6 +4,7 @@ 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.GeneralDesc;
+import com.lantone.qc.pub.model.label.PresentLabel;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
@@ -18,16 +19,12 @@ import java.util.List;
 @Component
 public class BEH0445 extends QCCatalogue {
     public void start(InputInfo inputInfo, OutputInfo outputInfo) {
-
-        List<GeneralDesc> generals = inputInfo.getBeHospitalizedDoc().getPresentLabel().getGenerals();
-        if(generals.size() > 0 || generals != null){
-            for (GeneralDesc general:generals) {
-                if(general.getName().contains("睡眠")){
-                    status.set("0");
-                    break;
-                }
+        PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
+        String text = presentLabel.getText();
+        if(text != null){
+            if(text.contains("睡眠")|| text.contains("纳眠")|| text.contains("入睡")){
+                status.set("0");
             }
         }
-
     }
 }