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

คลังเก็บรายเดือน: สิงหาคม 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

ทำความสะอาดกรองฝุ่นแอร์

2013-06-20 12.53.08

person patient ที่มี type_area ไม่ตรงกัน

select (p.house_regist_type_id)as PCU,(t.type_area) as CARD,p.cid,t.hn,t.last_visit,t.sex,p.age_y,v.village_name,d.name
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 thaiaddress d on d.chwpart=t.chwpart and d.amppart=t.amppart and d.tmbpart=t.tmbpart
where p.house_regist_type_id in (‘1′,’2’) and p.house_regist_type_id<>t.type_area
order by p.village_id

อบรม. mypcu สวนป่ารีสอร์ท

IMG20140813100209

ดึงตารางยา เพื่อเข้าอบรม จัดทำบัญชีข้อมูลยาและรหัสยามาตรฐานไทย (Thai Medicines Terminology)

select (d.icode)as HospDrugCode,(d.na)as ProductCat,(d.na)as TMTID,(d.na)as SpecPrep,d.generic_name,r.tradename,(d.na)as DSFcode,r.dosage_form,r.strength,(d.units)as Content,
d.unitprice,(d.na)as Distributor,(r.comp)as Manufacturer,(case when d.drugaccount in (‘¡’,’¢’,’¤’,’§’,’¨1′) then ‘E’ else ‘N’ end)as ISED,(d.did)as NDC24,(d.na)as Packsize,
(d.na)as PackPrice,(d.na)as UpdateFlag,(d.na)as datechange,(d.na)as dateupdate,(d.lastupdatestdprice) as DateEffective

from drugitems d
left join drugitems_register r on r.std_code=d.did
where d.istatus=’Y’
group by d.icode

ข้อมูลการบริการทันตกรรม

select p.age_y,p.age_m,t.icd10tm_operation_code,d.* from dtmain d
left join dtmain_area t on t.dtmain_id=d.dtmain_id
left join person p on p.patient_hn=d.hn
where t.icd10tm_operation_code in (‘2387030’) and d.vstdate between ‘2013-05-01’ and ‘2014-04-31’ and p.age_y in (‘7′,’8′)
group by d.hn

 

————————————————————————————————

select v.village_school_class_id,v.discharge,p.cid,p.patient_hn,concat(p.pname,p.fname,’ ‘,p.lname)as name,d.vstdate,d.icd9,t.icd10tm_operation_code
from village_student v
left join person p on p.person_id=v.person_id
left join dtmain d on d.hn=p.patient_hn
left join dtmain_area t on t.dtmain_id=d.dtmain_id
where v.village_school_class_id=’5’ /* and (t.icd10tm_operation_code in (‘2387030’)) and (d.vstdate between ‘2013-05-01’ and ‘2014-04-30′) */ and v.discharge <>’Y’
group by p.cid

ตรวจสอบ Nutri เด็ก 5-14 ปี บัญชี 5

select * from village_student_screen
where age_y between ‘5’ and ’14’
and (screen_date between ‘2014-07-01’ and ‘2014-07-31’)