Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page is now outdated.

For current documentation about OpenMRS FHIR coverage and available FHIR API calls via the FHIR2 Module, see either the general documentation at https://om.rs/fhir101 or the FHIR IG documentation which creates an inventory of all supported resources & artifacts at https://fhir.openmrs.org 

FHIR Support in 1.3.0

Note that all URLs are prefixed with the OpenMRS URL prefix (usually "/openmrs") and the FHIR module-specific prefix ("/ws/fhir2/"), the FHIR version, and then the resource name. The FHIR module suppports both FHIR R4 and DSTU3. For R4, use URLs with /R4 . For DSTU3, use URLs with /R3 . So, for example, the full URL for a Patient resource might be something like: http://localhost:8080/openmrs/ws/fhir2/R4/Patient/{uuid}.

...

ResourceGETSearchPOSTUPDATEDELETEOperationsComments
Person
/
/{uuid}
?name={string}
?gender=[male|female|unknown|null]
?birthdate={date-range}
?address-city={string}
?address-state={string}
?address-country={string}
?address-postalcode={string}
?_id={uuid}
?_lastUpdated={date-range}
//{uuid }/{uuid }

Patient
/
/{uuid}
?name={string}
?given={string}
?family={string}
?identifier={string}
?gender=[male|female|unknown|null]
?birthdate={date-range}
?death-date={date-range}
?deceased=[true|false]
?address-city={string}
?address-state={string}
?address-country={string}
?address-postalcode={string}
?_id={uuid}
?_lastUpdated={date-range}
//{uuid }/{uuid }

Practitioner
/
/{uuid}
?name={string}
?given={string}
?family={string}
?identifier={string}
?address-city={string}
?address-state={string}
?address-country={string}
?address-postalcode={string}
?_id={uuid}
?_lastUpdated={date-range}
//{uuid }/{uuid }
Note that Practitioner maps to both OpenMRS Users and Providers. However, Users are only provided for GET and Search requests and cannot be created or modified via the FHIR API.
Location
/
/{uuid}
?name={string}
?address-city={string}
?address-state={string}
?address-country={string}
?address-postalcode={string}
?part-of={reference}
?part-of.name={string}
?part-of.address-city={string}
?part-of.address-state={string}
?part-of.address-country={string}
?part-of.address-postalcode={string}
?_tag={string}
?_id={uuid}
?_lastUpdated={date-range}
//{uuid }/{uuid }

_tag allows you to search by the Location tag name.

Encounter
/
/{uuid}
?subject={reference}
?subject.identifier={string}
?subject.given={string}
?subject.family={string}
?subject.name={string}
?patient={reference}
?patient.identifier={string}
?patient.given={string}
?patient.family={string}
?patient.name={string}
?date={date}
?location={reference}
?location.address-city={string}
?location.address-state={string}
?location.address-country={string}
?location.address-postalcode={string}
?participant={reference}
?participant.identifier={string}
?participant.given={string}
?participant.family={string}
?participant.name={string}
?type={string}
?_id={uuid}
?_lastUpdated={date-range}
/
/{uuid}
/{uuid}

Only one of patient or subject will be honored when searching.

Because encounter can represent both a Visit or an Encounter, the Encounter.type field must  be set for creates or updates to work. This field needs to have at least one coding with a system of http://fhir.openmrs.org/code-system/Encounter or http://fhir.openmrs.org/code-system/Visit and the code should be the UUID of the encounterType  or visitType 

Observation
/
/{uuid}
?encounter={reference}
?subject={reference}
?subject.identifier={string}
?subject.given={string}
?subject.family={string}
?subject.name={string}
?patient={reference}
?patient.identifier={string}
?patient.given={string}
?patient.family={string}
?patient.name={string}
?has-member={reference}
?has-member.code={codeable concept}
?code={codeable concept}
?date={date}
?value-concept={codeable concept}
?value-date={date}
?value-quantity={quantity}
?value-string={string}
?_id={uuid}
?_lastUpdated={date-range}
/ 
/{uuid }

Obviously, it is not possible to update observations in OpenMRS and when they are replaced, the new observation will have a new UUID and hence be a new FHIR resource.

