เปิดใช้งานหน้า One Stop Service
select o.vstdate,p.cid,oq.seq_id,o.hn,o.vsttime,o.vn,concat(p.pname,p.fname,' ',p.lname) as ptname , t.name as pttype_name ,o.pttypeno,d.name as doctor_name , i.name as pdx_name ,s.name as spclty_name, st.name as ost_name ,v.income from ovst o left outer join vn_stat v on v.vn = o.vn left outer join patient p on p.hn = o.hn left outer join pttype t on t.pttype = o.pttype left outer join doctor d on d.code = o.doctor left outer join icd101 i on i.code = v.main_pdx left outer join spclty s on s.spclty = o.spclty left outer join ovstost st on st.ovstost = o.ovstost left outer join ovst_seq oq on oq.vn = o.vn left outer join ovst_nhso_op_status oo1 on oo1.vn = o.vn left outer join nhso_direct_status nd1 on nd1.nhso_direct_status_id = oo1.nhso_direct_status_id where o.vstdate between '
0000-00-00' and '
0000-00-00' and o.pt_subtype = 0 order by o.vn