API Reference

Overview

Encounter Information addresses to:

Encounter contains an information about an interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.

An encounter has a class to distinguish between different health care settings such as inpatient, outpatient, emergency, etc. A patient may have one medical record number with multiple encounter numbers per facility or organization.

The Hospitalization component is intended to store the extended information relating to a hospitalization event. It is always expected to be the same period as the encounter itself. Where the period is different, another encounter instance should be used to capture this information as a partOf this encounter instance.

Each Encounter has next elements:

  • a status
  • an classification such as inpatient, outpatient or emergency
  • an encounter type
  • a patient

Each Encounter must support:

  • an encounter identifier
  • providers involved in the encounter
  • when the encounter occurred
  • reason for the visit
  • the discharge disposition
  • where the encounter occurred

Profile specific implementation guidance:

  • To search for an encounter diagnosis, query for Condition resources that reference the Encounter of interest and have a category of encounter-diagnosis.
  • The Encounter resource can represent a reason using either a code with Encounter.reasonCode, or a reference with Encounter.reasonReference to Condition or other resource.
    • Although both are marked as must support, servers are not required to support both a code and a reference, but they SHALL support at least one of these elements.
    • The client application SHALL support both elements.
    • If Encounter.reasonReference references an Observation, it SHOULD conform to a US Core Observation if applicable. For example, a laboratory result SHOULD conform to the US Core Laboratory Result Observation Profile.
  • This profile supports where the encounter occurred. The location address can be represented by the Location referenced by Encounter.location.location or indirectly through the Organization referenced by Encounter.serviceProvider.
    • Although both are marked as must support, servers are not required to support both Encounter.location.location and Encounter.serviceProvider, but they SHALL support at least one of these elements.
    • The client application SHALL support both elements.
    • If using Encounter.location.location it SHOULD conform to US Core Location. However, as a result of implementation feedback, it MAY reference the base FHIR Location resource. See this guidance on Referencing US Core Profiles.

This resource conforms to USCDI V2 profile for Encounter - refers to US Core Encounter Profile. Encounter response will be provided in JSON (refers to Capability Statement) format as per FHIR standard R4 version.

USCDIUSCore Data ElementFHIR Resource Field
Encounter DiagnosisdiagnosisEncounter.diagnosis
Encounter TimeWhen the encounter occurredEncounter.period
Encounter LocationWhere the encounter occurredEncounter.location.location
Encounter DispositionThe discharge dispositionEncounter.hospitalization.dischargeDisposition
Encounter TypeAn encounter typeEncounter.type
A statusEncounter.status
An classification such as inpatient, outpatient or emergencyEncounter.class
A patientEncounter.subject
An encounter identifierEncounter.identifier
Providers involved in the encounterEncounter.serviceProvider
Reason for the visitEncounter.reasonCode, Encounter.reasonReference

Must support elements, mandatory and optional search parameters

Encounter must support these elements:

  • identifier
  • status
  • class
  • type
  • subject
  • participant
  • period
  • reasonCode
  • reasonReference
  • hospitalization
    • dischargeDisposition
  • location
    • location
  • serviceProvider

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

The syntax used to describe the interactions is described here.

SHALL support fetching an encounter using the _id search parameter:

GET [base url]/Encounter/{id}
or
GET [base url]/Encounter?_id={id}

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

SHALL support searching using the combination of the date and patient 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]/Encounter?date={gt|lt|ge|le}[date]{&date={gt|lt|ge|le}[date]&...}&patient={Type/}[id]

The following search parameter combinations SHOULD be supported:

SHOULD support searching using the identifier search parameter:
GET [base url]/Encounter?identifier={system|}|{code}

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

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

SHOULD support searching using the combination of the patient and location search parameters:
GET [base url]/Encounter?patient={Type/}[id]&location={Type}/{id}

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

SHOULD support searching using the combination of the patient and discharge-disposition search parameters:
GET [base]/Encounter?patient={Type/}[id]&discharge-disposition={system|}|{code}

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

Encounter By Id

Get Encounter by id

METHOD GET

[base url]/Encounter/{id}

or

[base url]/Encounter?_id={id}

PARAMS
[base url] - FHIR base url
{id} - Id for Encounter resource

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

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

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Encounter/b3117fc5-3116-b12a-cbbc-a0c3def361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Encounter By Patient Id

Search all Encounter by the specified Patient

METHOD GET

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

