ตามqueryนี้ครับ ค่ายามีเพิ่มเป็น 2 เท่า ค่าบริการไม่มีปัญหา
select d1.*,v1.*,o1.*,p.drugallergy,i1.name as pdx_name ,concat(v1.hospmain," ",hc.hosptype,hc.name)
as hospname,v1.pttype,pa.name as pay,pt.paidst as paycode,concat(pc.name," , ",pa.name) as pcname,concat("***",c.name,"***") as inname
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 hospcode hc on hc.hospcode=o1.hospmain
left outer join icd101 i1 on i1.code=v1.main_pdx
left outer join opdscreen os on os.vn=o1.vn
left outer join pttype pt on pt.pttype=v1.pttype
left outer join paidst pa on pa.paidst=pt.paidst
left outer join pcode pc on pc.code =pt.pcode
left outer join service_time st on st.vn =d1.vn
left outer join s_drugitems s on d1.icode = s.icode
left outer join income c on c.income = s.income
where d1.vn="540908081755"
order by s.income