Stream: fhir-messages
Topic: Message status (MessageHeader.status?)
Kevin Mayfield (Nov 05 2020 at 07:45):
On our ePrescribing project we will have a queue holding prescriptions awaiting delivery to a pharmacy.
They will have a status of queued. When they are collected the status will change to delivered.
This seems to be a similar concept to {resource}.status and I should create a status extension for MessageHeader?
Lloyd McKenzie (Nov 06 2020 at 20:45):
In our space, we simply delete the messages once the recipient has taken custody of them. You could create an extension - either a status or a boolean. Do you have a reason to retain the messages as queriable (as opposed to in audit) once they've been consumed?
Kevin Mayfield (Nov 07 2020 at 06:28):
What I'm looking at is in the sequence diagrams here: https://specs.prescribeit.ca/R3.0/erx/erx.html#eeh
For the Get poll queue requests I'm suggesting:
GET [base]/Bundle?message.destination.receiver=[ODSCode]&status=queued
or
GET [base]/Bundle/{id}
For the POST clear message queue, I'm looking at PATCH to change the message status for individual messages.
We also have a prescription tracker api. which is similar queries to the GET poll queue requests.
Kevin Mayfield (Nov 07 2020 at 06:42):
We can use this in our cancellation process, so if prescription-order has a status of delivered. A prescriber will know they have to contact the pharmacy to cancel the prescription (and the pharmacy will return the order by setting the status back to queued).
René Spronk (Nov 07 2020 at 07:52):
Shouldn't the message stay 'queued' until an ack-message has been received by the server?
Kevin Mayfield (Nov 07 2020 at 08:08):
Yes, that's what I was thinking. The PATCH acts as an ack.
I think polling is the wrong description, it's a query API which is also used to collect messages.
Lloyd McKenzie (Nov 07 2020 at 20:23):
In PrescribeIT, the 'ack' is the request by the recipient to delete the message from the queue
Last updated: Apr 12 2022 at 19:14 UTC