Selaa lähdekoodia

Merge branch 'hb/beilun' into hb/master

# Conflicts:
#	dbanaly/src/main/resources/application-local.yml
rengb 3 vuotta sitten
vanhempi
commit
76a5381f9a
100 muutettua tiedostoa jossa 1944 lisäystä ja 1428 poistoa
  1. 3 3
      dbanaly/src/main/resources/application-debug.yml
  2. 1 1
      dbanaly/src/main/resources/application-dev.yml
  3. 9 9
      dbanaly/src/main/resources/application-local.yml
  4. 4 4
      dbanaly/src/main/resources/application-master.yml
  5. 3 3
      dbanaly/src/main/resources/application-test.yml
  6. 1 1
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP0183.java
  7. 2 2
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP0191.java
  8. 45 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03180.java
  9. 40 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03187.java
  10. 39 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03188.java
  11. 39 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03189.java
  12. 39 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03190.java
  13. 39 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03191.java
  14. 60 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03192.java
  15. 43 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03193.java
  16. 39 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03194.java
  17. 45 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03237.java
  18. 35 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03238.java
  19. 44 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03239.java
  20. 36 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03240.java
  21. 33 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03241.java
  22. 41 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03242.java
  23. 38 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03245.java
  24. 43 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03246.java
  25. 37 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03247.java
  26. 42 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03248.java
  27. 43 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03250.java
  28. 33 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03255.java
  29. 38 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03260.java
  30. 30 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03261.java
  31. 30 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03262.java
  32. 30 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03263.java
  33. 40 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03265.java
  34. 40 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03266.java
  35. 41 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03267.java
  36. 53 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03268.java
  37. 67 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03269.java
  38. 32 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03275.java
  39. 38 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03276.java
  40. 32 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03277.java
  41. 42 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03278.java
  42. 37 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03279.java
  43. 39 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03280.java
  44. 43 0
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03282.java
  45. 8 2
      trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/ThreeLevelWardDocTrans.java
  46. 7 5
      trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/BeHospitalizedHtmlAnalysis.java
  47. 3 1
      trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/CriticallyIllNoticeHtmlAnalysis.java
  48. 9 7
      trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/DifficultCaseDiscussHtmlAnalysis.java
  49. 11 3
      trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/LeaveHospitalHtmlAnalysis.java
  50. 22 6
      trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/OperationRecordHtmlAnalysis.java
  51. 11 4
      trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/ThreeLevelWardHtmlAnalysis.java
  52. 0 174
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyBeHospitalizedHtmlAnalysis.java
  53. 0 56
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyConsultationRecordHtmlAnalysis.java
  54. 0 56
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyCrisisValueReportHtmlAnalysis.java
  55. 0 49
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyCriticallyIllNoticeHtmlAnalysis.java
  56. 0 50
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyDeathCaseDiscussHtmlAnalysis.java
  57. 0 46
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyDeathRecordHtmlAnalysis.java
  58. 0 78
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyDifficultCaseDiscussHtmlAnalysis.java
  59. 0 83
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyFirstCourseRecordHtmlAnalysis.java
  60. 0 58
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyLeaveHospitalHtmlAnalysis.java
  61. 0 61
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyOperationHtmlAnalysis.java
  62. 0 89
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyOperationRecordHtmlAnalysis.java
  63. 0 93
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyPreoperativeHtmlAnalysis.java
  64. 0 56
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyRescueHtmlAnalysis.java
  65. 0 56
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyStagesSummaryHtmlAnalysis.java
  66. 0 56
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyTransferIntoHtmlAnalysis.java
  67. 0 65
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyTransferOutHtmlAnalysis.java
  68. 1 1
      trans/src/main/java/com/lantone/qc/trans/yhsy/AnesthesiaRecordDocTrans.java
  69. 4 4
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyADLGradeDocTrans.java
  70. 13 11
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyBeHospitalizedDocTrans.java
  71. 5 5
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyClinicBloodEffectDocTrans.java
  72. 5 5
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyClinicalBloodDocTrans.java
  73. 10 13
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyConsultationDocTrans.java
  74. 2 2
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyCrisisInfoDocTrans.java
  75. 8 6
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyCrisisValueReportDocTrans.java
  76. 9 7
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyCriticallyIllNoticeDocTrans.java
  77. 13 9
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDeathCaseDiscussDocTrans.java
  78. 11 6
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDeathRecordDocTrans.java
  79. 8 8
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDifficultCaseDiscussDocTrans.java
  80. 32 32
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDocTrans.java
  81. 2 2
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDoctorAdviceDocTrans.java
  82. 5 5
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDutyShiftSystemDocTrans.java
  83. 10 10
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyFirstCourseRecordDocTrans.java
  84. 2 2
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyFirstPageRecordDocTrans.java
  85. 5 5
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyInformedConsentDocTrans.java
  86. 5 5
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyInvasiveOperationDocTrans.java
  87. 11 24
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyLeaveHospitalDocTrans.java
  88. 2 2
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyLisDocTrans.java
  89. 2 2
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyMedicalRecordInfoDocTrans.java
  90. 35 43
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyOperationDocTrans.java
  91. 2 2
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyOutDepDocTrans.java
  92. 2 2
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyPacsDocTrans.java
  93. 7 6
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyRescueDocTrans.java
  94. 7 6
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyStagesSummaryDocTrans.java
  95. 9 9
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyThreeLevelWardDocTrans.java
  96. 10 11
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyTransferRecordDocTrans.java
  97. 4 4
      trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyVTEGradeDocTrans.java
  98. 2 2
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyADLGradeHtmlAnalysis.java
  99. 122 0
      trans/src/main/java/com/lantone/qc/trans/yuhangsy/util/YuhangsyBeHospitalizedHtmlAnalysis.java
  100. 0 0
      trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyClinicBloodEffectHtmlAnalysis.java

+ 3 - 3
dbanaly/src/main/resources/application-debug.yml

@@ -30,9 +30,9 @@ spring:
     database:
       cache: 10 # cache索引
       token: 10 # Token索引
-    host: 192.168.2.236  #Redis服务器地址
-    port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
-    password: lantone # Redis服务器连接密码(默认为空)
+    host: 192.168.2.237  #Redis服务器地址
+    port: 63791 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    password: emrais # Redis服务器连接密码(默认为空)
     lettuce:
       pool:
         max-active: 8 # 连接池最大连接数(使用负值表示没有限制)

+ 1 - 1
dbanaly/src/main/resources/application-dev.yml

@@ -29,7 +29,7 @@ spring:
     database:
       cache: 10 # cache索引
       token: 10 # Token索引
-    host: 192.168.2.121  #Redis服务器地址
+    host: 192.168.2.125  #Redis服务器地址
     port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)
     lettuce:

+ 9 - 9
dbanaly/src/main/resources/application-local.yml

@@ -5,7 +5,7 @@ spring:
     druid:
       lantone:
         driver-class-name: com.mysql.jdbc.Driver
-        url: jdbc:mysql://172.17.14.227:3306/qc?useUnicode=true&characterEncoding=utf8&useSSL=false
+        url: jdbc:mysql://192.168.2.237:3306/qc?useUnicode=true&characterEncoding=utf8&useSSL=false
         username: root
         password: lantone
         initial-size: 8
@@ -28,9 +28,9 @@ spring:
     database:
       cache: 10 # cache索引
       token: 10 # Token索引
-    host: 172.17.14.227  #Redis服务器地址
-    port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
-    password: lantone # Redis服务器连接密码(默认为空)
+    host: 192.168.2.237 #Redis服务器地址
+    port: 63791 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    password: emrais # Redis服务器连接密码(默认为空)
     lettuce:
       pool:
         max-active: 8 # 连接池最大连接数(使用负值表示没有限制)
@@ -42,16 +42,16 @@ spring:
 xml-is-encryped: true
 
 CRF:
-  url: http://172.17.14.228:3456/api/mr_info_ex/entity_predict
+  url: http://192.168.2.234:3456/api/mr_info_ex/entity_predict
 
 Similarity:
-  url: http://172.17.14.228:3456/api/mr_info_ex/similarity
+  url: http://192.168.2.234:3456/api/mr_info_ex/similarity
 
 NewSimilarity:
-  url: http://172.17.14.228:23232/api/similarity
+  url: http://192.168.2.234:23232/api/similarity
 
 NewBatchSimilarity:
-  url: http://172.17.14.228:23232/api/similarity_batch
+  url: http://192.168.2.234:23232/api/similarity_batch
 
 ChiefPresentSimilarity:
-  url: http://172.17.14.228:3456/api/mr_info_ex/chief_present_similarity
+  url: http://192.168.2.234:3456/api/mr_info_ex/chief_present_similarity

+ 4 - 4
dbanaly/src/main/resources/application-master.yml

@@ -5,9 +5,9 @@ spring:
     druid:
       lantone:
         driver-class-name: com.mysql.jdbc.Driver
-        url: jdbc:mysql://192.168.2.122:3306/qc?useUnicode=true&characterEncoding=utf8&useSSL=false
+        url: jdbc:mysql://192.168.2.125:3308/qc?useUnicode=true&characterEncoding=utf8&useSSL=false
         username: root
-        password: lantone
+        password: LangT0ng@122lt
         initial-size: 8
         min-idle: 1
         max-active: 20
@@ -28,8 +28,8 @@ spring:
     database:
       cache: 10 # cache索引
       token: 10 # Token索引
-    host: 192.168.2.122  #Redis服务器地址
-    port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    host: 192.168.2.125 # Redis服务器地址
+    port: 63791 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)
     lettuce:
       pool:

+ 3 - 3
dbanaly/src/main/resources/application-test.yml

@@ -5,9 +5,9 @@ spring:
     druid:
       lantone:
         driver-class-name: com.mysql.jdbc.Driver
-        url: jdbc:mysql://192.168.2.236:3306/stu?useUnicode=true&characterEncoding=utf8&useSSL=false
+        url: jdbc:mysql://192.168.2.126:3307/qc?useUnicode=true&characterEncoding=utf8&useSSL=false
         username: root
-        password: lantone
+        password: Lat0ne@tesT
         initial-size: 8
         min-idle: 1
         max-active: 20
@@ -28,7 +28,7 @@ spring:
     database:
       cache: 6 # cache索引
       token: 6 # Token索引
-    host: 192.168.2.236  #Redis服务器地址
+    host: 192.168.2.126  #Redis服务器地址
     port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)
     lettuce:

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP0183.java

@@ -29,7 +29,7 @@ public class FIRP0183 extends QCCatalogue {
                 return;
             }
             if (!CatalogueUtil.compareToken(s, s1)) {
-                status.set("0");
+                status.set("-1");
             }
         }
     }

+ 2 - 2
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP0191.java

@@ -24,8 +24,8 @@ public class FIRP0191 extends QCCatalogue {
         }
         Map<String, String> map = inputInfo.getFirstPageRecordDoc().getStructureMap();
         String oName = map.get(Content.operative_name);
-        if (!StringUtil.isEmpty(oName)) {
-            status.set("0");
+        if (StringUtil.isEmpty(oName)) {
+            status.set("-1");
         }
     }
 }

+ 45 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03180.java

@@ -0,0 +1,45 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03180
+ * @Description :出院主要诊断入院病情未填写
+ * @Author : wsy
+ * @Date: 2020-03-16 13:31
+ */
+@Component
+public class FIRP03180 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureExtMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            List<Map<String, String>> outpatientEmergencyDiag = (List) firstpageStructureMap.get(Content.dischargeDiag);
+            if (outpatientEmergencyDiag == null || outpatientEmergencyDiag.size() == 0) {
+                return;
+            }
+
+            long count = outpatientEmergencyDiag.stream().filter(diag -> {
+                boolean flag = false;
+                if (StringUtil.isNotBlank(diag.get("诊断类别"))
+                        && diag.get("诊断类别").contains("主要诊断")
+                        && StringUtil.isBlank(diag.get("入院情况"))) {
+                    flag = true;
+                }
+                return flag;
+            }).count();
+
+            if (count > 0) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 40 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03187.java

@@ -0,0 +1,40 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03187
+ * @Description : 其他手术及操作名称未填写
+ * @Author : wsy
+ * @Date: 2021-11-18 14:11
+ */
+@Component
+public class FIRP03187 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            List<Map<String, String>> operative_information = (List<Map<String, String>>) firstpageStructureMap.get(Content.operative_information);
+            if (operative_information != null && operative_information.size() > 0) {
+                for (int i = 1; i < operative_information.size(); i++) {
+                    if (CatalogueUtil.isEmpty(operative_information.get(i).get(Content.operative_name))) {
+                        status.set("-1");
+                        break;
+                    }
+                }
+            }
+        }
+    }
+}

+ 39 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03188.java

@@ -0,0 +1,39 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03188
+ * @Description : 其他手术及操作编码未填写
+ * @Author : wsy
+ * @Date: 2021-11-18 14:11
+ */
+@Component
+public class FIRP03188 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            List<Map<String, String>> operative_information = (List<Map<String, String>>) firstpageStructureMap.get(Content.operative_information);
+            if (operative_information != null && operative_information.size() > 0) {
+                for (int i = 1; i < operative_information.size(); i++) {
+                    if (CatalogueUtil.isEmpty(operative_information.get(i).get(Content.operative_code))) {
+                        status.set("-1");
+                        break;
+                    }
+                }
+            }
+        }
+    }
+}

+ 39 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03189.java

@@ -0,0 +1,39 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03189
+ * @Description : 手术级别未填写
+ * @Author : wsy
+ * @Date: 2021-11-18 14:11
+ */
+@Component
+public class FIRP03189 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            List<Map<String, String>> operative_information = (List<Map<String, String>>) firstpageStructureMap.get(Content.operative_information);
+            if (operative_information != null && operative_information.size() > 0) {
+                for (Map<String, String> opInfo : operative_information) {
+                    if (CatalogueUtil.isEmpty(opInfo.get(Content.operative_degree))) {
+                        status.set("-1");
+                        break;
+                    }
+                }
+            }
+        }
+    }
+}

+ 39 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03190.java

@@ -0,0 +1,39 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03190
+ * @Description : 术者未填写
+ * @Author : wsy
+ * @Date: 2021-11-18 14:11
+ */
+@Component
+public class FIRP03190 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            List<Map<String, String>> operative_information = (List<Map<String, String>>) firstpageStructureMap.get(Content.operative_information);
+            if (operative_information != null && operative_information.size() > 0) {
+                for (Map<String, String> opInfo : operative_information) {
+                    if (CatalogueUtil.isEmpty(opInfo.get(Content.operative_user))) {
+                        status.set("-1");
+                        break;
+                    }
+                }
+            }
+        }
+    }
+}

+ 39 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03191.java

@@ -0,0 +1,39 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03191
+ * @Description : 第一助手未填写
+ * @Author : wsy
+ * @Date: 2021-11-18 14:11
+ */
+@Component
+public class FIRP03191 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            List<Map<String, String>> operative_information = (List<Map<String, String>>) firstpageStructureMap.get(Content.operative_information);
+            if (operative_information != null && operative_information.size() > 0) {
+                for (Map<String, String> opInfo : operative_information) {
+                    if (CatalogueUtil.isEmpty(opInfo.get(Content.operative_assistant_first))) {
+                        status.set("-1");
+                        break;
+                    }
+                }
+            }
+        }
+    }
+}

+ 60 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03192.java

@@ -0,0 +1,60 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.operation.OperationDiscussionDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03192
+ * @Description : 麻醉方式填写错误
+ * @Author : wsy
+ * @Date: 2021-11-18 14:11
+ */
+@Component
+public class FIRP03192 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
+        String operationsAnesthesia = "";
+        String operationsFirstAnesthesia = "";
+        if (ListUtil.isNotEmpty(operationDocs)) {
+            OperationDiscussionDoc operationDiscussionDoc = operationDocs.get(0).getOperationDiscussionDoc();
+            if (operationDiscussionDoc == null) {
+                return;
+            }
+            operationsAnesthesia = operationDiscussionDoc.getStructureMap().get("麻醉方法");
+        }
+        if (StringUtil.isBlank(operationsAnesthesia)) {
+            return;
+        }
+
+        if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            List<Map<String, String>> operative_information = (List<Map<String, String>>) firstpageStructureMap.get(Content.operative_information);
+            if (operative_information != null && operative_information.size() > 0) {
+                operationsFirstAnesthesia = operative_information.get(0).get(Content.anesthesia_mode);
+                if (!CatalogueUtil.isEmpty(operative_information.get(0).get(Content.operative_name)) || CatalogueUtil.isEmpty(operationsFirstAnesthesia)) {
+                    return;
+                }
+            }
+        }
+        if (StringUtil.isBlank(operationsFirstAnesthesia)) {
+            return;
+        }
+
+        if (!operationsAnesthesia.contains(operationsFirstAnesthesia)) {
+            status.set("-1");
+            return;
+        }
+    }
+}

+ 43 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03193.java

@@ -0,0 +1,43 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.operation.OperationDiscussionDoc;
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
+import com.lantone.qc.pub.util.ListUtil;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03193
+ * @Description : 麻醉方式未填写
+ * @Author : wsy
+ * @Date: 2021-11-18 14:11
+ */
+@Component
+public class FIRP03193 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            List<Map<String, String>> operative_information = (List<Map<String, String>>) firstpageStructureMap.get(Content.operative_information);
+            if (operative_information != null && operative_information.size() > 0) {
+                for (Map<String, String> opInfo : operative_information) {
+                    if (CatalogueUtil.isEmpty(opInfo.get(Content.anesthesia_mode))) {
+                        status.set("-1");
+                        break;
+                    }
+                }
+            }
+        }
+    }
+}

+ 39 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03194.java

@@ -0,0 +1,39 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName :  FIRP03194
+ * @Description :  手术及操作日期未填写
+ * @Author : wsy
+ * @Date: 2021-11-18 14:11
+ */
+@Component
+public class FIRP03194 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
+            List<Map<String, String>> operative_information = (List<Map<String, String>>) firstpageStructureMap.get(Content.operative_information);
+            if (operative_information != null && operative_information.size() > 0) {
+                for (Map<String, String> opInfo : operative_information) {
+                    if (CatalogueUtil.isEmpty(opInfo.get(Content.operative_date))) {
+                        status.set("-1");
+                        break;
+                    }
+                }
+            }
+        }
+    }
+}

