ตรวจสอบ สถานะ ทางครอบครัว 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
คนไข้มารับบริการ แต่ไม่มีการลงทะเบียน บัญชี 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’)
เบาหวาน ความดัน เบาหวานร่วมความดัน
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 //เบาหวาน
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. ประคับประคองผู้ป่วยระยะท้ายของชีวิต
ความเห็นล่าสุด