|
@@ -12616,6 +12616,7 @@
|
|
t1.score_res AS scoreRes,
|
|
t1.score_res AS scoreRes,
|
|
t1.scoreBn,
|
|
t1.scoreBn,
|
|
t1.doctorName,
|
|
t1.doctorName,
|
|
|
|
+ t1.doctorId,
|
|
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,
|
|
@@ -12642,6 +12643,7 @@
|
|
b.grade_type,
|
|
b.grade_type,
|
|
b.score_res,
|
|
b.score_res,
|
|
b.gmt_create,
|
|
b.gmt_create,
|
|
|
|
+ f.doctor_id as doctorId,
|
|
ifnull(mci.status,0) AS checkStatus,
|
|
ifnull(mci.status,0) AS checkStatus,
|
|
ifnull(hm_mci.status,0) AS mrStatus,
|
|
ifnull(hm_mci.status,0) AS mrStatus,
|
|
mci.check_name as chName,
|
|
mci.check_name as chName,
|
|
@@ -12700,9 +12702,6 @@
|
|
<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>
|
|
- <if test="qcResultPageVO.doctorId != null and qcResultPageVO.doctorId != ''">
|
|
|
|
- AND a.doctor_id = #{qcResultPageVO.doctorId}
|
|
|
|
- </if>
|
|
|
|
<if test="qcResultPageVO.hospitalId != null and qcResultPageVO.hospitalId != ''">
|
|
<if test="qcResultPageVO.hospitalId != null and qcResultPageVO.hospitalId != ''">
|
|
AND a.hospital_id = #{qcResultPageVO.hospitalId}
|
|
AND a.hospital_id = #{qcResultPageVO.hospitalId}
|
|
</if>
|
|
</if>
|
|
@@ -12774,6 +12773,10 @@
|
|
on b.is_deleted = 'N'
|
|
on b.is_deleted = 'N'
|
|
AND be.hospital_id = b.hospital_id
|
|
AND be.hospital_id = b.hospital_id
|
|
AND be.behospital_code = b.behospital_code
|
|
AND be.behospital_code = b.behospital_code
|
|
|
|
+ LEFT JOIN bas_doctor_info f
|
|
|
|
+ on be.hospital_id = f.hospital_id
|
|
|
|
+ and be.doctorName = f.name
|
|
|
|
+ AND f.is_deleted = 'N'
|
|
where
|
|
where
|
|
1=1
|
|
1=1
|
|
<if test="qcResultPageVO.level != null and qcResultPageVO.level != ''">
|
|
<if test="qcResultPageVO.level != null and qcResultPageVO.level != ''">
|
|
@@ -12786,6 +12789,9 @@
|
|
) t
|
|
) t
|
|
where
|
|
where
|
|
1=1
|
|
1=1
|
|
|
|
+ <if test="qcResultPageVO.doctorId != null and qcResultPageVO.doctorId != ''">
|
|
|
|
+ AND t.doctorId = #{qcResultPageVO.doctorId}
|
|
|
|
+ </if>
|
|
<if test="qcResultPageVO.checkStatus != null">
|
|
<if test="qcResultPageVO.checkStatus != null">
|
|
AND t.checkStatus = #{qcResultPageVO.checkStatus}
|
|
AND t.checkStatus = #{qcResultPageVO.checkStatus}
|
|
</if>
|
|
</if>
|
|
@@ -13712,6 +13718,7 @@
|
|
t.behDeptId,
|
|
t.behDeptId,
|
|
t.behDeptName,
|
|
t.behDeptName,
|
|
t.hospitalId,
|
|
t.hospitalId,
|
|
|
|
+ t.doctorId,
|
|
t.checkStatus,
|
|
t.checkStatus,
|
|
t.mrStatus,
|
|
t.mrStatus,
|
|
t.chName,
|
|
t.chName,
|
|
@@ -13738,6 +13745,7 @@
|
|
t1.placefile_date AS placefileDate,
|
|
t1.placefile_date AS placefileDate,
|
|
t1.gmt_create AS gradeTime,
|
|
t1.gmt_create AS gradeTime,
|
|
t1.diagnose,
|
|
t1.diagnose,
|
|
|
|
+ t1.doctorId,
|
|
t1.ward_name AS wardName,
|
|
t1.ward_name AS wardName,
|
|
t2.age,
|
|
t2.age,
|
|
t1.file_code AS fileCode,
|
|
t1.file_code AS fileCode,
|
|
@@ -13754,6 +13762,7 @@
|
|
b.grade_type,
|
|
b.grade_type,
|
|
b.score_res,
|
|
b.score_res,
|
|
b.gmt_create,
|
|
b.gmt_create,
|
|
|
|
+ f.doctor_id as doctorId,
|
|
ifnull(mci.status,0) AS checkStatus,
|
|
ifnull(mci.status,0) AS checkStatus,
|
|
ifnull(hm_mci.status,0) AS mrStatus,
|
|
ifnull(hm_mci.status,0) AS mrStatus,
|
|
mci.check_name as chName,
|
|
mci.check_name as chName,
|
|
@@ -13841,9 +13850,6 @@
|
|
<if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
|
|
<if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
|
|
AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
|
|
AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
|
|
</if>
|
|
</if>
|
|
- <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
|
|
|
|
- AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
|
- </if>
|
|
|
|
<if test="qcResultShortPageVO.behospitalCode != null and qcResultShortPageVO.behospitalCode != ''">
|
|
<if test="qcResultShortPageVO.behospitalCode != null and qcResultShortPageVO.behospitalCode != ''">
|
|
AND a.behospital_code LIKE CONCAT( '%', #{qcResultShortPageVO.behospitalCode}, '%' )
|
|
AND a.behospital_code LIKE CONCAT( '%', #{qcResultShortPageVO.behospitalCode}, '%' )
|
|
</if>
|
|
</if>
|
|
@@ -13890,6 +13896,10 @@
|
|
left join qc_cases_entry d
|
|
left join qc_cases_entry d
|
|
on d.is_deleted = 'N'
|
|
on d.is_deleted = 'N'
|
|
AND be.cases_id = d.cases_id
|
|
AND be.cases_id = d.cases_id
|
|
|
|
+ LEFT JOIN bas_doctor_info f
|
|
|
|
+ on be.hospital_id = f.hospital_id
|
|
|
|
+ and be.doctor_name = f.name
|
|
|
|
+ AND f.is_deleted = 'N'
|
|
<if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
|
|
<if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
|
|
AND d.NAME = #{qcResultShortPageVO.casesEntryName}
|
|
AND d.NAME = #{qcResultShortPageVO.casesEntryName}
|
|
</if>
|
|
</if>
|
|
@@ -13918,6 +13928,9 @@
|
|
AND qd.cases_entry_id = qce.id
|
|
AND qd.cases_entry_id = qce.id
|
|
</if>
|
|
</if>
|
|
where 1=1
|
|
where 1=1
|
|
|
|
+ <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
|
|
|
|
+ AND t.doctorId = #{qcResultShortPageVO.doctorId}
|
|
|
|
+ </if>
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
</if>
|
|
</if>
|
|
@@ -13965,6 +13978,7 @@
|
|
t1.`level`,
|
|
t1.`level`,
|
|
t1.checkStatus,
|
|
t1.checkStatus,
|
|
t1.mrStatus,
|
|
t1.mrStatus,
|
|
|
|
+ t1.doctorId,
|
|
t1.chName,
|
|
t1.chName,
|
|
t1.mrName,
|
|
t1.mrName,
|
|
t1.chTime,
|
|
t1.chTime,
|
|
@@ -13976,6 +13990,7 @@
|
|
b.score_res,
|
|
b.score_res,
|
|
b.`level`,
|
|
b.`level`,
|
|
b.gmt_create,
|
|
b.gmt_create,
|
|
|
|
+ f.doctor_id as doctorId,
|
|
ifnull(mci.status,0) AS checkStatus,
|
|
ifnull(mci.status,0) AS checkStatus,
|
|
ifnull(hm_mci.status,0) AS mrStatus,
|
|
ifnull(hm_mci.status,0) AS mrStatus,
|
|
mci.check_name as chName,
|
|
mci.check_name as chName,
|
|
@@ -13988,6 +14003,15 @@
|
|
a.beh_dept_id,
|
|
a.beh_dept_id,
|
|
a.beh_dept_name,
|
|
a.beh_dept_name,
|
|
a.hospital_id,
|
|
a.hospital_id,
|
|
|
|
+ case
|
|
|
|
+ when b.attending_doctor != '' and b.attending_doctor is not null then b.attending_doctor
|
|
|
|
+ when (b.attending_doctor = '' or b.attending_doctor is null) and
|
|
|
|
+ b.director_doctor != '' and b.director_doctor is not null
|
|
|
|
+ then b.director_doctor
|
|
|
|
+ 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 b.behospital_doctor end as doctor_name,
|
|
a.behospital_code
|
|
a.behospital_code
|
|
FROM
|
|
FROM
|
|
med_behospital_info a,
|
|
med_behospital_info a,
|
|
@@ -14042,9 +14066,6 @@
|
|
<if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
|
|
<if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
|
|
AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
|
|
AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
|
|
</if>
|
|
</if>
|
|
- <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
|
|
|
|
- AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
|
- </if>
|
|
|
|
<if test="qcResultShortPageVO.behospitalCode != null and qcResultShortPageVO.behospitalCode != ''">
|
|
<if test="qcResultShortPageVO.behospitalCode != null and qcResultShortPageVO.behospitalCode != ''">
|
|
AND a.behospital_code LIKE CONCAT( '%', #{qcResultShortPageVO.behospitalCode}, '%' )
|
|
AND a.behospital_code LIKE CONCAT( '%', #{qcResultShortPageVO.behospitalCode}, '%' )
|
|
</if>
|
|
</if>
|
|
@@ -14094,6 +14115,10 @@
|
|
on b.is_deleted = 'N'
|
|
on b.is_deleted = 'N'
|
|
AND be.hospital_id = b.hospital_id
|
|
AND be.hospital_id = b.hospital_id
|
|
AND be.behospital_code = b.behospital_code
|
|
AND be.behospital_code = b.behospital_code
|
|
|
|
+ LEFT JOIN bas_doctor_info f
|
|
|
|
+ on be.hospital_id = f.hospital_id
|
|
|
|
+ and be.doctor_name = f.name
|
|
|
|
+ AND f.is_deleted = 'N'
|
|
) t1
|
|
) t1
|
|
LEFT JOIN med_home_page t2 ON t1.hospital_id = t2.hospital_id
|
|
LEFT JOIN med_home_page t2 ON t1.hospital_id = t2.hospital_id
|
|
AND t1.behospital_code = t2.behospital_code
|
|
AND t1.behospital_code = t2.behospital_code
|
|
@@ -14103,6 +14128,9 @@
|
|
AND t.hospitalId = qi.hospital_id
|
|
AND t.hospitalId = qi.hospital_id
|
|
AND t.behospitalCode = qi.behospital_code
|
|
AND t.behospitalCode = qi.behospital_code
|
|
where 1=1
|
|
where 1=1
|
|
|
|
+ <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
|
|
|
|
+ AND t.doctorId = #{qcResultShortPageVO.doctorId}
|
|
|
|
+ </if>
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
</if>
|
|
</if>
|