select th.name,tbs.sample_type as sampleType, tpi.hospitalization, tpi.code as patientCode, tbs.code, tbs.collect_time as collectTime,tbs.update_at as updateAt
select th.name,tbs.sample_type as sampleType, tpi.hospitalization, tpi.code as patientCode, tbs.code, tbs.collect_time as collectTime,
tbs.update_at as updateAt,
tbs.user_id as userId,
d.`name` as doctorName
from t_biological_samples tbs
left join t_patient_information tpi on tpi.id=tbs.patient_information_id and tpi.rec_status=0
left join t_hospital th on th.id=tpi.hospital_id and th.rec_status=0
LEFT JOIN t_doctor d on d.user_id = tbs.user_id and d.rec_status = 0