Versions Compared

Key

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

Introduction

...

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

...

Practitioner resource represents a person who is directly or indirectly involved in the provisioning of healthcare.

...

Populating the FHIR Practitioner Resource 

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

Code Block
titlePractitioner
Integer personId :: [base]/Practitioner/[practitionerId]
identifier : Practitioner.identifier
Set<PersonAddress> addresses = null :: Person.address
  Integer personAddressId :: not mapped
  Person person :: not mapped
  Boolean preferred = false :: Patient.address.use ? mapping
  String address1 :: Practitioner.address.line
  String address2 :: Practitioner.address.line
  String address3 :: Practitioner.address.line
  String address4 :: Practitioner.address.line
  String address5 :: Practitioner.address.line
  String address6 :: Practitioner.address.line
  String cityVillage :: PPractitionertient.address.city
  String countyDistrict :: Practitioner.address.extension : "http://hl7.org/fhir/Profile/iso-21090#address-part-county", valueString
  String stateProvince :: Practitioner.address.state
  String country :: Practitioner.address.country
  String postalCode :: Practitioner.address.zip
  String latitude :: Practitioner.address.extension -> Location
  String longitude :: Practitioner.address.extension -> Location
  Date startDate :: Practitioner.address.period.start
  Date endDate ::  Practitioner.address.period.end
Set<PersonName> names = null :: Person.name
Integer personNameId :: not mapped
  Person person ::  not mapped
  Boolean preferred = false :: Practitioner.name.use = usual
  String prefix :: Practitioner.name.prefix
  String givenName :: PePractitionerson.name.given
  String middleName :: Practitioner.name.given
  String familyNamePrefix :: folded into Patent.name.family (else, Patient.name.family with extension http://hl7.org/fhir/Profile/iso-21090#name-qualifer, valueCode = PFX)
  String familyName :: Practitioner.name.family
  String familyName2 :: Practitioner.name.family
  String familyNameSuffix :: Practitioner.name.suffix
  String degree :: Person.name.suffix
Set<PersonAttribute> attributes = null ::
  integer personAttributeTypeId :: mapping table that defines how attributes map - whether existing elements or extensions
  String value :: depends on mapping
String gender :: Practitioner.gender (mapped: code = M or code = F, code system is http://hl7.org/fhir/v2/0001)
Date birthdate :: Practitioner.birthDate
Boolean birthdateEstimated = false :: Extension if worth mapping
Boolean deathdateEstimated = false :: Extension if worth mapping
Boolean dead = false :: if true, and no date, then Patient.deceasedBoolean= true
Date deathDate :: Practitioner.deceasedDate
Concept causeOfDeath :: Practitioner.extension
User personCreator :: not mapped (would be in provenance if worth mapping)
Date personDateCreated :: not mapped (would be in provenance if worth mapping)
User personChangedBy :: not mapped (would be in provenance if worth mapping)
Date personDateChanged :: not mapped (would be in provenance if worth mapping)
Boolean personVoided = false :: if true, Patient.active = false, else Patient.active = true
User personVoidedBy ::  not mapped (would be in provenance if worth mapping)
Date personDateVoided ::  not mapped (would be in provenance if worth mapping)
String personVoidReason :: not mapped (would be in provenance if worth mapping)
boolean isPatient :: not mapped

Example FHIR Practitioner Resource

Shown below is a fleshed out FHIR Practitioner Resource.

Code Block
titleFHIR Practitioner Resource
{
  "resourceType": "Practitioner",
  "id": "a846f32f-5401-4d53-871a-68354c22c3f9",
  identifier: [1]
	0:  {
		"system": "http://www.acme.org/practitioners",
		value: "clerk"
	},
  "name": {
    "family": [
      "Careful"
    ],
    "given": [
      "Adam"
    ]
  },
  address: [1]
	0:  {
		use: "home"
		city: "E. Kanateng"
	},
	gender: {
		coding: [1]
			0:  {
				system: "http://hl7.org/fhir/v3/AdministrativeGender"
				code: "M"
			}
	},
	birthDate: "2009-08-11T00:00:00"
}

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

GET Requests

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

Returns a FHIR Practitioner resource identified by a Practitioner UUID

Outcomes:

  • Returns a FHIR Practitioner resource if the specified Practitioner exists
  • Returns an Operation Outcome resource with a 404 error message if the specified Practitioner does not exist
Search
 /ws/fhir/Practitioner?_id={id}Above request will fetch all the Practitioners using the given id value. This will give a List of Practitioners as the response. Here _id parameter represents, the logical resource id associated with the resource.
 /ws/fhir/Practitioner?family={familyName}Above request will fetch all the Practitioners using the given family name. This will give a List of Practitioners as the response. Here family parameter represents, the family name of the Practitioner.
 /ws/fhir/Practitioner?name={name}Above request will fetch all the Practitioners using the name. This will give a List of Practitioners as the response. Here name parameter represents, the name of the Practitioner.
 /ws/fhir/Practitioner?identifier={identifier}Above request will fetch all the Practitioners using the given identifier. This will give a List of Practitioners as the response. Here identifier parameter represents, the identifier of the Practitioner. Here we use name as the identifier.
 /ws/fhir/Practitioner?given={givenName}Above request will fetch all the Practitioners using the given name. This will give a List of Practitioners as the response. Here given parameter represents, the given name of the Practitioner.
Operations
None to date

POST Requests

Create
URLDescription
 /ws/fhir/Practitioner

Create a Practitioner Resource for the given representation.

PUT Requests

Update
URLDescription
 /ws/fhir/Practitioner/{id}
  • If the Practitioner with the given uuid exists, update the existing attributes according to the representation.
  • If the Practitioner with the given uuid doesn't exists, Create a Practitioner Resource with the given uuid.

If you update attributes which are associates with the underlying Person Resource, all the update conditions of Person Resource applies here as well.

OpenMRS specific constrains

...

Practitioner covers all individuals who are engaged in the healthcare process and healthcare-related services as part of their formal responsibilities.

Supported Elements

The following properties are supported by OpenMrs FHIR Module:

  • Practitioner.id
  • Practitioner.identifier
  • Practitioner.active
  • Practitioner.name
  • Practitioner.telecom
  • Practitioner.address
  • Practitioner.gender
  • Practitioner.birthDate

OpenMRS ↔ FHIR Mapping

OpenMrs Provider Data ModelFHIR Resource Element
Provider.uuid
Practitioner.id
Provider.identifier
Practitioner.identifier
Provider.retired
Practitioner.active
Provider.providerAttribute (attribute type == user defined value)
Practitioner.telecom (system == phone)
Provider.person.address
Practitioner.address
Provider.person.name
Practitioner.name
Provider.person.gender
Practitioner.gender
Provider.person.birthDate
Practitioner.birthDate


OpenMrs User Data Model

FHIR Resource Element

User.uuid
Practitioner.id
User.userId
Practitioner.identifier
User.person.personAttribute (attribute type == user defined value)
Practitioner.telecom (system == phone)
User.person.gender
Practitioner.gender
User.person.name
Practitioner.name
User.person.address
Practitioner.address
User.person.birthDate
Practitioner.birthDate



Available RESTful Endpoints

GET

URL

Description

/ws/fhir2/Practitioner/{uuid}
Gets a specific practitioner
/ws/fhir2/Practitioner?name={String}
searches for the practitioner by name
/ws/fhir2/Practitioner?identifier={String}
searches for the practitioner by identifier