|
@@ -3392,7 +3392,7 @@
|
|
|
t1.deptId,
|
|
|
t1.deptName,
|
|
|
t1.doctorName,
|
|
|
- t1.doctorTitle,
|
|
|
+ t1.professor,
|
|
|
sum(t1.mrNum) as mrNum,
|
|
|
sum(t1.totleValue)as totleValue,
|
|
|
ROUND(CAST(sum(t1.totleValue)/sum(t1.mrNum) AS DECIMAL ( 18, 2 )), 2) AS averageValue,
|
|
@@ -3424,7 +3424,7 @@
|
|
|
when (b.attending_doctor = '' or b.attending_doctor is null) and
|
|
|
(b.director_doctor = '' or b.director_doctor is null) and
|
|
|
b.behospital_doctor != '' and b.behospital_doctor is not null
|
|
|
- then '住院医师' end as doctorTitle,
|
|
|
+ then '住院医师' end as professor,
|
|
|
count( * ) AS mrNum,
|
|
|
ROUND( sum( CAST( c.score_res AS DECIMAL ( 18, 2 )) ), 2 ) AS totleValue,
|
|
|
ROUND( avg( CAST( c.score_res AS DECIMAL ( 18, 2 )) ), 2 ) AS averageValue,
|
|
@@ -3469,8 +3469,8 @@
|
|
|
<if test="deptName != null and deptName != ''">
|
|
|
and a.beh_dept_name like CONCAT('%',#{deptName},'%')
|
|
|
</if>
|
|
|
- <if test="doctorName != null and doctorName != ''">
|
|
|
- and a.doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ and a.beh_dept_id = #{deptId}
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
a.beh_dept_id,
|
|
@@ -3479,14 +3479,14 @@
|
|
|
b.director_doctor,
|
|
|
b.behospital_doctor
|
|
|
) t1
|
|
|
- group by t1.deptId,t1.deptName,t1.doctorName
|
|
|
+ group by t1.deptId,t1.deptName,t1.doctorName,t1.professor
|
|
|
)tt1,
|
|
|
(
|
|
|
select
|
|
|
t2.deptId,
|
|
|
t2.deptName,
|
|
|
t2.doctorName,
|
|
|
- t2.doctorTitle,
|
|
|
+ t2.professor,
|
|
|
sum(t2.entryNum)as entryNum,
|
|
|
sum(t2.emptyNum)as emptyNum,
|
|
|
sum(t2.errorNum)as errorNum,
|
|
@@ -3517,7 +3517,7 @@
|
|
|
when (b.attending_doctor = '' or b.attending_doctor is null) and
|
|
|
(b.director_doctor = '' or b.director_doctor is null) and
|
|
|
b.behospital_doctor != '' and b.behospital_doctor is not null
|
|
|
- then '住院医师' end as doctorTitle,
|
|
|
+ then '住院医师' end as professor,
|
|
|
count( * ) AS entryNum,
|
|
|
count(case when e.rule_type = 1 then 1 end) AS emptyNum,
|
|
|
count(case when e.rule_type = 2 then 1 end) AS errorNum,
|
|
@@ -3570,8 +3570,8 @@
|
|
|
<if test="deptName != null and deptName != ''">
|
|
|
and a.beh_dept_name like CONCAT('%',#{deptName},'%')
|
|
|
</if>
|
|
|
- <if test="doctorName != null and doctorName != ''">
|
|
|
- and a.doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ and a.beh_dept_id = #{deptId}
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
a.beh_dept_id,
|
|
@@ -3588,15 +3588,21 @@
|
|
|
is_deleted = 'N'
|
|
|
AND cases_id = 243
|
|
|
)m2) t2
|
|
|
- group by t2.deptId,t2.deptName,t2.doctorName
|
|
|
+ group by t2.deptId,t2.deptName,t2.doctorName,t2.professor
|
|
|
) tt2
|
|
|
WHERE
|
|
|
tt1.deptId = tt2.deptId
|
|
|
AND tt1.deptName = tt2.deptName
|
|
|
AND tt1.doctorName= tt2.doctorName
|
|
|
- AND tt1.doctorTitle = tt2.doctorTitle
|
|
|
- AND tt1.doctorTitle != ''
|
|
|
- and tt1.doctorTitle is not null
|
|
|
+ AND tt1.professor = tt2.professor
|
|
|
+ AND tt1.professor != ''
|
|
|
+ and tt1.professor is not null
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
+ and tt1.doctorName like CONCAT('%',#{doctorName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="professor != null and professor != ''">
|
|
|
+ and tt1.professor like CONCAT('%',#{professor},'%')
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
|