Personal tools
You are here: Home / OSCAR Users / EMR and Case Management Resources / Query By Example - Database Searches / Find all registered children under a certain age
 

Find all registered children under a certain age

Contributed by Peter Everett

The Problem:

  • "Hi all, Re: Pertussis outbreak in fraser health, is anyone searching their databases for all patients under 18 mos and calling in their families for shots? What query should we use if we wanted to do that?" Tracy Monk                      

 

The Query:

Hello all...I hate to see Kids sick... Paste the below in the Admin > Query by example ...

SELECT demographic.last_name, demographic.first_name, demographic.year_of_birth, demographic.month_of_birth, demographic.date_of_birth, demographic.hin, demographic.ver, demographic.sex, demographic.phone, demographic.phone2, demographic.email
FROM demographic
WHERE (demographic.year_of_birth >=2011) OR (demographic.year_of_birth = "2010" AND demographic.month_of_birth > 8)

 

SOOO

I have put the age sex and HIN (with subcode i.e.: 66) phone numbers and email (just in case you have it). I am looking for all patients with birth dates after 08-2010...  (hope i got that right). But as you see it is easy to change in the "where clause"

Keep them well, Cheers, Peter

Peter Everett C.A.
CFO
Treatment 

Document Actions

 

Download button

DOWNLOAD OSCAR FOR TESTING

 

eForms button

DOWNLOAD SHARED E-FORMS


 Customize button

FIND PLUG-INS AND TWEAKS
FOR YOUR OSCAR EMR

 

Subscribe Button

SUBSCRIBE TO DISCUSSION LIST 
(SEE ALL LISTS)

  

Help button

ACCESS THE ONLINE MANUALS
(PAID SUPPORT)