我的随访列表修改
This commit is contained in:
parent
da587c41ed
commit
6155554e4d
@ -450,7 +450,13 @@
|
||||
select dt.id,
|
||||
dt.department_name,
|
||||
dt.department_code,
|
||||
( SELECT COUNT(1) FROM special_disease_route a WHERE a.department_id = dt.id and (a.parent_route_id = 0 or a.parent_route_id is null)) AS countNum
|
||||
( SELECT COUNT(1)
|
||||
FROM special_disease_route a
|
||||
WHERE a.department_id = dt.id and (a.parent_route_id = 0 or a.parent_route_id is null)
|
||||
<if test="releaseStatus != null and releaseStatus != ''">
|
||||
AND a.release_status= #{releaseStatus}
|
||||
</if>
|
||||
) AS countNum
|
||||
from department dt left join special_disease_route sdr on dt.id = sdr.department_id
|
||||
left join special_disease_route_package sdrp ON sdr.id = sdrp.route_id
|
||||
<where>
|
||||
|
||||
@ -12,22 +12,23 @@
|
||||
spmr.route_name manageRouteName,
|
||||
spmrn.id manageRouteNodeId,
|
||||
spmrn.route_node_name manageRouteNodeName,
|
||||
spmrn.task_type,
|
||||
spmrn.task_node_type,
|
||||
spmrn.route_node_name,
|
||||
IFNULL( spmrn.route_node_day,0) routeNodeDay,
|
||||
pi.discharge_time,
|
||||
pter.id patientTaskExecuteRecordId,
|
||||
IF(pter.id is NULL,0,1) sign,
|
||||
CASE
|
||||
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_id
|
||||
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id
|
||||
WHEN spmrn.task_node_type = 'PHONE_OUTBOUND' THEN spmrn.phone_id
|
||||
WHEN spmrn.task_node_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id
|
||||
END AS templateId
|
||||
FROM sign_patient_manage_route_node spmrn
|
||||
LEFT JOIN sign_patient_manage_route spmr ON spmrn.manage_route_id = spmr.id
|
||||
LEFT JOIN patient_info pi ON spmr.id = pi.id
|
||||
LEFT JOIN patient_task_execute_record pter ON pter.manage_route_node_id = spmrn.id
|
||||
<where>
|
||||
spmrn.task_type in('PHONE_OUTBOUND','ARTIFICIAL_FOLLOW_UP')
|
||||
spmrn.task_node_type in('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE')
|
||||
and spmrn.phone_dial_method = 'COMMON'
|
||||
<if test="residentId != null ">
|
||||
and pi.resident_id = #{residentId}
|
||||
</if>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user