select vn.hn,concat(pt.pname,pt.fname,' ',pt.lname)as name,vn.age_y,vn.vstdate, pt.informaddr,
lo.lab_items_code ,lo.lab_order_result,if(lab_order_result between '70' and '130' ,'1','0') as lab_progess
from vn_stat vn
left outer join patient pt on vn.hn = pt.hn
left outer join lab_head lh on vn.vn =lh.vn
left outer join lab_order lo on lh.lab_order_number = lo.lab_order_number
where vn.vstdate between '2011-02-01' and '2011-03-30'
and lo.lab_items_code in ('89','88')
and department = 'OPD'
and vn.pdx in ('E10','E101','E102','E103','E104','E105','E106','E107','E108','E109'
,'E11','E110','E111','E112','E113','E114','E115','E116','E117','E118','E119','E162','R739')
น่าจะเป็นแบบข้างบน ลองดูนะ ว่าได้หรือป่าว