Sfoglia il codice sorgente

根据匹配的基础规则ID获取确诊、拟诊、警惕的疾病

gaodm 4 anni fa
parent
commit
8c42a5af11
1 ha cambiato i file con 8 aggiunte e 9 eliminazioni
  1. 8 9
      src/main/resources/mapper/KlDiagnoseBaseMapper.xml

+ 8 - 9
src/main/resources/mapper/KlDiagnoseBaseMapper.xml

@@ -41,9 +41,9 @@
                 t1.eq_value,
                 t1.eq_unit
             ) AS baseKey,
-            GROUP_CONCAT(t1.id) as ids,
-            t2.lib_name,
-            t2.lib_type,
+            GROUP_CONCAT(t1.id) AS ids,
+            IFNULL(t2.lib_name, "") AS libName,
+            IFNULL(t2.lib_type, 0) AS libType,
             t1.concept_id,
             t1.type,
             t1.max_operator,
@@ -56,14 +56,13 @@
             t1.eq_value,
             t1.eq_unit
         FROM
-            kl_diagnose_base t1,
-            kl_concept t2
-        WHERE
-            t1.concept_id = t2.id
-        AND t1.is_deleted = "N"
-        AND t1.`status` = 1
+            kl_diagnose_base t1
+        LEFT JOIN kl_concept t2 ON t1.concept_id = t2.id
         AND t2.is_deleted = "N"
         AND t2.`status` = 1
+        WHERE
+            t1.is_deleted = "N"
+        AND t1.`status` = 1
         GROUP BY
             t1.concept_id,
             t1.type,