More thoughts on notifications in FHIR
December 8, 2013 1 Comment
I’ve been thinking a bit more about notifications since my last post about wanting to alert the patients usual GP (General Practitioner) that there is a document generated as a result of an ambulance visit for them to review. In particular, I’ve been thinking about other scenarios where a sender not only wants to inform a recipient that there is a document for them, but also that there is some action that needs to be performed for the patient. There’s a relationship of some sort to Tasks as well…
Looking at some sample scenarios where the recipient is a GP:
- The ambulance visits a patient after a fall and delivers them to hospital where they are admitted. The notification to the GP is just an FYI (for your information), and there is no expectation of action.
- The ambulance visits a patient with asthma and nebulizes them. They do not need to go to the hospital, but should be reviewed the following day.
- A hospital discharges a patient having started them on warfarin. The GP is requested to repeat an INR in 5 days and adjust the dose if required.
- A patient visits a private ‘after hours’ service with a lacerated hand. The service sutures the wound and asks the GP to review the patient in 5 days to remove the sutures.
- A patient is seen by an out-patient clinic and their anti-hypertensive medication adjusted. The GP is requested to monitor the Blood Pressure to endure that they don’t become hypotensive.
- While in hospital for a routine appendicectomy, an elevated Glucose blood result is noted. The GP is asked to follow up to investigate the possibility of diabetes.
- A District Nurse visits a patient to dress a wound, and notes that the Blood Pressure is high.
In many (but not all) of these scenarios, there is an expectation by the sender that the recipient GP is going to do something. So in those cases the sender really needs some way of knowing whether:
- The GP has received the request and will perform the requested action
- The GP has received the request and will not perform the requested action (maybe it was the wrong GP)
- The GP never received the request at all.
(I appreciate that this overlaps with some other important concepts like ‘Transfer of Care’, ‘Care Plan’ or ‘Tasks’, but for the sake of this discussion I’m going to keep it simple and just focus on the interaction between sender and recipient).
So let’s extend the simple concept of a Notification and add a few more properties:
- Expected action. This is optional – if not present then the Notification is an FYI. We’ll make this a CodeableConcept so we can define common set of actions if we want to, which might be good for reporting, but also supports plain text, which will be the most likely early on. We’ll make this multiple to cover the situation where there is more than one thing needed to do by the recipient. If there were multiple actions my different recipients, then we’d use separate Notifications for each recipient.
- Date due. This only makes sense when there is an expected action, but gives the recipient some idea of when the requested follow-up should occur.
- Recipient Status. This will be used to manage the state of the Notification – I’ll talk about this in a moment. It will be a code datatype, with a fixed set of values.
- Recipient Status Comment. A General comment field.
That takes care of the properties of the Notification, but we need to figure out how to manage the workflow aspects of the process – as described above, how can the sender be sure that the GP will carry out the requested actions (or not)?
We’ll use FHIR’s versioning capacity – plus the Provenance resource – to do this. (There may well be better ways, but let’s see how this plays out). It’ll work something like this:
- The sender will create the Notification resource (actually an e Other resource, as there is no specific FHIR resource for notifications yet) , setting the recipient details plus the expected action and date due. The recipientStatus will be ‘waiting’
- The recipient will periodically poll for Notifications with a recipientStatus of waiting – This will be slightly different from the version in the last post, because it will always return waiting notifications. Note also that we are using th
GET [server]/Other?code='notification'&recipient={gp}&recipientStatus=waiting
- The recipient can then update the Notification resource, setting the recipientStatus to ‘accepted’ or ‘declined’. They can use the RecipientStatusComment for any comment they may need to make – e.g. the reason why the GP declined to accept the action. If it is necessary to be more explicit about the person making the change, then they can create a provenance resource that has that information (the easiest way to do this is to put the updated Notification & Provenance resources in a bundle as discussed in previous posts)
- Optionally, once the action has been completed, the RecipientStatus can be updated to completed.
The sender can then monitor the status of the notifications as required.
Notifications where the recipient has declined the action:
GET [server]/Other?code='notification'&author={sender}&recipientStatus=declined
Notifications that have not been reviewed by the recipient yet
GET [server]/Other?code='notification'&author={sender}&recipientStatus=waiting&dateCreated< {yesterday}
To get a full picture of all changes to a Notification, we will need 2 queries:
The history of changes to the Notification resource
GET [server]/Other/{id}/_history
The Provenance resources that are associated with the Notification
GET [server]/Provenance?target={notificationID}
Of course, if we were being a nice server, we’d bundle both of these into a simple service that would make the calls internally and return a bundle of resources that would contain all the versions of the Notification resource, plus any Provenance resources associated with them.
GET [server]/Service/Notification/{notificationID}/_history
This pattern might not be suitable for a more fully featured task management solution, but it would seem the be sufficient for the simple use cases that we identified above.
So the complete list of properties for our improved Notification resource is (and remember that this is actually an Other resource at this stage, and all the properties are extensions):
- Code
- Subject
- Author
- Date Created
- About
- Recipient (was Target)
- Expected action
- Date due
- Recipient Status
- Recipient Status Comment
Comments welcomed!
Pingback: #FHIR and the Ambulance: Notification of XDS documents | Hay on FHIR