พฤษภาคม 2024
จ. อ. พ. พฤ. ศ. ส. อา.
« มี.ค.    
 12345
6789101112
13141516171819
20212223242526
2728293031  
พฤษภาคม 2024
จ. อ. พ. พฤ. ศ. ส. อา.
« มี.ค.    
 12345
6789101112
13141516171819
20212223242526
2728293031  

ทันตกรรม ที่ยังไม่ได้บันทึก 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

 

ใส่ความเห็น