BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: prapansak ที่ พฤษภาคม 25, 2011, 10:03:24 AM
-
ต้องการหาข้อมูลผู้ป่วยเบาหวานรายใหม่ในปี หน่อยครับ
ผมมีอยู่ 2 code ไม่รู้ว่าอันไหนถูก
code 1
----------------------------------------------------------
select pt.*,ov.*
from vn_stat ov ,patient pt ,ovst ovst
where ov.vn=ovst.vn and pt.hn=ov.hn and ov.vstdate between "2011-01-01" and "2011-05-25" and ov.hn=pt.hn
and ov.age_y>= 0
and ov.age_y<= 200
and ( (ov.pdx >= "e10" and ov.pdx <= "e149")
or (ov.dx0 >= "e10" and ov.dx0 <= "e149")
or (ov.dx1 >= "e10" and ov.dx1 <= "e149")
or (ov.dx2 >= "e10" and ov.dx2 <= "e149")
or (ov.dx3 >= "e10" and ov.dx3 <= "e149")
or (ov.dx4 >= "e10" and ov.dx4 <= "e149")
or (ov.dx5 >= "e10" and ov.dx5 <= "e149") )
--------------------------------------------------------------------
code 2
----------------------------------------------------------------------
select count(c.hn)
from clinicmember c
where c.regdate between "2011-01-01" and "2011-05-31" and c.clinic = "001"
order by c.regdate,c.number
-----------------------------------------------------------------------
-
ไม่รู้ว่าในกระทู้นี้ถูกใจหรือเปล่าครับ
http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=20407.0
-
หาผู้ป่วยเบาหวานรายใหม่ยังไงครับ
-
อ.เทพๆ ขอ Code ผู้ป่วยเบาหวานรายใหม่ในปี หายังไงครับ ช่วยที่จ้า