BMS-HOSxP Community
HOSxP => Report Exchange => ข้อความที่เริ่มโดย: koncept ที่ พฤศจิกายน 30, 2012, 13:06:46 PM
-
รบกวนหน่อยคับท่านใดพอจะแนะแนวทางให้ห่อยคับ
-
แตกต่างยังไงกับ code นี้คับ
select count(vn.pdx) as pdxx ,count(distinct (vn.hn)) as sp1,vn.pdx,icd.name
from ovst ovst
left outer join vn_stat vn on vn.vn=ovst.vn
left outer join patient pt on pt.hn=vn.hn
left outer join icd101 icd on icd.code=vn.pdx
where vn.vstdate between "2011-11-01" and "2012-06-30"
and vn.pdx is not null and vn.pdx<>""
and ovst.main_dep in ("000","001","002","003","004","005","006","007","023","045")
group by vn.pdx
order by pdxx desc
-
ตอนแรกนึกว่าจะดูรายงาน แยกตาม อายุรกรรม กุมารเวช ศัลยกรรม น่ะ ครับ
สรุปว่าผมเข้าใจผิดครับ