BMS-HOSxP Community

HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: sathaporn ที่ ตุลาคม 04, 2011, 15:47:43 PM

หัวข้อ: ขอรายผู้ป่วยที่มา ANC แยกสิทธ์การรักษา
เริ่มหัวข้อโดย: sathaporn ที่ ตุลาคม 04, 2011, 15:47:43 PM
ขอรายผู้ป่วยที่มา ANC แยกสิทธ์การรักษา ครับ
หัวข้อ: Re: ขอรายผู้ป่วยที่มา ANC แยกสิทธ์การรักษา
เริ่มหัวข้อโดย: jameborn ที่ ตุลาคม 04, 2011, 15:57:41 PM
select o.pttype,p.name,count(distinct s.person_anc_id) 'case',count(s.vn) 'total'
from person_anc_service s
left join ovst o on s.vn=o.vn
left join pttype p on p.pttype=o.pttype
where s.anc_service_date between '2011-1-1' and '2011-1-31'
group by o.pttype
order by o.pttype
แบบนี้มั๊ย
หัวข้อ: Re: ขอรายผู้ป่วยที่มา ANC แยกสิทธ์การรักษา
เริ่มหัวข้อโดย: sathaporn ที่ ตุลาคม 06, 2011, 15:42:14 PM
น่าจะ ok ครับ  เดี่ยวลองดูก่อนครับ ขอบคุณครับ