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

Introduction

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

  • The FHIR Practitioner Resource represents a person who is directly or indirectly involved in the provisioning of healthcare. 
  •  For more information on the FHIR Practitioner resource, please refer http://hl7-fhir.github.io/practitioner.html

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.

Practitioner
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.

FHIR 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

  • if the request body contains enough information to create a person, a new person resource will be created and that person will be associates with the practitioner.  If not practitioner resource will be created only having the given name by the request body. No person resource will be attached to it in this case.
  • No labels