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
ความเห็นล่าสุด