select
id,
name,
followup_method as followupMethod,
followup_type as followupType,
frequency,
followup_month as followupMonth,
person_in_charge as personInCharge,
person_in_charge_username as personInChargeUsername,
status,
create_by as createBy
from
fms_followup_queue
and name like concat('%', #{name}, '%')
SELECT id,
name,
followup_method as followupMethod,
followup_type as followupType,
frequency,
followup_month as followupMonth,
person_in_charge as personInCharge,
person_in_charge_username as personInChargeUsername,
status,
create_by as createBy
FROM fms_followup_queue
WHERE del_flag = 0
and id = #{id}
select
patient_id as id,
queue_id as queueId,
name,
pinyin_full as pinyinFull,
pinyin_simple as pinyinSimple,
gender,
birth_date as birthDate,
ethnicity,
education_years as educationYears,
phone,
discharge_time as dischargeTime,
id_card_type as idCardType,
id_card as idCard,
tenant_id as tenantId,
create_by as createBy,
create_time as createTime
FROM fms_patient_queue_relation
WHERE del_flag = 0
AND queue_id = #{id}
SELECT
id,
name,
followup_method as followupMethod,
followup_type as followupType,
frequency,
followup_month as followupMonth,
person_in_charge as personInCharge,
person_in_charge_username as personInChargeUsername,
status,
create_by as createBy
FROM fms_followup_task
queue_id = #{dto.queueId}
AND status = #{dto.status}
AND (name LIKE CONCAT('%', #{dto.keywords}, '%')
AND age >= #{dto.startAge}
AND age <= #{dto.endAge}
UPDATE fms_followup_task
SET status = 2, lost_reason = #{dto.reason}
WHERE patient_id = #{dto.patientId} AND queue_id = #{dto.queueId}
UPDATE fms_followup_task
SET status = 1, followuper = #{dto.followuper},
followup_time = #{dto.followupTime}, followup_text = #{dto.followupText}
WHERE patient_id = #{dto.patientId} AND queue_id = #{dto.queueId}