Browse Source

Merge remote-tracking branch 'origin/master'

rengb 5 years atrás
parent
commit
2473a2a05f

+ 7 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC0087.java

@@ -4,9 +4,12 @@ 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.FirstCourseRecordDoc;
+import com.lantone.qc.pub.model.entity.Diag;
+import com.lantone.qc.pub.model.label.DiagLabel;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Component;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -21,10 +24,10 @@ public class FIRC0087 extends QCCatalogue {
         status.set("0");
         FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
         if(firstCourseRecordDoc != null){
-            Map<String, String> courseRecordDocStructureMap = firstCourseRecordDoc.getStructureMap();
-            if(courseRecordDocStructureMap != null){
-                String tretment_plan = courseRecordDocStructureMap.get("鉴别诊断");
-                if(StringUtils.isEmpty(tretment_plan)){
+            DiagLabel differentialDiagLabel = firstCourseRecordDoc.getDifferentialDiagLabel();
+            if(differentialDiagLabel != null){
+                List<Diag> diags = differentialDiagLabel.getDiags();
+                if(diags == null || diags.size()<1){
                     status.set("-1");
                 }
             }

+ 8 - 4
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC0089.java

@@ -4,9 +4,13 @@ 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.FirstCourseRecordDoc;
+import com.lantone.qc.pub.model.entity.Diag;
+import com.lantone.qc.pub.model.label.DiagLabel;
+import com.lantone.qc.pub.model.label.TreatPlanLabel;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Component;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -21,10 +25,10 @@ public class FIRC0089 extends QCCatalogue {
         status.set("0");
         FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
         if(firstCourseRecordDoc != null){
-            Map<String, String> courseRecordDocStructureMap = firstCourseRecordDoc.getStructureMap();
-            if(courseRecordDocStructureMap != null){
-                String tretment_plan = courseRecordDocStructureMap.get("诊疗计划");
-                if(StringUtils.isEmpty(tretment_plan)){
+            TreatPlanLabel treatPlanLabel = firstCourseRecordDoc.getTreatPlanLabel();
+            if(treatPlanLabel != null){
+                String text = treatPlanLabel.getText();
+                if(StringUtils.isBlank(text)){
                     status.set("-1");
                 }
             }

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/firstcourserecord/FIRC0093.java

@@ -37,7 +37,7 @@ public class FIRC0093 extends QCCatalogue {
                 String beDate = beHospitalizedDocStructureMap.get("入院日期");
                 if(StringUtils.isNotEmpty(couDate) && StringUtils.isNotEmpty(beDate)){
                     Date date_in = new SimpleDateFormat(DATE_TIME_FORMAT).parse(beDate);
-                    Date date_out = new SimpleDateFormat(FORMAT_LONG_CN_MI).parse(couDate);
+                    Date date_out = new SimpleDateFormat(DATE_TIME_FORMAT).parse(couDate);
                     Calendar from  =  Calendar.getInstance();
                     from.setTime(date_in);
                     Calendar  to  =  Calendar.getInstance();

+ 36 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/threelevelward/THR0431.java

@@ -0,0 +1,36 @@
+package com.lantone.qc.kernel.catalogue.threelevelward;
+
+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.ThreeLevelWardDoc;
+import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @ClassName : THR0431
+ * @Description : 危重患者上级医师(副高及以上)查房记录无诊疗意见
+ * @Author : Mark
+ * @Date: 2020-04-04 19:21
+ */
+@Component
+public class THR0431 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getThreeLevelWardDocs().size() > 0) {
+            List<ThreeLevelWardDoc> threeLevelWardDocs = inputInfo.getThreeLevelWardDocs();
+            for (ThreeLevelWardDoc threeLevelWardDoc : threeLevelWardDocs) {
+                if (threeLevelWardDoc.getThreeLevelWardLabel().getSerious() != 1) {
+                    continue;
+                }
+                ThreeLevelWardLabel threeLevelWardLabel = threeLevelWardDoc.getThreeLevelWardLabel();
+                if (threeLevelWardLabel.getTreatmentPlans().size() == 0) {
+                    status.set("-1");
+                    return;
+                }
+            }
+        }
+    }
+}

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

@@ -147,7 +147,7 @@ public class BeHospitalizedAI extends ModelAI {
             }
             //处理初步诊断
             if (beHospitalizedDoc.getInitialDiagLabel().isCrfLabel()) {
-                putInitialDiagCrfData(midData.getJSONObject(Content.pridiag), inputInfo);
+                putInitialDiagCrfData(midData.getJSONObject(Content.initial_diag), inputInfo);
             }
             if (StringUtils.isNotEmpty(revised_diag_text) && beHospitalizedDoc.getRevisedDiagLabel().isCrfLabel()) {
                 //处理修正诊断

+ 3 - 1
kernel/src/main/java/com/lantone/qc/kernel/web/controller/QCTestController.java

@@ -87,7 +87,9 @@ public class QCTestController {
         MysqlJdbc mysqlJdbc = new MysqlJdbc(propertiesUtil.getProperty("mysql.test.user"),
                 propertiesUtil.getProperty("mysql.test.password"),
                 propertiesUtil.getProperty("mysql.test.url"));
-        mysqlJdbc.update("update qc_inputcases_mapping_all set check_label=null");
+        if(caseNumber == null){
+            mysqlJdbc.update("update qc_inputcases_mapping_all set check_label=null");
+        }
         mysqlJdbc.update("qc_inputcases_mapping_all", updates, wheres);
         return response;
     }

+ 5 - 5
trans/src/main/java/com/lantone/qc/trans/changx/ChangxFirstPageRecordDocTrans.java

@@ -23,11 +23,11 @@ public class ChangxFirstPageRecordDocTrans extends ModelDocTrans {
         firstPageRecordDoc.setStructureMap(content);
 
         Map<String, Object> structureExtMap = Maps.newHashMap();
-        structureExtMap.put(Content.diagnose_cts, FastJsonUtils.getJsonToBean(content.get(Content.diagnose_cts), Object.class));
-        structureExtMap.put(Content.outpatientEmergencyDiag, FastJsonUtils.getJsonToBean(content.get(Content.outpatientEmergencyDiag), Object.class));
-        structureExtMap.put(Content.operative_information, FastJsonUtils.getJsonToBean(content.get(Content.operative_information), Object.class));
-        structureExtMap.put(Content.dischargeDiag, FastJsonUtils.getJsonToBean(content.get(Content.dischargeDiag), Object.class));
-        structureExtMap.put(Content.pathologyDiagnose, FastJsonUtils.getJsonToBean(content.get(Content.pathologyDiagnose), Object.class));
+//        structureExtMap.put(Content.diagnose_cts, FastJsonUtils.getJsonToBean(content.get(Content.diagnose_cts), Object.class));
+//        structureExtMap.put(Content.outpatientEmergencyDiag, FastJsonUtils.getJsonToBean(content.get(Content.outpatientEmergencyDiag), Object.class));
+//        structureExtMap.put(Content.operative_information, FastJsonUtils.getJsonToBean(content.get(Content.operative_information), Object.class));
+//        structureExtMap.put(Content.dischargeDiag, FastJsonUtils.getJsonToBean(content.get(Content.dischargeDiag), Object.class));
+//        structureExtMap.put(Content.pathologyDiagnose, FastJsonUtils.getJsonToBean(content.get(Content.pathologyDiagnose), Object.class));
         firstPageRecordDoc.setStructureExtMap(structureExtMap);
         firstPageRecordDoc.setPageData(medrecVo.getContent());