Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
Child pages
  • Observation Resource
Skip to end of metadata
Go to start of metadata

Introduction

  • This page documents the implementation of the FHIR Observation resource (DSTU2) for the OpenMRS FHIR Module

  • The FHIR Observation Resource provides measurements and simple assertions made about a patient, device or other subject.
  •  For more information on the FHIR Observation resource, please refer http://hl7-fhir.github.io/observation.html

Populating the FHIR Observation Resource 

Shown below is how attributes of the FHIR Observation Resource map to the attributes of the OpenMRS Observation object. The left side of the relationship indicates the OpenMRS attribute; the right indicates the FHIR Observation resource mapping.

Observation
  String accessionNumber :: Observation.identifier
  String comment ::  Observation.comments
  ComplexData complexData :: -- not mapped --
  Concept concept ::  Observation.Name
  Encounter encounter :: Observation.extension http://resources.openmrs.org/doc/fhir/profiles/vitalsigns.xml#encounter  "Indicates that the information in the resource was gathered at a particular location"
  Set<Obs> groupMembers:: Observation.relatedItem.target (type = has-component)
  Location location :: Observation.extension  http://resources.openmrs.org/doc/fhir/profiles/vitalsigns.xml#location
  Date obsDatetime :: Observation.appliesDateTime
  Obs obsGroup:: n/a - back links are implicit not explicit
  Integer obsId :: n/a - goes in the URL e.g. [base]/Observation/[obsId]
  Order order :: not mapped (at least for now)
  Person person :: Observation.subject
  Integer personId :: not mapped
  static long serialVersionUID :: not mapped
  Concept valueCoded :: Observation.valueCodeableConcept
  ConceptName valueCodedName :: Observation.valueCodeableConcept
  String valueComplex :: Observation.valueAttachment
  Date valueDatetime :: Observation.valueDateTime
  Drug valueDrug :: Observation.valueCodeableConcept
  Integer valueGroupId :: not mapped
  String valueModifier :: not mapped
  Double valueNumeric :: Observation.valueQuantity
  String valueText::  Observation.valueString

Example FHIR Observation Resource

Shown below is a fleshed out FHIR Observation Resource.

FHIR Observation Resource
{
	resourceType: "Observation"
	name: {
		coding: [1]
			0:  {
				system: "UNSPECIFIED"
				code: "39156-5"
				display: "Body Mass Index"
			}-
		-
	}-
	valueQuantity: {
		value: 18.14
		units: "kg/m2"
		system: "http://unitsofmeasure.org"
		code: "kg/m2"
	}-
	appliesDateTime: "2011-05-17T00:00:00"
	issued: "2014-09-13T22:02:34.000"
	status: "final"
	reliability: "ok"
	subject: {
		reference: "Patient/dda12af7-1691-11df-97a5-7038c432aabf"
		display: "Valentine Ekero(Identifier:8079AM-6)"
	}-
	referenceRange: [1]
		0:  {
			low: {
				value: 0
			}-
			high: {
				value: 100
			}-
		}-
}

Available RESTful web services for the Observation Resource supported by the API

Read (GET Request)
URLDescription
 /ws/fhir/Observation/{id}Returns a FHIR Observation resource identified by a Observation UUID

Outcomes:

  • Returns a FHIR Observation resource if the specified Observation exists
  • Returns an Operation Outcome resource with a 404 error message if the specified Observation does not exist
Search (GET Request)
URLDescription
 /ws/fhir/Observation?_id={id}This request will fetch all Observations using the given id value. This will return a List of Observation as the response. Here _id parameter represents, the logical resource id associated with the resource.
  /ws/fhir/Observation?subject:Patient={id}&code={code}This request will fetch all Observations using the given patient id and the concept name that in the Observation. This will return a List of Observation as the response. Here subject:Patient parameter represents the subject that the observation is about and name parameter represents the concept name that in the Observation.
 /ws/fhir/Observation?code={code}This request will fetch all Observations using the name of the concept that in the Observation. This will return a List of Observation as the response. Here name parameter represents the concept that in the Observation
/ws/fhir/Observation?date={date}This request will fetch all Observations using the given observation date value. This will return a List of Observation as the response. Here date parameter represents the time that the observation is most relevant as an observation of the subject
/ws/fhir/Observation?subject:Patient={id}This request will fetch all Observations using the given patient id. This will return a List of Observation as the response. Here subject:Patient parameter represents the subject that the observation is about.
/ws/fhir/Observation?value-concept={value}This request will fetch all Observations using the given value of the observation. This will return a List of Observation as the response. Here value-concept parameter represents the value of the observation, if the value is a CodeableConcept.
/ws/fhir/Observation?patient.identifier={identifier}This request will fetch all Observations using the given patient's identifier. This will return a List of Observations ( 0..* Observations ) as the response. Here the identifier parameter represents a patient identifier.
Delete (DELETE request)
URLDescription
 /ws/fhir/Observation/{id}This request will delete the observation of given id. It will return Method Outcome with appropriate error codes.
POST(Post Request)
URLDescription
 /ws/fhir/ObservationCreate a Observation Resource for the given representation.
PUT(Update Request)
URLDescription
 /ws/fhir/Observation/{id}
  • If the Observation with the given uuid exists, update the existing attributes according to the representation.
  • If the Observation with the given uuid doesn't exists, Create a Observation Resource with the given uuid.
  • No labels

1 Comment

  1. Are we really going to specify the coded values with reference maps directly and not use the translation code method so that we can potentially send multiple reference maps and mapping types? Do we need an OID for the CIEL dictionary so that we can maintain interoperability at the OpenMRS concept level regardless of SNOMED, LOINC mapping etc.