+ 45 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03237.java

@@ -0,0 +1,45 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import org.springframework.stereotype.Component;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03237
+ * @Description : 首页入院时间格式填写不正确
+ * @Author : dy
+ * @Date: 2021-11-12 15:40
+ */
+@Component
+public class FIRP03237 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String admissionTime = firstpageStructureMap.get(Content.admisTime);
+            //创建SimpleDateFormat对象实例并定义好转换格式
+            // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date date=null;
+            try {
+                date=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(admissionTime);
+                if (!admissionTime.equals("-")){
+                    status.set("-1");
+                    return;
+                }
+            }catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+}

+ 35 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03238.java

@@ -0,0 +1,35 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+/**
+ * @ClassName : FIRP03238
+ * @Description : 血型填写不在值域范围内
+ * @Author : dy
+ * @Date: 2021-11-30 10:06
+ */
+@Component
+public class FIRP03238 extends QCCatalogue {
+    private List<String>Rh_list= Arrays.asList("A型","B型","O型","AB型","不详","未查");
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            if (structureMap!=null){
+                String bloodType = structureMap.get("血型");
+                if (StringUtil.isNotBlank(bloodType) || !Rh_list.contains(bloodType) || !"-".equals(bloodType)){
+                    status.set("-1");
+                    return;
+                }
+            }
+        }
+    }
+}

+ 44 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03239.java

@@ -0,0 +1,44 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03239
+ * @Description : 首页入院时间晚于出院时间
+ * @Author : dy
+ * @Date: 2021-11-12 15:57
+ */
+@Component
+public class FIRP03239 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            Map<String, String> structureMap1 = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String admissionTime = structureMap.get(Content.admisTime);
+            String dischargeTime = structureMap1.get(Content.dischargeTime);
+            //病案首页入院时间和病案首页的出院时间比较,大于出院时间则报错
+            if (StringUtil.isNotBlank(admissionTime) && StringUtil.isNotBlank(dischargeTime)){
+                status.set("0");
+            }
+            //SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            try {
+                if (CatalogueUtil.compareDate(admissionTime,admissionTime,-1)){
+                    status.set("-1");
+                }
+            }catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+}

+ 36 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03240.java

@@ -0,0 +1,36 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+/**
+ * @ClassName : FIRP03240
+ * @Description : 是否有31天再住院计划填写错误
+ * @Author : dy
+ * @Date: 2021-11-15 10:54
+ */
+@Component
+public class FIRP03240 extends QCCatalogue {
+    public  List<String> codeTables = Arrays.asList("有","无");
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String days = firstpageStructureMap.get("三十一天内再住院计划");
+            if (StringUtil.isNotBlank(days) || !days.equals("-") || codeTables.contains(days)){
+                status.set("-1");
+                return;
+            }
+        }
+    }
+}

+ 33 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03241.java

@@ -0,0 +1,33 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03241
+ * @Description : 有出院31天再住院计划,目的未填写
+ * @Author : dy
+ * @Date: 2021-11-15 11:15
+ */
+@Component
+public class FIRP03241 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String objective = firstpageStructureMap.get("再住院目的");
+            if (StringUtil.isBlank(objective)){
+                status.set("-1");
+                return;
+            }
+        }
+    }
+}

+ 41 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03242.java

@@ -0,0 +1,41 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03242
+ * @Description : 有出院31天再住院计划,目的填写错误
+ * @Author : dy
+ * @Date: 2021-11-15 11:43
+ */
+@Component
+public class FIRP03242 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        //有出院31天再住院计划,“有”时必填,目的填写“-”错误。当为否时,目的可以为“-”。
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String objective = firstpageStructureMap.get("再住院目的");
+            String rehospitalization = firstpageStructureMap.get(Content.reHospitalization);
+            if (StringUtil.isNotBlank(objective) && StringUtil.isNotBlank(rehospitalization)){
+                status.set("0");
+            }
+            if (rehospitalization.equals("有") && !objective.equals("-")){
+                status.set("-1");
+            }
+            if (rehospitalization.equals("否") && objective.equals("-")){
+                status.set("-1");
+            }
+        }
+    }
+}

+ 38 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03245.java

@@ -0,0 +1,38 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03245
+ * @Description : 药物过敏填写错误
+ * @Author : dy
+ * @Date: 2021-11-15 16:13
+ */
+@Component
+public class FIRP03245 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String medicine = firstpageStructureMap.get(Content.drugAllergy);
+            if (StringUtil.isNotBlank(medicine)) {
+                status.set("0");
+            }
+
+            //有或无,取值不能为“-”
+            if(medicine.equals("有") || medicine.equals("无")|| !medicine.equals("-")){
+                status.set("-1");
+            }
+        }
+    }
+}

+ 43 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03246.java

@@ -0,0 +1,43 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @ClassName : FIRP03246
+ * @Description : 联系人电话填写错误
+ * @Author : dy
+ * @Date: 2021-11-15 16:26
+ */
+@Component
+public class FIRP03246 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String phone = firstpageStructureMap.get(Content.contact_phone);
+            if (StringUtil.isNotBlank(phone)) {
+                status.set("0");
+            }
+            //匹配所有手机号码
+            String regex="^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$";
+            Pattern pattern=Pattern.compile(regex);
+            Matcher matcher = pattern.matcher(phone);
+            if (matcher.find() || !phone.equals("-")){
+                status.set("-1");
+            }
+        }
+    }
+
+}

+ 37 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03247.java

@@ -0,0 +1,37 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03247
+ * @Description : 联系人地址填写错误
+ * @Author : dy
+ * @Date: 2021-11-15 17:19
+ */
+@Component
+public class FIRP03247 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String address = firstpageStructureMap.get(Content.contact_address);
+            if (StringUtil.isNotBlank(address)) {
+                status.set("0");
+            }
+            if (!address.equals("-")){
+                status.set("-1");
+            }
+        }
+    }
+
+}

+ 42 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03248.java

@@ -0,0 +1,42 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @ClassName : FIRP03248
+ * @Description : 工作单位电话填写错误
+ * @Author : dy
+ * @Date: 2021-11-15 18:55
+ */
+@Component
+public class FIRP03248 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String workPhone = firstpageStructureMap.get("工作单位电话");
+            if (StringUtil.isBlank(workPhone)) {
+                return;
+            }
+            //匹配电话或手机号码,如果大于15位则报错
+            String regex="^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\\\\d{8}$";
+            Pattern pattern = Pattern.compile(regex);
+            Matcher matcher = pattern.matcher(workPhone);
+            //电话号码超过15位报错
+            if (matcher.find() && workPhone.length()<15){
+                status.set("-1");
+            }
+        }
+    }
+}

+ 43 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03250.java

@@ -0,0 +1,43 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03250
+ * @Description : 联系人关系填写错误
+ * @Author : dy
+ * @Date: 2021-11-16 11:15
+ */
+@Component
+public class FIRP03250 extends QCCatalogue {
+    private List<String> person_list = Arrays.asList("本人或户主","配偶","子","女","孙子","孙女","外孙子","外孙女","父母","祖父母或外祖父母","兄弟姐妹","同事同学","其他");
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String contactName = firstpageStructureMap.get("联系人姓名");
+            String relationship = firstpageStructureMap.get("联系人关系");
+            String name = firstpageStructureMap.get("姓名");
+            if (StringUtil.isNotBlank(name) &&StringUtil.isNotBlank(contactName)){
+                status.set("0");
+            }
+            if (person_list.contains(relationship) && StringUtil.isNotBlank(relationship) || !relationship.equals("-")){
+                status.set("-1");
+            }
+            if (contactName.equals(name) || !relationship.equals("本人或户主")){
+                status.set("-1");
+            }
+        }
+    }
+}

+ 33 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03255.java

@@ -0,0 +1,33 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03255
+ * @Description : 主要手术及操作编码未填写
+ * @Author : dy
+ * @Date: 2021-11-18 14:11
+ */
+@Component
+public class FIRP03255 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String info = firstpageStructureMap.get(Content.operative_information);
+            if (StringUtil.isBlank(info)) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 38 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03260.java

@@ -0,0 +1,38 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03260
+ * @Description : 工作单位及地址填写错误
+ * @Author : dy
+ * @Date: 2021-11-19 17:14
+ */
+@Component
+public class FIRP03260 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()==null){
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String workUnit = structureMap.get(Content.work_unit);
+            String job = structureMap.get(Content.job);
+            if (StringUtil.isNotBlank(job) || "农名".contains(job) || "无业人员".contains(job) || "学生".contains(job)){
+                status.set("-1");
+            }
+            if (StringUtil.isNotBlank(workUnit) && workUnit.equals("-")){
+                status.set("-1");
+            }
+        }
+    }
+}

+ 30 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03261.java

@@ -0,0 +1,30 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03261
+ * @Description : 户口地址填写错误
+ * @Author : dy
+ * @Date: 2021-11-22 10:08
+ */
+@Component
+public class FIRP03261 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String householdAddress = structureMap.get(Content.household_address);
+            if (StringUtil.isNotBlank(householdAddress) && !householdAddress.equals("-")){
+                status.set("-1");
+            }
+        }
+    }
+}

+ 30 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03262.java

@@ -0,0 +1,30 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03262
+ * @Description : 现住址电话填写错误
+ * @Author : dy
+ * @Date: 2021-11-22 10:30
+ */
+@Component
+public class FIRP03262 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String telephone = structureMap.get(Content.current_address_phone);
+            if (StringUtil.isNotBlank(telephone) && !telephone.equals("-")){
+                status.set("-1");
+            }
+        }
+    }
+}

+ 30 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03263.java

@@ -0,0 +1,30 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03263
+ * @Description : 现住址填写错误
+ * @Author : dy
+ * @Date: 2021-11-22 10:41
+ */
+@Component
+public class FIRP03263 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String currentAddress = structureMap.get(Content.current_address);
+            if (StringUtil.isNotBlank(currentAddress) && !currentAddress.equals("-")){
+                status.set("-1");
+            }
+        }
+    }
+}

+ 40 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03265.java

@@ -0,0 +1,40 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03265
+ * @Description : 民族填写错误
+ * @Author : dy
+ * @Date: 2021-11-23 14:02
+ */
+@Component
+public class FIRP03265 extends QCCatalogue {
+    public List<String> nation_list = Arrays.asList("汉族","蒙古族","回族","藏族","维吾尔族","苗族","彝族","壮族","布依族","朝鲜族","满族","侗族","瑶族"
+    ,"白族","土家族","哈尼族","哈萨克族","傣族","黎族","傈僳族","佤族","畲族","高山族","拉祜族","水族","东乡族","纳西族","景颇族","柯尔克孜族","土族","达斡尔族","仫佬族","羌族","布朗族"
+            ,"撒拉族","毛难族","仡佬族","锡伯族","阿昌族","普米族","塔吉克族","怒族","乌孜别克族","俄罗斯族","鄂温克族","德昂族","保安族","裕固族","京族","塔塔尔族","独龙族"
+            ,"鄂伦春族","赫哲族","门巴族","珞巴族","基诺族","其他","外籍人士");
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String nation = structureMap.get(Content.nation);
+            if (StringUtil.isNotBlank(nation)){
+                status.set("0");
+            }
+            if (!nation.equals("-") || nation_list.size()>0 || nation_list.contains(nation)) {
+                status.set("-1");
+                return;
+            }
+        }
+    }
+}

+ 40 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03266.java

@@ -0,0 +1,40 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03266
+ * @Description : 籍贯填写错误
+ * @Author : dy
+ * @Date: 2021-11-22 14:38
+ */
+@Component
+public class FIRP03266 extends QCCatalogue {
+    public List<String> place_list = Arrays.asList("北京市","天津市","河北省","山西省","内蒙古","辽宁省",
+            "吉林省","黑龙江省","上海市","江苏省","浙江省","安徽省","福建省","江西省","山东省","河南省",
+            "湖北省","湖南省","广东省","广西省","海南省","四川省","重庆市","贵州省","云南省","西藏","陕西省",
+            "甘肃省","青海省","宁夏","新疆","台湾","香港特别行政区","澳门","外籍");
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String nativePlace = structureMap.get(Content.native_place);
+            if (StringUtil.isNotBlank(nativePlace)){
+                status.set("0");
+            }
+            if (place_list.size()>0 && place_list.contains(nativePlace)) {
+                status.set("-1");
+                return;
+            }
+        }
+    }
+}

+ 41 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03267.java

@@ -0,0 +1,41 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03267
+ * @Description : 出生地填写错误
+ * @Author : dy
+ * @Date: 2021-11-22 14:38
+ */
+@Component
+public class FIRP03267 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()==null) {
+            return;
+        }
+        FirstPageRecordDoc firstPageRecordDoc=new FirstPageRecordDoc();
+        if (firstPageRecordDoc.getStructureMap()!=null){
+            FirstPageRecordDoc pageRecordDoc = inputInfo.getFirstPageRecordDoc();
+            Map<String, String> structureMap = pageRecordDoc.getStructureMap();
+            if (structureMap != null) {
+                String birthPlace = structureMap.get("出生地");
+                if (StringUtil.isNotEmpty(birthPlace) || !birthPlace.equals("-")){
+                    status.set("-1");
+                    return;
+                }
+            }
+        }
+    }
+}

+ 53 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03268.java

@@ -0,0 +1,53 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03268
+ * @Description : 出院科别不标准
+ * @Author : dy
+ * @Date: 2021-11-15 13:35
+ */
+@Component
+public class FIRP03268 extends QCCatalogue {
+    private List<String> category_list= Arrays.asList("预防保健科","全科医疗科","内科","呼吸内科专业","消化内科专业","神经内科专业","心血管内科专业","血液内科专业"
+    ,"肾病学专业","内分泌专业","免疫学专业","变态反应专业","老年病专业","其他","外科","普通外科专业","肝脏移植项目","胰腺移植项目","小肠移植项目"
+    ,"神经外科专业","骨科专业","泌尿外科专业","肾脏移植项目","胸外科专业","肺脏移植项目","心脏大血管外科专业","心脏移植项目","烧伤科专业","整形外科专业"
+    ,"妇产科","妇科专业","产科专业","计划生育专业","优生学专业","生殖健康与不孕症专业","妇女保健科","青春期保健专业","围产期保健专业","更年期保健专业","妇女心理卫生专业"
+    ,"妇女营养专业","儿科","新生儿专业","小儿传染病专业","小儿消化专业","小儿呼吸专业","小儿心脏病专业","小儿肾病专业","小儿血液病专业","小儿神经病学专业"
+    ,"小儿内分泌专业","小儿遗传病专业","小儿免疫专业","小儿外科","小儿普通外科专业","小儿骨科专业","小儿泌尿外科专业","小儿胸心外科专业","小儿神经外科专业","儿童保健科"
+    ,"儿童生长发育专业","儿童营养专业","儿童心理卫生专业","儿童五官保健专业","儿童康复专业","眼科","耳鼻咽喉科","耳科专业","鼻科专业","咽喉科专业","口腔科","口腔内科专业"
+    ,"口腔颌面外科专业","正畸专业","口腔修复专业","口腔预防保健专业","皮肤科","皮肤病专业","性传播疾病专业","医疗美容科","精神科","精神病专业","精神卫生专业","药物依赖专业"
+    ,"精神康复专业","社区防治专业","临床心理专业","司法精神专业","传染科","肠道传染病专业","呼吸道传染病专业","肝炎专业","虫媒传染病专业","动物源性传染病专业","蠕虫病专业"
+    ,"结核病科","地方病科","肿瘤科","急诊医学科","康复医学科","运动医学科","职业病科","职业中毒专业","尘肺专业","放射病专业","物理因素损伤专业","职业健康监护专业",
+            "临终关怀科","特种医学与军事医学科","麻醉科","疼痛科","重症医学科","医学检验科","临床体液、血液专业","临床微生物学专业","临床生化检验专业","临床免疫、血清学专业",
+            "临床细胞分子遗传学专业","病理科","医学影像科","X线诊断专业","CT诊断专业","磁共振成像诊断专业","核医学专业","超声诊断专业","心电诊断专业","脑电及脑血流图诊断专业"
+    ,"神经肌肉电图专业","介入放射学专业","放射治疗专业","中医科","内科专业","外科专业","妇产科专业","儿科专业","皮肤科专业","眼科专业","耳鼻咽喉科专业","口腔科专业","肿瘤科专业"
+    ,"骨伤科专业","肛肠科专业","老年病科专业","针灸科专业","推拿科专业","康复医学专业","急诊科专业","预防保健科专业","民族医学科","维吾尔医学","藏医学","蒙医学","彝医学"
+    ,"傣医学","中西医结合科","其他业务科室");
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc() != null&&inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            if (structureMap != null) {
+                String dischargeDepartment = structureMap.get("出院科别");
+                if (StringUtil.isNotBlank(dischargeDepartment)){
+                    status.set("0");
+                }
+                if (!dischargeDepartment.equals("-") || category_list.contains(dischargeDepartment)){
+                    status.set("-1");
+                    return;
+                }
+            }
+        }
+    }
+}
+

+ 67 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03269.java