PARAMS
[base url] - FHIR base url
{Type} - Type for the Reference. Example: Patient/
{id} - Id for Patient resource

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

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

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Encounter?patient=Patient/b3117fc5-3116-b12a-cbbc-a0c3def361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Encounter for the Patient and for the period

Search all Encounters of the patient in a specific period defining period begin and/or period end

METHOD GET

[base url]/Encounter?date={gt|lt|ge|le}[date]{&date={gt|lt|ge|le}[date]}&patient={Type/}[id]

PARAMS
[base url] - FHIR base url
{gt|lt|ge|le} - Search modifiers for the date. See Search specification for more information.
[date] - Begining and/or ending for a period
{Type/} - Type for the Reference. Example: Patient/
[id] - Id for Patiet resource

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

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

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Encounter?date=lt2021-01-11&date=gt2021-01-13&patient=Patient/example' \ --header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd

Encounter by Identifier

Search Encounter by the specified identifier

METHOD GET

[base url]/Encounter?identifier={system|}[code]

PARAMS
[base url] - FHIR base url
{system|} - Identifier system. FHIR search token parameter. See Search specification for more information.
[code] - Identifier code. FHIR search token parameter. See Search specification for more information.

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

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

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Encounter?identifier=http://happyNation.io/visitId|00001' \ --header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd

Encounter for the Patient by Class

Search all Encounters for the specific Patient by Encounter class.

METHOD GET

[base url]/Encounter?class={system|}[code]&patient={Type/}[id]

PARAMS
[base url] - FHIR base url
{system|} - Identifier system. FHIR search token parameter. See Search specification for more information.
[code] - Identifier code. FHIR search token parameter. See Search specification for more information.
{Type} - Type for the Reference. Example: Patient/
[id] - Id for the Patient

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

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

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Encounter?class=http://terminology.hl7.org/CodeSystem/v3-ActCode|AMB&patient=Patient/example' \ --header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd

Encounter for the Patient by Type

Search all Encounters for the specific Patient by Encounter type.

METHOD GET

[base url]/Encounter?type={system|}[code]&patient={Type/}[id]

PARAMS
[base url] - FHIR base url
{system|} - Identifier system. FHIR search token parameter. See Search specification for more information.
[code] - Identifier code. FHIR search token parameter. See Search specification for more information.
{Type} - Type for the Reference. Example: Patient/
[id] - Id for the Patient

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

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

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Encounter?type=http://snomed.info/sct|261665006&patient=Patient/example' \ --header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd

Encounter for the Patient by Encounter Location

Search all Encounters for the specific Patient by the specific Encounter Location. This API call supports searching using the combination of the patient and location search parameters.

METHOD GET

[base url]/Encounter?location={locationType/}[locationId]&patient={Type/}[id]

PARAMS
[base url] - FHIR base url
{locationType/} - Type for the Location Reference. Example: Location/
[locationId] - Id for the Location
{Type/} - Type for the Reference. Example: Patient/
[id] - Id for the Patient

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

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

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Encounter?location=Location/ward_001&patient=Patient/example' \ --header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd

Encounter for the Patient by Encounter Status

Search all Encounters for the specific Patient by the specific Encounter status. This API call supports searching using the combination of the patient and status search parameters.

METHOD GET

[base url]/Encounter?status={system|}[code]&patient={Type/}[id]

PARAMS
[base url] - FHIR base url
{system|} - Identifier system. FHIR search token parameter. See Search specification for more information.
[code] - Identifier code. FHIR search token parameter. See Search specification for more information.
{Type/} - Type for the Reference. Example: Patient/
[id] - Id for the Patient

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

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

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Encounter?status=finished&patient=Patient/aa74fca2-2c68-47a8-98b6-3857d3df75c4' \ --header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd

Encounter for the Patient by Encounter Discharge disposition

Search all Encounters using the combination of the specific Patient and discharge-disposition search parameters.

METHOD GET

[base url]/Encounter?discharge-disposition={system|}|[code]&patient={Type/}[id]

PARAMS
[base url] - FHIR base url
{system|} - Identifier system. FHIR search token parameter. See Search specification for more information.
[code] - Identifier code. FHIR search token parameter. See Search specification for more information.
{Type/} - Type for the Reference. Example: Patient/
[id] - Id for the Patient

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
Authorizationstringrequired'Bearer'

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

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

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Encounter?discharge-disposition=http://www.nubc.org/patient-discharge|01&patient=Patient/aa74fca2-2c68-47a8-98b6-3857d3df75c4' \ --header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd