|
@@ -2265,6 +2265,8 @@
|
|
|
|
|
|
<!-- 质控评分导出到excel-->
|
|
|
<select id="exportQcresult" resultMap="ExportExcelMap" parameterType="com.diagbot.vo.ExportQcresultVO">
|
|
|
+ SELECT * FROM (
|
|
|
+ SELECT tp.*,CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END checkStatus FROM (
|
|
|
SELECT
|
|
|
t1.behDeptId,
|
|
|
t1.behDeptName,
|
|
@@ -2400,11 +2402,24 @@
|
|
|
t1.behDoctorName,
|
|
|
t1.patName,
|
|
|
t1.behospitalCode,
|
|
|
- t1.caseName
|
|
|
+ t1.caseName)tp LEFT JOIN
|
|
|
+ (SELECT
|
|
|
+ *
|
|
|
+ FROM
|
|
|
+ med_check_info
|
|
|
+ WHERE is_deleted = 'N') g
|
|
|
+ ON tp.behospitalCode = g.behospital_code
|
|
|
+ AND tp.hospitalId = g.hospital_id ) tu
|
|
|
+ where tu.checkStatus is not null
|
|
|
+ <if test="checkStatus != null ">
|
|
|
+ and tu.checkStatus = #{checkStatus}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<!-- 科室质控评分导出到excel-->
|
|
|
<select id="exportQcresultByDept" resultMap="ExportExcelMap" parameterType="com.diagbot.vo.ExportQcresultVO">
|
|
|
+ SELECT * FROM (
|
|
|
+ SELECT tp.*,CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END checkStatus FROM (
|
|
|
SELECT
|
|
|
t1.behDeptId,
|
|
|
t1.behDeptName,
|
|
@@ -2554,11 +2569,24 @@
|
|
|
t1.behDoctorName,
|
|
|
t1.patName,
|
|
|
t1.behospitalCode,
|
|
|
- t1.caseName
|
|
|
+ t1.caseName)tp LEFT JOIN
|
|
|
+ (SELECT
|
|
|
+ *
|
|
|
+ FROM
|
|
|
+ med_check_info
|
|
|
+ WHERE is_deleted = 'N') g
|
|
|
+ ON tp.behospitalCode = g.behospital_code
|
|
|
+ AND tp.hospitalId = g.hospital_id ) tu
|
|
|
+ where tu.checkStatus is not null
|
|
|
+ <if test="checkStatus != null ">
|
|
|
+ and tu.checkStatus = #{checkStatus}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<!-- 医疗组质控评分导出到excel-->
|
|
|
<select id="exportQcresultByGroup" resultMap="ExportExcelMap" parameterType="com.diagbot.vo.ExportQcresultVO">
|
|
|
+ SELECT * FROM (
|
|
|
+ SELECT tp.*,CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END checkStatus FROM (
|
|
|
SELECT
|
|
|
t1.behDeptId,
|
|
|
t1.behDeptName,
|
|
@@ -2714,7 +2742,18 @@
|
|
|
t1.behDoctorName,
|
|
|
t1.patName,
|
|
|
t1.behospitalCode,
|
|
|
- t1.caseName
|
|
|
+ t1.caseName)tp LEFT JOIN
|
|
|
+ (SELECT
|
|
|
+ *
|
|
|
+ FROM
|
|
|
+ med_check_info
|
|
|
+ WHERE is_deleted = 'N') g
|
|
|
+ ON tp.behospitalCode = g.behospital_code
|
|
|
+ AND tp.hospitalId = g.hospital_id ) tu
|
|
|
+ WHERE tu.checkStatus IS NOT NULL
|
|
|
+ <if test="checkStatus != null ">
|
|
|
+ and tu.checkStatus = #{checkStatus}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<!-- 条目缺陷质控评分页(内页)-->
|