@@ -71,9 +71,7 @@
sum( type = 13 ) AS tcmsyndromeNum,
sum( type = 14 ) AS anesthesiaNum
FROM
- tran_mapping_config
- WHERE
- is_deleted = 'N'
+ ( SELECT hospital_id, type, count(*) AS num FROM tran_mapping_config WHERE is_deleted = 'N' GROUP BY hospital_id, type ) t1
GROUP BY
hospital_id
) b ON a.id = b.hospital_id