|
@@ -680,21 +680,22 @@
|
|
|
</select>-->
|
|
|
|
|
|
<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.modifier,u.linkman,c.is_deleted,c.explain_info as explainInfo,
|
|
|
+ SELECT a.*, u.linkman
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT DISTINCT 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.modifier,c.is_deleted,c.explain_info as explainInfo,
|
|
|
a.type, a.drgs
|
|
|
- FROM `qc_cases_entry` a, qc_mode b, med_qcresult_detail c, qc_cases_hospital d ,sys_user u
|
|
|
- where a.is_deleted = 'N' and b.is_deleted = 'N' and d.is_deleted = 'N'
|
|
|
- and u.is_deleted = 'N' and u.id = c.modifier
|
|
|
- and a.id = c.cases_entry_id
|
|
|
- and a.mode_id = b.id
|
|
|
- AND c.cases_id = d.cases_id
|
|
|
- and c.hospital_id = d.hospital_id
|
|
|
+ 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 d.is_deleted = 'N'
|
|
|
+ and a.id = c.cases_entry_id and a.mode_id = b.id
|
|
|
+ AND c.cases_id = d.cases_id and c.hospital_id = d.hospital_id
|
|
|
and c.hospital_id = #{hospitalId}
|
|
|
and c.behospital_code = #{behospitalCode}
|
|
|
- order by b.order_no, c.grade_type desc, a.order_no
|
|
|
+ order by b.order_no, c.grade_type desc, a.order_no) a
|
|
|
+ LEFT JOIN sys_user u on u.id = a.modifier and u.is_deleted = 'N'
|
|
|
</select>
|
|
|
|
|
|
|