> ## Documentation Index
> Fetch the complete documentation index at: https://help.elationhealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Immunizations

Report on immunizations administered to or declined by patients at your practice.

## Administered

**For reporting on but not limited to:**

* Vaccines administered including CVX code, vaccine name, lot number, and manufacturer
* Who administered and ordered each vaccine
* Administration site, method, and quantity

```sql sql theme={null}
select
    pi.id as "IMMUNIZATION_ID"
  , pi.patient_id
  , pt.first_name as "PATIENT_FIRST_NAME"
  , pt.last_name as "PATIENT_LAST_NAME"
  , pt.dob
  , pi.cvx
  , pi.name as "VACCINE_NAME"
  , pi.administered_date
  , pi.qty
  , pi.qty_units
  , pi.lot_number
  , pi.manufacturer_name
  , pi.method
  , pi.site
  , pi.reason
  , pi.notes
  , concat('(', pi.administering_physician_id, ') ', a_user.first_name, ' ', a_user.last_name) as "ADMINISTERING_PHYSICIAN"
  , concat('(', pi.ordering_physician_id, ') ', o_user.first_name, ' ', o_user.last_name) as "ORDERING_PHYSICIAN"
  , pi.creation_time
  , pi.deletion_time
  , pi.last_modified
from patient_immunization pi
  join patient pt on pt.id = pi.patient_id
  left join user a_user on a_user.physician_id = pi.administering_physician_id
  left join user o_user on o_user.physician_id = pi.ordering_physician_id
where pi.deleted_by_user_id is null;
```

## Declined

**For reporting on but not limited to:**

* Which patients have declined specific vaccines and the reason for declination
* Declination trends across your patient panel

The `declined_reason` column stores a short code. Use the reference below or the `declined_reason_label` column in the sample query to get the human-readable value.

| Code | Label |
| - | - |
| `00` | Parental decision |
| `01` | Religious exemption |
| `02` | Other |
| `03` | Patient decision |
| `NULL` (when `immunity = true`) | Existing Immunity |

```sql sql theme={null}
select
    pid.id as "IMMUNIZATION_DECLINED_ID"
  , pid.patient_id
  , pt.first_name as "PATIENT_FIRST_NAME"
  , pt.last_name as "PATIENT_LAST_NAME"
  , pt.dob
  , pid.cdc_type
  , pid.declined_date
  , pid.declined_reason
  , case
      when pid.immunity = true then 'Existing Immunity'
      when pid.declined_reason = '00' then 'Parental decision'
      when pid.declined_reason = '01' then 'Religious exemption'
      when pid.declined_reason = '02' then 'Other'
      when pid.declined_reason = '03' then 'Patient decision'
      else 'Unknown'
    end as "DECLINED_REASON_LABEL"
  , pid.immunity
  , pid.creation_time
  , pid.deletion_time
  , pid.last_modified
from patient_immunization_declined pid
  join patient pt on pt.id = pid.patient_id
where pid.deleted_by_user_id is null;
```

*If you have any questions about this topic please reach out to [Elation Support Portal](https://help.elationhealth.com/articles/support-portal-introduction.md) with the subject line HDB - \<your\_question>*
