|
@@ -22,30 +22,24 @@
|
|
|
|
|
|
<select id="getQcCasesEntry" parameterType="com.diagbot.vo.AnalyzeVO" resultType="com.diagbot.dto.QcCasesEntryDTO">
|
|
<select id="getQcCasesEntry" parameterType="com.diagbot.vo.AnalyzeVO" resultType="com.diagbot.dto.QcCasesEntryDTO">
|
|
SELECT DISTINCT
|
|
SELECT DISTINCT
|
|
- t7.`code`,t7.mode_id, t6.msg
|
|
|
|
|
|
+ t4.`code`,
|
|
|
|
+ t4.mode_id,
|
|
|
|
+ t3.msg
|
|
FROM
|
|
FROM
|
|
- med_medical_record t1,
|
|
|
|
- qc_model_hospital t2,
|
|
|
|
- med_record_type t3,
|
|
|
|
- qc_type_doc t4,
|
|
|
|
- qc_type_cases_entry t5,
|
|
|
|
- qc_cases_entry_hospital t6,
|
|
|
|
- qc_cases_entry t7
|
|
|
|
|
|
+ med_behospital_info t1,
|
|
|
|
+ qc_type_cases_entry t2,
|
|
|
|
+ qc_cases_entry_hospital t3,
|
|
|
|
+ qc_cases_entry t4
|
|
WHERE
|
|
WHERE
|
|
- t1.hospital_id = t2.hospital_id
|
|
|
|
- AND t2.stand_model_name = '入院记录'
|
|
|
|
- AND t2.hospital_model_name = t1.rec_title
|
|
|
|
- AND t3.type_name = t2.hospital_model_name
|
|
|
|
- AND t3.hospital_id = t4.hospital_id
|
|
|
|
- AND t3.type_id = t4.hospital_type_id
|
|
|
|
|
|
+ t1.qc_type_id = t2.type_id
|
|
|
|
+ AND t2.case_entry_id = t3.cases_entry_id
|
|
|
|
+ AND t1.hospital_id = t3.hospital_id
|
|
|
|
+ AND t3.cases_entry_id = t4.id
|
|
|
|
+ AND t3.is_used = 1
|
|
|
|
+ AND t1.is_deleted = 'N'
|
|
|
|
+ AND t2.is_deleted = 'N'
|
|
|
|
+ AND t3.is_deleted = 'N'
|
|
AND t4.is_deleted = 'N'
|
|
AND t4.is_deleted = 'N'
|
|
- AND t5.is_deleted = 'N'
|
|
|
|
- AND t6.is_deleted = 'N'
|
|
|
|
- AND t7.is_deleted = 'N'
|
|
|
|
- AND t4.type_id = t5.type_id
|
|
|
|
- AND t5.case_entry_id = t6.cases_entry_id
|
|
|
|
- AND t6.cases_entry_id = t7.id
|
|
|
|
- AND t6.is_used = 1
|
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
AND t1.hospital_id = #{hospitalId}
|
|
AND t1.hospital_id = #{hospitalId}
|
|
</if>
|
|
</if>
|