1. คำสั่งตรวจสอบทันตกรรมเคลือบหลุมร่องฟัน อายุ6-12ปี รหัส icd10tm(("238703a","238703b","238703c","238703d","238703e","238703f","238703g",
"238703h","2377030","2387030") Free schedule เบิกผ่านโปรแกรม E-claim ชดเชยได้ 4 ซี่ต่อปี ไม่นับซี่ซ้ำ
คำสั่ง SQL = select patient.hn,concat(patient.pname,patient.fname," ",patient.lname) as fullname,vn_stat.age_y,opitemrece.vstdate,
dttm.name as icd10name,dttm.icd10tm_operation_code as icd10tm from patient,opitemrece,dttm,vn_stat where
patient.hn=opitemrece.hn and opitemrece.vn=vn_stat.vn and opitemrece.icode=dttm.icode and
dttm.icd10tm_operation_code in("238703a","238703b","238703c","238703d","238703e","238703f","238703g",
"238703h","2377030","2387030") and vn_stat.age_y >="6" and vn_stat.age_y<="12"
and opitemrece.vstdate between "2019-10-01" and "2020-09-30" order by 1,2

2. คำสั่งตรวจสอบทันตกรรมเคลือบฟลูออไรด์หลุมร่องฟัน อายุ6-12ปี รหัส icd10tm(("238703a","238703b","238703c","238703d","238703e","238703f","238703g",
"238703h","2377030","2387030") Free schedule เบิกผ่านโปรแกรม E-claim ชดเชยได้ 4 ซี่ต่อปี ไม่นับซี่ซ้ำ
คำสั่ง SQL = select patient.hn,concat(patient.pname,patient.fname," ",patient.lname) as fullname,vn_stat.age_y,opitemrece.vstdate,dttm.name as icd10name,
dttm.icd10tm_operation_code as icd10tm from patient,opitemrece,dttm,vn_stat where patient.hn=opitemrece.hn and opitemrece.vn=vn_stat.vn
and opitemrece.icode=dttm.icode and dttm.icd10tm_operation_code in("2377020","2377021") and vn_stat.age_y >="4" and vn_stat.age_y<="12"
and opitemrece.vstdate between "2019-10-01" and "2020-09-30" order by 1,2

                                   วิธีการใช้งาน SQL QUERY HOSxP