From d953c2a400cd1dcafd2ce987181905dc3713d2ca Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 08 三月 2024 18:08:21 +0800
Subject: [PATCH] 代码提交

---
 smartor/src/main/java/com/smartor/yiwudataanalysis/ADT_A03.java |   30 ++++++++++++++++++------------
 1 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/smartor/src/main/java/com/smartor/yiwudataanalysis/ADT_A03.java b/smartor/src/main/java/com/smartor/yiwudataanalysis/ADT_A03.java
index b7c7acd..9b599c2 100644
--- a/smartor/src/main/java/com/smartor/yiwudataanalysis/ADT_A03.java
+++ b/smartor/src/main/java/com/smartor/yiwudataanalysis/ADT_A03.java
@@ -37,7 +37,7 @@
 
         //鎮h�呯浉鍏� ID^^^鎺堟潈鏈烘瀯
         CX[] pid3_patientIdentifierList = pid.getPid3_PatientIdentifierList();
-        if (pid3_patientIdentifierList != null || pid3_patientIdentifierList.length > 0) {
+        if (pid3_patientIdentifierList != null && pid3_patientIdentifierList.length > 0) {
             for (CX cx : pid3_patientIdentifierList) {
                 //鎮h�呯浉鍏矷D
                 String hzxgID = cx.getID().encode();
@@ -48,7 +48,7 @@
 
         //闂ㄨ瘖涓嶅~锛屼綇闄㈠繀濉�
         CX[] pid4_alternatePatientIDPID = pid.getPid4_AlternatePatientIDPID();
-        if (pid4_alternatePatientIDPID != null || pid4_alternatePatientIDPID.length > 0) {
+        if (pid4_alternatePatientIDPID != null && pid4_alternatePatientIDPID.length > 0) {
             for (CX cx : pid4_alternatePatientIDPID) {
                 //闈炲┐鍎� 0 濠村効 1
                 String s = cx.getID().encode();
@@ -313,18 +313,21 @@
 
         //鍏ョ鏃ユ湡
         DT[] pv125_contractEffectiveDate = pv1.getPv125_ContractEffectiveDate();
-        DT dt = pv125_contractEffectiveDate[0];
-
-        SimpleDateFormat inputFormattt = new SimpleDateFormat("yyyyMMdd"); // 杈撳叆鏃ユ湡鏍煎紡
         Date date22 = null; // 瑙f瀽涓篋ate瀵硅薄
-        try {
-            date22 = inputFormattt.parse(dt.encode());
-        } catch (ParseException e) {
-            e.printStackTrace();
+        if (pv125_contractEffectiveDate != null && pv125_contractEffectiveDate.length > 0) {
+            DT dt = pv125_contractEffectiveDate[0];
+
+            SimpleDateFormat inputFormattt = new SimpleDateFormat("yyyyMMdd"); // 杈撳叆鏃ユ湡鏍煎紡
+
+            try {
+                date22 = inputFormattt.parse(dt.encode());
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
         }
         SimpleDateFormat outputFormat2 = new SimpleDateFormat("yyyy-MM-dd"); // 杈撳嚭鏃ユ湡鏍煎紡
-        String rkdate = outputFormat2.format(date22);
-
+        String rkdate = null;
+        if (date22 != null) rkdate = outputFormat2.format(date22);
 
         //璐︽埛鍐荤粨寤鸿
         String pv128_interestCode = pv1.getPv128_InterestCode().encode();
@@ -428,8 +431,11 @@
         hospitalRecord.setOutMedNO(id1);
         //灏辫瘖绫诲瀷鎻忚堪锛堥棬璇娿�佷綇闄�...锛�
         hospitalRecord.setAdmTypeDesc(AdmTypeEnum.getDescByCode(patientClass));
+        //IMP  浣忛櫌
+        hospitalRecord.setAdmTypeCode("IMP");
+        hospitalRecord.setAdmStatus("鎮h�呭嚭闄�");
         //鍏ラ櫌鐘舵�侊紙灏辫瘖涓�佺粨鏉熷氨璇�...锛�
-        hospitalRecord.setAdmStatus(LevelHospEnum.getDescByCode(pv136_dischargeDisposition));
+        hospitalRecord.setEncOuthostype(LevelHospEnum.getDescByCode(pv136_dischargeDisposition));
         hospitalRecord.setAdmDate(dischargeDateTime);
         hospitalRecord.setEncPatName(patientName);
         if (StringUtils.isNotEmpty(xb)) {

--
Gitblit v1.9.3