|
@@ -478,7 +478,7 @@
|
|
|
IFNULL(a.doctor_name, ''),
|
|
|
IFNULL(a.beh_doctor_name, ''),
|
|
|
IFNULL(a.director_doctor_name, '')
|
|
|
- ) LIKE CONCAT('%', u1.linkman, '%')
|
|
|
+ ) = CONCAT('%', u1.linkman, '%')
|
|
|
) t
|
|
|
LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
|
|
|
ON t.behospital_code = g.behospital_code
|
|
@@ -2792,10 +2792,7 @@
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
- CONCAT(
|
|
|
- ( CASE WHEN a.director_doctor_name IS NOT NULL AND a.director_doctor_name != '' THEN concat( a.director_doctor_name, '\n' ) ELSE '' END ),
|
|
|
- a.doctor_name
|
|
|
- ) AS behDoctorName,
|
|
|
+ a.doctor_name AS behDoctorName,
|
|
|
a.`name` AS patName,
|
|
|
a.behospital_code AS behospitalCode,
|
|
|
a.behospital_date AS behospitalDate,
|
|
@@ -2992,10 +2989,7 @@
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
- CONCAT(
|
|
|
- ( CASE WHEN a.director_doctor_name IS NOT NULL AND a.director_doctor_name != '' THEN concat( a.director_doctor_name, '\n' ) ELSE '' END ),
|
|
|
- a.doctor_name
|
|
|
- ) AS behDoctorName,
|
|
|
+ a.doctor_name AS behDoctorName,
|
|
|
a.`name` AS patName,
|
|
|
a.behospital_code AS behospitalCode,
|
|
|
a.behospital_date AS behospitalDate,
|
|
@@ -3206,10 +3200,7 @@
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
- CONCAT(
|
|
|
- ( CASE WHEN a.director_doctor_name IS NOT NULL AND a.director_doctor_name != '' THEN concat( a.director_doctor_name, '\n' ) ELSE '' END ),
|
|
|
- a.doctor_name
|
|
|
- ) AS behDoctorName,
|
|
|
+ a.doctor_name AS behDoctorName,
|
|
|
a.`name` AS patName,
|
|
|
a.behospital_code AS behospitalCode,
|
|
|
a.behospital_date AS behospitalDate,
|
|
@@ -5343,11 +5334,7 @@
|
|
|
f1.mrTime
|
|
|
FROM
|
|
|
(SELECT
|
|
|
- CONCAT(
|
|
|
- ( CASE WHEN t.directorDoctorName IS NOT NULL AND t.directorDoctorName != '' THEN concat( t.directorDoctorName,
|
|
|
- '\n' ) ELSE '' END ),
|
|
|
- t.doctorName
|
|
|
- ) AS behDoctorName,
|
|
|
+ t.doctorName AS behDoctorName,
|
|
|
t.`name` AS patName,
|
|
|
t.behospitalCode AS behospitalCode,
|
|
|
t.behospitalDate AS behospitalDate,
|
|
@@ -5834,7 +5821,7 @@
|
|
|
f1.mrTime
|
|
|
FROM
|
|
|
(SELECT
|
|
|
- CONCAT( ifnull( t.directorDoctorName, '' ), '\n', t.doctorName ) AS behDoctorName,
|
|
|
+ t.doctorName AS behDoctorName,
|
|
|
t.`name` AS patName,
|
|
|
t.behospitalCode AS behospitalCode,
|
|
|
t.behospitalDate AS behospitalDate,
|
|
@@ -6066,6 +6053,9 @@
|
|
|
AND t.behospitalCode = qd.behospital_code
|
|
|
LEFT JOIN qc_cases qc ON qc.is_deleted = 'N'
|
|
|
AND qd.cases_id = qc.id
|
|
|
+ LEFT JOIN qc_cases_entry qce ON qce.is_deleted = 'N'
|
|
|
+ AND qd.cases_id = qce.cases_id
|
|
|
+ AND qd.cases_entry_id = qce.id
|
|
|
where 1=1
|
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
|
AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
@@ -6091,6 +6081,18 @@
|
|
|
<if test="qcResultShortPageVO.mrTimeEnd != null ">
|
|
|
<![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
|
|
|
+ AND qce.NAME = #{qcResultShortPageVO.casesEntryName}
|
|
|
+ </if>
|
|
|
+ <if test="qcResultShortPageVO.casesEntryId != null ">
|
|
|
+ AND qce.id = #{qcResultShortPageVO.casesEntryId}
|
|
|
+ </if>
|
|
|
+ <if test="qcResultShortPageVO.casesName != null and qcResultShortPageVO.casesName != ''">
|
|
|
+ AND qce.cases_name = #{qcResultShortPageVO.casesName}
|
|
|
+ </if>
|
|
|
+ <if test="qcResultShortPageVO.casesId != null">
|
|
|
+ AND qce.cases_id = #{qcResultShortPageVO.casesId}
|
|
|
+ </if>
|
|
|
)f1,
|
|
|
(SELECT
|
|
|
ROUND( AVG( qi.score_res ), 2 ) AS avgScore,
|
|
@@ -6613,7 +6615,7 @@
|
|
|
f1.mrTime
|
|
|
FROM
|
|
|
(SELECT
|
|
|
- CONCAT( ifnull( t.directorDoctorName, '' ), '\n', t.doctorName ) AS behDoctorName,
|
|
|
+ t.doctorName AS behDoctorName,
|
|
|
t.`name` AS patName,
|
|
|
t.behospitalCode AS behospitalCode,
|
|
|
t.behospitalDate AS behospitalDate,
|
|
@@ -6750,9 +6752,6 @@
|
|
|
<if test="qcResultShortPageVO.patName != null and qcResultShortPageVO.patName != ''">
|
|
|
AND a.NAME LIKE CONCAT( '%', #{qcResultShortPageVO.patName}, '%' )
|
|
|
</if>
|
|
|
- <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
|
|
|
- AND d.NAME = #{qcResultShortPageVO.casesEntryName}
|
|
|
- </if>
|
|
|
<if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
|
|
|
AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
|
OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
@@ -6763,6 +6762,9 @@
|
|
|
OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
|
|
|
+ AND d.NAME = #{qcResultShortPageVO.casesEntryName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.casesEntryId != null ">
|
|
|
AND d.id = #{qcResultShortPageVO.casesEntryId}
|
|
|
</if>
|
|
@@ -6796,6 +6798,9 @@
|
|
|
AND t.behospitalCode = qd.behospital_code
|
|
|
LEFT JOIN qc_cases qc ON qc.is_deleted = 'N'
|
|
|
AND qd.cases_id = qc.id
|
|
|
+ LEFT JOIN qc_cases_entry qce ON qce.is_deleted = 'N'
|
|
|
+ AND qd.cases_id = qce.cases_id
|
|
|
+ AND qd.cases_entry_id = qce.id
|
|
|
where 1=1
|
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
|
AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
@@ -6821,6 +6826,12 @@
|
|
|
<if test="qcResultShortPageVO.mrTimeEnd != null ">
|
|
|
<![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
|
|
|
+ AND qce.NAME = #{qcResultShortPageVO.casesEntryName}
|
|
|
+ </if>
|
|
|
+ <if test="qcResultShortPageVO.casesEntryId != null ">
|
|
|
+ AND qce.id = #{qcResultShortPageVO.casesEntryId}
|
|
|
+ </if>
|
|
|
)f1,
|
|
|
(SELECT
|
|
|
ROUND( AVG( qi.score_res ), 2 ) AS avgScore,
|
|
@@ -7814,7 +7825,7 @@
|
|
|
f1.mrTime
|
|
|
FROM
|
|
|
(SELECT
|
|
|
- CONCAT( ifnull( t.directorDoctorName, '' ), '\n', t.doctorName ) AS behDoctorName,
|
|
|
+ t.doctorName AS behDoctorName,
|
|
|
t.`name` AS patName,
|
|
|
t.behospitalCode AS behospitalCode,
|
|
|
t.behospitalDate AS behospitalDate,
|
|
@@ -8349,7 +8360,7 @@
|
|
|
f1.mrTime
|
|
|
FROM
|
|
|
(SELECT
|
|
|
- CONCAT( ifnull( t.directorDoctorName, '' ), '\n', t.doctorName ) AS behDoctorName,
|
|
|
+ t.doctorName AS behDoctorName,
|
|
|
t.`name` AS patName,
|
|
|
t.behospitalCode AS behospitalCode,
|
|
|
t.behospitalDate AS behospitalDate,
|