BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: panus_t ที่ เมษายน 18, 2014, 15:17:13 PM
-
select v.*
from vn_stat v
left outer join patient p on p.hn=v.hn
left outer join clinicmember c on c.hn=v.hn
where vstdate between "2013-10-01" and "2014-01-31" and p.chwpart="30" and p.amppart="03" and p.tmbpart="01"
ต้องการหา
1.คนไข้ ที่อยู่ใน clinicmember
2.มารับบริการตั้งแต่ 1 ต.ค.56-31 ม.ค.57
3.ที่อยู่ จังหวัด อำเภอ ตำบล ที่กำหนด
ครับ ??? ??? ;D
-
select v.*
from clinicmember c
left outer join patient p on p.hn=c.hn
left outer join vn_stat v on v.hn=c.hn
where vstdate between "2013-10-01" and "2013-10-01"
and p.chwpart="30" and p.amppart="08" and p.tmbpart="02"
ลองดูนะคะ ถ้าต้องการระบุคลินิกด้วยก้อใส่เงื่อนไขเพิ่ม c.clinic=001
-
เอาแบบนี้ไปเลยดีไหมครับ
http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=31775.0
-
ขอบคุณครับ ;D ;D ;D