Profiles and Exceptions to the Rules
Jun 9, 2015One of the key constructs in FHIR is a “profile”. A profile is a statement of how FHIR resources are used for a particular solution - or, how they should be used. The FHIR resources are a general purpose construct, and you can do kind of general purpose things with them, such as store the data in a PHR, and do generally useful display of a clinical record etc. But if you’re going to do something more specific, then you need to be specific about the contents. Perhaps, for instance, you’re going to write a decision support module that takes in ongoing glucose and HBA1c measurements, and keeps the patient informed about how well they are controlling their diabetes. In order for a patient or an institution to use that decision support module well, the author of the module is going to have to be clear about what are acceptable input measurements - and it’s very likely, unfortunately, that the answer is ‘not all of them’. Conversely, if the clinical record system is going to allow it’s users to hook up decision support modules like this, it’s going to have to be clear about what kind of glucose measurements it might feed to the decision support system.
If both the decision support system and the clinical records system produce profiles, a system administrator might even able to get an automated comparison to see whether they’re compatible. At least, that’s where we’d like to end up.
For now, however, let’s just consider the rules themselves. A clinical record system might find itself in this situation:
- We can provide a stream of glucose measurements to the decision support system
- They’ll come from several sources - labs, point of care testing devices, inpatient monitoring systems, and wearables
- There’s usually one or more intermediary systems between the actual glucose measurement, and the clinical record system (diagnostic systems, bedside care systems, home health systems - this is a rapidly changing space)
- Each measurement will have one of a few LOINC codes (say, 39480-9: Glucose [Moles/volume] in Venous blood, 41652-9: Glucose [Mass/volume] in Venous blood, 14743-9: Glucose [Moles/volume] in Capillary blood by Glucometer)
- the units of measure will be mg/dL or mmol/L
- there’ll be a numerical value, perhaps with a greater than or less thancomparator(e.g. >45mmol/L)
So you can prepare a FHIR profile that says this one way or another. And then a decision support engine can have a feel for what kind of data it might get, and make sure it can handle it all appropriately.
So that’s all fine. But…
Eventually, the integration engineers that actually bring the data into the system discover - by looking at rejected messages (usually) - 1 in a million inbound glucose measurements from the lab contain a text message instead of a numerical value. The message might be “Glucose value to high to determine”. Now what? From a clinical safety perspective, it’s almost certain that the integration engineers won’t replace “too high to determine’ with a “>N” where N is some arbitrarily chosen number - there’s no number they can choose that isn’t wrong. And they won’t be able to get the source system to change their interface either - that would have other knock-on effects for other customers / partners of the source system. Nor can they drop the data from the clinical record - it’s the actual test result. So they’ll find a way to inject that value into the system. Btw- aside - some of the things that go in this string value could go in Observation.dataAbsentReason, but they’re not coded, and it’s not possible to confidently decide which are missing reasons, and which are ‘text values’. So dataAbsentReason isn’t a solution to this case, though it’s always relevant.
Now the system contains data that doesn’t conform to the profile it claimed to use. What should happen?
- The system hides the data and doesn’t let the decision support system see it
- The system changes it’s profile to say that it might also send text instead of a number
- The system exposes the non-conformant data to the decision support system, but flags that it’s not valid according to it’s own declarations
Neither of these is palatable. I assume that #1 isn’t possible, at least, not as a blanket policy. There’s going to be some clinical safety reason why the value has to be passed on, just the same as the integration engineers passed it on in the first place, so that there’re not liable.
Option #2 is a good system/programmer choice - just tell me what you’re going to do, and don’t beat around the bush. And the system can do this - it can revise the statement ‘there’ll be a numerical value’ to something like ‘there’ll be a numerical value, or some text’. At least this is clear.
Only it creates a problem - now, the consumer of the data knows that they might get a number, or a string. But why might the get a string? what does it mean? Someone does know, somewhere, that the string option is used 1 in a million times, but there’s no way (currently, at least) to say this in the profile - it just says what’s possible, not what’s good, or ideal, or common. If you start considering the impact of data quality on every element - which you’re going to have to do - then you’re going to end up with a profile that’s technically correct but quite non-comunicative about what the data might be, nor one that provides any guidance as to what it should be, so that implementers know what they should do. (and observationally, if you say that it can be a string, then, hey, that’s what the integration engineers will do to, because it’s quicker….)
That’s what leads to the question about option #3: maybe the best thing to do is to leave the profile saying what’s ideal, what’s intended, and let systems flag non-conforming resources with a tag, or wrong elements with an extension? Then the consumer of the information can always check, and ignore it if they want to.
That is, if they know about the flag, and remember. Which means we’d need to define it globally, and the standard itself would have to tell people to check for data that isn’t consistent with it’s claims… and then we’d have to add overrides to say that some rules actually mean what they say, as opposed to not actually meaning that…. it all sounds really messy to me.
Perhaps, the right way to handle this is to have ideal and actual profiles? That would mean an extension to the Conformance resource so you could specify both - but already the interplay between system and use case profiles is not well understood.
I think this area needs further research.
p.s. There’s more than some passing similarity between this case and the game of ‘hot potato’ I used to play as a kid: ‘who’s going to do have to do something about this bad data’.