ผมสั่งพิมพ์ใบ lab แล้วไม่ออกครับ ขึ้นข้อผิดพลาดมาตามรูอที่แนบครับ รบกวน อ. ทุกท่านด้วยนะครับ
คำสั่งที่ใช้
select h.lab_order_number,h.lis_order_no,v.pcode,a.pcode as apcode, h.lab_receive_number,h.vn,h.hn,h.order_date ,h.order_time, h.lock_result,h.receive_time as service13,h.report_time as service14 ,h.confirm_report,d.name as doctor_name, concat(pt.pname,pt.fname,' ',pt.lname) as ptname , h.form_name ,v.rcpt_money as opaid,a.rcpt_money as ipaid , v.age_y as vage_y,a.age_y as aage_y ,h.department,concat(w.name,' - ',adm.bedno) as ward_name , k.department as department_name ,sp.name as spclty_name,lp.lab_perform_status_name,h.anonymous_request from lab_head h
left outer join patient pt on pt.hn=h.hn
left outer join doctor d on d.code=h.doctor_code
left outer join vn_stat v on v.vn=h.vn
left outer join spclty sp on sp.spclty = h.spclty
left outer join an_stat a on a.an=h.vn
left outer join kskdepartment k on k.depcode = h.order_department
left outer join ward w on w.ward = a.ward
left outer join iptadm adm on adm.an = a.an
left outer join lab_perform_status lp on lp.lab_perform_status_id = h.lab_perform_status_id
where h.vn= 511201072837
order by h.lab_order_number = 4882,h.order_date,h.order_time