Browse Source

北仑:title识别问题更新

wangsy 4 years atrás
parent
commit
3bfc2f716a

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/beilun/leavehospital/LEA0148.java

@@ -36,7 +36,7 @@ public class LEA0148 extends QCCatalogue {
             timeCy = medicalRecordInfoStructureMap.get("leaveHospitalDate");
         }
         String timeQm = leaveHospitalDoc.getStructureMap().get("记录时间");
-        if (StringUtil.isNotBlank(timeQm) && StringUtil.isNotBlank(timeCy)) {
+        if (StringUtil.isNotBlank(timeQm) && DateUtil.parseDate(timeQm) != null && StringUtil.isNotBlank(timeCy)) {
             if (!CatalogueUtil.compareTime(
                     StringUtil.parseDateTime(timeCy),
                     StringUtil.parseDateTime(DateUtil.nowString()),

+ 20 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/beilun/threelevelward/THR0127.java

@@ -113,7 +113,9 @@ public class THR0127 extends QCCatalogue {
                     int dept_doctorNum = CatalogueUtil.appearNumber(roundRecordEveryWeek.get(j).split(","), Content.dept_doctor);
                     //三级医师查房算一次主任查房
                     int threeDoctorNum = CatalogueUtil.appearNumber(roundRecordEveryWeek.get(j).split(","), "三级");
-                    if (directorNum + dept_doctorNum + threeDoctorNum < 2) {
+                    //北仑内分泌科(主任携主任代主治)
+                    int endocrinologyTitleNum = endocrinologyTitleNum(roundRecordEveryWeek.get(j).split(","));
+                    if (directorNum + dept_doctorNum + threeDoctorNum + endocrinologyTitleNum < 2) {
                         //每周无2次主任医师查房记录/科主任查房记录
                         status.set("-1");
                         resultInfos.add(lastWardDateRangeList.get(j));
@@ -126,6 +128,23 @@ public class THR0127 extends QCCatalogue {
         }
     }
 
+    /**
+     * 北仑内分泌科主任主治处理
+     *
+     * @param srcText
+     * @return
+     */
+    private int endocrinologyTitleNum(String[] srcText) {
+        int count = 0;
+        for (String title : srcText) {
+            String regex = ".*主任.*主任.*主治.*";
+            if (title.matches(regex)) {
+                count++;
+            }
+        }
+        return count;
+    }
+
     private Date getLastRecordDate(List<ThreeLevelWardDoc> allDoctorWradDocs) {
         ThreeLevelWardDoc threeLevelWardDoc = allDoctorWradDocs.get(allDoctorWradDocs.size() - 1);
         Map<String, String> lastWardDocStructureMap = threeLevelWardDoc.getStructureMap();

+ 14 - 4
trans/src/main/java/com/lantone/qc/trans/beilun/BeiLunThreeLevelWardDocTrans.java

@@ -148,7 +148,7 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
                 title = title.replace("一助", doctorTitle);
             }
             if ((StringUtils.isNotEmpty(subTitle(title)) && subTitle(title).contains("主任")) || findDirector(content)
-                    || title.contains("三级")) {
+                    || title.contains("三级") || endocrinologyTitle(title)) {
                 directorDoctorWardDoc = new DirectorDoctorWardDoc();
                 directorDoctorWardDoc.setStructureMap(structureMap);
                 directorDoctorWardDoc.setPageData((Map) structureMap);
@@ -164,7 +164,7 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
                 writTitle = writTitle.replace("一助", doctorTitle);
             }
             if ((StringUtils.isNotEmpty(subTitle(writTitle)) && subTitle(writTitle).contains("主任")) || findDirector(content)
-                    || writTitle.contains("三级")) {
+                    || writTitle.contains("三级") || endocrinologyTitle(writTitle)) {
                 directorDoctorWardDoc = new DirectorDoctorWardDoc();
                 directorDoctorWardDoc.setStructureMap(structureMap);
                 directorDoctorWardDoc.setPageData((Map) structureMap);
@@ -195,7 +195,7 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
                 title = title.replace("一助", doctorTitle);
             }
             if ((StringUtils.isNotEmpty(subTitle(title)) && subTitle(title).contains("主治"))
-                    || findAttend(content) || title.contains("三级")) {
+                    || findAttend(content) || title.contains("三级") || endocrinologyTitle(title)) {
                 attendingDoctorWardDoc = new AttendingDoctorWardDoc();
                 attendingDoctorWardDoc.setStructureMap(structureMap);
                 attendingDoctorWardDoc.setPageData((Map) structureMap);
@@ -212,7 +212,7 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
                 writTitle = writTitle.replace("一助", doctorTitle);
             }
             if ((StringUtils.isNotEmpty(subTitle(writTitle)) && subTitle(writTitle).contains("主治"))
-                    || findAttend(content) || writTitle.contains("三级")) {
+                    || findAttend(content) || writTitle.contains("三级") || endocrinologyTitle(writTitle)) {
                 attendingDoctorWardDoc = new AttendingDoctorWardDoc();
                 attendingDoctorWardDoc.setStructureMap(structureMap);
                 attendingDoctorWardDoc.setPageData((Map) structureMap);
@@ -221,6 +221,16 @@ public class BeiLunThreeLevelWardDocTrans extends ModelDocTrans {
         return attendingDoctorWardDoc;
     }
 
+    /**
+     * 北仑内分泌科主任主治处理
+     *
+     * @param title
+     * @return
+     */
+    private boolean endocrinologyTitle(String title) {
+        String regex = ".*主任.*主任.*主治.*";
+        return title.matches(regex);
+    }
 
     /**
      * 共同照护讨论记录中找主任查房