กันยายน 2014
จ. อ. พ. พฤ. ศ. ส. อา.
« ส.ค.   ต.ค. »
1234567
891011121314
15161718192021
22232425262728
2930  
กันยายน 2014
จ. อ. พ. พฤ. ศ. ส. อา.
« ส.ค.   ต.ค. »
1234567
891011121314
15161718192021
22232425262728
2930  

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

ประชุม. Ncbr. ศรีผไท. สสจ.สร.

IMG20140923105403

ระบบ หน้าผลการวินิจฉัย ผู้ป่วยใน และ นอก ช้า

[root@jphos ~]# ps aux | grep mysql   ตรวจสอบ เลข service ก่อน Kill
mysql 1975 8.3 8.6 16264640 1412124 ? Dl 13:15 0:01 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –plugin-

[root@jphos ~]# kill -9 1975   สั่ง kill แบบพิเศษ -9

[root@jphos ~]# service mysql status  ตรวจสอบสถานะก่อน ปิดบริการ
SUCCESS! MySQL (Percona Server) running (2361)

[root@jphos ~]# service mysql stop    สั่งปิดบริการ
Shutting down MySQL (Percona Server)….. SUCCESS!

[root@jphos ~]# service mysql status  ตรวจสอบสถนะหลังปิดบริการ
ERROR! MySQL (Percona Server) is not running

[root@jphos ~]# service mysql start   สั่งเปิดบริการ
Starting MySQL (Percona Server)….. SUCCESS!

[root@jphos ~]# service mysql status   ตรวจสอบสถานะหลังเปิดบริการ
SUCCESS! MySQL (Percona Server) running (3163)

ระบบหน้าห้องวินิจฉัย ผู้ป่วยในช้า ครับ

select k.* ,o.name as user_name
from ksklog   k 
left outer join opduser o on o.loginname=k.loginname 
where k.tablename = ‘IPTDIAG’ and k.modifytype = ‘EDIT’  and k.detail = ‘570002200’  order by k.ksklog_id

PCU ข้อมูลการให้บริการ OPV3 และมีการให้ยา Ferro-BC ในเขตรับผิดชอบ

select pv.vaccine_name,pl.vaccine_date,concat(p.pname,p.fname,’ ‘,p.lname)as name,concat(p.age_y,’-‘,p.age_m,’-‘,p.age_d)as age,p.house_regist_type_id,o.vstdate,o.hn,o.icode,(di.name)as namedrug
from opitemrece o
left join person p on p.patient_hn=o.hn
left join person_vaccine_list pl on pl.person_id=p.person_id and pl.vaccine_date=o.vstdate
left join person_vaccine pv on pv.person_vaccine_id=pl.person_vaccine_id
left join drugitems di on di.icode=o.icode
where o.vstdate between ‘2014-01-01’ and ‘2014-08-31′ and (o.icode=’1570007′) and pl.person_vaccine_id in (’14’)
and p.house_regist_type_id in (‘1′,’3’)

แพทย์แผนไทย ตรวจสอบการให้บริการ การนวดด้วยวิธีการแพทย์แผนไทยแบบราชสำนัก – 11 เกิน 5 ครั้งต่อผู้ให้บริการ ต่อคนต่อวัน

select pr.health_med_provider_id,pr.health_med_provider_full_name,concat(p.pname,p.fname,’ ‘,p.lname)as name,a.labor_date,
count(pr.health_med_provider_id and s.service_date>’5′)as nummm,s.hn,s.vn,s.service_date,
s.in_hospcode_service,d.icd10,i.health_med_operation_item_name,h.*
from health_med_service_operation h
left join health_med_service s on s.health_med_service_id=h.health_med_service_id
left join health_med_service_diagnosis d on d.health_med_service_id=h.health_med_service_id
left join person p on p.patient_hn=s.hn
left join person_anc a on a.person_id=p.person_id
left join health_med_provider pr on pr.health_med_provider_id=h.health_med_provider_id
left join health_med_operation_item i on i.health_med_operation_item_id=h.health_med_operation_item_id

where h.health_med_operation_item_id in (’33’) and s.service_date >’2014-03-08′
group by pr.health_med_provider_id,s.service_date
order by nummm desc

แพทย์แผนไทย ตรวจสอบการทับหม้อเกลือ

select concat(p.pname,p.fname,’ ‘,p.lname)as name,a.labor_date,(case when s.hn > 1 then 1 else s.hn end)as test,s.hn,s.vn,s.service_date,s.in_hospcode_service,d.icd10,h.*
from health_med_service_operation h
left join health_med_service s on s.health_med_service_id=h.health_med_service_id
left join health_med_service_diagnosis d on d.health_med_service_id=h.health_med_service_id
left join person p on p.patient_hn=s.hn
left join person_anc a on a.person_id=p.person_id

where h.health_med_operation_item_id in (‘8′) and s.service_date>’2014-06-30’
/*group by s.hn */
order by s.hn

ประชุม โปรแกรมบริหารงานคลินิกวัณโรค TBCM รร. เกษมการ์ดเด้น

IMG20140908140135

13:00 to 16:00 น

ข้อมูลวัคซีน เด็ก ป.6 dTs4

