|
@@ -3414,12 +3414,12 @@
|
|
|
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,
|
|
|
- SUM( c.`level` = '合格' ) AS firstLevelNum,
|
|
|
- SUM( c.`level` = '不合格' ) AS secondLevelNum,
|
|
|
- ROUND( SUM( c.`level` = '合格' )/ count( * ), 4 ) AS firstLevelPercent,
|
|
|
- ROUND( SUM( c.`level` = '不合格' )/ count( * ), 4 ) AS secondLevelPercent,
|
|
|
- concat( ROUND( SUM( c.`level` = '合格' )/ count( * )* 100, 2 ),'%' ) AS firstLevelPercentStr,
|
|
|
- concat( ROUND( SUM( c.`level` = '不合格' )/ count( * )* 100, 2 ),'%' ) AS secondLevelPercentStr
|
|
|
+ count(case when c.`level` = '合格' then 1 end) AS firstLevelNum,
|
|
|
+ count(case when c.`level` = '不合格' then 1 end) AS secondLevelNum,
|
|
|
+ ROUND( count(case when c.`level` = '合格' then 1 end)/ count( * ), 4 ) AS firstLevelPercent,
|
|
|
+ ROUND( count(case when c.`level` = '不合格' then 1 end)/ count( * ), 4 ) AS secondLevelPercent,
|
|
|
+ concat( ROUND( count(case when c.`level` = '合格' then 1 end)/ count( * )* 100, 2 ),'%' ) AS firstLevelPercentStr,
|
|
|
+ concat( ROUND( count(case when c.`level` = '不合格' then 1 end)/ count( * )* 100, 2 ),'%' ) AS secondLevelPercentStr
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
med_qcresult_cases c
|
|
@@ -3540,8 +3540,9 @@
|
|
|
a.beh_dept_id AS deptId,
|
|
|
a.beh_dept_name AS deptName,
|
|
|
a.doctor_id as doctorId,
|
|
|
- sum( d.rule_type = 1 ) AS emptyNum,
|
|
|
- sum( d.rule_type = 2 ) AS errorNum,
|
|
|
+ count(case when d.rule_type = 1 then 1 end) AS emptyNum,
|
|
|
+ count(case when d.rule_type = 2 then 1 end) AS errorNum,
|
|
|
+ a.doctor_id as doctorId1,
|
|
|
count( DISTINCT a.behospital_code ) AS mrNum
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
@@ -3613,7 +3614,6 @@
|
|
|
AND t1.doctorId = t3.doctorId)t4
|
|
|
left join bas_doctor_info bas
|
|
|
on t4.doctorId = bas.doctor_id
|
|
|
and bas.is_deleted = 'N'
|
|
|
where 1=1
|
|
|
<if test="professor != null and professor != ''">
|