|
@@ -304,21 +304,21 @@
|
|
|
SELECT a.*, u.linkman
|
|
|
FROM
|
|
|
(
|
|
|
- SELECT DISTINCT c.score,c.msg,c.cases_entry_id,c.is_reject,c.id id,c.info,
|
|
|
+ SELECT DISTINCT b.`name` model_name, b.id model_id, c.score,c.msg,c.cases_entry_id,c.is_reject,c.id id,c.info,
|
|
|
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, a.rule_type
|
|
|
FROM
|
|
|
- `qc_cases_entry` a, med_qcresult_detail c, qc_cases_hospital d
|
|
|
- where a.is_deleted = 'N' and d.is_deleted = 'N'
|
|
|
- and a.id = c.cases_entry_id
|
|
|
+ `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.hospital_id = d.hospital_id
|
|
|
and c.hospital_id = #{hospitalId}
|
|
|
<if test="qcresultInfoId != null">
|
|
|
AND c.qcresult_info_id = #{qcresultInfoId}
|
|
|
</if>
|
|
|
and c.behospital_code = #{behospitalCode} and c.opt_type != 4
|
|
|
- order by c.grade_type desc, a.order_no) a
|
|
|
+ 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>
|
|
|
|