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 for the OpenMRS FHIR Module

  • The FHIR Location Resource provides information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated. 
  •  For more information on the FHIR Location resource, please refer http://hl7-fhir.github.io/location.html

Populating the FHIR Location Resource 

Shown below is an example of how an OpenMRS Location objects would map to FHIR Location resource, as proposed by Grahame Grieve.The 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, while ; the right indicated 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 sample 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,
  },
  "status": "active"
}


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

urldescription
/ws/fhir/Location/{id}

Above request will fetch the Location for the given unique uuid. Here id represents, the logical resource id associated with the resource.

/ws/fhir/Location?_id={id}

Above request will fetch all the Locations using the given uuid value. This will give a List of Locations as the response.Here _id parameter represents, the logical resource id associated with the resource.

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

Above request will fetch all the Locations using the given status value. This will give a List of Locations as the response. Here status parameter represents, locations with a specific kind of status.

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

Above request will fetch all the Locations using the given name. This will give a List of Locations as the response. Here name parameter represents, the name of the location.