Observation Resource
Observation is a FHIR resource that is "used to support diagnosis, monitor progress, determine baselines and patterns and even capture demographic characteristics." As such, Observations have a wide range of uses and show up in a wide range of places. FHIR Observations are mapped to OpenMRS Obs objects.
Supported Elements
The following properties are supported by the OpenMRS FHIR Module:
Observation.id
Observation.code
Observation.category
Observation.status
Observation.interpretation
Observation.issued
- Observation.encounter
- Observation.basedOn
- Observation.subject
- Observation.value[x]
OpenMRS ↔ FHIR Mapping
OpenMRS Data Model | FHIR Resource Element |
---|---|
Obs.uuid | Observation.id |
Obs.concept | Observation.code |
Obs.concept | Observation.category |
Obs.status | Observation.status |
Obs.interpretation | Observation.interpretation |
Obs.dateCreated | Observation.issued |
Obs.encounter | Observation.encounter |
Obs.order | Observation.basedOn |
Obs.person | Observation.subject |
Obs.value[x] | Observation.value[x] |
1 category
is determined by a simple mapping table (fhir_observation_category_map
) that maps between the FHIR observation category value-set (if possible) and a particular conceptClass
. By default, the following categories will be mapped if the expected versions of them exist in the concept dictionary:
Category | Concept Class |
---|---|
laboratory | Test |
procedure | Procedure |
exam | Finding |
2 value[x]
mappings between OMRS and Observation are largely one-to-one where possible. Numeric values are generally mapped to valueQuantity
; coded observations are mapped to valueCodeableConcept
, etc.
Code System Mapping
The FHIR2 module has a fairly generic system for mapping between OpenMRS concepts and observation codes. The FHIR2 module will send and accept codes from any coding system it knows about. A few of the common ones (note that these should usually be available by default):
URL | Code System |
---|---|
http://loinc.org | LOINC |
http://snomed.info/sct | SNOMED CT |
https://openconceptlab.org/orgs/CIEL/sources/CIEL | CIEL |
In addition, the FHIR module will send and accept the concept UUID without any system as a reference to that concept. The FHIR module can be instructed to use other systems as well. Mappings between system URLs and the underlying OpenMRS concept sources are maintained in a simple mapping table (fhir_concept_source
). Adding a new entry to the table will add a newly supported concept system.
Available RESTful Endpoints
Note: placeholder "{release}" below must be replaced by the FHIR Release - currently "R3" and "R4" are implemented. See more on the FHIR Release support page.
GET
URL | Description |
---|---|
/ws/fhir2/{release}/Observation | Gets all observations |
/ws/fhir2/{release}/Observation/{uuid} | Gets a specific observation |
/ws/fhir2/{release}/Observation?{query} | Searches for observations matching the provided criteria |
Supported Search Parameters
Parameter | Value Type | Description |
---|---|---|
date | date | Searches for observations by the observation date and time |
code | token | Searches for observations with particular codes (concepts) |
category | token | Searches for observations by the observation category |
encounter | reference | Searches the encounter in which this observation was recorded |
subject | reference | Searches for observations by a given patient |
subject.identifier | token | Searches for observations by the patient identifier |
subject.given | string | Searches for observations based on the patient's given name(s) |
subject.family | string | Searches for observations based on the patient's family name |
subject.name | string | Searches for observations based on the patient's full or partial name |
patient | reference | Searches for observations by a given patient |
patient.identifier | token | Searches for observations by the patient identifier |
patient.given | string | Searches for observations based on the patient's given name(s) |
patient.family | string | Searches for observations based on the patient's family name |
patient.name | string | Searches for observations based on the patient's full or partial name |
has-member | reference | Searches for an observation group that contains a given observation |
has-member.code | token | Searches for an observation group that contains an observation with the provided code |
value-concept | token | Searches for an observation whose value is a concept that matches the provided concept code |
value-date | date | Searches for an observation whose value is a date by the specified date range. |
_id | Searches based on the exact UUID of the person record | |
_lastUpdated | date | Searches based on the the dateCreated field for the observation record |
1 See the notes on category mapping above
Supported _includes
Include | Description |
---|---|
Observation:encounter | Includes the encounter for any observations in the result set |
Observation:patient | Includes the patient for any observations in the result set |
Observation:has-member | Includes the observation group members for any observation group in the result set |
Supported _revincludes
Include | Description |
---|---|
Observation:has-member | Includes the observation group observation for any searches that match an observation group memeber |
DiagnosticReport:result | Includes the diagnostic report (if any) for which this observation is a result |
POST
URL | Description |
---|---|
/ws/fhir2/{release}/Observation | Creates a new observation |
DELETE
URL | Description |
---|---|
/ws/fhir2/{release}/Observation/{uuid} | Deletes (voids) the specified observation |