Process message

[Prod Resource]

https://www.hl7.org/fhir/STU3/operationdefinition.html

https://www.hl7.org/fhir/STU3/operations.html

description

Please note: this operation is not to be confused with the FHIR-defined $process-message. The two operations have different syntax and behaviour.

This operation allows:

  • a System user to create or update a Patient

Accepts a single FHIR Patient resource. Steps of processing:

  • If the patient does not already exist on PKB, a record will be created for them.

  • If the patient does already exist on PKB, their demographics will be updated.

  • If an email is included in the Patient resource, an invitation may be sent. Note that only one email address will be processed if more than one are provided.

  • Use of the team alias extension allows a patient to be added to specified teams. Multiple instances of the extension may be included to add the patient to multiple teams. If the team alias extension is included, then there must be an instance which includes the alias for the configured default team of the sending organisation.

  • If the team alias extension is not included in a Patient resource, the patient will be added to the configured default team of the sending organisation.

Authorisation and authentication

In addition to the OAuth 2.0 access token, the X-Org-Public-Id HTTP header must be provided in the request to specify the organisation that the system is calling on behalf of. The parameter will be the UUID of the PKB organisation.

Mappings

PKB

FHIR

Notes

[[User.Public ID]]

N/A - cannot be set with this endpoint.

 

[[User.Title]]

Patient.name.prefix[0]

 

[[User.Given Name]]

Patient.name.given[0-x]

Required

[[User.Family Name]]

Patient.name.family

Required

[[Patient.Middle Names]]

N/A - cannot be set with this endpoint.

 

[[Patient.Address Line 1]]

Patient.address.line[0]

 

[[Patient.Address Line 2]]

Patient.address.line[1]

 

[[Patient.City]]

Patient.address.city

 

[[Patient.State]]

Patient.address.state

 

[[Patient.Country]]

Patient.address.country

 

[[Patient.Postal Code]]

Patient.address.postalCode

 

[[Patient.Date of Birth]]

Patient.birthDate

Required

[[Patient.Death Timestamp]]

Patient.deceasedDateTime

OR

Patient.deceasedBoolean

Either is accepted.

[[Patient.Gender]]

Patient.gender

Required

[[Patient.Language]]

N/A - cannot be set with this endpoint.

 

[[Patient.Time Zone]]

N/A - cannot be set with this endpoint.

 

[[Patient.Skype ID]]

N/A - cannot be set with this endpoint.

 

[[Patient.Phone]]

  • Patient.telecom[x]: ContactPoint

    • system = phone

    • value = [[Patient.Phone]]

 

[[Patient.Status]]

N/A - cannot be set with this endpoint.

 

[[Patient.Registered]]

N/A - cannot be set with this endpoint.

 

[[Patient.Sharing Disabled]]

N/A - cannot be set with this endpoint.

 

[[Patient.Access Frozen]]

N/A - cannot be set with this endpoint.

 

[[Patient.Entered Timestamp]]

N/A - cannot be set with this endpoint.

 

[[Patient.Persisted Timestamp]]

N/A - cannot be set with this endpoint.

 

[[Contact]]

For each [[Contact]]:

  • Patient.telecom[x]: ContactPoint

    • system = "email"

    • value = [[Contact.Value]]

[[Contact.Is Primary]] = N/A - cannot be set with this endpoint
[[Contact.Is Confirmed]] = N/A - cannot be set with this endpoint

 

[[National ID]]

An NHS number must be provided. Other national ID types are not supported.

An NHS number is required.

[[Local ID]]

N/A - cannot be set with this endpoint

 

[[Team Alias]]

See interaction description for more details.

Team alias codes are configured on request by PKB.