|
@@ -1003,7 +1003,7 @@
|
|
|
SELECT * from (
|
|
|
SELECT
|
|
|
t.*,
|
|
|
- t3.name as medoupName,
|
|
|
+ t3.name as medoup_name,
|
|
|
CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END check_status,
|
|
|
CASE WHEN ISNULL(h.status) THEN 0 ELSE h.status END mr_status,
|
|
|
g.check_type as ch_type,
|
|
@@ -4123,7 +4123,7 @@
|
|
|
<resultMap id="ExportExcelMapByDept" type="com.diagbot.dto.ExportExcelByDeptDTO">
|
|
|
<result column="behDeptName" property="behDeptName"/>
|
|
|
<result column="wardName" property="wardName"/>
|
|
|
- <result column="medoupName" property="medoupName"/>
|
|
|
+ <result column="medoup_name" property="medoupName"/>
|
|
|
<result column="doctorName" property="doctorName"/>
|
|
|
<result column="avgScore" property="avgScore"/>
|
|
|
<collection property="excelBehospitalDTOS"
|
|
@@ -4152,6 +4152,7 @@
|
|
|
<result column="doctorName" property="doctorName"/>
|
|
|
<result column="patName" property="patName"/>
|
|
|
<result column="behospitalCode" property="behospitalCode"/>
|
|
|
+ <result column="fileCode" property="fileCode"/>
|
|
|
<result column="behospitalDate" property="behospitalDate"/>
|
|
|
<result column="leaveHospitalDate" property="leaveHospitalDate"/>
|
|
|
<result column="score" property="score"/>
|
|
@@ -4221,6 +4222,7 @@
|
|
|
t1.behDeptName,
|
|
|
t1.doctorName,
|
|
|
t1.patName,
|
|
|
+ t1.fileCode,
|
|
|
t1.behospitalCode,
|
|
|
t1.hospitalId,
|
|
|
t1.behospitalDate,
|
|
@@ -4237,6 +4239,7 @@
|
|
|
SELECT
|
|
|
a.doctor_name AS doctorName,
|
|
|
a.`name` AS patName,
|
|
|
+ a.`file_code` AS fileCode,
|
|
|
a.behospital_code AS behospitalCode,
|
|
|
a.behospital_date AS behospitalDate,
|
|
|
a.leave_hospital_date AS leaveHospitalDate,
|
|
@@ -4430,7 +4433,7 @@
|
|
|
<!-- 科室质控评分导出到excel-->
|
|
|
<select id="exportQcresultByDept" resultMap="ExportExcelMapByDept" parameterType="com.diagbot.vo.ExportQcresultVO">
|
|
|
SELECT * FROM (
|
|
|
- SELECT tp.*,t3.name as medoupName,CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END check_status,
|
|
|
+ SELECT tp.*,t3.name as medoup_name,CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END check_status,
|
|
|
CASE WHEN ISNULL(h.status) THEN 0 ELSE h.status END mr_status,
|
|
|
g.check_type AS ch_type,
|
|
|
h.check_type AS mr_type,
|
|
@@ -4447,6 +4450,7 @@
|
|
|
t1.patName,
|
|
|
t1.wardName,
|
|
|
t1.behospitalCode,
|
|
|
+ t1.fileCode,
|
|
|
t1.hospitalId,
|
|
|
t1.behospitalDate,
|
|
|
t1.leaveHospitalDate,
|
|
@@ -4464,6 +4468,7 @@
|
|
|
a.doctor_id,
|
|
|
a.`name` AS patName,
|
|
|
a.ward_name as wardName,
|
|
|
+ a.file_code as fileCode,
|
|
|
a.behospital_code AS behospitalCode,
|
|
|
a.hospital_id AS hospital_id,
|
|
|
a.behospital_date AS behospitalDate,
|
|
@@ -7347,7 +7352,7 @@
|
|
|
<!-- 离院病人评分详情页-科室-->
|
|
|
<select id="leaveHosMRPageByDept" resultType="com.diagbot.dto.QcResultShortDeptDTO">
|
|
|
SELECT
|
|
|
- t.*,t3.name as medoupName
|
|
|
+ t.*
|
|
|
FROM
|
|
|
(SELECT DISTINCT
|
|
|
t1.hospital_id AS hospitalId,
|
|
@@ -7373,6 +7378,7 @@
|
|
|
t1.placefile_date AS placefileDate,
|
|
|
t1.gmt_create AS gradeTime,
|
|
|
t1.diagnose,
|
|
|
+ t1.medoupName,
|
|
|
t1.ward_name AS wardName,
|
|
|
t1.checkStatus,
|
|
|
t1.mrStatus,
|
|
@@ -7385,6 +7391,7 @@
|
|
|
FROM
|
|
|
(
|
|
|
SELECT be.*,
|
|
|
+ t3.name as medoupName,
|
|
|
ifnull(mci.status,0) AS checkStatus,
|
|
|
ifnull(hm_mci.status,0) AS mrStatus,
|
|
|
mci.check_name as chName,
|
|
@@ -7518,6 +7525,11 @@
|
|
|
and be.hospital_id = e.hospital_id
|
|
|
AND e.is_deleted = 'N'
|
|
|
and e.cases_id = 243
|
|
|
+ LEFT JOIN bas_doctor_info t2 ON be.doctor_id = t2.doctor_id
|
|
|
+ and be.hospital_id = t2.hospital_id
|
|
|
+ AND t2.is_deleted = 'N'
|
|
|
+ LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
|
|
|
+ AND t3.is_deleted = 'N'
|
|
|
)t1
|
|
|
<if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==2">
|
|
|
,med_home_page t2
|
|
@@ -7559,16 +7571,10 @@
|
|
|
AND t1.hospital_id = t2.hospital_id
|
|
|
AND t1.behospital_code = t2.behospital_code
|
|
|
</if>
|
|
|
- )t LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_id
|
|
|
- AND t2.is_deleted = 'N'
|
|
|
- LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
|
|
|
- AND t3.is_deleted = 'N'
|
|
|
+ )t
|
|
|
where 1=1
|
|
|
- <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
- AND t2.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
- </if>
|
|
|
<if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName != ''">
|
|
|
- AND t3.name LIKE CONCAT( '%', #{qcResultShortPageVO.medoupName}, '%' )
|
|
|
+ AND t.medoupName LIKE CONCAT( '%', #{qcResultShortPageVO.medoupName}, '%' )
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
|
and t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
@@ -11965,7 +11971,7 @@
|
|
|
|
|
|
<!-- 未整改病历质控评分页-科室(内页)-->
|
|
|
<select id="unModifyMRByDept" resultType="com.diagbot.dto.QcResultShortDeptDTO">
|
|
|
- SELECT t.*,t3.name as medoupName
|
|
|
+ SELECT t.*
|
|
|
FROM
|
|
|
(SELECT DISTINCT
|
|
|
t1.hospital_id AS hospitalId,
|
|
@@ -11991,6 +11997,7 @@
|
|
|
t1.placefile_date AS placefileDate,
|
|
|
t1.gmt_create AS gradeTime,
|
|
|
t1.diagnose,
|
|
|
+ t1.medoupName,
|
|
|
t1.ward_name AS wardName,
|
|
|
CONCAT( ifnull(t2.age,'') ,ifnull(t2.age_unit,'') )as age,
|
|
|
t1.file_code AS fileCode,
|
|
@@ -12003,6 +12010,7 @@
|
|
|
FROM
|
|
|
(SELECT
|
|
|
be.*,
|
|
|
+ t3.name as medoupName,
|
|
|
ifnull(mci.status,0) AS checkStatus,
|
|
|
ifnull(hm_mci.status,0) AS mrStatus,
|
|
|
mci.check_name as chName,
|
|
@@ -12105,14 +12113,10 @@
|
|
|
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}, '%' )
|
|
|
- OR a.director_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' ))
|
|
|
+ AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.casesEntryId != null ">
|
|
|
AND d.id = #{qcResultShortPageVO.casesEntryId}
|
|
@@ -12139,21 +12143,22 @@
|
|
|
and be.hospital_id = e.hospital_id
|
|
|
AND e.is_deleted = 'N'
|
|
|
and e.cases_id = 243
|
|
|
+ LEFT JOIN bas_doctor_info t2 ON be.doctor_id = t2.doctor_id
|
|
|
+ and be.hospital_id = t2.hospital_id
|
|
|
+ AND t2.is_deleted = 'N'
|
|
|
+ LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
|
|
|
+ AND t3.is_deleted = 'N'
|
|
|
) t1
|
|
|
LEFT JOIN med_home_page t2 ON t1.hospital_id = t2.hospital_id
|
|
|
AND t1.behospital_code = t2.behospital_code
|
|
|
AND t2.is_deleted = 'N'
|
|
|
- ) t LEFT JOIN bas_doctor_info t2 ON t.doctorId = t2.doctor_id
|
|
|
- AND t.hospitalId = t2.hospital_id
|
|
|
- AND t2.is_deleted = 'N'
|
|
|
- LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
|
|
|
- AND t3.is_deleted = 'N'
|
|
|
+ ) t
|
|
|
where 1=1
|
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
|
AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.medoupName != null and qcResultShortPageVO.medoupName!=''">
|
|
|
- AND t3.name like concat('%', #{qcResultShortPageVO.medoupName}, '%')
|
|
|
+ AND t.medoupName like concat('%', #{qcResultShortPageVO.medoupName}, '%')
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.mrStatus != null">
|
|
|
AND t.mrStatus = #{qcResultShortPageVO.mrStatus}
|