id
,process_no,patient_id,user_id,status,process_type,finish_ask_time,
create_user_id,create_time,update_user_id,update_time
select pro.id as processId,
pro.user_id as userId,
pro.status as status,
pro.update_time as time,
mre.id as medicalRecId,
mre.patient_self_desc as patientSelfDesc,
mre.patient_id as patientId,
mre.patient_name as name,
mre.patient_age as age,
mre.patient_gender as gender,
pat.resource_id as resourceId
from vp_process pro
left join vp_medical_rec mre on pro.medical_rec_id = mre.id
left join vp_patient pat on mre.patient_id = pat.id
where
pro.user_id = #{diagnoseProcess.userId}
AND mre.patient_self_desc like concat("%",#{diagnoseProcess.patientSelfDesc}, "%")
ORDER BY pro.update_time desc