SELECT
ncd_person_ncd_screen.pid,
case when ncd_person_ncd_screen.height<100 OR ncd_person_ncd_screen.height>250 then ncd_person_ncd_screen.height else null end as 'ส่วนสูง',
case when ncd_person_ncd_screen.weight<30 OR ncd_person_ncd_screen.weight>250 then ncd_person_ncd_screen.weight else null end as 'น้ำหนัก',
case when ncd_person_ncd_screen.waist<50 OR ncd_person_ncd_screen.waist>200 then ncd_person_ncd_screen.waist else null end as 'เอว',
case when ncd_person_ncd_screen.hbp_s1<50 OR ncd_person_ncd_screen.hbp_s1>220 then ncd_person_ncd_screen.hbp_s1 else null end as 'ความดันค่าบน',
case when ncd_person_ncd_screen.hbp_d1<50 OR ncd_person_ncd_screen.hbp_d1>260  then ncd_person_ncd_screen.hbp_d1 else null end as 'ความดันค่าล่าง',
case when ncd_person_ncd_screen.bsl<50 OR ncd_person_ncd_screen.bsl>300 then ncd_person_ncd_screen.bsl else null end as 'ระดับน้ำตาล',
  ncd_person_ncd_screen.screen_date as วันที่คัดกรอง
FROM
	ncd_person_ncd_screen
WHERE
  (ncd_person_ncd_screen.height<100
OR ncd_person_ncd_screen.height>250
OR ncd_person_ncd_screen.weight<30
OR ncd_person_ncd_screen.weight>250
OR ncd_person_ncd_screen.waist<50
OR ncd_person_ncd_screen.waist>200
OR ncd_person_ncd_screen.hbp_s1<50
OR ncd_person_ncd_screen.hbp_s1>260
OR ncd_person_ncd_screen.hbp_d1<50 
OR ncd_person_ncd_screen.hbp_d1>260
OR ncd_person_ncd_screen.bsl<50
OR ncd_person_ncd_screen.bsl>300)
and ncd_person_ncd_screen.screen_date between '2015-10-01' and '2016-09-30'
ORDER BY
	ncd_person_ncd_screen.pid;