@@ -0,0 +1,67 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+import rx.subjects.PublishSubject;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Map;
+/**
+ * @ClassName : FIRP03269
+ * @Description : 实际住院天数填写错误
+ * @Author : dy
+ * @Date: 2021-11-23 17:04
+ */
+@Component
+public class FIRP03269 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            Map<String, String> structureMap1 = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            Map<String, String> structureMap2 = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            if (structureMap!=null && structureMap1!=null && structureMap2!=null){
+                String actual = structureMap.get("实际住院天数");
+                String dischargeTime = structureMap1.get("出院时间");
+                String admissionTime = structureMap2.get("入院时间");
+                if (StringUtil.isNotBlank(actual) || !actual.equals("-")){
+                    status.set("-1");
+                }
+                if (StringUtil.isNotBlank(admissionTime) && StringUtil.isNotBlank(dischargeTime)) {
+                    Date date = StringUtil.parseDateTime(dischargeTime);
+                    Date date1 = StringUtil.parseDateTime(admissionTime);
+                    daysBetween(date1,date);
+                    status.set("-1");
+                    return;
+                }
+            }
+
+        }
+    }
+    /**
+     * 计算两个日期之间相差的天数
+     * @param smdate 较小的时间
+     * @param bdate  较大的时间
+     * @return 相差天数
+     * @throws ParseException
+     */
+    public static int daysBetween(Date smdate, Date bdate) throws ParseException
+    {
+        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
+        smdate=sdf.parse(sdf.format(smdate));
+        bdate=sdf.parse(sdf.format(bdate));
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(smdate);
+        long time1 = cal.getTimeInMillis();
+        cal.setTime(bdate);
+        long time2 = cal.getTimeInMillis();
+        long between_days=(time2-time1)/(1000*3600*24);
+        return Integer.parseInt(String.valueOf(between_days));
+    }
+}

+ 32 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03275.java

@@ -0,0 +1,32 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+/**
+ * @ClassName : FIRP03275
+ * @Description : 医疗付费方式未填写
+ * @Author : dy
+ * @Date: 2021-11-24 16:20
+ */
+@Component
+public class FIRP03275 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            if (structureMap!=null && structureMap.size() > 0){
+                String medicalPaymentMethod = structureMap.get("医疗付费方式");
+                if (StringUtil.isBlank(medicalPaymentMethod)){
+                    status.set("-1");
+                }
+            }
+        }
+    }
+}

+ 38 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03276.java

@@ -0,0 +1,38 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+/**
+ * @ClassName : FIRP03276
+ * @Description : 医疗付费方式填写错误
+ * @Author : dy
+ * @Date: 2021-11-24 16:33
+ */
+@Component
+public class FIRP03276 extends QCCatalogue {
+    private List<String> payment_Method = Arrays.asList("本市城镇职工基本医疗保险","外埠城镇职工基本医疗保险","本市城乡居民基本医疗保险","外埠城镇居民基本医疗保险",
+            "本市新型农村合作医疗","外埠新型农村合作医疗","贫困救助","商业医疗保险","全公费","全自费","其他社会保险","其他");
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            if (structureMap!=null && structureMap.size() > 0){
+                String medicalPaymentMethod = structureMap.get("医疗付费方式");
+                if (StringUtil.isNotBlank(medicalPaymentMethod)){
+                    status.set("0");
+                }
+                if (payment_Method.contains(medicalPaymentMethod) || !"-".equals(medicalPaymentMethod)){
+                    status.set("-1");
+                    return;
+                }
+            }
+        }
+    }
+}

+ 32 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03277.java

@@ -0,0 +1,32 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+/**
+ * @ClassName : FIRP03277
+ * @Description : 患者姓名填写错误
+ * @Author : dy
+ * @Date: 2021-11-25 10:49
+ */
+@Component
+public class FIRP03277 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+       if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+           Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+           if (structureMap != null){
+               String name = structureMap.get("姓名");
+               if (StringUtil.isNotEmpty(name) || !name.equals("-")){
+                   status.set("-1");
+                   return;
+               }
+           }
+       }
+    }
+}

+ 42 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03278.java

@@ -0,0 +1,42 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+/**
+ * @ClassName : FIRP03278
+ * @Description :职业填写错误
+ * @Author : dy
+ * @Date: 2021-11-29 10:20
+ */
+@Component
+public class FIRP03278 extends QCCatalogue {
+    private List<String>job_list= Arrays.asList("国家公务员","专业技术人员","职员","企业管理人员","工人","农民","学生","现役军人","自由职业者","个体经营者","无业人员"
+    ,"退(离)休人员","其他");
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            if (structureMap != null){
+                String job = structureMap.get(Content.job);
+                if (StringUtil.isNotEmpty(job)){
+                    status.set("0");
+                }
+                /**
+                 * 职业填写超出值域范围
+                 */
+                if (job_list.contains(job) || !job.equals("-")){
+                    status.set("-1");
+                    return;
+                }
+            }
+        }
+    }
+}

+ 37 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03279.java

@@ -0,0 +1,37 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.Content;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : FIRP03264
+ * @Description : 婚姻状况填写错误
+ * @Author : dy
+ * @Date: 2021-11-29 10:27
+ */
+@Component
+public class FIRP03279 extends QCCatalogue {
+    public List<String> marry_list = Arrays.asList("未婚","已婚","丧偶","离婚","其他");
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String marry = structureMap.get(Content.marry);
+            if (StringUtil.isNotBlank(marry)){
+                status.set("0");
+            }
+            if (!marry.equals("-") || marry_list.size()>0 && marry_list.contains(marry)) {
+                status.set("-1");
+                return;
+            }
+        }
+    }
+}

+ 39 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03280.java

@@ -0,0 +1,39 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+/**
+ * @ClassName : FIRP03280
+ * @Description : 联系人姓名填写错误
+ * @Author : dy
+ * @Date: 2021-11-29 10:52
+ */
+@Component
+public class FIRP03280 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        if (inputInfo.getFirstPageRecordDoc() == null) {
+            status.set("0");
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
+            Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            String contactName = firstpageStructureMap.get("联系人姓名");
+            String relationship = firstpageStructureMap.get("联系人关系");
+            String name = firstpageStructureMap.get("姓名");
+            if (StringUtil.isNotBlank(name) &&StringUtil.isNotBlank(contactName)){
+                status.set("0");
+            }
+            if (relationship.contains("本人或户主") && StringUtil.isNotBlank(relationship) || !relationship.equals("-")){
+                status.set("-1");
+            }
+            if (!contactName.equals(name)){
+                status.set("-1");
+            }
+        }
+    }
+}

+ 43 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/firstpagerecord/FIRP03282.java

@@ -0,0 +1,43 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+/**
+ * @ClassName : FIRP03282
+ * @Description : 病理号未填写
+ * @Author : dy
+ * @Date: 2021-11-29 14:37
+ */
+@Component
+public class FIRP03282 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo){
+        status.set("0");
+        if (inputInfo.getFirstPageRecordDoc()==null){
+            return;
+        }
+        if (inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
+            Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            Map<String, String> structureMap1 = inputInfo.getFirstPageRecordDoc().getStructureMap();
+            if (structureMap != null){
+                String diagnosisFee = structureMap.get("病理诊断费");
+                if (StringUtil.isEmpty(diagnosisFee) || diagnosisFee.equals(Integer.valueOf(0))){
+                    status.set("-1");
+                    return;
+                }
+            }
+            if (structureMap1!=null){
+                String diagnosis = structureMap1.get("病理诊断");
+                if (StringUtil.isEmpty(diagnosis) || diagnosis.equals("-")){
+                    status.set("-1");
+                    return;
+                }
+            }
+        }
+
+    }
+}

+ 8 - 2
trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/ThreeLevelWardDocTrans.java

