224
« เมื่อ: เมษายน 18, 2011, 15:58:35 PM »
ข้อมูล LAB HbA1C
select a.hn, c.pname, concat(c.fname,' ',c.lname) as cc,
e.age_y,c.cid, e.hospmain, a.vstdate,b.name, a.qty,l.lab_order_result,a.pttype, e.pttypeno, d.name , a.an
from opitemrece a
left outer join nondrugitems b on a.icode=b.icode
left outer join patient c on a.hn=c.hn
left outer join pttype d on a.pttype=d.pttype
left outer join vn_stat e on a.vn=e.vn
left outer join lab_head h on e.hn=h.hn
left outer join lab_order l on l.lab_order_number=h.lab_order_number
left outer join lab_items i on i.lab_items_code=l.lab_items_code
left outer join lab_items_group g on g.lab_items_group_code = i.lab_items_group
where
(a.icode="3000809" and i.lab_items_name='HbA1C')
and a.vstdate between '2006-10-01' and '2007-06-27'
order by a.hn,a.vst
Report
ลำดับที่ : วันที่ : PID : เลขบัตร : HN : ชื่อ-สกุล : อายุ(ปี) : สิทธิ : จำนวน : ผล lab