From 562a960261b75d70abd65aa10528f09aeece94e8 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 24 九月 2024 09:49:23 +0800
Subject: [PATCH] 代码提交

---
 smartor/src/main/java/com/smartor/yiwudataanalysis/ADT_A03.java |   36 ++++++++++++++++++++++--------------
 1 files changed, 22 insertions(+), 14 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..7e1505f 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();
@@ -422,14 +425,18 @@
         //鏁版嵁鍏ュ簱
         HospitalRecord hospitalRecord = new HospitalRecord();
         hospitalRecord.setCreateTime(new Date());
-        hospitalRecord.setPatientID(patientID);
+//        hospitalRecord.setPatientID(patientID);
+        hospitalRecord.setPatientID(id1);
         hospitalRecord.setOpreationTime(new Date());
         //灏辫瘖鍙�
         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)) {
@@ -456,7 +463,8 @@
 
         HospitalUserinfo hospitalUserinfo = new HospitalUserinfo();
 //        hospitalUserinfo.setCreateTime(null);
-        hospitalUserinfo.setPatientID(patientID);
+//        hospitalUserinfo.setPatientID(patientID);
+        hospitalUserinfo.setPatientID(id1);
         hospitalUserinfo.setRegDate(rkdate);
         hospitalUserinfo.setIdentityID(SSNNumberPatient);
         hospitalUserinfo.setPatName(patientName);

--
Gitblit v1.9.3