Browse Source

Merge branch 'develop' into dev/20200713_1.3.7.2

gaodm 4 năm trước cách đây
mục cha
commit
500d0a31d7

+ 9 - 0
doc/015.20200706v1.3.7.1/qc_initv1.3.7.1.sql

@@ -0,0 +1,9 @@
+use `qc`;
+
+ALTER TABLE `qc_cases_entry` ADD `drgs` tinyint(4) DEFAULT '2' COMMENT '是否控费(1:是,2:否)' AFTER `name`;
+ALTER TABLE `qc_cases_entry` ADD `type` tinyint(4) DEFAULT '1' COMMENT '质控形式(1:形式质控,2:内涵质控)' AFTER `drgs`;
+
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '17', '是', '1', '1', '1', '是否控费');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '17', '否', '2', '1', '2', '是否控费');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '18', '形式质控', '1', '1', '2', '质控形式');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '18', '内涵质控', '2', '1', '1', '质控形式');

+ 15 - 0
doc/015.20200714病案首页添加14个字段/qc_init_20200714.sql

@@ -0,0 +1,15 @@
+use `qc`;
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isPhysicalRestraint', '住院期间身体约束', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'tbiBehospitalBeforeTime', '入院前颅脑损伤患者昏迷时间', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'tbiBehospitalAfterTime', '入院后颅脑损伤患者昏迷时间', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isFallBed', '住院期间是否发生跌倒或坠床', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isNosocomialInfection', '医院感染', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isIntoIcu', '入住ICU情况', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isComplications', '并发症情况', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isPressure_sore', '是否发生压疮', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isBehospitalPressureSore', '是否住院期间发生压疮', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isUnplannedReoperation', '非计划再次手术', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'treatmentResults', '治疗结果', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'complicationsResults', '并发症', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'infectionSite', '感染部位', '2', '0', '病案首页');
+INSERT INTO `qc`.`sys_dictionary_info` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', 'isBeInDanger', '住院期间有无告病危', '2', '0', '病案首页');

+ 4 - 0
src/main/java/com/diagbot/dto/MsgDTO.java

@@ -22,6 +22,10 @@ public class MsgDTO {
     private BigDecimal score;
     //提示信息
     private String msg;
+    // 控费标识(1:是控费条目,2:不是控费条目)
+    private Integer drgs;
+    // 质控形式(1:形式质控,2:内涵质控)
+    private Integer type;
     //提示信息
     private String code;
     //提示信息

+ 70 - 0
src/main/java/com/diagbot/entity/HomePage.java

@@ -678,4 +678,74 @@ public class HomePage implements Serializable {
      */
     private String modifier;
 
+    /**
+     * 住院期间身体约束
+     */
+    private String isPhysicalRestraint;
+
+    /**
+     * 颅脑损伤患者昏迷时间(入院前)
+     */
+    private String tbiBehospitalBeforeTime;
+
+    /**
+     * 颅脑损伤患者昏迷时间(入院后)
+     */
+    private String tbiBehospitalAfterTime;
+
+    /**
+     * 住院期间是否发生跌倒或坠床
+     */
+    private String isFallBed;
+
+    /**
+     * 医院感染
+     */
+    private String isNosocomialInfection;
+
+    /**
+     * 入住ICU情况
+     */
+    private String isIntoIcu;
+
+    /**
+     * 并发症情况
+     */
+    private String isComplications;
+
+    /**
+     * 是否发生压疮
+     */
+    private String isPressureSore;
+
+    /**
+     * 是否住院期间发生压疮
+     */
+    private String isBehospitalPressureSore;
+
+    /**
+     * 非计划再次手术
+     */
+    private String isUnplannedReoperation;
+
+    /**
+     * 治疗结果
+     */
+    private String treatmentResults;
+
+    /**
+     * 并发症
+     */
+    private String complicationsResults;
+
+    /**
+     * 感染部位
+     */
+    private String infectionSite;
+
+    /**
+     * 住院期间有无告病危
+     */
+    private String isBeInDanger;
+
 }

+ 10 - 0
src/main/java/com/diagbot/entity/QcCasesEntry.java

@@ -45,6 +45,16 @@ public class QcCasesEntry implements Serializable {
      */
     private String name;
 
+    /**
+     * 控费标识(1:是控费条目,2:不是控费条目)
+     */
+    private Integer drgs;
+
+    /**
+     * 质控形式(1:形式质控,2:内涵质控)
+     */
+    private Integer type;
+
     /**
      * 规则类型(0:无,1:空项,2:错误)
      */

+ 7 - 7
src/main/java/com/diagbot/facade/AlgorithmFacade.java

@@ -146,17 +146,17 @@ public class AlgorithmFacade {
      */
     private String getLevel(BigDecimal score) {
         String level = "甲";
-        //得分90分为甲级
-        if (BigDecimalUtil.gt(score, new BigDecimal(90))) {
+        //得分90分为甲级
+        if (BigDecimalUtil.ge(score, new BigDecimal(90))) {
             level = "甲";
         }
-        //得分≤90分且得分>80分为乙级
-        if (BigDecimalUtil.le(score, new BigDecimal(90))
-                && BigDecimalUtil.gt(score, new BigDecimal(80))) {
+        //得分<90分且得分≥80分为乙级
+        if (BigDecimalUtil.lt(score, new BigDecimal(90))
+                && BigDecimalUtil.ge(score, new BigDecimal(80))) {
             level = "乙";
         }
-        //得分80分为丙级
-        if (BigDecimalUtil.le(score, new BigDecimal(80))) {
+        //得分<80分为丙级
+        if (BigDecimalUtil.lt(score, new BigDecimal(80))) {
             level = "丙";
         }
 

+ 5 - 0
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -214,6 +214,11 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             // 根据模块分组
             Map<String, List<MsgDTO>> msgMap = EntityUtil.makeEntityListMap(msgDTOList, "modelName");
             res.put("msg", msgMap);
+
+            // 添加DRGS分组
+            List<MsgDTO> msgDTOListDrgs = msgDTOList.stream().filter(r -> r.getDrgs().equals(1)).collect(Collectors.toList());
+            Map<String, List<MsgDTO>> drgsMap = EntityUtil.makeEntityListMap(msgDTOListDrgs, "modelName");
+            res.put("drgs", drgsMap);
         }
 
         return res;

+ 2 - 1
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -109,7 +109,8 @@
     <select id="getMsg" resultType="com.diagbot.dto.MsgDTO">
         SELECT b.`name` model_name,c.score,c.msg,c.cases_entry_id,c.is_reject,c.id id,c.info,
         a.cases_id cases_id, d.score cases_score,b.id model_id, a.name standard_msg,
-        c.opt_type, c.grade_type, c.gmt_create, c.gmt_modified
+        c.opt_type, c.grade_type, c.gmt_create, c.gmt_modified,
+        a.type, a.drgs
         FROM `qc_cases_entry` a, qc_mode b, med_qcresult_detail c, qc_cases_hospital d
         where a.is_deleted = 'N' and b.is_deleted = 'N' and c.is_deleted = 'N' and d.is_deleted = 'N'
         and a.id = c.cases_entry_id

+ 14 - 0
src/main/resources/mapper/HomePageMapper.xml

@@ -135,6 +135,20 @@
         <result column="gmt_modified" property="gmtModified" />
         <result column="creator" property="creator" />
         <result column="modifier" property="modifier" />
+        <result column="is_physical_restraint" property="isPhysicalRestraint" />
+        <result column="tbi_behospital_before_time" property="tbiBehospitalBeforeTime" />
+        <result column="tbi_behospital_after_time" property="tbiBehospitalAfterTime" />
+        <result column="is_fall_bed" property="isFallBed" />
+        <result column="is_nosocomial_infection" property="isNosocomialInfection" />
+        <result column="is_into_icu" property="isIntoIcu" />
+        <result column="is_complications" property="isComplications" />
+        <result column="is_pressure_sore" property="isPressureSore" />
+        <result column="is_behospital_pressure_sore" property="isBehospitalPressureSore" />
+        <result column="is_unplanned_reoperation" property="isUnplannedReoperation" />
+        <result column="treatment_results" property="treatmentResults" />
+        <result column="complications_results" property="complicationsResults" />
+        <result column="infection_site" property="infectionSite" />
+        <result column="is_be_in_danger" property="isBeInDanger" />
     </resultMap>
 
 

+ 1 - 0
src/main/resources/mapper/MedicalRecordMapper.xml

@@ -30,6 +30,7 @@
         and t1.rec_id = t3.rec_id
         and t1.hospital_id = #{hospitalId}
         and t1.behospital_code = #{behospitalCode}
+        and t3.xml_text != ''
     </select>
 
     <update id="updateBatchByKey">

+ 2 - 0
src/main/resources/mapper/QcCasesEntryMapper.xml

@@ -10,6 +10,8 @@
         <result column="mode_id" property="modeId" />
         <result column="code" property="code" />
         <result column="name" property="name" />
+        <result column="drgs" property="drgs" />
+        <result column="type" property="type" />
         <result column="rule_type" property="ruleType" />
         <result column="dev_type" property="devType" />
         <result column="accuracy_type" property="accuracyType" />