Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
is_stopped,
|
||||
stop_reason,
|
||||
dept_id,
|
||||
reg_type,
|
||||
doctor_id
|
||||
<if test="createTime != null">, create_time</if>
|
||||
<if test="updateTime != null">, update_time</if>
|
||||
@@ -43,6 +44,7 @@
|
||||
#{isStopped},
|
||||
#{stopReason},
|
||||
#{deptId},
|
||||
#{regType},
|
||||
#{doctorId}
|
||||
<if test="createTime != null">, #{createTime}</if>
|
||||
<if test="updateTime != null">, #{updateTime}</if>
|
||||
@@ -68,6 +70,7 @@
|
||||
<if test="isStopped != null">is_stopped = #{isStopped},</if>
|
||||
<if test="stopReason != null">stop_reason = #{stopReason},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="regType != null">reg_type = #{regType},</if>
|
||||
<if test="doctorId != null">doctor_id = #{doctorId},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime}</if>
|
||||
</set>
|
||||
@@ -97,12 +100,16 @@
|
||||
ds.is_stopped AS is_stopped,
|
||||
ds.stop_reason AS stop_reason,
|
||||
ds.dept_id AS dept_id,
|
||||
ds.reg_type AS reg_type,
|
||||
sp.doctor_id AS doctor_id,
|
||||
sp.schedule_date AS schedule_date
|
||||
FROM adm_doctor_schedule ds
|
||||
LEFT JOIN adm_schedule_pool sp ON sp.schedule_id = ds.id
|
||||
AND sp.delete_flag = '0'
|
||||
LEFT JOIN adm_organization org ON ds.dept_id = org.id
|
||||
AND org.delete_flag = '0'
|
||||
WHERE ds.dept_id = #{deptId}
|
||||
AND ds.delete_flag = '0'
|
||||
AND sp.schedule_date BETWEEN #{startDate}::date AND #{endDate}::date
|
||||
ORDER BY sp.schedule_date, ds.time_period
|
||||
</select>
|
||||
@@ -129,12 +136,16 @@
|
||||
ds.is_stopped AS is_stopped,
|
||||
ds.stop_reason AS stop_reason,
|
||||
ds.dept_id AS dept_id,
|
||||
ds.reg_type AS reg_type,
|
||||
sp.doctor_id AS doctor_id,
|
||||
sp.schedule_date AS schedule_date
|
||||
FROM adm_doctor_schedule ds
|
||||
INNER JOIN adm_schedule_pool sp ON sp.schedule_id = ds.id
|
||||
AND sp.delete_flag = '0'
|
||||
LEFT JOIN adm_organization org ON ds.dept_id = org.id
|
||||
AND org.delete_flag = '0'
|
||||
WHERE sp.schedule_date = #{today}::date
|
||||
AND ds.delete_flag = '0'
|
||||
AND (ds.is_stopped = false OR ds.is_stopped IS NULL)
|
||||
ORDER BY ds.time_period
|
||||
</select>
|
||||
@@ -161,12 +172,16 @@
|
||||
ds.is_stopped AS is_stopped,
|
||||
ds.stop_reason AS stop_reason,
|
||||
ds.dept_id AS dept_id,
|
||||
ds.reg_type AS reg_type,
|
||||
sp.doctor_id AS doctor_id,
|
||||
sp.schedule_date AS schedule_date
|
||||
FROM adm_doctor_schedule ds
|
||||
INNER JOIN adm_schedule_pool sp ON sp.schedule_id = ds.id
|
||||
AND sp.delete_flag = '0'
|
||||
LEFT JOIN adm_organization org ON ds.dept_id = org.id
|
||||
AND org.delete_flag = '0'
|
||||
WHERE sp.schedule_date = #{today}::date
|
||||
AND ds.delete_flag = '0'
|
||||
AND sp.doctor_id = #{doctorId}
|
||||
AND (ds.is_stopped = false OR ds.is_stopped IS NULL)
|
||||
ORDER BY ds.time_period
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.web.reportManagement.mapper.ReportManageCardMapper">
|
||||
|
||||
<!-- 分页查询报卡列表 -->
|
||||
<select id="selectCardPage" 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 = #{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>
|
||||
|
||||
<!-- 根据卡号查询报卡详情 -->
|
||||
<select id="selectCardByCardNo" 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' AND t1.card_no = #{cardNo}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user