Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
PKB offers an Appointment Management capability in our UI, allowing a patient to securely message a team in the PKB organisation to say they wish to Cancel or Amend an appointment. This message then has to be read and acted upon by someone at the organisation.
These secure messages and the associated appointment information can be extracted via API, enabling the organisation to have more control over how requests are handled. For example, organisations can:
Route requests to specific individuals or teams
Create their own dashboards to handle the requests
Build their own reports to monitor the volume of requests per specialty over time
The organisation sends appointments into PKB patient records (via HL7 or FHIR).
Patients send secure messages to request to amend/cancel appointments.
A clinician at the organisation “Grants Access” to enable the required data to be extracted.
The organisation uses PKB’s APIs to:
extract the secure message requests
extract the appointment details
The organisation displays the extracted information to the appropriate appointment management team.
The appointment management team actions the patient requests within their own appointment system.
The organisation sends the updated appointment information to PKB (via HL7 or FHIR).
API Details
This workflow uses a combination of custom REST APIs and our Aggregated FHIR API.
Grant Access
A clinician who has access to the cancel / rebook messages sent by patients grants access to their PKB record.
Access is granted to the credentials that PKB provides to the organisation for use with the PKB APIs.
The resulting authorization code is exchanged for an access and refresh token pair.
Tokens will be managed and maintained by the customer to ensure the authorization is only done once.
A corrective workflow is required to obtain a new authorization code in the event a session breaks / expires.
Here is an example of a patient using this process, with links out to the key parts of our wiki. The clinician follows the same steps, only the scope is changed to CLINICIAN.
Extract Messages
Using a valid access token, retrieve the user’s messages in PKB, specifying which messages to return by supplying a specific timestamp as a parameter.
Within the response, there are a few key elements to be aware of:
The “subject” has the type of request (change or cancel) and the date, time, and appointment’s subject (from the HL7 feed) of the appointment. You’ll need this to match to the appointment information from the aggregated endpoint.
The “content” has the note that the patient added when making the request to change or cancel.
The “patientId” is the PKB id of the patient. You’ll need this to obtain the patient’s national identifier.
If you use the “status” search parameter with a value of “pending” that will bring back only the appointments that have been requested to be changed/cancelled.
Using the information obtained above (appointment id and message content), the team at the trust amends the appointment. The resulting change flows into PKB via the existing appointment feed.