We do not currently have a way to indicate that one observation replaces an existing observation.

Only one of patient or subject will be honored when searching.

Immunization
/
/{uuid}
?patient.identifier={string}
/
/{uuid}
/{uuid}

Immunization is backed by the the CIEL Immunization History (1421) concept structure. To work with Immunizations, you must have that concept set or concepts mapped to that concept set. Additionally, you must define an encounter type for immunizations and an encounter role for the provider administering the immunization. The value of these needs to be set in the fhir2.immunizationsEncounterTypeUuid and fhir2.administeringEncounterRoleUuid  global properties or else Immunizations will not be properly supported.

Currently, Immunization is only support for FHIR Release R4.

AllergyIntolerance
/
/{uuid}
?subject={reference}
?subject.identifier={string}
?subject.given={string}
?subject.family={string}
?subject.name={string}
?patient={reference}
?patient.identifier={string}
?patient.given={string}
?patient.family={string}
?patient.name={string}
?category=[food | medication | environment | biologic]
?code={codeable concept}
?severity={codeable concept}
?manifestation={codeable concept}
?clinical-status={codeable concept}
?_id={uuid}
?_lastUpdated={date-range}
//{uuid }/{uuid }
Only one of patient or subject will be honored when searching.
Condition
/
/{uuid}
?subject={reference}
?subject.identifier={string}
?subject.given={string}
?subject.family={string}
?subject.name={string}
?patient={reference}
?patient.identifier={string}
?patient.given={string}
?patient.family={string}
?patient.name={string}
?code={codeable concept}
?clinical-status={codeable concept}
?onset-date={date}
?onset-age={quantity}
?recorded-date={date}
?_id={uuid}
?_lastUpdated={date-range}
/
/{uuid }/{uuid }

Only one of patient or subject will be honored when searching.

Condition is only supported as a first-class object on Platform 2.2.0 or higher. On Platform versions prior to 2.2, it is supported by looking for Obs with a concept matching UUID 1284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.

Medication
/
/{uuid}
?code={codeable concept}
?form={codeable concept}
?ingredient-code={codeable concept}
?_id={uuid}
?_lastUpdated={date-range}
/
/{uuid}
/{uuid}


MedicationRequest

/

/{uuid}
?subject={reference}
?subject.identifier={string}
?subject.given={string}
?subject.family={string}
?subject.name={string}
?patient={reference}
?patient.identifier={string}
?patient.given={string}
?patient.family={string}
?patient.name={string}
?encounter={reference}
?code={codeable concept}
?requestor={reference}
?requestor.identifier={string}
?requestor.given={string}
?requestor.family={string}
?requestor.name={string}
?medication={reference}
?_id={uuid}
?_lastUpdated={date-range}




Only one of patient or subject will be honored when searching.

In 1.0.0, resources representing orders are read-only.

DiagnosticReport
/{uuid}
?subject={reference}
?subject.identifier={string}
?subject.given={string}
?subject.family={string}
?subject.name={string}
?patient={reference}
?patient.identifier={string}
?patient.given={string}
?patient.family={string}
?patient.name={string}
?encounter={reference}
?issued={date-range}
?code={codeable concept}
?result={reference}
?_id={uuid}
?_lastUpdated={date-range}
/
/{uuid}
/{uuid}

Only one of patient or subject will be honored when searching.

ServiceRequest

ProcedureRequest (DSTU3)

/{uuid}
?subject={reference}
?subject.identifier={string}
?subject.given={string}
?subject.family={string}
?subject.name={string}
?patient={reference}
?patient.identifier={string}
?patient.given={string}
?patient.family={string}
?patient.name={string}
?encounter={reference}
?code={codeable concept}
?requestor={reference}
?requestor.identifier={string}
?requestor.given={string}
?requestor.family={string}
?requestor.name={string}
?occurrence={date-range}
?_id={uuid}
?_lastUpdated={date-range}




Only one of patient or subject will be honored when searching.

In 1.0.0, resources representing orders are read-only.

Task
/{uuid}
?based-on={reference}
?owner={reference}
?status={codeable concept}
?_id={uuid}
?_lastUpdated={date-range}
/
/{uuid}
/{uuid }

...