@@ -60,8 +60,14 @@ public class ThreeLevelWardDocTrans extends ModelDocTrans {
         if (contentMap.get("isParsed") != null && "1".equals(contentMap.get("isParsed").toString())) {
             structureMap = (Map) FastJsonUtils.getJsonToMap(content);
         } else {
-            String recTitle = contentMap.get("recTitle").toString();
-            String recTypeId = contentMap.get("recTypeId").toString();
+            String recTitle = "";
+            String recTypeId = "";
+            if (contentMap.containsKey("recTitle") && StringUtil.isNotBlank(contentMap.get("recTitle").toString())) {
+                recTitle = contentMap.get("recTitle").toString();
+            }
+            if (contentMap.containsKey("recTypeId") && StringUtil.isNotBlank(contentMap.get("recTypeId").toString())) {
+                recTypeId = contentMap.get("recTypeId").toString();
+            }
             HtmlAnalysis ningBoZhongYiHtmlAnalysis = new ThreeLevelWardHtmlAnalysis();
             Map<String, String> sourceMap = ningBoZhongYiHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {

+ 7 - 5
trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/BeHospitalizedHtmlAnalysis.java

@@ -67,13 +67,15 @@ public class BeHospitalizedHtmlAnalysis implements HtmlAnalysis {
         }
 //
 
-        if (map.get("性别").equals("女")) {
-            if (map.get("婚育史").contains("月经史")) {
-                map.put("月经史", map.get("婚育史").substring(map.get("婚育史").indexOf("月经史") + 4));
-                map.put("婚育史", map.get("婚育史").substring(0, map.get("婚育史").indexOf("月经史")));
+        if (map.get("性别") != null && map.get("性别").equals("女")) {
+            if (StringUtil.isNotBlank(map.get("婚育史"))) {
+                if (map.get("婚育史").contains("月经史")) {
+                    map.put("月经史", map.get("婚育史").substring(map.get("婚育史").indexOf("月经史") + 4));
+                    map.put("婚育史", map.get("婚育史").substring(0, map.get("婚育史").indexOf("月经史")));
+                }
             }
         }
-        if (map.get("性别").equals("男")) {
+        if (map.get("性别") != null && map.get("性别").equals("男")) {
             if (StringUtil.isNotBlank(map.get("月经史"))) {
                 map.put("婚育史", map.get("月经史"));
             }

+ 3 - 1
trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/CriticallyIllNoticeHtmlAnalysis.java

@@ -54,7 +54,9 @@ public class CriticallyIllNoticeHtmlAnalysis implements HtmlAnalysis {
                 CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
             }
             structureMap.put("患者签名", structureMap.get("患者签名").replace("患者签名", ""));
-            structureMap.put("法定监护人/被授权人签名", structureMap.get("法定监护人/被授权人签名").replace("患方签名", ""));
+            if (StringUtil.isNotBlank(structureMap.get("法定监护人/被授权人签名"))) {
+                structureMap.put("法定监护人/被授权人签名", structureMap.get("法定监护人/被授权人签名").replace("患方签名", ""));
+            }
             CommonAnalysisUtil.processTypeRight(structureMap, "3.目前病情评估");
             CommonAnalysisUtil.processType(structureMap, "6.患方知情选择");
             CommonAnalysisUtil.processType(structureMap, "指印");

+ 9 - 7
trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/DifficultCaseDiscussHtmlAnalysis.java

@@ -34,7 +34,9 @@ public class DifficultCaseDiscussHtmlAnalysis implements HtmlAnalysis {
             String recTypeId = args[2];
             Document doc = Jsoup.parse(html);
             HtmlAnalysisUtil.tableStyle1InsertMap(doc.getElementById("table1"), structureMap);
-            doc.selectFirst("body").child(0).getElementById("table1").remove();
+            if (doc.selectFirst("body").child(0).getElementById("table1") != null) {
+                doc.selectFirst("body").child(0).getElementById("table1").remove();
+            }
             String htmlContent = HtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
             if (StringUtil.isNotBlank(htmlContent)) {
                 htmlContent = htmlContent.replaceAll("[   ]", " ").replace("第一页", "").replace("发言记录(包括病史简要、讨论意见及结论):", "");
@@ -46,23 +48,23 @@ public class DifficultCaseDiscussHtmlAnalysis implements HtmlAnalysis {
                 String date = CommonAnalysisUtil.extractDate(structureMap.get("住院号"));
                 if (StringUtil.isNotBlank(date)) {
                     structureMap.put("时间", date);
-                    CommonAnalysisUtil.repKey(structureMap,"住院号","\n");
+                    CommonAnalysisUtil.repKey(structureMap, "住院号", "\n");
                 }
             }
             if (structureMap.containsKey("记录者(签名)")) {
-                structureMap.put("记录医生", structureMap.get("记录者(签名)").replace(" ",""));
+                structureMap.put("记录医生", structureMap.get("记录者(签名)").replace(" ", ""));
             }
             if (structureMap.containsKey("科主任(签名)")) {
                 String date1 = CommonAnalysisUtil.NBZYExtractDate(structureMap.get("科主任(签名)").replace(" ", ""));
                 if (StringUtil.isNotBlank(date1)) {
-                    structureMap.put("科主任签名", structureMap.get("科主任(签名)").replace(" ","").replace(date1, ""));
-                }else{
-                    structureMap.put("科主任签名", structureMap.get("科主任(签名)").replace(" ","").replace("年月日", ""));
+                    structureMap.put("科主任签名", structureMap.get("科主任(签名)").replace(" ", "").replace(date1, ""));
+                } else {
+                    structureMap.put("科主任签名", structureMap.get("科主任(签名)").replace(" ", "").replace("年月日", ""));
                 }
             }
             HtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
         } catch (Exception e) {
-            log.error(e.getMessage(), e);
+            log.error(e.getMessage(), e + "html=" + args[0]);
         }
         return structureMap;
     }

+ 11 - 3
trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/LeaveHospitalHtmlAnalysis.java

@@ -34,7 +34,9 @@ public class LeaveHospitalHtmlAnalysis implements HtmlAnalysis {
             String recTypeId = args[2];
             Document doc = Jsoup.parse(html);
             HtmlAnalysisUtil.tableStyle1InsertMap(doc.getElementById("table1"), structureMap);
-            doc.selectFirst("body").child(0).getElementById("table1").remove();
+            if (doc.selectFirst("body").child(0).getElementById("table1") != null) {
+                doc.selectFirst("body").child(0).getElementById("table1").remove();
+            }
             String htmlContent = HtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
             if (StringUtil.isNotBlank(htmlContent)) {
                 htmlContent = htmlContent.replace("患者如有需要,可于出院十日后(工作日),携带(身份证、社保卡、户口簿)等有效身份证到病案室(茗\n" +
@@ -44,7 +46,13 @@ public class LeaveHospitalHtmlAnalysis implements HtmlAnalysis {
                                 "三楼)复印住院病历资料。如委托他人办理,需携带委托人(患者)及被委托人有效身份证明前来办理。", "")
                         .replace("特殊检查资料号", "特殊检查资料号:");
                 List<String> sortTitles = CommonAnalysisUtil.sortTitles(titles, htmlContent);
-                CommonAnalysisUtil.cutByTitles(htmlContent, sortTitles, 0, structureMap);
+
+                try {
+                    CommonAnalysisUtil.cutByTitles(htmlContent, sortTitles, 0, structureMap);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    log.error("报错html :" + htmlContent);
+                }
             }
             if (StringUtil.isNotBlank(CommonAnalysisUtil.extractDate(structureMap.get("出院日期")))) {
                 structureMap.put("住院天数", structureMap.get("出院日期").replace(CommonAnalysisUtil.extractDate(structureMap.get("出院日期")), ""));
@@ -66,7 +74,7 @@ public class LeaveHospitalHtmlAnalysis implements HtmlAnalysis {
             }
             HtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
         } catch (Exception e) {
-            log.error(e.getMessage(), e);
+            log.error(e.getMessage(), e + "html=" + args[0]);
         }
         return structureMap;
     }

+ 22 - 6
trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/OperationRecordHtmlAnalysis.java

@@ -2,6 +2,7 @@ package com.lantone.qc.trans.ningbozhenhai.util;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.jsoup.Jsoup;
@@ -44,7 +45,7 @@ public class OperationRecordHtmlAnalysis implements HtmlAnalysis {
                 .replace("(包括体位、切口处理经过,病灶所见及手术步骤等):", "");
         List<String> titles = Lists.newArrayList(
                 "姓名", "病区", "科室", "床号", "床位", "住院号", "手术开始时间", "手术结束时间", "术前诊断", "术 前 诊  断",
-                "手术名称", "手 术 名  称", "术中诊断", "术(中)后诊断", "手术人员", "手术主刀医师", "手 术 主 刀 医 师", "一 助", "二 助", "麻醉方式",
+                "手术名称", "手 术 名  称", "术中诊断", "术(中)后诊断", "手术人员", "手术主刀医师", "手 术 主 刀 医 师", "麻醉方式",
                 "麻 醉 方  式", "麻醉人员", "麻 醉 医  师", "手术风险评估(可选)", "NNIS分级", "手术类别(可选)", "手术标本", "冰冻切片结果",
                 "术中并发症", "术中失血量", "手术经过", "手术经过及处理(包括患者的体位、切口处理、病灶所见及手术步骤等)", "记录者签字", "主刀签字", "主刀医师签名",
                 "记录日期", "日期", "时间"
@@ -55,13 +56,28 @@ public class OperationRecordHtmlAnalysis implements HtmlAnalysis {
         CommonAnalysisUtil.processTypeRight(map, "手术类别(可选)");
         CommonAnalysisUtil.processType(map, "手术标本");
         CommonAnalysisUtil.processType(map, "术中并发症");
-        map.put("NNIS分级", map.get("NNIS分级").replace("-", ""));
-        if (map.containsKey("时间")) {
-            map.put("日期", map.get("记录日期") + map.get("时间"));
+        if (StringUtil.isNotBlank(map.get("NNIS分级"))) {
+            map.put("NNIS分级", map.get("NNIS分级").replace("-", ""));
         }
-        if (map.containsKey("手术主刀医师")) {
-            map.put("手术人员", "手术主刀医师:" + map.get("手术主刀医师") + " 一助:" + map.get("一助") + " 二助:" + map.get("二助"));
+        if (map.containsKey("记录日期") && StringUtil.isNotBlank(map.get("记录日期"))) {
+            StringBuffer sb = new StringBuffer();
+            sb.append(map.get("记录日期"));
+            if (map.containsKey("时间") && StringUtil.isNotBlank(map.get("时间"))) {
+                sb.append(map.get("时间"));
+            }
+            map.put("日期", sb.toString());
         }
+        /*if (map.containsKey("手术主刀医师") && StringUtil.isNotBlank(map.get("手术主刀医师"))) {
+            StringBuffer sb1 = new StringBuffer();
+            sb1.append("手术主刀医师:" + map.get("手术主刀医师"));
+            if (map.containsKey("一助") && StringUtil.isNotBlank(map.get("一助"))) {
+                sb1.append(" 一助:" + map.get("一助"));
+            }
+            if (map.containsKey("二助") && StringUtil.isNotBlank(map.get("二助"))) {
+                sb1.append(" 二助:" + map.get("二助"));
+            }
+            map.put("手术人员", sb1.toString());
+        }*/
     }
 
 }

+ 11 - 4
trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/ThreeLevelWardHtmlAnalysis.java

@@ -31,14 +31,21 @@ public class ThreeLevelWardHtmlAnalysis implements HtmlAnalysis {
             String recTitle = args[1];
             String recTypeId = args[2];
             Document doc = Jsoup.parse(html);
-            Element bigDivElement = doc.selectFirst("body").child(0);
-            if (bigDivElement.childNodeSize() == 1) {
-                bigDivElement = bigDivElement.child(0);
+            String htmlText;
+            if (doc.selectFirst("body").childNodeSize() > 0) {
+                Element bigDivElement = doc.selectFirst("body").child(0);
+                if (bigDivElement.childNodeSize() == 1) {
+                    bigDivElement = bigDivElement.child(0);
+                }
+                htmlText = HtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+            }else{
+                htmlText = doc.text();
             }
+
             /*if (bigDivElement.selectFirst("hr") != null) {
                 bigDivElement.selectFirst("hr").previousElementSiblings().remove();
             }*/
-            String htmlText = HtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
+
             /*htmlText = htmlText.replace("注意:上级医师查房主要记 录:患者病情、诊断、鉴别诊断、当前治疗措施和疗效的分析及下一步诊疗意见等,能反应上级医 师的水平。", "")
                     .replace("提醒:有创诊疗操作记录内容包括操作名称、时间、步骤、结果及患者的一般情况,记录操作过 程是否顺利,有无不良反应,术后注意事项,操作医师签名、记录时间等。 手术室完成的、治疗性质的及全麻下完成的有创诊疗操作参照手术管理。(包括介入治疗、胃肠镜 下肿瘤切除/粘膜下肿瘤剥除等)", "");*/
             CommonAnalysisUtil.extractWardInfo(recTitle, htmlText, structureMap);

+ 0 - 174
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyBeHospitalizedHtmlAnalysis.java

@@ -1,174 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.pub.util.StringUtil;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-import org.jsoup.nodes.Element;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: rengb
- * @time: 2020/9/15 16:28
- */
-@Slf4j
-public class YhsyBeHospitalizedHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "1";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> map = Maps.newLinkedHashMap();
-        try {
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Document doc = Jsoup.parse(html);
-
-            if (recTitle.contains("24")) {
-                analysis24h(doc, map);
-            } else if (recTitle.contains("日间病历")) {
-                analysisDay(doc, map);
-            } else {
-                analysisGeneral(doc, recTitle, map);
-            }
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return map;
-    }
-
-    //一般模板
-    private void analysisGeneral(Document doc, String recTitle, Map<String, String> map) {
-        //个人基础信息table解析
-        YhsyHtmlAnalysisUtil.tableStyle1InsertMap(doc.getElementById("table1"), map);
-        //主诉、现病史等table解析
-        YhsyHtmlAnalysisUtil.tableStyle2InsertMap(doc.getElementById("table6"), map);
-        if (StringUtil.isNotBlank(map.get("婚育史月经史")) && map.get("婚育史月经史").contains("经期")) {
-            map.put("婚育史", map.get("婚育史月经史").substring(0, map.get("婚育史月经史").indexOf("经期")));
-        }
-        //体 格 检 查 表(一) table解析
-        Element tgjcTableElement = doc.getElementById("table3");
-        YhsyHtmlAnalysisUtil.tableStyle2InsertMap(tgjcTableElement, map);
-
-        //诊断 table解析
-        String disTableElementId = null;
-        Element disTableElement = null;
-        String[] disTableElementIds = {"table7_2_0_0_1_1_2_0_1_4_5_6_7_0_1_37", "table7_2_0_0_1_1_2_0_1_4_5_6_7_0_1", "table7_2_0_0_1_1_2_0_1_4_5_6_7", "table7_2_0_0_1_1_2_0_1_4_5_6_7_0_1_5_2_3_1_2", "table7_2_0_0_1_1_2_0_1_4_5_6_7_0_1_5_2_3", "table7_2_0_0_1_1_2_0_1_4_5_6_7_0_1_5_2_3_1_2_27", "table7_2_0_0_1_1_2_0_1_4_5_6_7_0_1_5_2_3_1"};
-        for (String eid : disTableElementIds) {
-            disTableElement = doc.getElementById(eid);
-            if (disTableElement != null) {
-                disTableElementId = eid;
-                break;
-            }
-        }
-
-        YhsyHtmlAnalysisUtil.tableStyle1InsertMap(disTableElement, map);
-        disHandleExt(map);
-
-        //医生签名、医生签名时间
-        Element docSignElement = null, docSignTimeElement = null;
-        if (disTableElement != null) {
-            for (Element disTableElementNt : disTableElement.nextElementSiblings()) {
-                docSignElement = disTableElementNt.selectFirst("image,img");
-                if (docSignElement != null) {
-                    docSignTimeElement = disTableElementNt.nextElementSibling();
-                    break;
-                }
-            }
-        }
-        if (docSignElement != null) {
-//            map.put("医生签名", docSignElement.outerHtml());
-            map.put("医生签名", "暂无");
-        }
-        if (docSignTimeElement != null) {
-            map.put("医生签名时间", YhsyHtmlAnalysisUtil.elementLayer1ToStr(docSignTimeElement, false).trim());
-        }
-
-        //专科检查、辅助检查
-        Element yuElement = new Element("div");
-        if (tgjcTableElement != null) {
-            for (Element tgjcTableElementNt : tgjcTableElement.nextElementSiblings()) {
-                if (StringUtil.isNotBlank(disTableElementId) && tgjcTableElementNt.id().contains(disTableElementId)) {
-                    break;
-                }
-                if (tgjcTableElementNt.tagName().equals("table")) {
-                    continue;
-                }
-                tgjcTableElementNt.appendTo(yuElement);
-            }
-        }
-        String yuText = YhsyHtmlAnalysisUtil.blockDivToStr(yuElement, true)
-                .replace("体  格  检  查  表 (二)", "")
-                .replace("(补充及专科情况)", "")
-                .replace("辅  助  检  查", "辅助检查:")
-                .replace("诊断:", "")
-                .replace("补充专科情况", "补充专科情况:")
-                .trim();
-        CommonAnalysisUtil.cutByTitles(yuText, Lists.newArrayList("专科检查", "辅助检查"), 0, map);
-
-    }
-
-    //24小时出入院记录、24小时出入院记录(全院)、24小时入出院记录(全院通用)、24小时内入院死亡记录(全院通用)
-    private void analysis24h(Document doc, Map<String, String> map) {
-        String text = YhsyHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), false);
-        text = text.substring(text.lastIndexOf("24小时入出院记录姓    名")).replaceFirst("第1页", "");
-        List<String> titles = Lists.newArrayList("姓    名", "家庭住址", "性    别", "工作单位", "年    龄", "身份证号码", "民    族",
-                "联系人(关系)", "职    业", "入院时间", "婚    姻", "死亡时间", "记录时间", "出 生 地", "病史陈述者", "主    诉", "入院情况", "心理评估",
-                "疼痛评估", "营养评估", "功能评估", "入院诊断", "诊疗经过", "死亡原因", "死亡诊断", "出院情况", "出院诊断", "出院计划", "出院医嘱",
-                "出院去向", "医师签名", "书写时间");
-
-        CommonAnalysisUtil.cutByTitles(text, titles, 0, map);
-        CommonAnalysisUtil.processType(map, "出院去向");
-    }
-
-    //原-日间病历入出院记录、日间病历-性早熟
-    private void analysisDay(Document doc, Map<String, String> map) {
-        //个人基础信息table解析
-        YhsyHtmlAnalysisUtil.tableStyle1InsertMap(doc.getElementById("table1"), map);
-        //主诉、入院情况等table解析
-        YhsyHtmlAnalysisUtil.tableStyle2InsertMap(doc.getElementById("table6"), map);
-        //医生签名、医生签名时间
-        Element docSignElement = null, docSignTimeElement = null;
-        for (Element table6ElementNt : doc.getElementById("table6").parent().nextElementSiblings()) {
-            docSignElement = table6ElementNt.selectFirst("image,img");
-            if (docSignElement != null) {
-                docSignTimeElement = table6ElementNt.nextElementSibling();
-                break;
-            }
-        }
-        if (docSignElement != null) {
-//            map.put("医生签名", docSignElement.outerHtml());
-            map.put("医生签名", "暂无");
-        }
-        if (docSignTimeElement != null) {
-            map.put("医生签名时间", YhsyHtmlAnalysisUtil.elementLayer1ToStr(docSignTimeElement, false).trim());
-        }
-    }
-
-    private void disHandleExt(Map<String, String> map) {
-        String[] keys = {"补充诊断", "修正诊断"};
-        String value = null;
-        int index = 0;
-        for (String key : keys) {
-            value = map.get(key);
-            if (StringUtil.isNotBlank(value)) {
-                for (String key_ : keys) {
-                    index = value.indexOf(key_);
-                    if (index > 0) {
-                        map.put(key_, value.substring(index + 5));
-                        map.put(key, value.substring(0, index));
-                    }
-                }
-            }
-        }
-    }
-
-}

+ 0 - 56
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyConsultationRecordHtmlAnalysis.java

@@ -1,56 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Element;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: rengb
- * @time: 2020/9/28 20:12
- */
-@Slf4j
-public class YhsyConsultationRecordHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "7";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> map = Maps.newLinkedHashMap();
-        try {
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
-            analysisGeneral(recTitle,bigDivElement, map);
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return map;
-    }
-
-    private void analysisGeneral(String recTitle,Element bigDivElement, Map<String, String> map) {
-        if (bigDivElement.childNodeSize() == 1) {
-            bigDivElement = bigDivElement.child(0);
-        }
-        if (bigDivElement.selectFirst("hr") != null) {
-            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
-        }
-        String text = YhsyHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
-        CommonAnalysisUtil.extractWardInfo(recTitle,text, map);
-        String bqjlText = "病情记录" + map.get("病情记录");
-        List<String> titles = Lists.newArrayList(
-                "病情记录"
-        );
-        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
-        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
-    }
-
-}

+ 0 - 56
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyCrisisValueReportHtmlAnalysis.java

@@ -1,56 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Element;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: rengb
- * @time: 2020/9/28 19:48
- */
-@Slf4j
-public class YhsyCrisisValueReportHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "23";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> map = Maps.newLinkedHashMap();
-        try {
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
-            analysisGeneral(recTitle,bigDivElement, map);
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return map;
-    }
-
-    private void analysisGeneral(String recTitle,Element bigDivElement, Map<String, String> map) {
-        if (bigDivElement.childNodeSize() == 1) {
-            bigDivElement = bigDivElement.child(0);
-        }
-        if (bigDivElement.selectFirst("hr") != null) {
-            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
-        }
-        String text = YhsyHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
-        CommonAnalysisUtil.extractWardInfo(recTitle,text, map);
-        String bqjlText = "病情记录" + map.get("病情记录");
-        List<String> titles = Lists.newArrayList(
-                "病情记录"
-        );
-        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
-        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
-    }
-
-}

+ 0 - 49
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyCriticallyIllNoticeHtmlAnalysis.java

@@ -1,49 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.pub.util.StringUtil;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description: 病危(重)通知单html解析
- * @author: HUJING
- * @time: 2020/9/14 15:28
- */
-@Slf4j
-public class YhsyCriticallyIllNoticeHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "25";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> structureMap = Maps.newLinkedHashMap();
-
-        try {
-            List<String> titles = Lists.newArrayList("姓名", "性别", "出生日期", "科别", "病区", "床号", "住院号",
-                    "临床诊断", "病情摘要", "主要症状", "体格检查", "辅助检查", "告知医师签名",
-                    "告知时间", "患方意见", "患方签名", "手印说明", "与患者关系", "签字时间");
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Document doc = Jsoup.parse(html);
-            String htmlContent = YhsyHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
-            if (StringUtil.isNotBlank(htmlContent)) {
-                htmlContent = htmlContent.replaceAll("[   ]", " ");
-                CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
-            }
-            CommonAnalysisUtil.extractDateByTitle(structureMap, "告知时间");
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return structureMap;
-    }
-
-}

+ 0 - 50
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyDeathCaseDiscussHtmlAnalysis.java

@@ -1,50 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-import org.jsoup.nodes.Element;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: rengb
- * @time: 2020/9/17 14:27
- */
-@Slf4j
-public class YhsyDeathCaseDiscussHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "3";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> map = Maps.newLinkedHashMap();
-        try {
-            String html = args[0];
-            String recTypeId = args[2];
-            Document doc = Jsoup.parse(html);
-            Element bigDivElement = doc.selectFirst("body").child(0);
-
-            bigDivElement.child(0).lastElementSibling().remove();
-            map.put("医生签名时间", YhsyHtmlAnalysisUtil.elementLayer1ToStr(bigDivElement.child(0).lastElementSibling(), false));
-            bigDivElement.child(0).lastElementSibling().remove();
-
-            String text = YhsyHtmlAnalysisUtil.blockDivToStr(bigDivElement, false);
-            List<String> titles = Lists.newArrayList("姓名", "性别", "出生日期", "科别", "病区", "床号", "住院号",
-                    "入院诊断", "死亡诊断", "尸检结果", "讨论时间", "讨论地点",
-                    "主 持 人", "参加人员", "具体讨论意见", "主持人小结意见", "主持人(签名)", "记录者签名");
-            CommonAnalysisUtil.cutByTitlesNoColon(text, titles, 0, map);
-            YhsyHtmlAnalysisUtil.mapValueRemoveStartColon(map);
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return map;
-    }
-
-}

+ 0 - 46
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyDeathRecordHtmlAnalysis.java

@@ -1,46 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.pub.util.StringUtil;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description: 死亡记录html解析
- * @author: HUJING
- * @time: 2020/9/14 15:41
- */
-@Slf4j
-public class YhsyDeathRecordHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "24";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> structureMap = Maps.newLinkedHashMap();
-        try {
-            List<String> titles = Lists.newArrayList("入院日期", "死亡时间", "入院情况", "入院诊断",
-                    "诊疗经过(重点记录病情演变、抢救经过)", "死亡原因", "死亡诊断", "医师签字", "记录时间");
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Document doc = Jsoup.parse(html);
-            String htmlContent = YhsyHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), false);
-            if (StringUtil.isNotBlank(htmlContent)) {
-                htmlContent = htmlContent.replaceAll("[   ]", " ");
-                CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
-            }
-            CommonAnalysisUtil.extractDateByTitle(structureMap, "记录时间");
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return structureMap;
-    }
-}

+ 0 - 78
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyDifficultCaseDiscussHtmlAnalysis.java

@@ -1,78 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.pub.util.StringUtil;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description: 疑难、危重病例讨论记录html解析
- * @author: HUJING
- * @time: 2020/9/14 15:41
- */
-@Slf4j
-public class YhsyDifficultCaseDiscussHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "19";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> structureMap = Maps.newLinkedHashMap();
-        try {
-            List<String> titles = Lists.newArrayList("姓名", "性别", "出生日期", "科别", "病区", "床号",
-                    "住院号", "年龄", "床号", "住院号", "住址(单位)", "讨论日期", "讨论地点", "主持人", "参加人员", "具体讨论意见",
-                    "主持人小结意见", "主持人小结意见/讨论结论", "主持人签名", "记录医生签名");
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Document doc = Jsoup.parse(html);
-            String htmlContent = YhsyHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
-            if (StringUtil.isNotBlank(htmlContent)) {
-                htmlContent = htmlContent.replaceAll("[   ]", " ").replace("第一页","");
-                CommonAnalysisUtil.html2StructureMap(titles, htmlContent, structureMap);
-            }
-            CommonAnalysisUtil.extractDateByTitle(structureMap, "告知时间");
-            removeLast(structureMap);
-            if (structureMap.containsKey("住院号")) {
-                String date = CommonAnalysisUtil.extractDate(structureMap.get("住院号"));
-                if (StringUtil.isNotBlank(date)) {
-                    structureMap.put("时间", date);
-                    structureMap.put("住院号", structureMap.get("住院号").replace(date, "").replace("\n", ""));
-
-                }
-            }
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return structureMap;
-    }
-
-    /**
-     * 去除value中最后的逗号
-     *
-     * @param structureMap
-     */
-    private void removeLast(Map<String, String> structureMap) {
-        for (Map.Entry<String, String> entry : structureMap.entrySet()) {
-            structureMap.put(entry.getKey(), findLast(entry.getValue()));
-        }
-    }
-
-    private String findLast(String value) {
-        if (StringUtil.isNotBlank(value)) {
-            if (value.lastIndexOf(",") != value.length() - 1) {
-                return value;
-            }
-            value = value.substring(0, value.length() - 1);
-            findLast(value);
-        }
-        return value;
-    }
-}

+ 0 - 83
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyFirstCourseRecordHtmlAnalysis.java

@@ -1,83 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.pub.util.StringUtil;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: HUJING
- * @time: 2020/9/9 11:24
- */
-@Slf4j
-public class YhsyFirstCourseRecordHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "2";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> structureMap = Maps.newLinkedHashMap();
-        try {
-            List<String> titles = Lists.newArrayList("(一)病历特点", "(二)诊断依据", "(三)鉴别诊断",
-                    "(四)初步诊断", "(五)诊疗计划", "(二)拟诊讨论", "初步诊断", "诊断依据", "鉴别诊断", "(三)诊疗计划", "心理治疗", "(五)疼痛评估",
-                    "疼痛治疗", "营养治疗", "康复治疗", "VTE预防", "医生签名", "(六)诊疗计划");
-            String html = args[0];
-            String recTitle = args[1];
-            Document doc = Jsoup.parse(html);
-            String htmlContent = YhsyHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
-            if (StringUtil.isNotBlank(htmlContent)) {
-                htmlContent = htmlContent.replace("—/—", "")
-                        .replace("第1页", "")
-                        .replace("建议先书写大病", "")
-                        .replace("历,并对导入的既往史和现病史进行归纳", "")
-                        .replace("若书写者为诊疗组长本人,以下签名框中可只签一个名字", "");
-                String[] lines = htmlContent.split("\n\n");
-                String text = "";
-                if (lines.length > 1) {
-                    if (lines[0].contains("宁波市北仑区人民医院")) {
-                        for (int i = 1; i < lines.length; i++) {
-                            text += lines[i];
-                        }
-                    } else {
-                        for (int i = 0; i < lines.length; i++) {
-                            text += lines[i];
-                        }
-                    }
-                    //htmlContent = lines[1];
-                } else if (lines.length == 1) {
-                    text = lines[0];
-                }
-                if (StringUtil.isNotBlank(text)) {
-                    String date = CommonAnalysisUtil.extractDate(text);
-                    if (StringUtil.isNotBlank(date)) {
-                        structureMap.put("时间", date);
-                        text = text.replace(date, "");
-                    }
-                    text = text.replaceAll("[   ]", " ");
-                    CommonAnalysisUtil.html2StructureMap(titles, text, structureMap);
-                }
-            }
-            if (structureMap.containsKey("(一)病历特点")) {
-                CommonAnalysisUtil.cutByTitles(structureMap.get("(一)病历特点"), Lists.newArrayList("入院查体", "辅助检查"), 0, structureMap);
-                if (structureMap.containsKey("入院查体")) {
-                    structureMap.put("(一)病历特点", structureMap.get("(一)病历特点").split("入院查体")[0]);
-                }
-            }
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, args[2], structureMap);
-            //        CommonAnalysisUtil.extractDateByTitle(structureMap, "时间");
-            //        structureMap.forEach((k,v)-> System.out.println(k + "------" + v));
-            //        structureMap.put("rec_title=", "107");
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return structureMap;
-    }
-
-}

