select h.hoscode hospcode,cast(h.hosname as char(200)) hospname,count(*) target,sum(result="Y") result,sum(result="Y")/count(*)*100 percent from chospital_amp h left join ( select p.hospcode,p.cid,p.hn,p.pid,concat(p.name," ",p.lname) ptname ,cc.instype_new ,group_concat(distinct if(c.chronic between "J45" and "J46","Y",null)) chronic ,group_concat(distinct if(dx.diagcode between "J45" and "J46","Y",null)) diagcode ,group_concat(distinct if(b.diagcode between "J45" and "J46",b.diagcode,null) order by b.diagcode) admit ,group_concat(distinct if(b.diagcode between "J45" and "J46","Y",null)) result from person p join card cc on cc.pid=p.pid and cc.hospcode=p.hospcode left join chronic c on c.pid=p.pid and c.hospcode=p.hospcode left join diagnosis_opd dx on dx.pid=p.pid and dx.hospcode=p.hospcode and dx.date_serv between "2015-04-01" and "2016-03-31" and dx.diagtype=1 left join admission a on a.pid=p.pid and a.hospcode=p.hospcode and date(a.datetime_disch) between "2015-04-01" and "2016-03-31" left join diagnosis_ipd b on a.an=b.an and a.hospcode=b.hospcode and b.diagtype=1 where cc.instype_new=0100 and p.typearea in (1,3) and p.discharge = "9" and (c.chronic between "J45" and "J46" or dx.diagcode between "J45" and "J46") group by p.hospcode,p.pid ) a on a.hospcode=h.hoscode group by a.hospcode union select "ภาพรวมทั้งคัพ" as hoscode,"" as hosname,count(*) target,sum(result="Y") result,sum(result="Y")/count(*)*100 percent from chospital_amp h left join ( select p.hospcode,p.cid,p.hn,p.pid,concat(p.name," ",p.lname) ptname ,cc.instype_new ,group_concat(distinct if(c.chronic between "J45" and "J46","Y",null)) chronic ,group_concat(distinct if(dx.diagcode between "J45" and "J46","Y",null)) diagcode ,group_concat(distinct if(b.diagcode between "J45" and "J46",b.diagcode,null) order by b.diagcode) admit ,group_concat(distinct if(b.diagcode between "J45" and "J46","Y",null)) result from person p join card cc on cc.pid=p.pid and cc.hospcode=p.hospcode left join chronic c on c.pid=p.pid and c.hospcode=p.hospcode left join diagnosis_opd dx on dx.pid=p.pid and dx.hospcode=p.hospcode and dx.date_serv between "2015-04-01" and "2016-03-31" and dx.diagtype=1 left join admission a on a.pid=p.pid and a.hospcode=p.hospcode and date(a.datetime_disch) between "2015-04-01" and "2016-03-31" left join diagnosis_ipd b on a.an=b.an and a.hospcode=b.hospcode and b.diagtype=1 where cc.instype_new=0100 and p.typearea in (1,3) and p.discharge = "9" and (c.chronic between "J45" and "J46" or dx.diagcode between "J45" and "J46") group by p.hospcode,p.pid ) a on a.hospcode=h.hoscode
แสดง 1 ถึง 20 จาก 25 ผลลัพธ์

อัตราการรับไว้รักษาในโรงพยาบาล (ADMISSION RATE) ด้วยโรคหืด ปีงบประมาณ 2559

#HOSPCODEสถานบริการ TargetResultPercent
107711รพ.สต.ตะเบาะ ตำบลตะเบาะ138--
207712รพ.สต.บ้านพี้ ตำบลบ้านโตก89--
307713รพ.สต.พนานิคม ตำบลบ้านโตก81--
407714รพ.สต.สะเดียง ตำบลสะเดียง179--
507715รพ.สต.ป่าแดง ตำบลป่าเลา43--
607716รพ.สต.บ้านพลำ ตำบลป่าเลา116--
707717รพ.สต.นางั่ว ตำบลนางั่ว139--
807718รพ.สต.ท่าพล ตำบลท่าพล90--
907719รพ.สต.วังซอง ตำบลท่าพล39--
1007720รพ.สต.ดงมูลเหล็ก ตำบลดงมูลเหล็ก142--
1107721รพ.สต.บ้านโคก ตำบลบ้านโคก117--
1207722รพ.สต.กงกะยาง ตำบลบ้านโคก32--
1307723รพ.สต.ชอนไพร ตำบลชอนไพร84--
1407724รพ.สต.นาป่า ตำบลนาป่า150--
1507725รพ.สต.หนองผักบุ้ง ตำบลนายม49--
1607726รพ.สต.ถ้ำน้ำบัง ตำบลนายม28--
1707727รพ.สต.วังชมภู ตำบลวังชมภู166--
1807728รพ.สต.น้ำร้อน ตำบลน้ำร้อน88--
1907729รพ.สต.ห้วยสะแก ตำบลห้วยสะแก80--
2007730รพ.สต.ห้วยใหญ่ ตำบลห้วยใหญ่54--
   1,9040