Stream: cds hooks
Topic: Precondition Failed
Dan Miller (May 12 2021 at 08:17):
Hi,
We're working on a new CDS Hooks service and I wanted to just clarify the behaviour around when we have a 'Precondition Failed'. Are we able or is it even appropriate to send cards back detailing what data was missing?
Dennis Patterson (May 12 2021 at 15:09):
Cards are intended to be displayed to the user, so that may not be the most appropriate means for this type of error. The spec doesen't currently define an operation outcome or similar response structure for a 412, but I know there's been conversation around this for errors in general.
It sounds like the scenario you're thinking through is when the CDS Service isn't able to obtain its necessary data because the FHIR server is down, returning errorrs, or there's other connecetivity issues. The 412 would tell the CDS Client that these kinds of problems are occuring, which the CDS Client may use to indicate to the user that there are issues, as well as trigger action on the operational side of things.
Within this scenario when the CDS Client isn't able to obtain the data it needs to make a recommndation, are there sub-types of errors that you can see being useful to tell a CDS Client?
Dan Miller (May 13 2021 at 15:47):
Yes, one scenario we are thinking about is when the fhir server is unavailable to us. However, we are also considering when the data just isn't available.
The best example I can think of is when our CDS requires the patient’s height or weight, but one hasn't been recorded and isn't available. This data isn't always required and depends on the medication being prescribed. If the CDS passes without this data but checks that required height or weight data couldn't be run I would think we should send a 412 'Precondition Failed'. But it's something the clinician may be able to address so also giving them a message detailing the missing data could possibly be helpful?
Going further down the rabbit hole, we could indicate the type of data missing allowing the client to trigger a workflow but given the client knows what is in the prefetch criteria this is probably redundant.
Dennis Patterson (May 18 2021 at 12:25):
If there's something that the user might be able to do something about, a card might be possible. Otherwise, OperationOutcome could be appropriate so that each CDS Client can decide whether the user should be notified. For example, if the FHIR server is down and 3 services report that, the CDS Client could aggregate that into one message just to say that there are issues with CDS. Similarly, if 3 services report that vitals were missing, the client has potential to present a single message rather than spamming the user.
Want to bump https://github.com/cds-hooks/docs/issues/14 with some of your thoughts?
Dan Miller (May 18 2021 at 14:28):
Thanks Dennis,
I think for now we are going to return the 412 with an empty payload. The prefetch details what's required to process the CDS so it should be possible to determine what data is missing. As we understand more about implementations we will be able to determine if and what additional messaging might be helpful.
I'll add our thoughts to the issue as I think it might be good for discussion.
Last updated: Apr 12 2022 at 19:14 UTC