> ## 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.

# Immunization

## Overview

The Immunization resource describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party. At its minimum, Immunization contains vaccine code, date, reference to the patient and status of the immunization, but may also contain data about the administered vaccine including the manufacturer, lot number and expiration date.

If an immunization was not given, this would be represented as:

* `Immunization.status = “not-done”`

Each Immunization has next elements:

* a status
* a vaccine code that identifies the kind of vaccine administered
* a date the vaccine was administered
* a patient

Each Immunization must support:

* a statusReason if the vaccine wasn't given

| USCore Data Element | FHIR Resource Field      |
| ------------------- | ------------------------ |
| status              | Immunization.status      |
| vaccine             | Immunization.vaccineCode |
| date                | Immunization.occurrence  |
| patient             | Immunization.patient     |

**Profile specific implementation guidance:**

* Use the status code: not-done to represent that an immunization was not given.
* NDC codes as a translational data element: Based upon the 2015 Edition Certification Requirements, [CVX vaccine codes](http://www2a.cdc.gov/vaccines/iis/iisstandards/vaccines.asp?rpt=cvx) are required and the NDC vaccine codes SHOULD be supported as translations to them. A [NDC to CVX ConceptMap](http://www2a.cdc.gov/vaccines/iis/iisstandards/ndc_crosswalk.asp) is provided and is based upon the CDC's [CVX crosswalk table](http://www2a.cdc.gov/vaccines/iis/iisstandards/ndc_crosswalk.asp). A translation is illustrated in the example below.

This resource conforms to **[USCDI v3 profile](https://www.healthit.gov/isa/uscdi-data-class/immunizations)** for Immunization - refer to [StructureDefinition US Core Immunization](http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-immunization.html). Immunization response will be provided in JSON (refers to Capability Statement) format as per [FHIR](https://hl7.org/fhir) standard R4 version.

### Must support elements, mandatory and optional search parameters

Immunization **must support** these elements:

* `status`
* `statusReason`
* `vaccineCode`
* `patient`
* `occurrence[x]`
* `primarySource`

The following search parameters and search parameter combinations SHALL be supported:

The syntax used to describe the interactions is described [here](/articles/fhir/us-core-guidance).

**SHALL** support searching for all immunizations for a patient using the patient search parameter:
`GET [base url]/Immunization?patient={Type/}[id]`

The following search parameters and search parameter combinations SHOULD be supported:
**SHOULD** support searching using the combination of the patient and date search parameters:

* including support for these date comparators: gt,lt,ge,le
* including optional support for AND search on date (e.g.date=\[date]\&date=\[date]]&...)
  `GET [base url]/Immunization?patient={Type/}[id]&date=[date]`

**SHOULD** support searching using the combination of the patient and status search parameters:
`GET [base url]/Immunization?patient={Type/}[id]&status={system|}[code]`

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

## Immunization By Patient Id

Search for immunizations by patient id.

**METHOD** *GET*

```
[base url]/Immunization?patient={Type/}[id]
```

**PARAMS**
\[base url] - [FHIR base url](/articles/fhir/service-base-urls)
\[id] - Id for the Patient

**HEADERS**

The Authorization token SHALL be obtained during the Authentication and Authorization process. Go to [Authentication and Authorization](/articles/fhir/authentication-authorization) for further details.

| Header        | Type       | Required/Optional | Value            |
| ------------- | ---------- | ----------------- | ---------------- |
| Authorization | **string** | required          | `Bearer <token>` |

**RESPONSES**

| Code | Description                        | Comment                                                                                                                                         |
| ---- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 200  | OK                                 | The request was processed successfully                                                                                                          |
| 400  | Bad request                        | Invalid request parameters or FHIR operation outcome resource returned                                                                          |
| 401  | Unauthorized                       | This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource |
| 404  | No route matched with those values | The request was able to communicate with a given server, but the server could not find what was requested                                       |
| 500  | Internal Server Error              | The server has encountered a situation it doesn't know how to handle                                                                            |

**EXAMPLE:**

```
curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Immunization?patient=Patient/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'
```

## Immunization By Id

Get Immunization by ID.

**METHOD** *GET*

```
[base url]/Immunization/{id}
```

or

```
[base url]/Immunization?_id={id}
```

**PARAMS**
\[base url] - [FHIR base url](/articles/fhir/service-base-urls)
\{id} - Id of Immunization resource

**HEADERS**

The Authorization token SHALL be obtained during the Authentication and Authorization process. Go to [Authentication and Authorization](/articles/fhir/authentication-authorization) for further details.

| Header        | Type       | Required/Optional | Value            |
| ------------- | ---------- | ----------------- | ---------------- |
| Authorization | **string** | required          | `Bearer <token>` |

**RESPONSES**

| Code | Description                        | Comment                                                                                                                                         |
| ---- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 200  | OK                                 | The request was processed successfully                                                                                                          |
| 400  | Bad request                        | Invalid request parameters or FHIR operation outcome resource returned                                                                          |
| 401  | Unauthorized                       | This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource |
| 404  | No route matched with those values | The request was able to communicate with a given server, but the server could not find what was requested                                       |
| 500  | Internal Server Error              | The server has encountered a situation it doesn't know how to handle                                                                            |

**EXAMPLE:**

```
curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Immunization/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'
```

## Immunization By patient and date search parameters

Get Immunization by combination of the patient and date search parameters.

**METHOD** *GET*

```
[base url]/Immunization?patient=[reference]&date={gt|lt|ge|le}[date]{&date={gt|lt|ge|le}[date]&...}
```

**PARAMS**
\[base url] - [FHIR base url](/articles/fhir/service-base-urls)
\[reference] - reference to the Patient
\[date] - immunization date

**HEADERS**

The Authorization token SHALL be obtained during the Authentication and Authorization process. Go to [Authentication and Authorization](/articles/fhir/authentication-authorization) for further details.

| Header        | Type       | Required/Optional | Value            |
| ------------- | ---------- | ----------------- | ---------------- |
| Authorization | **string** | required          | `Bearer <token>` |

**RESPONSES**

| Code | Description                        | Comment                                                                                                                                         |
| ---- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 200  | OK                                 | The request was processed successfully                                                                                                          |
| 400  | Bad request                        | Invalid request parameters or FHIR operation outcome resource returned                                                                          |
| 401  | Unauthorized                       | This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource |
| 404  | No route matched with those values | The request was able to communicate with a given server, but the server could not find what was requested                                       |
| 500  | Internal Server Error              | The server has encountered a situation it doesn't know how to handle                                                                            |

**EXAMPLE:**

```
curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Immunization?patient=1137192&date=ge2019-01-14' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'
```

## Immunization by patient and status search parameters

Get Immunization by combination of the patient and status search parameters.

**METHOD** *GET*

```
[base url]/Immunization?patient=[reference]&status={system|}[code]
```

**PARAMS**
\[base url] - [FHIR base url](/articles/fhir/service-base-urls)
\[reference] - reference to the Patient
\{system|} - terminology system used to define immunization status code
\[code] - status of immunization

**HEADERS**

The Authorization token SHALL be obtained during the Authentication and Authorization process. Go to [Authentication and Authorization](/articles/fhir/authentication-authorization) for further details.

| Header        | Type       | Required/Optional | Value            |
| ------------- | ---------- | ----------------- | ---------------- |
| Authorization | **string** | required          | `Bearer <token>` |

**RESPONSES**

| Code | Description                        | Comment                                                                                                                                         |
| ---- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 200  | OK                                 | The request was processed successfully                                                                                                          |
| 400  | Bad request                        | Invalid request parameters or FHIR operation outcome resource returned                                                                          |
| 401  | Unauthorized                       | This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource |
| 404  | No route matched with those values | The request was able to communicate with a given server, but the server could not find what was requested                                       |
| 500  | Internal Server Error              | The server has encountered a situation it doesn't know how to handle                                                                            |

**EXAMPLE:**

```
curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Immunization?patient=1137192&status=completed' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'
```
