ผู้เขียน หัวข้อ: ขอความอนุเคาะห์รายงานจำนวน ผู้ป่วย CKD (โรคไต) แยกตำบล แยกหมู่บ้าน  (อ่าน 4447 ครั้ง)

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

ออฟไลน์ nano

  • Full Member
  • ***
  • กระทู้: 133
  • น้องใหม่ครับ
  • Respect: +2
    • ดูรายละเอียด
    • เว็บโรงพยาบาลครับเพิ่งทำยังไม่สมบูรณ์เท่าไหร่ขอคำชี้แนะด้วย
select
pt.tmbpart,
pt.moopart,
count(distinct pt.hn) as hn_count
from vn_stat ov ,patient pt ,ovst ovst
WHERE
ov.vn = ovst.vn AND
pt.hn = ov.hn AND
ov.vstdate BETWEEN "2011-10-01" AND "2012-09-30" AND
ov.hn = pt.hn AND
ov.aid LIKE "3806%"
 and ( (ov.pdx >= "N180" and ov.pdx <= "N189")
 or (ov.dx0 >= "N180" and ov.dx0 <= "N189")
 or (ov.dx1 >= "N180" and ov.dx1 <= "N189")
 or (ov.dx2 >= "N180" and ov.dx2 <= "N189")
 or (ov.dx3 >= "N180" and ov.dx3 <= "N189")
 or (ov.dx4 >= "N180" and ov.dx4 <= "N189")
 or (ov.dx5 >= "N180" and ov.dx5 <= "N189") )
GROUP BY
pt.tmbpart,
pt.moopart
ORDER BY
pt.tmbpart ASC,
pt.moopart ASC
โรงพยาบาลบึงโขงหลง อ.บึงโขงหลง จ.บึงกาฬ
ขึ้นระบบเองโดยหัวหน้ากลุ่มงานไอที
Server version: 5.5.31-30.3 Percona Server
Centos 6.2 64 bit ram 32 G 1 TB
ส่วนผมยังเป็น แอ๊ดมึนอยู่ครับ งมๆ ซาวๆๆ  
เริ่มใช้งาน hosxp  20/07/53
เว็บไซต์ 
www.bklhospital.go.th
mail : preecha122@hotmail.com