SQL: Find Synagis Candidates

About

This report shows chart number, first name, and last name of all active patients who have “Synagis indicated” in their birth history.

A sample image of this SQL report run in the Database Viewer is shown below:

Caveats

  • This will show only active patients.
  • There is no DOB cutoff in this report, but it will show the youngest patients first.
  • In order to list a patient, the Synagis Indicated  checkbox must be selected in the Patient Chart/History/Perinatal History/Birth Info tab. A patient will not show in the list just because a patient is listed with a diagnosis code as having been premature, having chronic lung disease, etc.

Code

To highlight and copy the code below to your clipboard, simply click the Copy button.

select register.patno, fname, lname, birthdat, familyimmunostatus from medhist
inner join register on register.patno = medhist.patno
where status_pat = 'ACTIVE' and familyimmunostatus not in ('0','N')
order by birthdat desc