需求104
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
AND t1.pat_name LIKE CONCAT('%', #{param.patientName}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND t1.status = #{param.status}
|
||||
AND t1.status::INTEGER = #{param.status}
|
||||
</if>
|
||||
<if test="param.registrationSource != null">
|
||||
AND t1.registration_source = #{param.registrationSource}
|
||||
@@ -150,4 +150,106 @@
|
||||
WHERE t1.delete_flag = '0' AND t1.card_no = #{cardNo}
|
||||
</select>
|
||||
|
||||
<!-- 审核传染病报卡 -->
|
||||
<update id="auditCard">
|
||||
UPDATE infectious_card
|
||||
SET status = #{status}::INTEGER,
|
||||
update_time = CURRENT_TIMESTAMP
|
||||
WHERE card_no = #{cardNo}
|
||||
</update>
|
||||
|
||||
<!-- 退回传染病报卡 -->
|
||||
<update id="returnCard">
|
||||
UPDATE infectious_card
|
||||
SET status = #{status}::INTEGER,
|
||||
return_reason = #{returnReason},
|
||||
update_time = CURRENT_TIMESTAMP
|
||||
WHERE card_no = #{cardNo}
|
||||
</update>
|
||||
|
||||
<!-- 查询所有报卡数据(用于导出) -->
|
||||
<select id="selectAllCards" resultType="com.openhis.web.reportManagement.dto.InfectiousCardDto">
|
||||
SELECT
|
||||
t1.card_no AS cardNo,
|
||||
'传染病报告卡' AS cardName,
|
||||
t1.disease_code AS diseaseCode,
|
||||
CASE
|
||||
WHEN t1.disease_code = '0101' THEN '鼠疫'
|
||||
WHEN t1.disease_code = '0102' THEN '霍乱'
|
||||
WHEN t1.disease_code = '0201' THEN '传染性非典型肺炎'
|
||||
WHEN t1.disease_code = '0202' THEN '艾滋病'
|
||||
WHEN t1.disease_code = '0203' THEN '病毒性肝炎'
|
||||
WHEN t1.disease_code = '0211' THEN '炭疽'
|
||||
WHEN t1.disease_code = '0213' THEN '肺结核'
|
||||
WHEN t1.disease_code = '0222' THEN '梅毒'
|
||||
WHEN t1.disease_code = '0224' THEN '血吸虫病'
|
||||
WHEN t1.disease_code = '0225' THEN '疟疾'
|
||||
WHEN t1.disease_code = '0301' THEN '流行性感冒'
|
||||
WHEN t1.disease_code = '0302' THEN '流行性腮腺炎'
|
||||
WHEN t1.disease_code = '0303' THEN '风疹'
|
||||
WHEN t1.disease_code = '0310' THEN '其它感染性腹泻病'
|
||||
WHEN t1.disease_code = '0311' THEN '手足口病'
|
||||
ELSE t1.disease_code
|
||||
END AS diseaseName,
|
||||
t1.pat_name AS patientName,
|
||||
t1.sex AS sex,
|
||||
t1.age AS age,
|
||||
t1.dept_id AS deptId,
|
||||
t2.name AS deptName,
|
||||
t1.registration_source AS registrationSource,
|
||||
t1.report_date AS reportDate,
|
||||
t1.status AS status,
|
||||
t1.id_type AS idType,
|
||||
t1.id_no AS idNo,
|
||||
t1.parent_name AS parentName,
|
||||
t1.birthday AS birthday,
|
||||
t1.age_unit AS ageUnit,
|
||||
t1.workplace AS workplace,
|
||||
t1.phone AS phone,
|
||||
t1.contact_phone AS contactPhone,
|
||||
t1.address_prov AS addressProv,
|
||||
t1.address_city AS addressCity,
|
||||
t1.address_county AS addressCounty,
|
||||
t1.address_town AS addressTown,
|
||||
t1.address_village AS addressVillage,
|
||||
t1.address_house AS addressHouse,
|
||||
t1.patient_belong AS patientBelong,
|
||||
t1.occupation AS occupation,
|
||||
t1.disease_type AS diseaseType,
|
||||
t1.case_class AS caseClass,
|
||||
t1.onset_date AS onsetDate,
|
||||
t1.diag_date AS diagDate,
|
||||
t1.death_date AS deathDate,
|
||||
t1.report_org AS reportOrg,
|
||||
t1.report_doc AS reportDoc,
|
||||
t1.withdraw_reason AS withdrawReason,
|
||||
t1.correct_name AS correctName,
|
||||
t1.other_disease AS otherDisease
|
||||
FROM infectious_card t1
|
||||
LEFT JOIN adm_organization t2 ON t1.dept_id = t2.id
|
||||
WHERE t1.delete_flag = '0'
|
||||
<if test="param.cardNo != null and param.cardNo != ''">
|
||||
AND t1.card_no = #{param.cardNo}
|
||||
</if>
|
||||
<if test="param.patientName != null and param.patientName != ''">
|
||||
AND t1.pat_name LIKE CONCAT('%', #{param.patientName}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND t1.status::INTEGER = #{param.status}
|
||||
</if>
|
||||
<if test="param.registrationSource != null">
|
||||
AND t1.registration_source = #{param.registrationSource}
|
||||
</if>
|
||||
<if test="param.deptId != null">
|
||||
AND t1.dept_id = #{param.deptId}
|
||||
</if>
|
||||
<if test="param.startDate != null and param.startDate != ''">
|
||||
AND t1.report_date >= TO_DATE(#{param.startDate}, 'YYYY-MM-DD')
|
||||
</if>
|
||||
<if test="param.endDate != null and param.endDate != ''">
|
||||
AND t1.report_date <= TO_DATE(#{param.endDate}, 'YYYY-MM-DD')
|
||||
</if>
|
||||
ORDER BY t1.report_date DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user