select p.patient_hn,p.cid,concat(p.pname,p.fname,’ ‘,p.lname)as name,p.age_y,concat(h.address,’ M.’,vl.village_moo,’ B. ‘,vl.village_name)as address,
vs.school_name,sc.village_school_class_name,(case when sv.student_vaccine_id in (‘5’) then vsv.vaccine_date else ‘NULL’ end)as dTs4,
v.*
from village_student v
left join village_school vs on vs.village_school_id=v.village_school_id
left join village_school_class sc on sc.village_school_class_id=v.village_school_class_id
left join person p on p.person_id=v.person_id
left join house h on h.house_id=p.house_id
left join village vl on vl.village_id=p.village_id
left join village_student_vaccine vsv on vsv.village_student_id=v.village_student_id
left join village_student_vaccine_list vsvl on vsvl.village_student_vaccine_id=vsv.village_student_vaccine_id
left join student_vaccine sv on sv.student_vaccine_id=vsvl.student_vaccine_id
where sc.village_school_class_id in (‘9’)
order by vs.school_name

แสดงข้อมูล นักเรียน ตามระดับชั้น

select vs.school_name,sc.village_school_class_name,v.*
from village_student v
left join village_school vs on vs.village_school_id=v.village_school_id
left join village_school_class sc on sc.village_school_class_id=v.village_school_class_id
where sc.village_school_class_id in (‘9’)

ใบสั่งยา แสดงค่าใช้จ่ายเบิกไม่ได้ ตามสิทธิการรักษา

select

(case when op.paidst in (’01’,’02’,’04’) and sp.pttype is null then ‘àºÔ¡ä´é’ else round(op.sum_price,2) end)
as paid,
(case when op.paidst in (’03’,’01’) and sp.pttype is not null then ‘àºÔ¡äÁèä´é’ else round(d1.item_price,2) end)as paid2,

v1.pttype,v1.pcode,op.paidst,(sp.pttype)as payman,nd.billcode,op.icode,d1.*,v1.*,o1.*,oapp.nextdate,oapp.app_cause,
p.drugallergy,i1.name as pdx_name ,
concat(hpc.hosptype,” “,hpc.name) as hpcna ,
concat(hpc1.hosptype,” “,hpc1.name) as hpcna1
from doctor_order_print d1
left outer join vn_stat v1 on v1.vn=d1.vn
left outer join ovst o1 on o1.vn=d1.vn
left outer join patient p on p.hn = v1.hn
left outer join icd101 i1 on i1.code=v1.main_pdx
left outer join hospcode hpc on hpc.hospcode=v1.hospmain
left outer join hospcode hpc1 on hpc1.hospcode=v1.hospsub
left outer join oapp on oapp.nextdate=d1.vn and oapp.app_cause=d1.vn
left outer join opitemrece op on op.vn=d1.vn and op.icode=d1.icode
left outer join nondrugitems nd on nd.icode=op.icode
left outer join service_pay sp on sp.icode=d1.icode and sp.pttype=v1.pttype
where /* op.paidst =’03’ and v1.vstdate = ‘2014-06-04’ and */ d1.drug_name like ‘%ANALGES%’
/* where d1.vn=”570827155200″ and d1.print_server=”OPD” */

order by d1.item_no
limit 1000

———————————————————————————-

select

(case when op.paidst in (’01’,’02’,’04’) and sp.pttype is null then ‘àºÔ¡ä´é’ else round(op.sum_price,2) end)
as paid,
(case when op.paidst in (’03’,’01’) and sp.pttype in (’01’,’09’,’74’,’75’,’76’,’77’,’78’,’79’,’94’,’98’) then ‘àºÔ¡äÁèä´é’
when op.icode=’3003012′ then ‘àºÔ¡äÁèä´é’

else round(d1.item_price,2) end)as paid2,

v1.pttype,v1.pcode,op.paidst,(sp.pttype)as payman,nd.billcode,op.icode,d1.*,v1.*,o1.*,oapp.nextdate,oapp.app_cause,
p.drugallergy,i1.name as pdx_name ,
concat(hpc.hosptype,” “,hpc.name) as hpcna ,
concat(hpc1.hosptype,” “,hpc1.name) as hpcna1
from doctor_order_print d1
left outer join vn_stat v1 on v1.vn=d1.vn
left outer join ovst o1 on o1.vn=d1.vn
left outer join patient p on p.hn = v1.hn
left outer join icd101 i1 on i1.code=v1.main_pdx
left outer join hospcode hpc on hpc.hospcode=v1.hospmain
left outer join hospcode hpc1 on hpc1.hospcode=v1.hospsub
left outer join oapp on oapp.nextdate=d1.vn and oapp.app_cause=d1.vn
left outer join opitemrece op on op.vn=d1.vn and op.icode=d1.icode
left outer join nondrugitems nd on nd.icode=op.icode
left outer join service_pay sp on sp.icode=d1.icode and sp.pttype=v1.pttype
/* where op.paidst =’03’ and v1.vstdate = ‘2014-06-04’ and d1.drug_name like ‘%ANALGES%’ /*
where d1.vn=”570827155200″ and d1.print_server=”OPD” */

order by d1.item_no
limit 1000