|
@@ -6726,10 +6726,7 @@
|
|
|
|
|
|
<!-- 不合格数病历号(内页)-->
|
|
<!-- 不合格数病历号(内页)-->
|
|
<select id="badLevelPage" resultType="com.diagbot.dto.QcResultShortDTO">
|
|
<select id="badLevelPage" resultType="com.diagbot.dto.QcResultShortDTO">
|
|
- SELECT f.*
|
|
|
|
- from
|
|
|
|
- (
|
|
|
|
- SELECT DISTINCT t.*,e.score_res as scoreBn
|
|
|
|
|
|
+ SELECT t.*
|
|
FROM
|
|
FROM
|
|
(SELECT DISTINCT
|
|
(SELECT DISTINCT
|
|
t1.hospital_id AS hospitalId,
|
|
t1.hospital_id AS hospitalId,
|
|
@@ -6738,6 +6735,7 @@
|
|
t1.LEVEL AS LEVEL,
|
|
t1.LEVEL AS LEVEL,
|
|
t1.grade_type AS gradeType,
|
|
t1.grade_type AS gradeType,
|
|
t1.score_res AS scoreRes,
|
|
t1.score_res AS scoreRes,
|
|
|
|
+ t1.scoreBn,
|
|
t1.NAME AS NAME,
|
|
t1.NAME AS NAME,
|
|
t1.sex AS sex,
|
|
t1.sex AS sex,
|
|
t1.beh_dept_id AS behDeptId,
|
|
t1.beh_dept_id AS behDeptId,
|
|
@@ -6782,6 +6780,7 @@
|
|
b.LEVEL,
|
|
b.LEVEL,
|
|
b.grade_type,
|
|
b.grade_type,
|
|
b.score_res,
|
|
b.score_res,
|
|
|
|
+ e.score_res as scoreBn,
|
|
a.NAME,
|
|
a.NAME,
|
|
a.sex,
|
|
a.sex,
|
|
a.beh_dept_id,
|
|
a.beh_dept_id,
|
|
@@ -6802,20 +6801,18 @@
|
|
FROM
|
|
FROM
|
|
med_behospital_info a,
|
|
med_behospital_info a,
|
|
med_qcresult_info b,
|
|
med_qcresult_info b,
|
|
- med_qcresult_detail c,
|
|
|
|
- qc_cases_entry d
|
|
|
|
|
|
+ med_qcresult_cases e
|
|
WHERE
|
|
WHERE
|
|
a.is_deleted = 'N'
|
|
a.is_deleted = 'N'
|
|
AND b.is_deleted = 'N'
|
|
AND b.is_deleted = 'N'
|
|
- AND c.is_deleted = 'N'
|
|
|
|
- AND d.is_deleted = 'N'
|
|
|
|
|
|
+ AND e.is_deleted = 'N'
|
|
AND a.hospital_id = b.hospital_id
|
|
AND a.hospital_id = b.hospital_id
|
|
- AND a.hospital_id = c.hospital_id
|
|
|
|
|
|
+ AND a.hospital_id = e.hospital_id
|
|
AND a.behospital_code = b.behospital_code
|
|
AND a.behospital_code = b.behospital_code
|
|
- AND a.behospital_code = c.behospital_code
|
|
|
|
- AND c.cases_id = d.cases_id
|
|
|
|
- AND c.cases_entry_id = d.id
|
|
|
|
|
|
+ AND a.behospital_code = e.behospital_code
|
|
AND a.qc_type_id != 0
|
|
AND a.qc_type_id != 0
|
|
|
|
+ AND e.`level`='不合格'
|
|
|
|
+ AND e.cases_id= 243
|
|
<if test="qcResultPageVO.isPlacefile != null and qcResultPageVO.isPlacefile != ''">
|
|
<if test="qcResultPageVO.isPlacefile != null and qcResultPageVO.isPlacefile != ''">
|
|
and a.is_placefile = #{qcResultPageVO.isPlacefile}
|
|
and a.is_placefile = #{qcResultPageVO.isPlacefile}
|
|
</if>
|
|
</if>
|
|
@@ -6850,9 +6847,6 @@
|
|
<if test="qcResultPageVO.patName != null and qcResultPageVO.patName != ''">
|
|
<if test="qcResultPageVO.patName != null and qcResultPageVO.patName != ''">
|
|
AND a.NAME LIKE CONCAT( '%', #{qcResultPageVO.patName}, '%' )
|
|
AND a.NAME LIKE CONCAT( '%', #{qcResultPageVO.patName}, '%' )
|
|
</if>
|
|
</if>
|
|
- <if test="qcResultPageVO.casesEntryName != null and qcResultPageVO.casesEntryName != ''">
|
|
|
|
- AND d.NAME = #{qcResultPageVO.casesEntryName}
|
|
|
|
- </if>
|
|
|
|
<if test="qcResultPageVO.doctorId != null and qcResultPageVO.doctorId != ''">
|
|
<if test="qcResultPageVO.doctorId != null and qcResultPageVO.doctorId != ''">
|
|
AND (a.doctor_id LIKE CONCAT( '%', #{qcResultPageVO.doctorId}, '%' )
|
|
AND (a.doctor_id LIKE CONCAT( '%', #{qcResultPageVO.doctorId}, '%' )
|
|
OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultPageVO.doctorId}, '%' )
|
|
OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultPageVO.doctorId}, '%' )
|
|
@@ -6863,15 +6857,6 @@
|
|
OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultPageVO.doctorName}, '%' )
|
|
OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultPageVO.doctorName}, '%' )
|
|
OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultPageVO.doctorName}, '%' ))
|
|
OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultPageVO.doctorName}, '%' ))
|
|
</if>
|
|
</if>
|
|
- <if test="qcResultPageVO.casesEntryId != null ">
|
|
|
|
- AND d.id = #{qcResultPageVO.casesEntryId}
|
|
|
|
- </if>
|
|
|
|
- <if test="qcResultPageVO.isReject != null">
|
|
|
|
- AND c.is_reject = #{qcResultPageVO.isReject}
|
|
|
|
- </if>
|
|
|
|
- <if test="qcResultPageVO.ruleType != null">
|
|
|
|
- AND d.rule_type = #{qcResultPageVO.ruleType}
|
|
|
|
- </if>
|
|
|
|
)be
|
|
)be
|
|
left join med_check_info mci
|
|
left join med_check_info mci
|
|
on mci.is_deleted = 'N'
|
|
on mci.is_deleted = 'N'
|
|
@@ -6888,13 +6873,6 @@
|
|
AND t1.behospital_code = t2.behospital_code
|
|
AND t1.behospital_code = t2.behospital_code
|
|
AND t2.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
) t
|
|
) t
|
|
- LEFT JOIN med_qcresult_cases e ON t.hospital_id = e.hospital_id
|
|
|
|
- AND t.behospital_code = e.behospital_code
|
|
|
|
- AND e.is_deleted = 'N'
|
|
|
|
- AND e.`level`='不合格'
|
|
|
|
- AND e.cases_id = 243
|
|
|
|
- )f
|
|
|
|
-
|
|
|
|
where 1=1
|
|
where 1=1
|
|
<if test="qcResultPageVO.checkStatus != null">
|
|
<if test="qcResultPageVO.checkStatus != null">
|
|
AND t.checkStatus = #{qcResultPageVO.checkStatus}
|
|
AND t.checkStatus = #{qcResultPageVO.checkStatus}
|
|
@@ -7121,6 +7099,7 @@
|
|
f1.behospitalDate,
|
|
f1.behospitalDate,
|
|
f1.leaveHospitalDate,
|
|
f1.leaveHospitalDate,
|
|
f1.score,
|
|
f1.score,
|
|
|
|
+ f1.scoreBn,
|
|
f2.avgScore,
|
|
f2.avgScore,
|
|
f1.msg,
|
|
f1.msg,
|
|
f1.caseName,
|
|
f1.caseName,
|
|
@@ -7139,6 +7118,7 @@
|
|
t.leaveHospitalDate AS leaveHospitalDate,
|
|
t.leaveHospitalDate AS leaveHospitalDate,
|
|
qi.score_res AS score,
|
|
qi.score_res AS score,
|
|
qd.msg AS msg,
|
|
qd.msg AS msg,
|
|
|
|
+ t.scoreBn,
|
|
qc.NAME AS caseName,
|
|
qc.NAME AS caseName,
|
|
t.behDeptId,
|
|
t.behDeptId,
|
|
t.behDeptName,
|
|
t.behDeptName,
|
|
@@ -7157,6 +7137,7 @@
|
|
t1.LEVEL AS LEVEL,
|
|
t1.LEVEL AS LEVEL,
|
|
t1.grade_type AS gradeType,
|
|
t1.grade_type AS gradeType,
|
|
t1.score_res AS scoreRes,
|
|
t1.score_res AS scoreRes,
|
|
|
|
+ t1.scoreBn,
|
|
t1.NAME AS NAME,
|
|
t1.NAME AS NAME,
|
|
t1.sex AS sex,
|
|
t1.sex AS sex,
|
|
t1.beh_dept_id AS behDeptId,
|
|
t1.beh_dept_id AS behDeptId,
|
|
@@ -7201,6 +7182,7 @@
|
|
b.LEVEL,
|
|
b.LEVEL,
|
|
b.grade_type,
|
|
b.grade_type,
|
|
b.score_res,
|
|
b.score_res,
|
|
|
|
+ c.score_res as scoreBn,
|
|
a.NAME,
|
|
a.NAME,
|
|
a.sex,
|
|
a.sex,
|
|
a.beh_dept_id,
|
|
a.beh_dept_id,
|