ผู้เขียน หัวข้อ: 8. ร้อยละของหญิงตั้งครรภ์ได้รับยาเม็ดเสริมไอโอดีน  (อ่าน 5119 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ manoi

  • Hero Member
  • *****
  • กระทู้: 8,669
  • Respect: +170
    • ดูรายละเอียด
    • HOSxP Community Center
ที่มา บัญชี 2  ก่อนทำรายงานนี้ต้องหาก่อนนะครับว่ายาเม็ดเสริมไอโอดีนในบัญชียาของโรงพยาบาลมีรหัสอะไรบ้าง แล้วนำมาใส่ใน icode_list ครับ เช่น   o1.icode in ('1000001','1000002','1000003')

ข้อมูล A จำนวนหญิงตั้งครรภ์ที่ได้รับยาเม็ดเสริมไอโอดีน

select count(distinct p2.person_id) from person_anc p1,person p2,person_anc_service p3,opitemrece o1
where p1.person_id = p2.person_id and p1.person_anc_id = p3.person_anc_id
and p3.anc_service_date between 'yyyy-mm-dd1' and 'yyyy-mm-dd2'
and p3.vn<>'' and p3.vn = o1.vn and o1.icode in (icode_list)


ข้อมูล B จำนวนหญิงตั้งครรภ์ที่มารับบริการ

select count(distinct p2.person_id) from person_anc p1,person p2,person_anc_service p3
where p1.person_id = p2.person_id and p1.person_anc_id = p3.person_anc_id
and p3.anc_service_date between 'yyyy-mm-dd1' and 'yyyy-mm-dd2'
and p3.vn<>''
« แก้ไขครั้งสุดท้าย: เมษายน 02, 2013, 15:15:27 PM โดย manoi »
HOSxP Project Manager / Cheif Developer / BMS MD