มกราคม 2015
จ. อ. พ. พฤ. ศ. ส. อา.
« ธ.ค.   ก.พ. »
 1234
567891011
12131415161718
19202122232425
262728293031  
มกราคม 2015
จ. อ. พ. พฤ. ศ. ส. อา.
« ธ.ค.   ก.พ. »
 1234
567891011
12131415161718
19202122232425
262728293031  

คลังเก็บรายเดือน: มกราคม 2015

ตรวจสอบ สถานะ ทางครอบครัว FSTATUS ที่ยังไม่ได้เลือก

select patient_hn,cid,person_house_position_id,pname,fname,lname,age_y from person
where person_house_position_id not in (‘1′,’2’)

pfsense2.2 fix lightsquid for perl

คู่มือตั้งค่า pfSense 2.2 fix lightsquid

 

ln -s /usr/pbi/lightsquid-amd64/local/etc/lightsquid /usr/local/etc/lightsquid

 

 

import ไฟล์ .txt ลง sql

LOAD DATA INFILE ‘d:\EPI.txt’ INTO TABLE epi
FIELDS TERMINATED BY ‘|’

คนไข้มารับบริการ แต่ไม่มีการลงทะเบียน บัญชี 1

select p.last_visit,p2.cid,p.*
from patient p
left join person p2 on p2.cid=p.cid
where (p2.cid is null and p.last_visit is not null) and (p.last_visit between ‘2015-01-01’ and ‘2015-01-18’)

เบิก power supply ใหม่ 5 ตัว

IMG20150119093757

ติดตั้งประจำเครื่องแผนก ไอที 5 ตัว

เบาหวาน ความดัน เบาหวานร่วมความดัน

select concat(p.pname,p.fname,’ ‘,p.lname)as name,ad.full_name,dm.hn,dm.icd10,dm.dxtype,dm.clinic,ht.icd10,ht.dxtype,ht.clinic from (select * from clinic_persist_icd where icd10 between ‘e10’ and ‘e149’ group by hn) as dm
left join (select * from clinic_persist_icd where icd10 between ‘i10’ and ‘i159′ group by hn)as ht
on ht.hn=dm.hn
left join patient p on p.hn=dm.hn
left join thaiaddress ad on ad.chwpart=p.chwpart and ad.amppart=p.amppart and ad.tmbpart=p.tmbpart
where ht.icd10 is null
order by p.chwpart,p.amppart,p.tmbpart //เบาหวาน

 

select concat(p.pname,p.fname,’ ‘,p.lname)as name,ad.full_name,ht.hn,ht.icd10,ht.dxtype,ht.clinic,dm.icd10,dm.dxtype,dm.clinic from (select * from clinic_persist_icd where icd10 between ‘e10’ and ‘e149’ group by hn) as dm
right join (select * from clinic_persist_icd where icd10 between ‘i10’ and ‘i159′ group by hn)as ht
on ht.hn=dm.hn
left join patient p on p.hn=ht.hn
left join thaiaddress ad on ad.chwpart=p.chwpart and ad.amppart=p.amppart and ad.tmbpart=p.tmbpart
where dm.icd10 is null
order by p.chwpart,p.amppart,p.tmbpart // ความดัน

 

select concat(p.pname,p.fname,’ ‘,p.lname)as name,ad.full_name,a.hn,a.icd10,a.dxtype,a.clinic,b.icd10,b.dxtype,b.clinic from (select * from clinic_persist_icd where icd10 between ‘i10’ and ‘i159’)as a
inner join (select * from clinic_persist_icd where icd10 between ‘e10’ and ‘e149’)as b
on a.hn=b.hn and a.icd10<>b.icd10
left join patient p on p.hn=a.hn
left join thaiaddress ad on ad.chwpart=p.chwpart and ad.amppart=p.amppart and ad.tmbpart=p.tmbpart
order by p.chwpart,p.amppart,p.tmbpart // เบาหวานร่วมความดัน

 

เบาหวาน ความดัน เบาหวาน+ความดัน

HT —> i10-i159

DM—> E10-E149

/* select * from ovstdiag
where icd10 between ‘i10’ and ‘i159’ or icd10 between ‘e10’ and ‘e149’
group by hn  //ทั้งหมด

/* select ht.* from (select * from ovstdiag where icd10 between’i10’and ‘i159’ group by hn) as ht
left join (select * from ovstdiag where icd10 between ‘e10’ and ‘e149’ group by hn)as dm
on dm.hn=ht.hn
where dm.icd10 is null  //เบาหวาน กับ ความดัน

/* select dm.* from (select * from ovstdiag where icd10 between ‘e10’ and ‘e149’ group by hn)as dm
left join (select * from ovstdiag where icd10 between ‘i10’ and ‘i159’ group by hn) as ht
on ht.hn=dm.hn
where ht.icd10 is null //ความดัน

/* select dm.hn,dm.icd10,dm.vstdate,dm.hn,ht.icd10,dm.vstdate from (select * from ovstdiag where icd10 between ‘i10’ and ‘i159’ group by hn) as ht
inner join (select * from ovstdiag where icd10 between ‘e10’ and ‘e149’ group by hn)as dm
on ht.hn=dm.hn  //เบาหวาน

1UKp7

6 โครงการมอบของขวัญปีใหม่ 2558

1. ฟันเทียมรากฟัน

 

2. ฉีดวัคซีน dtc  ประชากร 20 ถึง 50 ปี

select p.age_y,o.*
from ovst_vaccine o
left join vn_stat v on v.vn=o.vn
left join person p on p.patient_hn=v.hn
where o.person_vaccine_id=’64’ and (p.age_y between ’20’ and ’50’)

3. คัดกรองภาวะพึ่งพิงบุคคลอื่น เยี่ยมผู้สูงอายุ

select * from person_visit    where visit_note like ‘%ผู้สูงอายุ%’ or visit_note like ‘%เยี่ยมผู้สูงอายุ%’

4. แก้ปัญหาสายตาต้อกระจก เปลี่ยนใส่เลนส์ตาเทียมให้ผู้ป่วย

select e.dmht_eye_screen_cataract_name,c.dmht_eye_screen_cataract_id,c.*
from clinicmember_cormobidity_eye_screen c
left join dmht_eye_screen_cataract e on e.dmht_eye_screen_cataract_id=c.dmht_eye_screen_cataract_id
where c.dmht_eye_screen_cataract_id <>’0′

5. พัฒนาทีมหมอ

6. ประคับประคองผู้ป่วยระยะท้ายของชีวิต