Remove from teams

Overview

PKB already offers an HL7-based, automated add to teams workflow. This page outlines the functionality to discharge patients from a team in a similar fashion.

Organisations can now discharge patients from clinical teams using the HL7 API. Previously this was only possible in the user interface. This lets organisations discharge patients automatically, for example when a patient changes their GP practice. When a patient is discharged from a team, they will receive an email notification and the team will lose access to data in the patient’s record that was not added by that team. 

Spec change

The ZTM custom segment already supports a list of aliases in ZTM-1, which indicate which team(s) the patient should be added to.

This has now been expanded so that a list of aliases can also be provided in ZTM-2, to indicate which team(s) the patient should be discharged from.

Each discharge alias will need to map to a team in the sender's organisation. If the patient is currently admitted to that team, then they will be discharged (which includes revoking any granted privacy labels).

Validation rules

Adding and removing from teams

  1. ZTM-1 and ZTM-2 can both be populated in the same ZTM segment

  2. ZTM-1 is not required to be populated when populating ZTM-2

  3. ZTM-1 and ZTM-2 cannot contain the same team(s) in the same ZTM segment. These messages will be rejected with an AR, and the patient will not be added to, or removed from any of the teams in the ZTM segment.

  4. When populating ZTM-1 the creating team must always be included.

Removing from teams

  1. A ZTM-2 containing a team that the patient is not already in will be rejected with an AR

  2. ZTM segments containing unknown aliases in ZTM-2 will be rejected with an AR

  3. ZTM segments containing aliases that map to the org will be rejected with an AR

  4. If an organisation is using soft-matching and an A28 with a ZTM-2 contains a mis-match then the patient will not be removed from the team

Example

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A28|ABC0000000001|P|2.4

PID|||9999999999^^^NHS^NH|

ZTM|add-to-team-alias|remove-from-team-alias

User journey

 

© Patients Know Best, Ltd. Registered in England and Wales Number: 6517382. VAT Number: GB 944 9739 67.

This API specification and design is licensed under a Creative Commons Attribution 4.0 International License.