พฤษภาคม 2024
จ. อ. พ. พฤ. ศ. ส. อา.
« มี.ค.    
 12345
6789101112
13141516171819
20212223242526
2728293031  
พฤษภาคม 2024
จ. อ. พ. พฤ. ศ. ส. อา.
« มี.ค.    
 12345
6789101112
13141516171819
20212223242526
2728293031  

ตรวจสอบข้อมูลคนไข้ เสียชีวิต แต่ยังอยู่ใน คลีนิคผู้ป่วยเบาหวานความดัน <>2

select person.cid,person.pname,person.fname,person.lname,clinicmember.clinic_member_status_id,person.death,
patient.hn
from person
inner join clinicmember on person.patient_hn=clinicmember.hn
inner join patient on person.cid=patient.cid
where person.death=”y” and clinicmember.clinic_member_status_id <>2
group by cid

 

 

ดึงข้อมูลจาก clinic มาแก้ไข clinic_member_status_id ให้ 2

select clinicmember_id,clinic,hn,clinic_member_status,regedit

from clinicmember

where hn=’xxxxxxx’ and clinic_member_status_id <>2

ใส่ความเห็น