select l1.*,l2.*,l3.*,concat(pt.pname,pt.fname," ",pt.lname) as ptname,pt.name,
dc.name,v.name,v.age_y,v.age_m ,n.name as nationality_name
from lab_head l1, lab_order l2,lab_items l3,vn_stat v,nationality n
left outer join patient pt pt.hn = l2.hn
left outer join pttype p p.pttype = v.pttype
left outer join doctor dc dc.code = l2.code
where l1.lab_order_number = 240
and l1.lab_order_number = l2.lab_order_number
and l2.lab_items_code=l3.lab_items_code
and l1.hn=pt.hn and n.nationality=pt.nationality
and l1.vn=v.vn
order by l3.lab_items_name,l3.display_order