|
@@ -2268,9 +2268,10 @@
|
|
|
and a.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
|
AND a.qc_type_id != 0
|
|
|
- <if test="hospitalId != null and hospitalId != ''">
|
|
|
- AND a.hospital_id = #{hospitalId}
|
|
|
- </if>
|
|
|
+<!-- <if test="hospitalId != null and hospitalId != ''">-->
|
|
|
+<!-- AND a.hospital_id = #{hospitalId}-->
|
|
|
+<!-- </if>-->
|
|
|
+ <include refid="hospitalIdChoose"/>
|
|
|
<if test="isPlacefile != null and isPlacefile == 0">
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
<![CDATA[ AND a.behospital_date >= #{startDate}]]>
|
|
@@ -2322,9 +2323,10 @@
|
|
|
and a.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
|
AND a.qc_type_id != 0
|
|
|
- <if test="hospitalId != null and hospitalId != ''">
|
|
|
+ <!--<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
- </if>
|
|
|
+ </if>-->
|
|
|
+ <include refid="hospitalIdChoose"/>
|
|
|
<if test="isPlacefile != null and isPlacefile == 0">
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
<![CDATA[ AND a.behospital_date >= #{startDate}]]>
|
|
@@ -2399,9 +2401,10 @@
|
|
|
and a.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
|
AND a.qc_type_id != 0
|
|
|
- <if test="hospitalId != null and hospitalId != ''">
|
|
|
+ <!-- <if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
- </if>
|
|
|
+ </if>-->
|
|
|
+ <include refid="hospitalIdChoose"/>
|
|
|
<if test="isPlacefile != null and isPlacefile == 0">
|
|
|
<if test="lastStartDate != null and lastStartDate != ''">
|
|
|
<![CDATA[ AND a.behospital_date >= #{lastStartDate}]]>
|
|
@@ -2453,9 +2456,10 @@
|
|
|
and a.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
|
AND a.qc_type_id != 0
|
|
|
- <if test="hospitalId != null and hospitalId != ''">
|
|
|
+ <!--<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
- </if>
|
|
|
+ </if>-->
|
|
|
+ <include refid="hospitalIdChoose"/>
|
|
|
<if test="isPlacefile != null and isPlacefile == 0">
|
|
|
<if test="lastStartDate != null and lastStartDate != ''">
|
|
|
<![CDATA[ AND a.behospital_date >= #{lastStartDate}]]>
|
|
@@ -3308,9 +3312,12 @@
|
|
|
and a.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
|
AND a.qc_type_id != 0
|
|
|
- <if test="hospitalId != null and hospitalId != ''">
|
|
|
- AND a.hospital_id = #{hospitalId}
|
|
|
- </if>
|
|
|
+<!-- <if test="hospitalId != null and hospitalId != ''">-->
|
|
|
+<!-- AND a.hospital_id = #{hospitalId}-->
|
|
|
+<!-- </if>-->
|
|
|
+ <include refid="hospitalIdChoose"/>
|
|
|
+
|
|
|
+
|
|
|
<if test="isPlacefile != null and isPlacefile == 0">
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
<![CDATA[ AND a.behospital_date >= #{startDate}]]>
|
|
@@ -3364,9 +3371,10 @@
|
|
|
and a.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
|
AND a.qc_type_id != 0
|
|
|
- <if test="hospitalId != null and hospitalId != ''">
|
|
|
- AND a.hospital_id = #{hospitalId}
|
|
|
- </if>
|
|
|
+<!-- <if test="hospitalId != null and hospitalId != ''">-->
|
|
|
+<!-- AND a.hospital_id = #{hospitalId}-->
|
|
|
+<!-- </if>-->
|
|
|
+ <include refid="hospitalIdChoose"/>
|
|
|
<if test="isPlacefile != null and isPlacefile == 0">
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
<![CDATA[ AND a.behospital_date >= #{startDate}]]>
|
|
@@ -3435,9 +3443,10 @@
|
|
|
</if>
|
|
|
AND d.cases_id = 243
|
|
|
AND a.qc_type_id != 0
|
|
|
- <if test="hospitalId != null and hospitalId != ''">
|
|
|
+ <!--<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
- </if>
|
|
|
+ </if>-->
|
|
|
+ <include refid="hospitalIdChoose"/>
|
|
|
<if test="isPlacefile != null and isPlacefile == 0">
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
<![CDATA[ AND a.behospital_date >= #{startDate}]]>
|
|
@@ -3530,6 +3539,37 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <sql id="hospitalIdChoose">
|
|
|
+ <choose>
|
|
|
+ <when test="organizationName != null and organizationName != ''">
|
|
|
+ <choose>
|
|
|
+ <when test="organizationName == '邵逸夫'">
|
|
|
+ AND a.hospital_id = 2
|
|
|
+ </when>
|
|
|
+ <when test="organizationName == '浙江大学附属第一医院'">
|
|
|
+ AND a.hospital_id = 3
|
|
|
+ </when>
|
|
|
+ <when test="organizationName == '七院'">
|
|
|
+ AND a.hospital_id = 14
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ <choose>
|
|
|
+ <when test="organizationType == '综合医院'">
|
|
|
+ AND a.hospital_id IN (2, 3)
|
|
|
+ </when>
|
|
|
+ <when test="organizationType == '专科医院'">
|
|
|
+ AND a.hospital_id = 14
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ AND a.hospital_id IN (2, 3, 14)
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </sql>
|
|
|
+
|
|
|
<!-- 医师病案首页合格率占比 湘雅定制-->
|
|
|
<select id="homePageLevelStatisticsXY" resultType="com.diagbot.dto.HomePageNumXYDTO">
|
|
|
SELECT
|