Prechádzať zdrojové kódy

1.主刀医师在术后48小时内无查房记录修改逻辑

hujing 5 rokov pred
rodič
commit
457255ff1e

+ 12 - 20
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0602.java

@@ -21,7 +21,7 @@ import java.util.Map;
 
 /**
  * @ClassName : THR0602
- * @Description : 主医师在术后48小时内无查房记录
+ * @Description : 主医师在术后48小时内无查房记录
  * @Author : 胡敬
  * @Date: 2020-03-30 14:03
  */
@@ -34,8 +34,8 @@ public class THR0602 extends QCCatalogue {
         if (ListUtil.isEmpty(operationDocs) || ListUtil.isEmpty(threeLevelWardDocs)) {
             return;
         }
-        //所有主治医师查房记录
-        List<AttendingDoctorWardDoc> attendingDoctorWardDocs = threeLevelWardDocs.get(0).getAttendingDoctorWardDocs();
+        //所有医师查房记录
+        List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDocs.get(0).getAllDoctorWradDocs();
         for (OperationDoc operationDoc : operationDocs) {
             OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
             if (operationRecordDoc == null) {
@@ -47,10 +47,10 @@ public class THR0602 extends QCCatalogue {
                 continue;
             }
             Map<String, String> doctorRecord = extractWardRecord(
-                    attendingDoctorWardDocs,
+                    allDoctorWradDocs,
                     operationEndDateStr,
                     48 * 60);
-            if (!doctorRecord.containsKey(Content.attend)) {
+            if (!doctorRecord.containsKey("主刀")) {
                 status.set("-1");
                 return;
             }
@@ -60,14 +60,14 @@ public class THR0602 extends QCCatalogue {
     }
 
     /**
-     * 抽取住院duration分钟内查房记录并取第一条主治医师查房记录以及第一条主任/副主任医师查房记录
+     * 抽取住院duration分钟内查房记录并取第一条主医师查房记录
      *
-     * @param attendingDoctorWardDocs
+     * @param allDoctorWradDocs
      * @param admisTime
      * @param duration
      * @return
      */
-    private static Map<String, String> extractWardRecord(List<AttendingDoctorWardDoc> attendingDoctorWardDocs, String admisTime, int duration) {
+    private static Map<String, String> extractWardRecord(List<ThreeLevelWardDoc> allDoctorWradDocs, String admisTime, int duration) {
         Map<Date, String> dateRecord = new HashMap<>();
         List<String> sortRecord = new ArrayList<>();
         Map<String, String> doctorRecord = new HashMap<>();
@@ -76,7 +76,7 @@ public class THR0602 extends QCCatalogue {
         if (admisDate == null) {
             return doctorRecord;
         }
-        for (AttendingDoctorWardDoc attendingDoctorWardDoc : attendingDoctorWardDocs) {
+        for (ThreeLevelWardDoc attendingDoctorWardDoc : allDoctorWradDocs) {
             Map<String, String> threeLevelWardStructureMap = attendingDoctorWardDoc.getStructureMap();
             recordTime = threeLevelWardStructureMap.get("查房日期");
             Date recordDate = StringUtil.parseDateTime(recordTime);
@@ -92,20 +92,12 @@ public class THR0602 extends QCCatalogue {
         dateRecord.entrySet().stream().sorted(Map.Entry.comparingByKey()).forEachOrdered(
                 x -> sortRecord.add(x.getValue())
         );
-        //按时间排好序查房记录的第一条主医师查房记录存进doctorRecord
+        //按时间排好序查房记录的第一条主医师查房记录存进doctorRecord
         for (String record : sortRecord) {
-            if (!CatalogueUtil.subTitle(record).contains(Content.attend)) {
+            if (!CatalogueUtil.subTitle(record).contains("主刀")) {
                 continue;
             }
-            doctorRecord.put(Content.attend, record);
-            break;
-        }
-        //按时间排好序查房记录的第一条主任医师/副主任医师查房记录存进doctorRecord
-        for (String record : sortRecord) {
-            if (!CatalogueUtil.subTitle(record).contains(Content.director)) {
-                continue;
-            }
-            doctorRecord.put(Content.director, record);
+            doctorRecord.put("主刀", record);
             break;
         }
         return doctorRecord;

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/util/CatalogueUtil.java

@@ -234,7 +234,7 @@ public class CatalogueUtil {
      */
     public static String subTitle(String srcText) {
         if (StringUtil.isNotBlank(srcText) && srcText.contains("代")) {
-            srcText = srcText.substring(srcText.indexOf("代") + 1);
+            srcText = srcText.substring(srcText.lastIndexOf("代") + 1);
         }
         return srcText;
     }