Browse Source

义乌中心医院:每周三次主治和每周两次主任更新

wangsy 4 năm trước cách đây
mục cha
commit
964dae7926

+ 11 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/ywzxyy/threelevelward/THR0127.java

@@ -72,7 +72,12 @@ public class THR0127 extends QCCatalogue {
                     status.set("0");
                     return;
                 }
-                Date lastRecordDate = getLastRecordDate(allDoctorWradDocs);
+                Date lastRecordDate = null;
+                if (StringUtil.isNotBlank(dischargeTime)) {
+                    lastRecordDate = StringUtil.parseDateTime(dischargeTime);
+                } else {
+                    lastRecordDate = getLastRecordDate(allDoctorWradDocs);
+                }
                 if (lastRecordDate == null) {
                     return;
                 }
@@ -85,7 +90,7 @@ public class THR0127 extends QCCatalogue {
                 List<String> lastWardDateRangeList = new ArrayList<>();
                 //每周的病历记录
                 while (i >= 1) {
-                    roundRecordThisWeek = extractWardRecord(inputInfo, allDoctorWradDocs, beginDate, hoursPerWeek, lastRecordDate);
+                    roundRecordThisWeek = extractWardRecord(inputInfo, allDoctorWradDocs, beginDate, hoursPerWeek, lastRecordDate, dischargeTime);
                     if (CatalogueUtil.isEmpty(roundRecordThisWeek)) {
                         break;
                     }
@@ -164,7 +169,7 @@ public class THR0127 extends QCCatalogue {
      * @param duration
      * @return
      */
-    private static String extractWardRecord(InputInfo inputInfo, List<ThreeLevelWardDoc> threeLevelWardDocs, Date admisDate, int duration, Date maxRecordDate) {
+    private static String extractWardRecord(InputInfo inputInfo, List<ThreeLevelWardDoc> threeLevelWardDocs, Date admisDate, int duration, Date maxRecordDate, String dischargeTime) {
         String recordTime = "", recordTitle = "", title = "";
         List<Date> dateList = new ArrayList();
         for (ThreeLevelWardDoc threeLevelWardDoc : threeLevelWardDocs) {
@@ -192,6 +197,9 @@ public class THR0127 extends QCCatalogue {
                 dateList.add(recordDate);
             }
         }
+        if (dateList.size() > 0 && StringUtil.isNotBlank(dischargeTime)) {
+            dateList.add(StringUtil.parseDateTime(dischargeTime));
+        }
         if (dateList.size() > 0) {
             //dateList.sort(Date::compareTo);
             if (!maxRecordDate.equals(dateList.get(dateList.size() - 1)) || CatalogueUtil.compareTime(admisDate, dateList.get(dateList.size() - 1), Long.valueOf(6 * 24 * 60))) {

+ 11 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/ywzxyy/threelevelward/THR0128.java

@@ -80,7 +80,12 @@ public class THR0128 extends QCCatalogue {
                     status.set("0");
                     return;
                 }
-                Date lastRecordDate = getLastRecordDate(allDoctorWradDocs);
+                Date lastRecordDate = null;
+                if (StringUtil.isNotBlank(dischargeTime)) {
+                    lastRecordDate = StringUtil.parseDateTime(dischargeTime);
+                } else {
+                    lastRecordDate = getLastRecordDate(allDoctorWradDocs);
+                }
                 if (lastRecordDate == null) {
                     return;
                 }
@@ -106,7 +111,7 @@ public class THR0128 extends QCCatalogue {
                 List<String> lastWardDateRangeList = new ArrayList<>();
                 //每周的病历记录
                 while (i >= 1) {
-                    roundRecordThisWeek = extractWardRecord(inputInfo, allDoctorWradDocs, beginDate, hoursPerWeek, lastRecordDate);
+                    roundRecordThisWeek = extractWardRecord(inputInfo, allDoctorWradDocs, beginDate, hoursPerWeek, lastRecordDate, dischargeTime);
                     if (CatalogueUtil.isEmpty(roundRecordThisWeek)) {
                         break;
                     }
@@ -171,7 +176,7 @@ public class THR0128 extends QCCatalogue {
      * @param duration
      * @return
      */
-    private static String extractWardRecord(InputInfo inputInfo, List<ThreeLevelWardDoc> threeLevelWardDocs, Date admisDate, int duration, Date maxRecordDate) {
+    private static String extractWardRecord(InputInfo inputInfo, List<ThreeLevelWardDoc> threeLevelWardDocs, Date admisDate, int duration, Date maxRecordDate, String dischargeTime) {
         String recordTime = "", recordTitle = "", title = "";
         List<Date> dateList = new ArrayList();
         for (ThreeLevelWardDoc threeLevelWardDoc : threeLevelWardDocs) {
@@ -199,6 +204,9 @@ public class THR0128 extends QCCatalogue {
                 dateList.add(recordDate);
             }
         }
+        if (dateList.size() > 0 && StringUtil.isNotBlank(dischargeTime)) {
+            dateList.add(StringUtil.parseDateTime(dischargeTime));
+        }
         if (dateList.size() > 0) {
             //dateList.sort(Date::compareTo);
             if (!maxRecordDate.equals(dateList.get(dateList.size() - 1)) || CatalogueUtil.compareTime(admisDate, dateList.get(dateList.size() - 1), Long.valueOf(6 * 24 * 60))) {

+ 4 - 4
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/BeHospitalizedAI.java

@@ -95,10 +95,10 @@ public class BeHospitalizedAI extends ModelAI {
                 putContent(crfContent, medicalTextType.get(2), maritalText, Content.marriage);
             }
             /* 月经史 */
-            if (beHospitalizedDoc.getMenstrualLabel() != null && beHospitalizedDoc.getMenstrualLabel().isCrfLabel()) {
-                String menstrualText = beHospitalizedDoc.getMenstrualLabel().getText();
-                putContent(crfContent, medicalTextType.get(2), concatMenstrual, menstrualText, Content.menses);
-            }
+//            if (beHospitalizedDoc.getMenstrualLabel() != null && beHospitalizedDoc.getMenstrualLabel().isCrfLabel()) {
+//                String menstrualText = beHospitalizedDoc.getMenstrualLabel().getText();
+//                putContent(crfContent, medicalTextType.get(2), concatMenstrual, menstrualText, Content.menses);
+//            }
             /* 家族史 */
             if (beHospitalizedDoc.getFamilyLabel() != null && beHospitalizedDoc.getFamilyLabel().isCrfLabel()) {
                 String familyText = beHospitalizedDoc.getFamilyLabel().getText();