ธันวาคม 2013
จ. อ. พ. พฤ. ศ. ส. อา.
« พ.ย.   ม.ค. »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
ธันวาคม 2013
จ. อ. พ. พฤ. ศ. ส. อา.
« พ.ย.   ม.ค. »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

คลังเก็บรายวัน: ธันวาคม 17, 2013

ทันตกรรม ที่ยังไม่ได้บันทึก Diag

ทันตกรรม

select o.hn,o.main_dep,s.name,o.vstdate,v.vstdate,v.hn,v.pdx,v.dx0,v.dx1,v.dx2,v.dx3,v.dx4,v.dx5
from ovst o
left outer join vn_stat v on v.hn=o.hn and v.vstdate=o.vstdate
inner join spclty s on o.spclty=s.spclty
where (o.vstdate between ‘2014-02-01’ and ‘2014-02-31’) and (v.pdx=”) and (o.main_dep in (‘005’))
order by o.main_dep,s.name,o.vstdate

คลีนิคพิเศษ

select o.hn,o.main_dep,k.department,o.vstdate,v.vstdate,v.vn,v.hn,v.pdx,v.dx0,v.dx1,v.dx2,v.dx3,v.dx4,v.dx5
from ovst o
left outer join vn_stat v on v.hn=o.hn and v.vstdate=o.vstdate
left outer join kskdepartment k on k.depcode=o.main_dep
where (o.vstdate between ‘2014-02-01’ and ‘2014-02-31’) and (v.pdx=”) and (o.main_dep in (‘001′,’002’))

ทั้งหมด ไม่เอา ห้องคลอด

select o.hn,o.main_dep,s.name,k.department,o.vstdate,v.hn,v.pdx,v.dx0,v.dx1,v.dx2,v.dx3,v.dx4,v.dx5
from ovst o
left outer join vn_stat v on v.hn=o.hn and v.vstdate=o.vstdate
inner join spclty s on o.spclty=s.spclty
inner join kskdepartment k on k.depcode=o.main_dep
where (o.vstdate between ‘2014-03-01’ and ‘2014-03-31’) and (v.pdx=”) and o.main_dep not in (‘017’)
order by o.main_dep,s.name,o.vstdate