+ 0 - 58
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyLeaveHospitalHtmlAnalysis.java

@@ -1,58 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.pub.util.StringUtil;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: HUJING
- * @time: 2020/9/9 11:24
- */
-@Slf4j
-public class YhsyLeaveHospitalHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "5";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> structureMap = Maps.newLinkedHashMap();
-        try {
-            List<String> titles = Lists.newArrayList("姓名", "出生年月", "性别", "年龄", "出生日期", "科室", "病区", "床位", "床号", "住院号 ", "住院号",
-                    "入院日期", "出院日期", "地址", "住院天数", "婚姻", "入院诊断", "出院诊断", "分娩日期", "分娩方式", "手术指征",
-                    "入院情况", "诊治经过", "入院后检查化验结果", "入院后化验检查结果", "诊疗经过", "治疗结果", "出院计划", "病理检查结果", "出院情况", "婴儿情况",
-                    "治疗效果", "出院医嘱", "医师签名", "日期", "病理号", "X片号", "MR号", "CT号", "其它", "主治医师", "住院医师");
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Document doc = Jsoup.parse(html);
-            String htmlContent = YhsyHtmlAnalysisUtil.blockDivToStr(doc.selectFirst("body").child(0), true);
-            if (StringUtil.isNotBlank(htmlContent)) {
-                htmlContent = htmlContent.replace("下拉选择无或右键调用临床数据", "");
-                htmlContent = htmlContent.replaceAll("[   ]", " ").replace("第1页", "");
-                htmlContent = htmlContent.replace("\n", "");
-                List<String> sortTitles = CommonAnalysisUtil.sortTitles(titles, htmlContent.replace("复诊时间", ""));
-                sortTitles.add("时间");
-                CommonAnalysisUtil.cutByTitles(htmlContent, sortTitles, 0, structureMap);
-            }
-            if (structureMap.containsKey("出院诊断") && structureMap.get("出院诊断").contains("入院情况")) {
-                String discharge = structureMap.get("出院诊断");
-                int index = discharge.indexOf("入院情况");
-                structureMap.put("出院诊断", discharge.substring(0, index));
-                structureMap.put("入院情况", discharge.substring(index + 4));
-            }
-            CommonAnalysisUtil.extractDateByTitle(structureMap, "时间");
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, structureMap);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return structureMap;
-    }
-}

+ 0 - 61
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyOperationHtmlAnalysis.java

@@ -1,61 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Element;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: rengb
- * @time: 2020/9/28 14:56
- */
-@Slf4j
-public class YhsyOperationHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "18";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> map = Maps.newLinkedHashMap();
-        try {
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
-            analysisGeneral(recTitle, bigDivElement, map);
-            CommonAnalysisUtil.makeEmpty(map, "医生签名");
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return map;
-    }
-
-    private void analysisGeneral(String recTitle, Element bigDivElement, Map<String, String> map) {
-        if (bigDivElement.childNodeSize() == 1) {
-            bigDivElement = bigDivElement.child(0);
-        }
-        if (bigDivElement.selectFirst("hr") != null) {
-            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
-        }
-        String text = YhsyHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
-        CommonAnalysisUtil.extractWardInfo(recTitle, text, map);
-        String bqjlText = "病情记录" + map.get("病情记录")
-                .replace("提醒:有创诊疗操作记录内容包括操作名称、时间、步骤、结果及患者的一般情况,记录操作过","")
-                .replace("程是否顺利,有无不良反应,术后注意事项,操作医师签名、记录时间等。","")
-                .replace("手术室完成的、治疗性质的及全麻下完成的有创诊疗操作参照手术管理。(包括介入治疗、胃肠镜","")
-                .replace("下肿瘤切除/粘膜下肿瘤剥除等)","");
-        List<String> titles = Lists.newArrayList(
-                "病情记录", "患者手术后情况", "手术简要经过(包括手术方式、术中所见、过程是否顺利、有无并发症等)", "术后去向", "术后去向", "术后诊断", "术后处理措施", "术后应当特别注意观察的事项:", "术后治疗计划(包括术后应当特别注意观察的事项)", "医生签名", "医师签名"
-        );
-        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
-        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
-    }
-
-}

+ 0 - 89
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyOperationRecordHtmlAnalysis.java

@@ -1,89 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.pub.util.StringUtil;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Element;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: rengb
- * @time: 2020/9/28 16:36
- */
-@Slf4j
-public class YhsyOperationRecordHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "17";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> map = Maps.newLinkedHashMap();
-        try {
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
-            analysisGeneral(bigDivElement, map);
-            YhsyHtmlAnalysisUtil.mapValueRemoveStartColon(map);
-            String operatingCrew = null;
-            if (map.containsKey("手术人员")) {
-                operatingCrew = map.get("手术人员");
-            } else if (map.containsKey("手术者及助手名称")) {
-                operatingCrew = map.get("手术者及助手名称");
-            }
-            if (StringUtil.isNotBlank(operatingCrew)) {
-                CommonAnalysisUtil.cutByTitles(operatingCrew, Lists.newArrayList("主刀", "一助", "二助", "助手", "洗手护士"), 0, map);
-            }
-            if (map.containsKey("主刀")) {
-                map.put("主刀", map.get("主刀").replaceAll("[^\u4E00-\u9FA5]", ""));
-            }
-            if (map.containsKey("麻醉者")) {
-                String anesthetist = map.get("麻醉者").replace("麻醉医生:", "");
-                map.put("麻醉医师", anesthetist);
-                if (anesthetist.contains("1.")) {
-                    int index = anesthetist.indexOf("1.");
-                    map.put("麻醉医师", anesthetist.substring(0, index));
-                    map.put("手术经过", anesthetist.substring(index));
-                }
-            }
-            if (map.containsKey("手术日期")) {
-                String operatorDateStr = map.get("手术日期");
-                if (operatorDateStr.contains("--")) {
-                    String[] operatorDate = operatorDateStr.split("--");
-                    map.put("手术开始时间", operatorDate[0]);
-                    map.put("手术结束时间", operatorDate[1]);
-                }
-            }
-            CommonAnalysisUtil.makeEmpty(map, "医生签名");
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return map;
-    }
-
-    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
-        /*if (bigDivElement.selectFirst("hr") != null) {
-            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
-        }*/
-        String text = YhsyHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
-        text = text.replaceAll("第1页", "");
-        List<String> titles = Lists.newArrayList(
-                "姓名", "性别", "出生日期", "出生年月", "科别", "科室", "病区", "床号", "床位", "住院号",
-                "手术时间", "手术日期", "术前诊断", "手术指征", "手术人员", "麻醉方式", "麻醉人员", "麻 醉 者", "洗手护士", "本次手术是否属于非计划再次手术", "接生者",
-                "术前胎心", "手术名称", "术后诊断", "手术者及助手名称", "术中取病理标本", "麻醉方法", "诊断手术/操作简要经过(包括术中有无并发症及具体描述和处理)", "手术经过",
-                "医生签名", "记录时间", "时间", "手术/操作医生", "记录者", "术中输血", "术前宫颈准备日期", "药物名称及用法", "导管或其他", "插入深度",
-                "阴道填塞纱布条", "准备者", "取出日期", "手术方法", "术中特殊情况", "病理检查", "其他", "记录者", "手术者",
-                "检查子宫位置"
-        );
-        titles = CommonAnalysisUtil.sortTitles(titles, text);
-        CommonAnalysisUtil.cutByTitlesNoColon(text, titles, 0, map);
-    }
-
-}

+ 0 - 93
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyPreoperativeHtmlAnalysis.java

@@ -1,93 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.pub.util.StringUtil;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Element;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: rengb
- * @time: 2020/9/17 19:19
- */
-@Slf4j
-public class YhsyPreoperativeHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "11";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> map = Maps.newLinkedHashMap();
-        try {
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
-            analysisGeneral(bigDivElement, map);
-
-            YhsyHtmlAnalysisUtil.mapValueRemoveStartColon(map);
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return map;
-    }
-
-    private void analysisGeneral(Element bigDivElement, Map<String, String> map) {
-        /*if (bigDivElement.selectFirst("hr") != null) {
-            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
-        }*/
-        String text = YhsyHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
-
-        int index1 = text.lastIndexOf("经治医生签名");
-        int index2 = text.lastIndexOf("主刀医生签名");
-        if (index1 != -1 && index2 != -1) {
-            text = text.substring(0, index1).replace("(如高血压病、冠心病、糖尿病、脑梗、心梗、心肺肝肾功能不全,口服抗凝药", "").replace("等)", "")
-                    .replace("(如腹腔镜可能改开腹等)", "").replace("(如腹腔镜可能改开腹", "").replace("皮瓣转移术可能的变更方案","")
-                    .replace("四级手术、疑难手术等必须填写以下“具体讨论意见”,作为科室三大讨论本留存资料", "")
-                    .replace("术后术后", "术后")
-                    + text.substring(index1, index2).replace("签字时间", "经治医生签字时间").replace("年月日时分", "")
-                    + text.substring(index2).replace("签字时间", "主刀医生签字时间").replace("年月日时分", "");
-        }
-        text = text.replace("术前讨论及术前小结", "").replace("讨论结论:", "").replace("年月日时\n" +
-                "分", "");
-        List<String> titles = Lists.newArrayList("姓名", "性别", "出生日期", "出生年月", "科别", "科室", "病区", "床号", "床位", "住院号",
-                "讨论时间", "讨论方式", "参加人员", "简要病情", "具体讨论意见",
-                "1.术前诊断", "2.手术指征与禁忌征", "3.可替代方案", "4.拟施手术方式(名称)及可能的变更方案", "5.计划性多次手术",
-                "5.本次手术是否属于计划性多次手术",
-                "5.拟施麻醉方式", "6.术前特殊准备", "7.主要术中、术后风险及防范措施", "8.术中、术后注意事项(含护理事项)",
-                "6.拟施麻醉方式", "7.术前特殊准备", "8.主要术中、术后风险及防范措施", "9.术中、术后注意事项(含护理事项)",
-                "术前诊断", "手术指征", "拟施手术名称及方式", "拟施麻醉方式", "其他术前相关情况", "注意事项",
-                "经治医生签名", "经治医生签字时间", "主刀医生签名", "医生签名", "主刀医生签字时间", "签字时间");
-        CommonAnalysisUtil.cutByTitles(text, titles, 0, map);
-        CommonAnalysisUtil.processType(map, "5.计划性多次手术");
-        CommonAnalysisUtil.processType(map, "5.本次手术是否属于计划性多次手术");
-        CommonAnalysisUtil.processType(map, "讨论方式");
-        CommonAnalysisUtil.makeEmpty(map, "主刀医生签名");
-        // 解决医生签名显示 年 月 日 时 分
-        signatureTime(map);
-    }
-
-    /**
-     * 解决医生签名时间显示 年 月 日 时 分
-     *
-     * @param map
-     */
-    private void signatureTime(Map<String, String> map) {
-        String goCureDoctor = map.get("经治医生签字时间");
-        String operateDoctor = map.get("主刀医生签字时间");
-        if (StringUtil.isNotBlank(goCureDoctor) && goCureDoctor.contains("年 月 日 时 分")) {
-            map.put("经治医生签字时间", goCureDoctor.replace("年 月 日 时 分", ""));
-        }
-        if (StringUtil.isNotBlank(operateDoctor) && operateDoctor.contains("年 月 日 时 分")) {
-            map.put("主刀医生签字时间", operateDoctor.replace("年 月 日 时 分", ""));
-        }
-    }
-
-}

+ 0 - 56
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyRescueHtmlAnalysis.java

@@ -1,56 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Element;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: rengb
- * @time: 2020/9/28 20:12
- */
-@Slf4j
-public class YhsyRescueHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "22";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> map = Maps.newLinkedHashMap();
-        try {
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
-            analysisGeneral(recTitle,bigDivElement, map);
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return map;
-    }
-
-    private void analysisGeneral(String recTitle,Element bigDivElement, Map<String, String> map) {
-        if (bigDivElement.childNodeSize() == 1) {
-            bigDivElement = bigDivElement.child(0);
-        }
-        if (bigDivElement.selectFirst("hr") != null) {
-            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
-        }
-        String text = YhsyHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
-        CommonAnalysisUtil.extractWardInfo(recTitle,text, map);
-        String bqjlText = "病情记录" + map.get("病情记录");
-        List<String> titles = Lists.newArrayList(
-                "病情记录"
-        );
-        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
-        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
-    }
-
-}

+ 0 - 56
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyStagesSummaryHtmlAnalysis.java

@@ -1,56 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Element;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: rengb
- * @time: 2020/9/28 20:16
- */
-@Slf4j
-public class YhsyStagesSummaryHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "28";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> map = Maps.newLinkedHashMap();
-        try {
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
-            analysisGeneral(recTitle, bigDivElement, map);
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return map;
-    }
-
-    private void analysisGeneral(String recTitle, Element bigDivElement, Map<String, String> map) {
-        if (bigDivElement.childNodeSize() == 1) {
-            bigDivElement = bigDivElement.child(0);
-        }
-        if (bigDivElement.selectFirst("hr") != null) {
-            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
-        }
-        String text = YhsyHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
-        CommonAnalysisUtil.extractWardInfo(recTitle, text, map);
-        String bqjlText = "病情记录" + map.get("病情记录");
-        List<String> titles = Lists.newArrayList(
-                "病情记录"
-        );
-        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
-        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
-    }
-
-}

+ 0 - 56
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyTransferIntoHtmlAnalysis.java

@@ -1,56 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Element;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: rengb
- * @time: 2020/9/28 20:20
- */
-@Slf4j
-public class YhsyTransferIntoHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "26";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> map = Maps.newLinkedHashMap();
-        try {
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
-            analysisGeneral(recTitle, bigDivElement, map);
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return map;
-    }
-
-    private void analysisGeneral(String recTitle, Element bigDivElement, Map<String, String> map) {
-        if (bigDivElement.childNodeSize() == 1) {
-            bigDivElement = bigDivElement.child(0);
-        }
-        if (bigDivElement.selectFirst("hr") != null) {
-            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
-        }
-        String text = YhsyHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
-        CommonAnalysisUtil.extractWardInfo(recTitle, text, map);
-        String bqjlText = "病情记录" + map.get("病情记录");
-        List<String> titles = Lists.newArrayList(
-                "病情记录", "医师签名", "医师签字"
-        );
-        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
-        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
-    }
-
-}

+ 0 - 65
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyTransferOutHtmlAnalysis.java

