ตุลาคม 2015
จ. อ. พ. พฤ. ศ. ส. อา.
« ก.ย.   พ.ย. »
 1234
567891011
12131415161718
19202122232425
262728293031  
ตุลาคม 2015
จ. อ. พ. พฤ. ศ. ส. อา.
« ก.ย.   พ.ย. »
 1234
567891011
12131415161718
19202122232425
262728293031  

คลังเก็บรายวัน: ตุลาคม 6, 2015

hosxp 10 อันดับยาใช้งานเยอะสุด

select count(*),o.icode,d.name
from opitemrece o
left join drugitems d on d.icode=o.icode
where o.vstdate between ‘2014-10-01’ and ‘2015-09-30’ and (o.icode not like ‘30%’)
group by o.icode
order by count(*) desc
limit 10

hosxp 10 อันดับโรค ipd opd ตามช่วงวัน

ผู้ป่วยนอก————————————————————————————————–

select count(*),v.pdx,tname,name
from vn_stat v
left join icd101 i on i.code=v.pdx
where v.vstdate between ‘2014-10-01’ and ‘2015-09-30’
group by v.pdx
order by count(*) desc
limit 10

ผู้ป่วยใน—————————————————————————————————-

select count(*),v.pdx,tname,name
from an_stat v
left join icd101 i on i.code=v.pdx
where v.dchdate between ‘2014-10-01’ and ‘2015-09-30’ and (v.pdx is not null or v.pdx<>”)
group by v.pdx
order by count(*) desc
limit 11