ถ้าจะปรับคำสั่งแสดงผลในฟอร์มเอกสารว่าดึงข้อมูลตาราง opitemrece ต้องปรับอย่างไรครับ
select d1.*,v1.*,o1.*,s.*,t.blobtext,t.blobtext2,p.drugallergy,ofbs.dtx1,ofbs.dtx2,i1.name as pdx_name,
concat(hc.hosptype,hc.name) as hospmain_name,
concat(hcs.hosptype,hcs.name) as hospsub_name
from doctor_order_print d1
left outer join vn_stat v1 on v1.vn=d1.vn
left outer join ovst o1 on o1.vn=d1.vn
left outer join patient p on p.hn = v1.hn
left outer join icd101 i1 on i1.code=v1.main_pdx
left outer join opdscreen s on s.vn = d1.vn
left outer join opdscreen_fbs ofbs on ofbs.vn=o1.vn
left outer join hospcode hc on o1.hospmain=hc.hospcode
left outer join hospcode hcs on o1.hospsub=hcs.hospcode
left outer join tempreport t on t.name=d1.vn and t.reportname="DOCTOR-FORM"
where d1.vn="470529131938" and d1.print_server="DOCTOR-1"