Versions Compared

Key

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

Introduction

...

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

...

Location is a FHIR resource that represents "details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.

...

Populating the FHIR Location Resource 

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

Code Block
titleLocation
Integer uuid :: n/a - goes in the URL e.g. [base]/Location/[locationId]
String name :: Location.name
String description :: Location.description
String address1 :: Address.line
String address2 :: Address.line
String cityVillage :: Address.city
String stateProvince :: Address.state
String country :: Address.country
String postalCode ::Address.zip
String latitude :: Location.position.longitude
String longitude :: Location.position.latitude
String countyDistrict :: not mapped
String address3 :: Address.line
String address4 :: Address.line
String address6 :: Address.line
String address5 :: Address.line
Location parentLocation :: Location.partOf
Set<Location> childLocations :: not mapped

Example FHIR Location Resource

Shown below is a fleshed out FHIR Location Resource.

Code Block
titleFHIR Location Resource
{
  "resourceType": "Location",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/location-alias",
      "valueString": "Burgers University Medical Center, South Wing, second floor"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/location-alias",
      "valueString": "BU MC, SW, F2"
    }
  ],
  "identifier": [
    {
      "value": "B1-S.F2"
    }
  ],
  "name": "South Wing, second floor",
  "description": "Second floor of the Old South Wing, formerly in use by Psychiatry",
  "address": {
    "use": "work",
    "line": [
      "Galapagosweg 91, Building A"
    ],
    "city": "Den Burg",
    "postalCode": "9105 PZ",
    "country": "NLD"
  },
  "position": {
    "longitude": -83.6945691,
    "latitude": 42.25475478,
  },
  "partOf": {
     "reference": "Location/c0937d4f-1691-11df-97a5-7038c432aabf"
     "display": "Mosoriot Hospital"
  },
  "status": "active"
}

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

GET Requests

Read
URLDescription
/ws/fhir/Location/{id}

Returns a FHIR Location resource identified by a Location UUID

Outcomes:

  • Returns a FHIR location resource if the specified Location exists
  • Returns an Operation Outcome resource with a 404 error message if the specified Location does not exist
Search
/ws/fhir/Location?_id={id}

 

/ws/fhir/Location?status={value}

 

/ws/fhir/Location?name={value}
 
Operations
None to dateNone to date

POST Requests

None to date

 " In the current implementation, FHIR Locations are mapped to OpenMRS Location objects.

Supported Elements

The following properties are supported by the OpenMRS FHIR Module:

  • Location.id
  • Location.name
  • Location.description
  • Location.address
  • Location.position
  • Location.status
  • Location.telecom
  • Location.partOf
  • Location.meta.tag

OpenMRS ↔ FHIR Mapping

OpenMRS Data ModelFHIR Resource
Location.uuid
Location.id
Location.name
Location.name
Location.description
Location.description
Location.address
Location.address
Location.latitude / Location.longintude
Location.position
Location.retired
Location.status
Location.parentLocation
Location.partOf
Location.tags
Location.meta.tag

Available RESTful Endpoints

GET

URLDescription
/Location/{uuid}
Get a specific location
/Location?name={string}
Get locations by name
/Location?address-city={string}
Get locations by city
/Location?address-country={string}
Get locations by country
/Location?address-postalcode={string}
Get locations by postal code
/Location?address-state={string}
Get locations by state