select c.hn,concat(pname,fname,' ',lname) as ptname,age_y,informaddr,lastvisit,
bps,bpd,bw,lab_items_name,lo.lab_order_result
from clinicmember c
left outer join patient p on p.hn = c.hn
left outer join opdscreen o on o.vn = c.last_vn
left outer join lab_head lh on lh.vn = c.last_vn
left outer join lab_order lo on lo.lab_order_number = lh.lab_order_number
left outer join lab_items li on li.lab_items_code = lo.lab_items_code
where c.clinic = '001'
and lo.lab_items_code in ('204','221','77','78','315','316','45','95','102')
order by c.hn
หมายเหตุ lab_items_code ดูจากตาราง lab_items