ร้อยละของเด็ก 9,18,30 และ 42 เดือน ได้รับการตรวจคัดกรองพัฒนาการ

More
7 ปี 2 สัปดาห์ ที่ผ่านมา #11 โดย admin
select p.cid,concat(p.pname,p.fname," ",p.lname) as ptname,
timestampdiff(MONTH,birthdate,"2016-10-1") AS age,"ตุลา" as TargetMonth,p.birthdate,t.vstdate,t.pp_special_type_name
from person p
left outer join (select x.cid, v.vstdate,a.pp_special_type_name
from pp_special pp
left outer join vn_stat v on v.vn=pp.vn
left outer join patient x on v.hn=x.hn
left outer join pp_special_type a on a.pp_special_type_id=pp.pp_special_type_id
where v.vstdate between "2016-10-01" and "2017-03-31" and a.pp_special_code in ("1B260","1B261","1B262") ) as t on t.cid=p.cid
where house_regist_type_id in ("1","3") and person_discharge_id = "9"
and p.nationality ="99" and timestampdiff(MONTH,birthdate,"2016-10-01") in ("8","17","29","41")
UNION
select p.cid,concat(p.pname,p.fname," ",p.lname) as ptname,
timestampdiff(MONTH,birthdate,"2016-11-1") AS age,"พ.ย" as TargetMonth,p.birthdate,t.vstdate,t.pp_special_type_name
from person p
left outer join (select x.cid, v.vstdate,a.pp_special_type_name
from pp_special pp
left outer join vn_stat v on v.vn=pp.vn
left outer join patient x on v.hn=x.hn
left outer join pp_special_type a on a.pp_special_type_id=pp.pp_special_type_id
where v.vstdate between "2016-10-01" and "2017-03-31" and a.pp_special_code in ("1B260","1B261","1B262") ) as t on t.cid=p.cid
where house_regist_type_id in ("1","3") and person_discharge_id = "9"
and p.nationality ="99" and timestampdiff(MONTH,birthdate,"2016-11-01") in ("8","17","29","41")
UNION
select p.cid,concat(p.pname,p.fname," ",p.lname) as ptname,
timestampdiff(MONTH,birthdate,"2016-12-1") AS age,"ธันวา" as TargetMonth,p.birthdate,t.vstdate,t.pp_special_type_name
from person p
left outer join (select x.cid, v.vstdate,a.pp_special_type_name
from pp_special pp
left outer join vn_stat v on v.vn=pp.vn
left outer join patient x on v.hn=x.hn
left outer join pp_special_type a on a.pp_special_type_id=pp.pp_special_type_id
where v.vstdate between "2016-10-01" and "2017-03-31" and a.pp_special_code in ("1B260","1B261","1B262") ) as t on t.cid=p.cid
where house_regist_type_id in ("1","3") and person_discharge_id = "9"
and p.nationality ="99" and timestampdiff(MONTH,birthdate,"2016-12-01") in ("8","17","29","41")
UNION
select p.cid,concat(p.pname,p.fname," ",p.lname) as ptname,
timestampdiff(MONTH,birthdate,"2017-1-1") AS age,"ม.ค" as TargetMonth,p.birthdate,t.vstdate,t.pp_special_type_name
from person p
left outer join (select x.cid, v.vstdate,a.pp_special_type_name
from pp_special pp
left outer join vn_stat v on v.vn=pp.vn
left outer join patient x on v.hn=x.hn
left outer join pp_special_type a on a.pp_special_type_id=pp.pp_special_type_id
where v.vstdate between "2016-10-01" and "2017-03-31" and a.pp_special_code in ("1B260","1B261","1B262") ) as t on t.cid=p.cid
where house_regist_type_id in ("1","3") and person_discharge_id = "9"
and p.nationality ="99" and timestampdiff(MONTH,birthdate,"2017-01-01") in ("8","17","29","41")
UNION
select p.cid,concat(p.pname,p.fname," ",p.lname) as ptname,
timestampdiff(MONTH,birthdate,"2017-02-1") AS age,"ก.พ." as TargetMonth,p.birthdate,t.vstdate,t.pp_special_type_name
from person p
left outer join (select x.cid, v.vstdate,a.pp_special_type_name
from pp_special pp
left outer join vn_stat v on v.vn=pp.vn
left outer join patient x on v.hn=x.hn
left outer join pp_special_type a on a.pp_special_type_id=pp.pp_special_type_id
where v.vstdate between "2016-10-01" and "2017-03-31" and a.pp_special_code in ("1B260","1B261","1B262") ) as t on t.cid=p.cid
where house_regist_type_id in ("1","3") and person_discharge_id = "9"
and p.nationality ="99" and timestampdiff(MONTH,birthdate,"2017-02-01") in ("8","17","29","41")
UNION
select p.cid,concat(p.pname,p.fname," ",p.lname) as ptname,
timestampdiff(MONTH,birthdate,"2017-03-1") AS age,"มี.ค." as TargetMonth,p.birthdate,t.vstdate,t.pp_special_type_name
from person p
left outer join (select x.cid, v.vstdate,a.pp_special_type_name
from pp_special pp
left outer join vn_stat v on v.vn=pp.vn
left outer join patient x on v.hn=x.hn
left outer join pp_special_type a on a.pp_special_type_id=pp.pp_special_type_id
where v.vstdate between "2016-10-01" and "2017-03-31" and a.pp_special_code in ("1B260","1B261","1B262") ) as t on t.cid=p.cid
where house_regist_type_id in ("1","3") and person_discharge_id = "9"
and p.nationality ="99" and timestampdiff(MONTH,birthdate,"2017-03-01") in ("8","17","29","41")

กรุณา เข้าสู่ระบบ หรือ สมัครสมาชิกใหม่ เพื่อเข้าร่วมวงสนทนา

เวลาที่ใช้ในการสร้างหน้าเว็บ: 0.158 วินาที
ขับเคลื่อนโดย ระบบฟอรัม Kunena