Clarify the details of order-review
In australia, we have a prototype implementation of order-review. We made the following rules that should be documented in the order-review hook definition:
- encounter is mandatory
- patient is mandatory
- context and prefetch data must be for the same patient/encounter
- user must be a provider that matches the provider in the encounter
These were our rules
Further full validation rules can be found here:https://github.com/grahamegrieve/fhirserver/blob/master/Server/Modules/HackingHealthLogic.pas
sorry- wrong link - see https://github.com/grahamegrieve/fhirserver/blob/master/Server/CDSHooksServices.pas
I'm not sure about the "user must be a provider that matches the provider in the encounter" part. E.g., if the attending on record is Dr. Smith, and resident Dr. Jones is placing orders, shouldn't Dr. Jones see the CDS content even though he/she isn't the attending on record? Also, couldn't the context data be from a prior encounter? E.g., you are here for an office visit, but you care about lab results taken from a prior visit as a prefetch. E.g., when you are ordering an HbA1c, to make sure an HbA1c hasn't already been ordered in the past 2 months (minimal interval should usually be about q3months).
"user must be a provider that matches... ": these were our business rules. I included them because it's clear it's not a ubiquitious rule - so it's a good case for considering how far the hook definition should go, and what should be local. For the other issue, I think you have confused context and pre-fetch
Yes, you're right, I should have said prefetch, not context...
and I was wrong to say that prefetch data must be for the same encounter. It must be for the same patient, but not for the same encounter