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 ,p.birth,timestampdiff(year,p.birth,"2018-10-01") age ,group_concat(distinct if(a.diagcode regexp "Z014|Z124",a.diagcode,null)) dx ,group_concat(distinct if(a.diagcode regexp "Z014|Z124","Y",null)) result from person p left join diagnosis_opd a on a.pid=p.pid and a.hospcode=p.hospcode and a.date_serv between "2018-10-01" and "2019-09-30" where timestampdiff(year,p.birth,"2018-10-01") between 30 and 60 and p.typearea in (1,3) and p.sex=2 and p.discharge = 9 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 ,p.birth,timestampdiff(year,p.birth,"2018-10-01") age ,group_concat(distinct if(a.diagcode regexp "Z014|Z124",a.diagcode,null)) dx ,group_concat(distinct if(a.diagcode regexp "Z014|Z124","Y",null)) result from person p left join diagnosis_opd a on a.pid=p.pid and a.hospcode=p.hospcode and a.date_serv between "2018-10-01" and "2019-09-30" where timestampdiff(year,p.birth,"2018-10-01") between 30 and 60 and p.typearea in (1,3) and p.sex=2 and p.discharge = 9 group by p.hospcode,p.pid ) a on a.hospcode=h.hoscode
แสดง 21 ถึง 25 จาก 25 ผลลัพธ์

ตรวจ PAPSMEAR ปีงบประมาณ 2560

#HOSPCODEสถานบริการ TargetResultPercent
2107731รพ.สต.โป่งหว้า ตำบลห้วยใหญ่71922831.71
2207732รพ.สต.ยางลาด ตำบลระวิง48113227.44
2307733รพ.สต.ระวิง ตำบลระวิง47613227.73
2410727รพ.เพชรบูรณ์7,848330.42
25ภาพรวมทั้งคัพ37,4937,00318.68