สิงหาคม 2014
จ. อ. พ. พฤ. ศ. ส. อา.
« ก.ค.   ก.ย. »
 123
45678910
11121314151617
18192021222324
25262728293031
สิงหาคม 2014
จ. อ. พ. พฤ. ศ. ส. อา.
« ก.ค.   ก.ย. »
 123
45678910
11121314151617
18192021222324
25262728293031

คลังเก็บรายวัน: สิงหาคม 21, 2014

มีข้อมูลในบัญชี 1 แต่ไม่ได้ทำ patient_link

select s.age_y,s.age_m,s.age_d,s.cid,s.patient_hn,s.patient_link,p.hn,p.cid,p.type_area,p.last_update,p.deathday from patient p left join person s on s.cid=p.cid where p.last_update <>” and s.patient_hn is null and deathday is null and s.cid <>”

คนไข้มารับบริการ type_area ไม่ตรงกันระหว่าง บัญชี 1 กับ ห้องบัตร

select t.last_update,t.cid,concat(p.pname,p.fname,’ ‘,p.lname)as name,p.sex,p.birthdate,t.hn,p.house_regist_type_id,t.type_area,
v.village_name,v.village_moo,t.addrpart,t.moopart,t.chwpart,t.amppart,t.tmbpart
from person p
left join patient t on t.cid=p.cid
left join village v on v.village_id=p.village_id
left join vn_stat s on s.hn=p.patient_hn
where p.house_regist_type_id in (‘1′,’2′,’3′,’4’) and p.house_regist_type_id<>t.type_area and t.last_update <>”
group by s.hn

มารับบริการมีข้อมูลหน้าห้องบัตร แต่ บัญชี 1 ไม่มีข้อมูล และไม่ได้เชื่อมโยง patient_link

select s.age_y,s.age_m,s.age_d,s.cid,s.patient_hn,s.patient_link,p.hn,p.cid,p.type_area,p.last_update,p.deathday
from patient p
left join person s on s.cid=p.cid
where p.last_update <>” and s.patient_hn is null and deathday is null and s.cid is null