|
@@ -808,9 +808,17 @@
|
|
|
FROM
|
|
|
med_behospital_info a,
|
|
|
med_home_page e,
|
|
|
- med_home_operation_info f
|
|
|
+ med_home_operation_info f,
|
|
|
+ med_medical_record tt2,
|
|
|
+ qc_mode tt3
|
|
|
WHERE a.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
+ and tt2.is_deleted = 'N'
|
|
|
+ AND tt3.is_deleted = 'N'
|
|
|
+ AND a.hospital_id = tt2.hospital_id
|
|
|
+ AND a.behospital_code = tt2.behospital_code
|
|
|
+ AND tt2.mode_id = tt3.id
|
|
|
+ AND tt3.`name` = '手术记录'
|
|
|
AND f.is_deleted = 'N'
|
|
|
AND a.hospital_id = e.hospital_id
|
|
|
AND a.hospital_id = f.hospital_id
|
|
@@ -841,17 +849,17 @@
|
|
|
</if>
|
|
|
</if>
|
|
|
group by a.behospital_code
|
|
|
- ) a where a+b+c+d >0
|
|
|
+ ) a
|
|
|
</select>
|
|
|
|
|
|
<!-- 预处理病案首页手术数据 -->
|
|
|
<update id="preHomeOperation" >
|
|
|
- update med_home_operation_info a,(select home_page_id,GROUP_CONCAT(g.ssdj) ssdj
|
|
|
+ update med_home_operation_info a,(select home_page_id,operation_order_no,GROUP_CONCAT(g.ssdj) ssdj
|
|
|
from med_home_operation_info f
|
|
|
- left join kl_operative_9 g on LOCATE(g.ssbm,f.operation_code) >0 and (lbbm='04' or lbbm='03')
|
|
|
+ left join kl_operative_9 g on LOCATE(concat('[',g.ssbm,']'),concat('[',f.operation_code,']')) >0 and (lbbm='04' or lbbm='03')
|
|
|
where f.operation_code is not null and f.operation_code !='[]' and (f.flag =0 or f.flag is null)
|
|
|
- group by home_page_id
|
|
|
- ) b set a.ssdj=b.ssdj,a.flag=1 where a.home_page_id=b.home_page_id
|
|
|
+ group by home_page_id,operation_order_no
|
|
|
+ ) b set a.ssdj=b.ssdj,a.flag=1 where a.home_page_id=b.home_page_id and a.operation_order_no=b.operation_order_no
|
|
|
</update>
|
|
|
|
|
|
<!-- 入院人数统计-首页 -->
|
|
@@ -5246,7 +5254,7 @@
|
|
|
<if test='qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile == "1" and qcResultShortPageVO.hospitalId == "7"'>
|
|
|
,
|
|
|
GROUP_CONCAT(case when t4.operation_doctor_id is not null then t4.operation_doctor_id else '' end separator ',') AS operationDoctorName,
|
|
|
- t4.ssdj AS operationLevel
|
|
|
+ ifnull(GROUP_CONCAT(t4.ssdj),'') AS operationLevel
|
|
|
</if>
|
|
|
FROM
|
|
|
(SELECT
|
|
@@ -10455,10 +10463,11 @@
|
|
|
<select id="cancerCount" resultType="int" parameterType="com.diagbot.vo.FilterVO">
|
|
|
SELECT count(1) from (
|
|
|
select a.behospital_code
|
|
|
- FROM med_behospital_info a,med_home_page b
|
|
|
+ FROM med_behospital_info a,med_home_page b, med_home_operation_info t4
|
|
|
WHERE a.hospital_id=b.hospital_id and a.behospital_code=b.behospital_code
|
|
|
AND a.qc_type_id != 0 and a.is_deleted = 'N' and b.is_deleted = 'N'
|
|
|
- and (b.outpatient_emr_diagnose_code like 'C%')
|
|
|
+ and (b.outpatient_emr_diagnose_code like 'C%') AND b.home_page_id = t4.home_page_id AND t4.operation_code IS NOT NULL AND t4.operation_code != '[]'
|
|
|
+ AND a.hospital_id = t4.hospital_id
|
|
|
<if test="isPlacefile != null and isPlacefile != ''">
|
|
|
and a.is_placefile = #{isPlacefile}
|
|
|
</if>
|