Wednesday, March 19, 2014

คลินิคไตเรื้อรัง ค้นหาผู้ป่วยที่ admit pdx N184 and N185 /พี่ไก่

ก่อนอื่นให้หา "N184" and "N185" ขึ้นมาก่อน

SELECT * from an_stat
WHERE pdx BETWEEN "N184" and "N185" and regdate BETWEEN "2009-10-01" and "2010-09-30"

บอกด้วยเงื่อนไขมีภาวะแทรกซ้อน ซีด K สูง และมีภาวะ น้ำเกิน

SELECT * from an_stat
WHERE pdx BETWEEN "N184" and "N185" and regdate BETWEEN "2012-10-01" and "2013-09-30"
and hn in (SELECT hn from an_stat WHERE dx0 BETWEEN "D460" and "D649" or dx0 in ("E875","E877")
or dx1 BETWEEN "D460" and "D649" or dx2 BETWEEN "D460" and "D649" or dx3 BETWEEN "D460" and "D649" or
dx4 BETWEEN "D460" and "D649" or dx5 BETWEEN "D460" and "D649" AND regdate BETWEEN "2011-10-01" and "2012-09-30" )
and hn in (SELECT hn from an_stat WHERE dx0 = "E875" or dx1 = "E875" or dx2 = "E875" or dx3 = "E875" or dx4 = "E875" or dx5 = "E875"
AND regdate BETWEEN "2011-10-01" and "2012-09-30" )
and hn in (SELECT hn from an_stat WHERE dx0 = "E877" or dx1 = "E877" or
dx2 = "E877" or dx3 = "E877" or dx4 = "E877" or dx5 = "E877"
and regdate BETWEEN "2011-10-01" and "2012-09-30" )

By keepper

0 ความคิดเห็น:

Post a Comment

 

Sample Text

111

Sample Text