@@ -1,65 +0,0 @@
-package com.lantone.qc.trans.yhsy.util;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Element;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description:
- * @author: rengb
- * @time: 2020/9/28 20:22
- */
-@Slf4j
-public class YhsyTransferOutHtmlAnalysis implements YhsyHtmlAnalysis {
-
-    private String modeId = "27";
-
-    @Override
-    public Map<String, String> analysis(String... args) {
-        Map<String, String> map = Maps.newLinkedHashMap();
-        try {
-            String html = args[0];
-            String recTitle = args[1];
-            String recTypeId = args[2];
-            Element bigDivElement = Jsoup.parse(html).selectFirst("body").child(0);
-            analysisGeneral(recTitle, bigDivElement, map);
-            YhsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
-        return map;
-    }
-
-    private void analysisGeneral(String recTitle, Element bigDivElement, Map<String, String> map) {
-        if (bigDivElement.childNodeSize() == 1) {
-            bigDivElement = bigDivElement.child(0);
-        }
-        if (bigDivElement.selectFirst("hr") != null) {
-            bigDivElement.selectFirst("hr").previousElementSiblings().remove();
-        }
-        String text = YhsyHtmlAnalysisUtil.blockDivToStr(bigDivElement, true);
-        CommonAnalysisUtil.extractWardInfo(recTitle, text, map);
-        String bqjlText = "病情记录" + map.get("病情记录").replace("年   月   日   时   分 ","");
-        List<String> titles = Lists.newArrayList(
-                "病情记录",
-                "医师签名",
-                "签名时间",
-                "患者签名",
-                "签名时间"
-        );
-        titles = CommonAnalysisUtil.sortTitlesNoColon(titles, bqjlText);
-        CommonAnalysisUtil.cutByTitlesNoColon(bqjlText, titles, 0, map);
-        List<String> tits = Lists.newArrayList(
-                "签名时间",
-                "患者签名"
-        );
-        tits = CommonAnalysisUtil.sortTitlesNoColon(tits, text);
-        CommonAnalysisUtil.cutByTitlesNoColon(text, tits, 0, map);
-    }
-}

+ 1 - 1
trans/src/main/java/com/lantone/qc/trans/yhsy/AnesthesiaRecordDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.alibaba.fastjson.JSONObject;
 import com.google.common.collect.Lists;

+ 4 - 4
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyADLGradeDocTrans.java

@@ -1,11 +1,11 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.lantone.qc.pub.model.doc.ADLGradeDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
 import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
-import com.lantone.qc.trans.yhsy.util.YhsyADLGradeHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyADLGradeHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -20,7 +20,7 @@ import java.util.Map;
  * @Version 1.0
  */
 @Slf4j
-public class YhsyADLGradeDocTrans extends ModelDocTrans {
+public class YuhangsyADLGradeDocTrans extends ModelDocTrans {
     @Override
     public ADLGradeDoc extract(MedrecVo medrecVo) {
         ADLGradeDoc adlGradeDoc = null;
@@ -33,7 +33,7 @@ public class YhsyADLGradeDocTrans extends ModelDocTrans {
             } else {
                 String recTitle = contentMap.get("recTitle").toString();
                 String recTypeId = contentMap.get("recTypeId").toString();
-                YhsyADLGradeHtmlAnalysis adlGradeHtmlAnalysis = new YhsyADLGradeHtmlAnalysis();
+                YuhangsyADLGradeHtmlAnalysis adlGradeHtmlAnalysis = new YuhangsyADLGradeHtmlAnalysis();
                 Map<String, String> sourceMap = adlGradeHtmlAnalysis.analysis(content, recTitle, recTypeId);
                 if (MapUtils.isNotEmpty(sourceMap)) {
                     structureMap.putAll(sourceMap);

+ 13 - 11
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyBeHospitalizedDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
@@ -7,8 +7,8 @@ import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyBeHospitalizedHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyBeHospitalizedHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -21,7 +21,7 @@ import java.util.Map;
  * @time: 2020/3/5 15:47
  */
 @Slf4j
-public class YhsyBeHospitalizedDocTrans extends ModelDocTrans {
+public class YuhangsyBeHospitalizedDocTrans extends ModelDocTrans {
 
     @Override
     public BeHospitalizedDoc extract(MedrecVo medrecVo) {
@@ -35,7 +35,7 @@ public class YhsyBeHospitalizedDocTrans extends ModelDocTrans {
             } else {
                 String recTitle = contentMap.get("recTitle").toString();
                 String recTypeId = contentMap.get("recTypeId").toString();
-                YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyBeHospitalizedHtmlAnalysis();
+                YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyBeHospitalizedHtmlAnalysis();
                 Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
                 if (MapUtils.isNotEmpty(sourceMap)) {
                     structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -62,12 +62,14 @@ public class YhsyBeHospitalizedDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
-            "联系人(关系)=联系人",
-            "入院时间=入院日期",
-            "医生签名=记录医生",
-            "医生签名时间=记录时间",
-            "疼痛评估=疼痛",
-            "代诉=主诉"
+            "供史者=病史陈述者",
+//            "记录日期=病史采集时间",
+            "时间=记录时间",
+            "医师签名=记录医生",
+            "产科专科检查一般状况=专科检查",
+            "补充及专科情况体温=专科检查",
+            "实验室检查=辅助检查",
+            "民族\\宗教=民族"
     );
 
 }

+ 5 - 5
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyClinicBloodEffectDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.ClinicBloodEffectDoc;
@@ -7,8 +7,8 @@ import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyClinicBloodEffectHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyClinicBloodEffectHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -21,7 +21,7 @@ import java.util.Map;
  * @desc 输血后效果评价
  **/
 @Slf4j
-public class YhsyClinicBloodEffectDocTrans extends ModelDocTrans {
+public class YuhangsyClinicBloodEffectDocTrans extends ModelDocTrans {
 
     @Override
     public List<ClinicBloodEffectDoc> extract(MedrecVo medrecVo) {
@@ -48,7 +48,7 @@ public class YhsyClinicBloodEffectDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyClinicBloodEffectHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyClinicBloodEffectHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);

+ 5 - 5
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyClinicalBloodDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.ClinicalBloodDoc;
@@ -8,8 +8,8 @@ import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyClinicalBloodHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyClinicalBloodHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -22,7 +22,7 @@ import java.util.Map;
  * @time: 2020/3/17 13:21
  */
 @Slf4j
-public class YhsyClinicalBloodDocTrans extends ModelDocTrans {
+public class YuhangsyClinicalBloodDocTrans extends ModelDocTrans {
 
     @Override
     public List<ClinicalBloodDoc> extract(MedrecVo medrecVo) {
@@ -49,7 +49,7 @@ public class YhsyClinicalBloodDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyClinicalBloodHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyClinicalBloodHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);

+ 10 - 13
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyConsultationDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -14,9 +14,9 @@ import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyConsultationHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyConsultationRecordHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyConsultationHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyConsultationRecordHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -30,7 +30,7 @@ import java.util.Set;
  * @time: 2020/3/17 13:22
  */
 @Slf4j
-public class YhsyConsultationDocTrans extends ModelDocTrans {
+public class YuhangsyConsultationDocTrans extends ModelDocTrans {
 
     @Override
     public List<ConsultationDoc> extract(MedrecVo medrecVo) {
@@ -98,7 +98,7 @@ public class YhsyConsultationDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyConsultationRecordHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyConsultationRecordHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, consultationRecord_keyContrasts);
@@ -116,11 +116,8 @@ public class YhsyConsultationDocTrans extends ModelDocTrans {
     }
 
     private List<String> consultationRecord_keyContrasts = Lists.newArrayList(
-            "执行情况=会诊情况",
-            "记录日期=会诊申请日期",
-            "签名++++=签名",
-            "病情记录=简要病情",
-            "医师签名=签名"
+            "会诊原因=会诊目的",
+            "医师会诊意见=会诊意见"
     );
 
 
@@ -159,7 +156,7 @@ public class YhsyConsultationDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyConsultationHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyConsultationHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, consultationResults_pageDataTitles);
@@ -226,7 +223,7 @@ public class YhsyConsultationDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyConsultationHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyConsultationHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, consultationApplication_keyContrasts);
             structureMap.put("记录编号", contentMap.get("recId").toString());

+ 2 - 2
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyCrisisInfoDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.CrisisInfoDoc;
@@ -14,7 +14,7 @@ import java.util.Map;
  * @author: rengb
  * @time: 2020/3/19 19:41
  */
-public class YhsyCrisisInfoDocTrans extends ModelDocTrans {
+public class YuhangsyCrisisInfoDocTrans extends ModelDocTrans {
 
     @Override
     public List<CrisisInfoDoc> extract(MedrecVo medrecVo) {

+ 8 - 6
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyCrisisValueReportDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.CrisisValueReportDoc;
@@ -7,8 +7,8 @@ import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyCrisisValueReportHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyCrisisValueReportHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -21,7 +21,7 @@ import java.util.Map;
  * @time: 2020/3/19 19:41
  */
 @Slf4j
-public class YhsyCrisisValueReportDocTrans extends ModelDocTrans {
+public class YuhangsyCrisisValueReportDocTrans extends ModelDocTrans {
 
     @Override
     public List<CrisisValueReportDoc> extract(MedrecVo medrecVo) {
@@ -48,7 +48,7 @@ public class YhsyCrisisValueReportDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyCrisisValueReportHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyCrisisValueReportHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -66,7 +66,9 @@ public class YhsyCrisisValueReportDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
-            "病情记录=病情分析及处理"
+            "病历标题=标题",
+            "记录医师=医师签名",
+            "病情记录=病历内容"
     );
 
 }

+ 9 - 7
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyCriticallyIllNoticeDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.CriticallyIllNoticeDoc;
@@ -8,8 +8,8 @@ import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyCriticallyIllNoticeHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyCriticallyIllNoticeHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -22,7 +22,7 @@ import java.util.Map;
  * @time: 2020/3/19 19:41
  */
 @Slf4j
-public class YhsyCriticallyIllNoticeDocTrans extends ModelDocTrans {
+public class YuhangsyCriticallyIllNoticeDocTrans extends ModelDocTrans {
 
     @Override
     public List<CriticallyIllNoticeDoc> extract(MedrecVo medrecVo) {
@@ -49,7 +49,7 @@ public class YhsyCriticallyIllNoticeDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyCriticallyIllNoticeHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyCriticallyIllNoticeHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -68,8 +68,10 @@ public class YhsyCriticallyIllNoticeDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
-            "临床诊断=当前诊断",
-            "患方签名=患者签名"
+            "患者姓名=姓名",
+            "现在我院=科别",
+            "医护人员签名签名日期=医生签名时间",
+            "目前诊断为=当前诊断"
     );
 
 }

+ 13 - 9
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDeathCaseDiscussDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.DeathCaseDiscussDoc;
@@ -7,8 +7,8 @@ import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyDeathCaseDiscussHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyDeathCaseDiscussHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -21,7 +21,7 @@ import java.util.Map;
  * @time: 2020/3/17 13:22
  */
 @Slf4j
-public class YhsyDeathCaseDiscussDocTrans extends ModelDocTrans {
+public class YuhangsyDeathCaseDiscussDocTrans extends ModelDocTrans {
 
     @Override
     public DeathCaseDiscussDoc extract(MedrecVo medrecVo) {
@@ -35,7 +35,7 @@ public class YhsyDeathCaseDiscussDocTrans extends ModelDocTrans {
             } else {
                 String recTitle = contentMap.get("recTitle").toString();
                 String recTypeId = contentMap.get("recTypeId").toString();
-                YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyDeathCaseDiscussHtmlAnalysis();
+                YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyDeathCaseDiscussHtmlAnalysis();
                 Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
                 if (MapUtils.isNotEmpty(sourceMap)) {
                     structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -54,11 +54,15 @@ public class YhsyDeathCaseDiscussDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
-            "医生签名时间=记录时间",
-            "主持人小结意见=主持人小结",
-            "具体讨论意见=讨论内容",
+            "患者姓名=姓名",
+            "病情摘要=病史简介",
+            "讨论日期=讨论时间",
+            "死亡主持人签名=主持人",
+            "参加讨论人员(注明职称、职务)=参加人员",
+            "讨论意见(对诊断、治疗、抢救的意见,死亡原因分析及经验教训等的记录)=讨论内容",
             "记录者签名=记录医生",
-            "主持人(签名)=主持人签名"
+            "记录者签名日期=记录时间",
+            "总结=主持人小结"
     );
 
 }

+ 11 - 6
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDeathRecordDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.DeathRecordDoc;
@@ -8,8 +8,8 @@ import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyDeathRecordHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyDeathRecordHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -22,7 +22,7 @@ import java.util.Map;
  * @time: 2020/3/17 13:23
  */
 @Slf4j
-public class YhsyDeathRecordDocTrans extends ModelDocTrans {
+public class YuhangsyDeathRecordDocTrans extends ModelDocTrans {
 
     @Override
     public DeathRecordDoc extract(MedrecVo medrecVo) {
@@ -36,7 +36,7 @@ public class YhsyDeathRecordDocTrans extends ModelDocTrans {
             } else {
                 String recTitle = contentMap.get("recTitle").toString();
                 String recTypeId = contentMap.get("recTypeId").toString();
-                YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyDeathRecordHtmlAnalysis();
+                YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyDeathRecordHtmlAnalysis();
                 Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
                 if (MapUtils.isNotEmpty(sourceMap)) {
                     structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -56,7 +56,12 @@ public class YhsyDeathRecordDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
-            "签名时间=记录时间"
+            "入院时情况(简要病史、阳性体征、有关实验室及器械检查结果)=入院情况",
+            "住院经过及抢救经过=诊疗经过",
+            "尸体病理解剖情况=尸检",
+            "实验室检查=医技检查",
+            "实验室检查=医技检查",
+            "记录医师=记录医生"
     );
 
 }

+ 8 - 8
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDifficultCaseDiscussDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.DifficultCaseDiscussDoc;
@@ -7,8 +7,8 @@ import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyDifficultCaseDiscussHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyDifficultCaseDiscussHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -21,7 +21,7 @@ import java.util.Map;
  * @time: 2020/3/17 13:23
  */
 @Slf4j
-public class YhsyDifficultCaseDiscussDocTrans extends ModelDocTrans {
+public class YuhangsyDifficultCaseDiscussDocTrans extends ModelDocTrans {
 
     @Override
     public List<DifficultCaseDiscussDoc> extract(MedrecVo medrecVo) {
@@ -48,7 +48,7 @@ public class YhsyDifficultCaseDiscussDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyDifficultCaseDiscussHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyDifficultCaseDiscussHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (!sourceMap.containsKey("具体讨论意见") && sourceMap.containsKey("参加人员")) {
                 String participant = sourceMap.get("参加人员");
@@ -82,9 +82,9 @@ public class YhsyDifficultCaseDiscussDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
-            "主持人=主持人姓名及专业技术职务",
-            "参加人员=参加人员的姓名及专业技术职务",
-            "主持人小结意见/讨论结论=主持人小结"
+            "病历记录时间=记录时间",
+            "记录医师=记录医生签名",
+            "病程内容=汇报病史"
     );
 
 }

+ 32 - 32
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.InputInfo;
@@ -20,7 +20,7 @@ import java.util.stream.Collectors;
  * @Date: 2020-03-03 19:47
  */
 @Slf4j
-public class YhsyDocTrans extends DocTrans {
+public class YuhangsyDocTrans extends DocTrans {
 
     @Override
     protected InputInfo extract(QueryVo queryVo) {
@@ -28,118 +28,118 @@ public class YhsyDocTrans extends DocTrans {
         for (MedrecVo i : queryVo.getMedrec()) {
             if (i.getTitle() != null) {
                 if (i.getTitle().equals("会诊")) {
-                    YhsyConsultationDocTrans consultationDocTrans = new YhsyConsultationDocTrans();
+                    YuhangsyConsultationDocTrans consultationDocTrans = new YuhangsyConsultationDocTrans();
                     inputInfo.setConsultationDocs(consultationDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("手术")) {
-                    YhsyOperationDocTrans operationDocTrans = new YhsyOperationDocTrans();
+                    YuhangsyOperationDocTrans operationDocTrans = new YuhangsyOperationDocTrans();
                     inputInfo.setOperationDocs(operationDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("转科")) {
-                    YhsyTransferRecordDocTrans transferRecordDocTrans = new YhsyTransferRecordDocTrans();
+                    YuhangsyTransferRecordDocTrans transferRecordDocTrans = new YuhangsyTransferRecordDocTrans();
                     inputInfo.setTransferRecordDocs(transferRecordDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("入院记录")) {
-                    YhsyBeHospitalizedDocTrans beHospitalizedDocTrans = new YhsyBeHospitalizedDocTrans();
+                    YuhangsyBeHospitalizedDocTrans beHospitalizedDocTrans = new YuhangsyBeHospitalizedDocTrans();
                     inputInfo.setBeHospitalizedDoc(beHospitalizedDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("输血/血制品病程记录")) {
-                    YhsyClinicalBloodDocTrans clinicalBloodDocTrans = new YhsyClinicalBloodDocTrans();
+                    YuhangsyClinicalBloodDocTrans clinicalBloodDocTrans = new YuhangsyClinicalBloodDocTrans();
                     inputInfo.setClinicalBloodDocs(clinicalBloodDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("输血后效果评价")) {
-                    YhsyClinicBloodEffectDocTrans clinicBloodEffectDocTrans = new YhsyClinicBloodEffectDocTrans();
+                    YuhangsyClinicBloodEffectDocTrans clinicBloodEffectDocTrans = new YuhangsyClinicBloodEffectDocTrans();
                     inputInfo.setClinicBloodEffectDocs(clinicBloodEffectDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("危急值记录")) {
-                    YhsyCrisisValueReportDocTrans crisisValueReportDocTrans = new YhsyCrisisValueReportDocTrans();
+                    YuhangsyCrisisValueReportDocTrans crisisValueReportDocTrans = new YuhangsyCrisisValueReportDocTrans();
                     inputInfo.setCrisisValueReportDocs(crisisValueReportDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("危急值")) {
-                    YhsyCrisisInfoDocTrans crisisInfoDocTrans = new YhsyCrisisInfoDocTrans();
+                    YuhangsyCrisisInfoDocTrans crisisInfoDocTrans = new YuhangsyCrisisInfoDocTrans();
                     inputInfo.setCrisisInfoDocs(crisisInfoDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("病危通知书")) {
-                    YhsyCriticallyIllNoticeDocTrans criticallyIllNoticeDocTrans = new YhsyCriticallyIllNoticeDocTrans();
+                    YuhangsyCriticallyIllNoticeDocTrans criticallyIllNoticeDocTrans = new YuhangsyCriticallyIllNoticeDocTrans();
                     inputInfo.setCriticallyIllNoticeDocs(criticallyIllNoticeDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("死亡病例讨论记录")) {
-                    YhsyDeathCaseDiscussDocTrans deathCaseDiscussDocTrans = new YhsyDeathCaseDiscussDocTrans();
+                    YuhangsyDeathCaseDiscussDocTrans deathCaseDiscussDocTrans = new YuhangsyDeathCaseDiscussDocTrans();
                     inputInfo.setDeathCaseDiscussDoc(deathCaseDiscussDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("死亡记录")) {
-                    YhsyDeathRecordDocTrans deathRecordDocTrans = new YhsyDeathRecordDocTrans();
+                    YuhangsyDeathRecordDocTrans deathRecordDocTrans = new YuhangsyDeathRecordDocTrans();
                     inputInfo.setDeathRecordDoc(deathRecordDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("疑难病例讨论记录")) {
-                    YhsyDifficultCaseDiscussDocTrans difficultCaseDiscussDocTrans = new YhsyDifficultCaseDiscussDocTrans();
+                    YuhangsyDifficultCaseDiscussDocTrans difficultCaseDiscussDocTrans = new YuhangsyDifficultCaseDiscussDocTrans();
                     inputInfo.setDifficultCaseDiscussDocs(difficultCaseDiscussDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("医嘱信息")) {
-                    YhsyDoctorAdviceDocTrans doctorAdviceDocTrans = new YhsyDoctorAdviceDocTrans();
+                    YuhangsyDoctorAdviceDocTrans doctorAdviceDocTrans = new YuhangsyDoctorAdviceDocTrans();
                     inputInfo.setDoctorAdviceDocs(doctorAdviceDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("值班交接制度")) {
-                    YhsyDutyShiftSystemDocTrans dutyShiftSystemDocTrans = new YhsyDutyShiftSystemDocTrans();
+                    YuhangsyDutyShiftSystemDocTrans dutyShiftSystemDocTrans = new YuhangsyDutyShiftSystemDocTrans();
                     inputInfo.setDutyShiftSystemDocs(dutyShiftSystemDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("首次病程录")) {
-                    YhsyFirstCourseRecordDocTrans firstCourseRecordDocTrans = new YhsyFirstCourseRecordDocTrans();
+                    YuhangsyFirstCourseRecordDocTrans firstCourseRecordDocTrans = new YuhangsyFirstCourseRecordDocTrans();
                     inputInfo.setFirstCourseRecordDoc(firstCourseRecordDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("病案首页")) {
-                    YhsyFirstPageRecordDocTrans firstPageRecordDocTrans = new YhsyFirstPageRecordDocTrans();
+                    YuhangsyFirstPageRecordDocTrans firstPageRecordDocTrans = new YuhangsyFirstPageRecordDocTrans();
                     inputInfo.setFirstPageRecordDoc(firstPageRecordDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("出院小结")) {
-                    YhsyLeaveHospitalDocTrans leaveHospitalDocTrans = new YhsyLeaveHospitalDocTrans();
+                    YuhangsyLeaveHospitalDocTrans leaveHospitalDocTrans = new YuhangsyLeaveHospitalDocTrans();
                     inputInfo.setLeaveHospitalDoc(leaveHospitalDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("抢救记录")) {
-                    YhsyRescueDocTrans rescueDocTrans = new YhsyRescueDocTrans();
+                    YuhangsyRescueDocTrans rescueDocTrans = new YuhangsyRescueDocTrans();
                     inputInfo.setRescueDocs(rescueDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("阶段小结")) {
-                    YhsyStagesSummaryDocTrans stagesSummaryDocTrans = new YhsyStagesSummaryDocTrans();
+                    YuhangsyStagesSummaryDocTrans stagesSummaryDocTrans = new YuhangsyStagesSummaryDocTrans();
                     inputInfo.setStagesSummaryDocs(stagesSummaryDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("查房记录")) {
-                    YhsyThreeLevelWardDocTrans threeLevelWardDocTrans = new YhsyThreeLevelWardDocTrans();
+                    YuhangsyThreeLevelWardDocTrans threeLevelWardDocTrans = new YuhangsyThreeLevelWardDocTrans();
                     threeLevelWardDocTrans.setOperationDocs(inputInfo.getOperationDocs());
                     inputInfo.setThreeLevelWardDocs(threeLevelWardDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("住院病历信息")) {
-                    YhsyMedicalRecordInfoDocTrans medicalRecordInfoDocTrans = new YhsyMedicalRecordInfoDocTrans();
+                    YuhangsyMedicalRecordInfoDocTrans medicalRecordInfoDocTrans = new YuhangsyMedicalRecordInfoDocTrans();
                     inputInfo.setMedicalRecordInfoDoc(medicalRecordInfoDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("化验")) {
-                    YhsyLisDocTrans lisDocTrans = new YhsyLisDocTrans();
+                    YuhangsyLisDocTrans lisDocTrans = new YuhangsyLisDocTrans();
                     inputInfo.setLisDocs(lisDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("辅检")) {
-                    YhsyPacsDocTrans pacsDocTrans = new YhsyPacsDocTrans();
+                    YuhangsyPacsDocTrans pacsDocTrans = new YuhangsyPacsDocTrans();
                     inputInfo.setPacsDocs(pacsDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("门诊")) {
-                    YhsyOutDepDocTrans outDepDocTrans = new YhsyOutDepDocTrans();
+                    YuhangsyOutDepDocTrans outDepDocTrans = new YuhangsyOutDepDocTrans();
                     inputInfo.setBeHospitalizedDoc(outDepDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("知情同意书")) {
-                    YhsyInformedConsentDocTrans informedConsentDocTrans = new YhsyInformedConsentDocTrans();
+                    YuhangsyInformedConsentDocTrans informedConsentDocTrans = new YuhangsyInformedConsentDocTrans();
                     inputInfo.setInformedConsentDoc(informedConsentDocTrans.extract(i));
                 }
                 if (i.getTitle().equals("有创操作")) {
-                    YhsyInvasiveOperationDocTrans invasiveOperationDocTrans = new YhsyInvasiveOperationDocTrans();
+                    YuhangsyInvasiveOperationDocTrans invasiveOperationDocTrans = new YuhangsyInvasiveOperationDocTrans();
                     inputInfo.setInvasiveOperationDocs(invasiveOperationDocTrans.extract(i));
                 }
                 /*******************************VTE评分 trans解析*****************************************/
                 if (i.getTitle().equals("VTE评分")) {
-                    YhsyVTEGradeDocTrans vteGradeDocTrans = new YhsyVTEGradeDocTrans();
+                    YuhangsyVTEGradeDocTrans vteGradeDocTrans = new YuhangsyVTEGradeDocTrans();
                     inputInfo.setVteGradeDoc(vteGradeDocTrans.extract(i));
                 }
                 /*******************************ADL评分 trans解析*****************************************/
                 if (i.getTitle().equals("ADL评分")) {
-                    YhsyADLGradeDocTrans adlGradeDocTrans = new YhsyADLGradeDocTrans();
+                    YuhangsyADLGradeDocTrans adlGradeDocTrans = new YuhangsyADLGradeDocTrans();
                     inputInfo.setAdlGradeDoc(adlGradeDocTrans.extract(i));
                 }
                 /*******************************手麻记录 trans解析*****************************************/
@@ -149,12 +149,12 @@ public class YhsyDocTrans extends DocTrans {
                 }
                 /*******************************VTE评分 trans解析*****************************************/
                 if (i.getTitle().equals("VTE评分")) {
-                    YhsyVTEGradeDocTrans vteGradeDocTrans = new YhsyVTEGradeDocTrans();
+                    YuhangsyVTEGradeDocTrans vteGradeDocTrans = new YuhangsyVTEGradeDocTrans();
                     inputInfo.setVteGradeDoc(vteGradeDocTrans.extract(i));
                 }
                 /*******************************ADL评分 trans解析*****************************************/
                 if (i.getTitle().equals("ADL评分")) {
-                    YhsyADLGradeDocTrans adlGradeDocTrans = new YhsyADLGradeDocTrans();
+                    YuhangsyADLGradeDocTrans adlGradeDocTrans = new YuhangsyADLGradeDocTrans();
                     inputInfo.setAdlGradeDoc(adlGradeDocTrans.extract(i));
                 }
                 /*******************************手麻记录 trans解析*****************************************/

+ 2 - 2
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDoctorAdviceDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
@@ -14,7 +14,7 @@ import java.util.Map;
  * @author: rengb
  * @time: 2020/3/19 19:41
  */
-public class YhsyDoctorAdviceDocTrans extends ModelDocTrans {
+public class YuhangsyDoctorAdviceDocTrans extends ModelDocTrans {
 
     @Override
     public List<DoctorAdviceDoc> extract(MedrecVo medrecVo) {

+ 5 - 5
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyDutyShiftSystemDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.DutyShiftSystemDoc;
@@ -7,8 +7,8 @@ import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyDutyShiftSystemHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyDutyShiftSystemHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -21,7 +21,7 @@ import java.util.Map;
  * @time: 2020/3/17 13:24
  */
 @Slf4j
-public class YhsyDutyShiftSystemDocTrans extends ModelDocTrans {
+public class YuhangsyDutyShiftSystemDocTrans extends ModelDocTrans {
 
     @Override
     public List<DutyShiftSystemDoc> extract(MedrecVo medrecVo) {
@@ -48,7 +48,7 @@ public class YhsyDutyShiftSystemDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyDutyShiftSystemHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyDutyShiftSystemHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);

+ 10 - 10
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyFirstCourseRecordDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -10,8 +10,8 @@ import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyFirstCourseRecordHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyFirstCourseRecordHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -26,7 +26,7 @@ import static com.lantone.qc.trans.comsis.ModelDocGenerate.structureMapJoin;
  * @time: 2020/3/17 13:25
  */
 @Slf4j
-public class YhsyFirstCourseRecordDocTrans extends ModelDocTrans {
+public class YuhangsyFirstCourseRecordDocTrans extends ModelDocTrans {
 
     @Override
     public FirstCourseRecordDoc extract(MedrecVo medrecVo) {
@@ -40,7 +40,7 @@ public class YhsyFirstCourseRecordDocTrans extends ModelDocTrans {
             } else {
                 String recTitle = contentMap.get("recTitle").toString();
                 String recTypeId = contentMap.get("recTypeId").toString();
-                YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyFirstCourseRecordHtmlAnalysis();
+                YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyFirstCourseRecordHtmlAnalysis();
                 Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
                 if (MapUtils.isNotEmpty(sourceMap)) {
                     sourceMap = removeSerialNumber(sourceMap);
@@ -73,11 +73,11 @@ public class YhsyFirstCourseRecordDocTrans extends ModelDocTrans {
         return structureMap;
     }
 
-    private List<String> keyContrasts = Lists.newArrayList(
-            "时间=病历日期",
-            "病历特点=病例特点",
-            "入院查体=查体",
-            "辅助检查=辅检"
+    private List<String>    keyContrasts = Lists.newArrayList(
+            "病历记录标题=标题",
+            "病历记录时间=病历日期",
+            "记录医师=记录医生",
+            "病历特点=病例特点"
     );
 
 }

+ 2 - 2
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyFirstPageRecordDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Maps;
 import com.lantone.qc.dbanaly.util.ModuleMappingUtil;
@@ -15,7 +15,7 @@ import java.util.Map;
  * @author: 胡敬
  * @time: 2020/3/16 17:47
  */
-public class YhsyFirstPageRecordDocTrans extends ModelDocTrans {
+public class YuhangsyFirstPageRecordDocTrans extends ModelDocTrans {
 
     @Override
     public FirstPageRecordDoc extract(MedrecVo medrecVo) {

+ 5 - 5
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyInformedConsentDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.InformedConsentDoc;
@@ -10,8 +10,8 @@ import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyInformedHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyInformedHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -24,7 +24,7 @@ import java.util.Map;
  * @time: 2021/4/18 17:48
  */
 @Slf4j
-public class YhsyInformedConsentDocTrans extends ModelDocTrans {
+public class YuhangsyInformedConsentDocTrans extends ModelDocTrans {
     @Override
     public List<InformedConsentDoc> extract(MedrecVo medrecVo) {
         List<InformedConsentDoc> retList = Lists.newArrayList();
@@ -57,7 +57,7 @@ public class YhsyInformedConsentDocTrans extends ModelDocTrans {
                 } else {
                     String recTitle = contentMap.get("recTitle").toString();
                     String recTypeId = contentMap.get("recTypeId").toString();
-                    YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyInformedHtmlAnalysis();
+                    YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyInformedHtmlAnalysis();
                     Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
                     if (MapUtils.isNotEmpty(sourceMap)) {
                         structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);

+ 5 - 5
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyInvasiveOperationDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.InvasiveOperationDoc;
@@ -6,8 +6,8 @@ import com.lantone.qc.pub.model.vo.MedrecVo;
 import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyInvasiveOperationHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyInvasiveOperationHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -20,7 +20,7 @@ import java.util.Map;
  * @time: 2021/8/27 16:12
  */
 @Slf4j
-public class YhsyInvasiveOperationDocTrans extends ModelDocTrans {
+public class YuhangsyInvasiveOperationDocTrans extends ModelDocTrans {
     @Override
     public List<InvasiveOperationDoc> extract(MedrecVo medrecVo) {
         List<InvasiveOperationDoc> retList = Lists.newArrayList();
@@ -51,7 +51,7 @@ public class YhsyInvasiveOperationDocTrans extends ModelDocTrans {
                 } else {
                     String recTitle = contentMap.get("recTitle").toString();
                     String recTypeId = contentMap.get("recTypeId").toString();
-                    YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyInvasiveOperationHtmlAnalysis();
+                    YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyInvasiveOperationHtmlAnalysis();
                     Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
                     if (MapUtils.isNotEmpty(sourceMap)) {
                         structureMap.put("记录编号", contentMap.get("recId").toString());

+ 11 - 24
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyLeaveHospitalDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
@@ -9,8 +9,8 @@ import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyLeaveHospitalHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyLeaveHospitalHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -24,7 +24,7 @@ import java.util.Map;
  * @time: 2020/3/17 13:25
  */
 @Slf4j
-public class YhsyLeaveHospitalDocTrans extends ModelDocTrans {
+public class YuhangsyLeaveHospitalDocTrans extends ModelDocTrans {
 
     @Override
     public LeaveHospitalDoc extract(MedrecVo medrecVo) {
@@ -38,7 +38,7 @@ public class YhsyLeaveHospitalDocTrans extends ModelDocTrans {
             } else {
                 String recTitle = contentMap.get("recTitle").toString();
                 String recTypeId = contentMap.get("recTypeId").toString();
-                YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyLeaveHospitalHtmlAnalysis();
+                YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyLeaveHospitalHtmlAnalysis();
                 Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
                 if (MapUtils.isNotEmpty(sourceMap)) {
                     structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -64,25 +64,12 @@ public class YhsyLeaveHospitalDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
-            "患者姓名=姓名",
-            "性别=",
-            "床号=",
-            "年龄=",
-            "科室=科别",
-            "入院诊断=入院诊断",
-            "出院诊断=出院诊断",
-            "实际住院天数=住院天数",
-            "入院情况=入院情况",
-            "诊疗经过=诊治经过",
-            "出院情况=",
-            "出院医嘱=",
-            "随访计划=",
-            "医师签名=记录医生",
-            "时间=记录时间",
-            "治疗结果=诊疗结果",
-            "其它=其他",
-            "出生年月=出生日期",
-            "床位=床号"
+            "入院时间=入院日期",
+            "出院时间=出院日期",
+            "入院情况=病史摘要",
+            "住院经过=诊治经过",
+            "签名时间=时间",
+            "入院查体=主要实验室检查及器械检验结果"
     );
 
 }

+ 2 - 2
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyLisDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.LisDoc;
@@ -14,7 +14,7 @@ import java.util.Map;
  * @author: rengb
  * @time: 2020/3/19 19:41
  */
-public class YhsyLisDocTrans extends ModelDocTrans {
+public class YuhangsyLisDocTrans extends ModelDocTrans {
 
     @Override
     public List<LisDoc> extract(MedrecVo medrecVo) {

+ 2 - 2
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyMedicalRecordInfoDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
@@ -12,7 +12,7 @@ import java.util.Map;
  * @author: 胡敬
  * @time: 2020/6/3 15:45
  */
-public class YhsyMedicalRecordInfoDocTrans extends ModelDocTrans {
+public class YuhangsyMedicalRecordInfoDocTrans extends ModelDocTrans {
 
     @Override
     public MedicalRecordInfoDoc extract(MedrecVo medrecVo) {

+ 35 - 43
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyOperationDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -12,7 +12,7 @@ import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.*;
+import com.lantone.qc.trans.yuhangsy.util.*;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 import org.jsoup.Jsoup;
@@ -28,7 +28,7 @@ import java.util.Set;
  * @time: 2020/3/20 17:11
  */
 @Slf4j
-public class YhsyOperationDocTrans extends ModelDocTrans {
+public class YuhangsyOperationDocTrans extends ModelDocTrans {
 
     @Override
     public List<OperationDoc> extract(MedrecVo medrecVo) {
@@ -110,7 +110,7 @@ public class YhsyOperationDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyOperationHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyOperationHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, operationDiscussion_keyContrasts);
@@ -119,7 +119,7 @@ public class YhsyOperationDocTrans extends ModelDocTrans {
             }
             if (MapUtils.isNotEmpty(structureMap)) {
                 operationDiscussionDoc = ModelDocGenerate.operationDiscussionDocGen(structureMap);
-                String text = YhsyHtmlAnalysisUtil.blockDivToStr(Jsoup.parse(content).selectFirst("body").child(0), true);
+                String text = YuhangsyHtmlAnalysisUtil.blockDivToStr(Jsoup.parse(content).selectFirst("body").child(0), true);
                 operationDiscussionDoc.setText(text);
                 operationDiscussionDoc.setPageData((Map) structureMap);
                 return operationDiscussionDoc;
@@ -130,13 +130,10 @@ public class YhsyOperationDocTrans extends ModelDocTrans {
     }
 
     private List<String> operationDiscussion_keyContrasts = Lists.newArrayList(
-            "手术简要经过(包括手术方式、术中所见、过程是否顺利、有无并发症等)=手术简要经过",
-            "病情记录=手术简要经过",
-            "术后诊断=术中后诊断",
-            "患者手术后情况=患者术后情况",
-            "术后应当特别注意观察的事项:=术后注意事项",
-            "术后治疗计划(包括术后应当特别注意观察的事项)=术后注意事项",
-            "医师签名=医生签名"
+            "病历日期=病历日期",
+            "病历标题=标题",
+            "病情记录=术后注意事项",
+            "记录医生=记录医生"
     );
 
 
@@ -175,7 +172,7 @@ public class YhsyOperationDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyOperationRecordHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyOperationRecordHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             //含有手术情况知情书时间特殊处理
             if (sourceMap.containsKey("时间") && sourceMap.get("时间").contains("宁波市北仑区人民医院")) {
@@ -207,13 +204,13 @@ public class YhsyOperationDocTrans extends ModelDocTrans {
     }
 
     private List<String> operationRecord_keyContrasts = Lists.newArrayList(
-            "手术经过=手术经过及处理",
-            "术诊断=术中后诊断",
-            "主刀=主刀医师",
-            "记录者=记录医生",
-            "患者手术后情况=患者术后情况",
-            "麻醉方法=麻醉方式",
-            "时间=记录时间"
+            "手术开始时间=开始时间",
+            "术诊断=术中后诊断",
+//            "麻醉医师=麻醉者",
+//            "麻醉方式=麻醉方法",
+            "记录医师=记录医生",
+            "记录医师签名时间=记录时间",
+            "手术过程=手术经过及处理"
     );
 
 
@@ -252,10 +249,16 @@ public class YhsyOperationDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyPreoperativeHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyPreoperativeHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
-                structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, preoperativeDiscussion_keyContrasts);
+                if (StringUtil.isNotBlank(sourceMap.get("文书标题")) && sourceMap.get("文书标题").equals("术前小结")) {
+                    structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, preoperativeDiscussion_keyContrasts2);
+                } else {
+                    structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, preoperativeDiscussion_keyContrasts);
+                }
+
+
                 structureMap.put("记录编号", contentMap.get("recId").toString());
                 structureMap.put("病历号", contentMap.get("behospitalCode") == null ? null : contentMap.get("behospitalCode").toString());
             }
@@ -301,26 +304,15 @@ public class YhsyOperationDocTrans extends ModelDocTrans {
     }
 
     private List<String> preoperativeDiscussion_keyContrasts = Lists.newArrayList(
-            "1.术前诊断=术前诊断",
-            "2.手术指征与禁忌征=手术指征与禁忌",
-            "3.可替代方案=可替代的方案",
-            "4.拟施手术方式(名称)及可能的变更方案=拟施手术方式、名称及可能的变更与禁忌症",
-            "5.计划性多次手术=计划性多次手术",
-            "6.拟施麻醉方式=拟施麻醉方式",
-            "5.拟施麻醉方式=拟施麻醉方式",
-            "5.本次手术是否属于计划性多次手术=计划性多次手术",
-            "6.术前特殊准备=术前准备",
-            "7.术前特殊准备=术前准备",
-            "7.主要术中、术后风险及防范措施=风险及防范措施",
-            "8.主要术中、术后风险及防范措施=风险及防范措施",
-            "9.术中、术后注意事项(含护理事项)=术中术后注意事项",
-            "8.术中、术后注意事项(含护理事项)=术中术后注意事项",
-            //"术中、术后注意事项(含护理事项)=术后注意事项",
-            //"拟施手术方式(名称)及可能的变更方案=拟施手术方式、名称及可能的变更与禁忌症",
-            //"术前特殊准备=术前准备",
-            //"手术指征与禁忌征=手术指征与禁忌",
-            "经治医生签字时间=记录时间",
-            "签字时间=记录时间"
+            "讨论时间=文书时间",
+            "讨论方式=病历内容",
+            "主刀医生签名=记录医生"
+    );
+    private List<String> preoperativeDiscussion_keyContrasts2 = Lists.newArrayList(
+            "病史摘要=病历内容",
+            "医生签名=记录医生",
+            "日期=文书时间"
+
     );
 
     /**********************************************手术知情同意书****************************************************/
@@ -351,7 +343,7 @@ public class YhsyOperationDocTrans extends ModelDocTrans {
         OperationInformedConsentDoc operationInformedConsentDoc = new OperationInformedConsentDoc();
         String recTitle = contentMap.get("recTitle").toString();
         String recTypeId = contentMap.get("recTypeId").toString();
-        YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyOperationInformedHtmlAnalysis();
+        YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyOperationInformedHtmlAnalysis();
         Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
         if (MapUtils.isNotEmpty(sourceMap)) {
             structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);

+ 2 - 2
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyOutDepDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
 import com.lantone.qc.pub.model.label.ChiefLabel;
@@ -15,7 +15,7 @@ import java.util.Map;
  * @author: rengb
  * @time: 2020/3/19 19:41
  */
-public class YhsyOutDepDocTrans extends ModelDocTrans {
+public class YuhangsyOutDepDocTrans extends ModelDocTrans {
 
     @Override
     public BeHospitalizedDoc extract(MedrecVo medrecVo) {

+ 2 - 2
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyPacsDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.PacsDoc;
@@ -14,7 +14,7 @@ import java.util.Map;
  * @author: zh
  * @time: 2021/4/7 15:41
  */
-public class YhsyPacsDocTrans extends ModelDocTrans {
+public class YuhangsyPacsDocTrans extends ModelDocTrans {
 
     @Override
     public List<PacsDoc> extract(MedrecVo medrecVo) {

+ 7 - 6
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyRescueDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.RescueDoc;
@@ -7,8 +7,8 @@ import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyRescueHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyRescueHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -21,7 +21,7 @@ import java.util.Map;
  * @time: 2020/3/17 17:34
  */
 @Slf4j
-public class YhsyRescueDocTrans extends ModelDocTrans {
+public class YuhangsyRescueDocTrans extends ModelDocTrans {
 
     @Override
     public List<RescueDoc> extract(MedrecVo medrecVo) {
@@ -48,7 +48,7 @@ public class YhsyRescueDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyRescueHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyRescueHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -67,7 +67,8 @@ public class YhsyRescueDocTrans extends ModelDocTrans {
 
     private List<String> keyContrasts = Lists.newArrayList(
             "病历标题=标题",
-            "病情记录=抢救内容"
+            "病情记录=抢救内容",
+            "记录医师=记录医生"
     );
 
 }

+ 7 - 6
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyStagesSummaryDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.pub.model.doc.StagesSummaryDoc;
@@ -7,8 +7,8 @@ import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyStagesSummaryHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyStagesSummaryHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -21,7 +21,7 @@ import java.util.Map;
  * @time: 2020/3/19 19:41
  */
 @Slf4j
-public class YhsyStagesSummaryDocTrans extends ModelDocTrans {
+public class YuhangsyStagesSummaryDocTrans extends ModelDocTrans {
 
     @Override
     public List<StagesSummaryDoc> extract(MedrecVo medrecVo) {
@@ -48,7 +48,7 @@ public class YhsyStagesSummaryDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyStagesSummaryHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyStagesSummaryHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -66,8 +66,9 @@ public class YhsyStagesSummaryDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
+            "记录医师=记录医生",
             "病历标题=标题",
-            "病情记录=病历内容"
+            "病情记录=目前病情"
     );
 
 }

+ 9 - 9
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyThreeLevelWardDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.lantone.qc.dbanaly.util.KernelConstants;
@@ -15,8 +15,8 @@ import com.lantone.qc.pub.util.SpringContextUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyThreeLevelWardHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyThreeLevelWardHtmlAnalysis;
 import lombok.Setter;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
@@ -34,7 +34,7 @@ import java.util.Map;
  */
 @Slf4j
 @Setter
-public class YhsyThreeLevelWardDocTrans extends ModelDocTrans {
+public class YuhangsyThreeLevelWardDocTrans extends ModelDocTrans {
 
     private List<OperationDoc> operationDocs;
 
@@ -62,7 +62,7 @@ public class YhsyThreeLevelWardDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyThreeLevelWardHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyThreeLevelWardHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -271,10 +271,10 @@ public class YhsyThreeLevelWardDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
-            "病历日期=查房日期",
-            "病历标题=查房标题",
-            "科主任=三级医师",
-            "记录日期=记录时间"
+            "病历记录时间=查房日期",
+            "病历记录标题=查房标题",
+            "病程内容=病情记录",
+            "记录医师=记录医生"
     );
 
     /**

+ 10 - 11
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyTransferRecordDocTrans.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -11,9 +11,9 @@ import com.lantone.qc.pub.util.ListUtil;
 import com.lantone.qc.pub.util.StringUtil;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.OrdinaryAssistant;
-import com.lantone.qc.trans.yhsy.util.YhsyHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyTransferIntoHtmlAnalysis;
-import com.lantone.qc.trans.yhsy.util.YhsyTransferOutHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyTransferIntoHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyTransferOutHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -25,7 +25,7 @@ import java.util.*;
  * @time: 2020/3/20 16:10
  */
 @Slf4j
-public class YhsyTransferRecordDocTrans extends ModelDocTrans {
+public class YuhangsyTransferRecordDocTrans extends ModelDocTrans {
 
     @Override
     public TransferRecordDoc extract(MedrecVo medrecVo) {
@@ -155,7 +155,7 @@ public class YhsyTransferRecordDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyTransferIntoHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyTransferIntoHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -210,7 +210,7 @@ public class YhsyTransferRecordDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyTransferOutHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyTransferOutHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -268,7 +268,7 @@ public class YhsyTransferRecordDocTrans extends ModelDocTrans {
         } else {
             String recTitle = contentMap.get("recTitle").toString();
             String recTypeId = contentMap.get("recTypeId").toString();
-            YhsyHtmlAnalysis yhsyHtmlAnalysis = new YhsyTransferOutHtmlAnalysis();
+            YuhangsyHtmlAnalysis yhsyHtmlAnalysis = new YuhangsyTransferOutHtmlAnalysis();
             Map<String, String> sourceMap = yhsyHtmlAnalysis.analysis(content, recTitle, recTypeId);
             if (MapUtils.isNotEmpty(sourceMap)) {
                 structureMap = OrdinaryAssistant.mapKeyContrast(sourceMap, keyContrasts);
@@ -296,10 +296,9 @@ public class YhsyTransferRecordDocTrans extends ModelDocTrans {
     }
 
     private List<String> keyContrasts = Lists.newArrayList(
-            "医师签名=记录医生",
+            "记录医师=记录医生",
             "病历标题=标题",
-            "病情记录=病历内容",
-            "签名时间=记录时间"
+            "病情记录=目前病情"
     );
 
 }

+ 4 - 4
trans/src/main/java/com/lantone/qc/trans/yhsy/YhsyVTEGradeDocTrans.java

@@ -1,11 +1,11 @@
-package com.lantone.qc.trans.yhsy;
+package com.lantone.qc.trans.yuhangsy;
 
 import com.lantone.qc.pub.model.doc.VTEGradeDoc;
 import com.lantone.qc.pub.model.vo.MedrecVo;
 import com.lantone.qc.pub.util.FastJsonUtils;
 import com.lantone.qc.trans.ModelDocTrans;
 import com.lantone.qc.trans.comsis.ModelDocGenerate;
-import com.lantone.qc.trans.yhsy.util.YhsyVTEGradeHtmlAnalysis;
+import com.lantone.qc.trans.yuhangsy.util.YuhangsyVTEGradeHtmlAnalysis;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 
@@ -20,7 +20,7 @@ import java.util.Map;
  * @Version 1.0
  */
 @Slf4j
-public class YhsyVTEGradeDocTrans extends ModelDocTrans {
+public class YuhangsyVTEGradeDocTrans extends ModelDocTrans {
     @Override
     public VTEGradeDoc extract(MedrecVo medrecVo) {
         VTEGradeDoc vteGradeDoc = null;
@@ -33,7 +33,7 @@ public class YhsyVTEGradeDocTrans extends ModelDocTrans {
             } else {
                 String recTitle = contentMap.get("recTitle").toString();
                 String recTypeId = contentMap.get("recTypeId").toString();
-                YhsyVTEGradeHtmlAnalysis vteGradeHtmlAnalysis = new YhsyVTEGradeHtmlAnalysis();
+                YuhangsyVTEGradeHtmlAnalysis vteGradeHtmlAnalysis = new YuhangsyVTEGradeHtmlAnalysis();
                 Map<String, String> sourceMap = vteGradeHtmlAnalysis.analysis(content, recTitle, recTypeId);
                 if (MapUtils.isNotEmpty(sourceMap)) {
                     structureMap.putAll(sourceMap);

+ 2 - 2
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyADLGradeHtmlAnalysis.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.trans.yhsy.util;
+package com.lantone.qc.trans.yuhangsy.util;
 
 import com.google.common.collect.Maps;
 import com.lantone.qc.pub.Content;
@@ -17,7 +17,7 @@ import java.util.Map;
  * @Version 1.0
  */
 @Slf4j
-public class YhsyADLGradeHtmlAnalysis implements YhsyHtmlAnalysis {
+public class YuhangsyADLGradeHtmlAnalysis implements YuhangsyHtmlAnalysis {
     private String modeId = "0";//模块id待定
     @Override
     public Map<String, String> analysis(String... args) {

+ 122 - 0
trans/src/main/java/com/lantone/qc/trans/yuhangsy/util/YuhangsyBeHospitalizedHtmlAnalysis.java

@@ -0,0 +1,122 @@
+package com.lantone.qc.trans.yuhangsy.util;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
+import com.lantone.qc.trans.changshaxy.util.XyHtmlAnalysisUtil;
+import com.lantone.qc.trans.comsis.CommonAnalysisUtil;
+import com.lantone.qc.trans.yuhangsy.util.comsis.YuhangsyCommonAnalysisUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/9/15 16:28
+ */
+@Slf4j
+public class YuhangsyBeHospitalizedHtmlAnalysis implements YuhangsyHtmlAnalysis {
+
+    private String modeId = "1";
+
+    @Override
+    public Map<String, String> analysis(String... args) {
+        Map<String, String> map = Maps.newLinkedHashMap();
+        try {
+            String html = args[0];
+            String recTitle = args[1];
+            String recTypeId = args[2];
+            Document doc = Jsoup.parse(html);
+
+            if (recTitle.contains("24")) {
+                analysis24h(doc, map);
+            } else if (recTitle.contains("日间病历")) {
+                analysisDay(doc, map);
+            } else {
+                analysisGeneral(doc, recTitle, map);
+            }
+            YuhangsyHtmlAnalysisUtil.insertModuleId(modeId, recTypeId, map);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        }
+        return map;
+    }
+
+    //一般模板
+    private void analysisGeneral(Document doc, String recTitle, Map<String, String> structureMap) {
+        List<String> titles = Lists.newArrayList("姓名", "工作单位", "性别", "住址","住 址", "年龄", "联系人(电话)","联系人及电话号码", "婚姻",
+                "入院日期", "民族","民族\\宗教", "记录日期", "职业", "供史者", "籍贯","身份证号码",
+                "主 诉","现病史", "既往史", "个人史","婚育史","家族史","产科专科检查一般状况", "体格检查一般状况", "其 他","补充及专科情况 体温","实验室检查", "特殊检查","辅助检查",
+                "初步诊断", "医师签名", "时间", "修正诊断");
+
+        String htmlContent = YuhangsyCommonAnalysisUtil.html2String(doc.toString());
+        if (StringUtil.isNotBlank(htmlContent)) {
+            YuhangsyCommonAnalysisUtil.html2StructureMap(titles,htmlContent,structureMap);
+        }
+        //如果医师签名包括时间
+        if(StringUtil.isNotBlank(structureMap.get("医师签名"))&& structureMap.get("医师签名").contains("时间")){
+            Integer index = structureMap.get("医师签名").indexOf("时间");
+            structureMap.put("时间", structureMap.get("医师签名").substring(index+"时间:".length()));
+            structureMap.put("医师签名", structureMap.get("医师签名").substring(0, index));
+        }
+        //如果时间带有医师签名
+        if(StringUtil.isNotBlank(structureMap.get("时间"))&& structureMap.get("时间").contains("医师签名")){
+            Integer index = structureMap.get("时间").indexOf("医师签名");
+            structureMap.put("时间", structureMap.get("时间").substring(0,index));
+        }
+        //补充及专科情况 体温内容加体温
+        if(StringUtil.isNotBlank(structureMap.get("补充及专科情况体温"))){
+            structureMap.put("补充及专科情况体温", "体温:"+structureMap.get("补充及专科情况体温"));
+        }
+    }
+
+    //24小时出入院记录、24小时出入院记录(全院)、24小时入出院记录(全院通用)、24小时内入院死亡记录(全院通用)
+    private void analysis24h(Document doc, Map<String, String> structureMap) {
+        try {
+            List<String> titles = Lists.newArrayList("入院时间", "出院时间", "住院天数", "入院诊断",
+                    "出院诊断","主 诉", "入院情况", "入院查体", "住院经过", "出院情况", "出院医嘱","查体",
+                    "患者或患者授权亲属签名", "医师签名", "签名时间","日 期","出院指导"
+            );
+            String htmlContent = YuhangsyCommonAnalysisUtil.html2String(doc.toString());
+
+            if (StringUtil.isNotBlank(htmlContent)) {
+                YuhangsyCommonAnalysisUtil.html2StructureMap(titles,htmlContent,structureMap);
+            }
+            //如果医师签名包括签名时间
+            if(StringUtil.isNotBlank(structureMap.get("医师签名"))&& structureMap.get("医师签名").contains("签名时间")){
+                Integer index = structureMap.get("医师签名").indexOf("签名时间");
+                structureMap.put("签名时间", structureMap.get("医师签名").substring(index+"签名时间:".length()));
+                structureMap.put("医师签名", structureMap.get("医师签名").substring(0, index));
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+
+    //原-日间病历入出院记录、日间病历-性早熟
+    private void analysisDay(Document doc, Map<String, String> structureMap) {
+        List<String> titles = Lists.newArrayList("入院时间", "出院时间", "住院天数", "入院诊断",
+                "出院诊断","主 诉", "入院情况", "入院查体", "住院经过", "出院情况", "出院医嘱","查体",
+                "患者或患者授权亲属签名", "医师签名", "签名时间","日 期","出院指导"
+        );
+        String htmlContent = YuhangsyCommonAnalysisUtil.html2String(doc.toString());
+
+
+        if (StringUtil.isNotBlank(htmlContent)) {
+            YuhangsyCommonAnalysisUtil.html2StructureMap(titles,htmlContent,structureMap);
+        }
+        //如果医师签名包括签名时间
+        if(StringUtil.isNotBlank(structureMap.get("医师签名"))&& structureMap.get("医师签名").contains("签名时间")){
+            Integer index = structureMap.get("医师签名").indexOf("签名时间");
+            structureMap.put("签名时间", structureMap.get("医师签名").substring(index+"签名时间:".length()));
+            structureMap.put("医师签名", structureMap.get("医师签名").substring(0, index));
+        }
+    }
+
+}

+ 0 - 0
trans/src/main/java/com/lantone/qc/trans/yhsy/util/YhsyClinicBloodEffectHtmlAnalysis.java


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä