Explorar o código

新增med_index_relevance表sql

zhanghang %!s(int64=4) %!d(string=hai) anos
pai
achega
f82aff18e6

+ 17 - 0
doc/031.20210326v2.0.2/qc_initv2.0.2.sql

@@ -302,3 +302,20 @@ CREATE TABLE `med_index_result` (
 ) ENGINE=InnoDB AUTO_INCREMENT=1207 DEFAULT CHARSET=utf8;
 
 
+DROP TABLE IF EXISTS `med_index_relevance`;
+CREATE TABLE `med_index_relevance` (
+  `id` int(10) NOT NULL AUTO_INCREMENT,
+  `index_result_id` int(10) DEFAULT NULL COMMENT '主缓存表id',
+  `relevance_type` int(10) DEFAULT NULL COMMENT '病历条目关联表type',
+  `hospital_id` tinyint(3) DEFAULT NULL COMMENT '医院ID',
+  `behospital_code` varchar(255) DEFAULT NULL COMMENT '病人病历号',
+  `start_date` datetime DEFAULT NULL,
+  `end_date` datetime DEFAULT NULL,
+  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6311 DEFAULT CHARSET=utf8;
+

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

@@ -17631,7 +17631,7 @@
         AND a.hospital_id = #{filterVO.hospitalId}
         and a.behospital_code = c.behospital_code
         ) d
-        LEFT JOIN med_home_page b ON b.behospital_code = d.behospital_code
+        JOIN med_home_page b ON b.behospital_code = d.behospital_code
         AND d.hospital_id = b.hospital_id
         AND b.is_deleted = 'N'
     </select>