Stream: implementers
Topic: Reference.profile extension
Ardon Toonstra (Dec 22 2021 at 12:51):
There are a number of situations where we have mapped multiple concepts to one 'generic' element in FHIR, e.g. MedicationStatement.derivedFrom
or MedicationRequest.basedOn
. When converting back from FHIR it is hard to tell which concept the reference belongs to if the Resource type is not discriminative enough. Especially if you cant resolve the reference, which in our Medication use cases is quite a lot because we use Reference.identifiers since things live on multiple different servers.
So we thought of extending the Reference datatype with a targetProfile extension. Quite similar to the Reference.type
or the Element.type.targetProfile
elements.
What do you think of this approach and could such an extension be upgraded to an HL7 FHIR core extension?
Lloyd McKenzie (Dec 22 2021 at 20:53):
Profiles don't convey meaning. If you want meaning, add an extension that conveys the meaning.
Ardon Toonstra (Dec 23 2021 at 08:11):
Mm, I am not so sure about that. So Reference.type doesn't convey meaning either?
We have multiple profiles on MedicationRequest, every profile specializes the MedicationRequest and comes with it's own meaning on top of the resource type of FHIR.
This will provide one generic extension/method that can be reused in quite some situations. That would be better/nicer for our implementers than having specific extensions? Moreover, if you don't support the extension you will still have valid FHIR and are compatible with other use cases.
René Spronk (Dec 23 2021 at 08:20):
It's perfectly ok to have separate extensions for each and every 'specialization' you may have, or to add one extension with your own code (as to what specialization this is).
But don't derive this from a profile, which may or may not be listed, may or may not be valid anymore, may or may not have been stripped by any data processor. Profiles are not an indication of any semantics. They're in a different 'dimension' than the data itself.
Lloyd McKenzie (Dec 23 2021 at 19:16):
Reference.type indicates what the target resource is. Its purpose is to help the receiver know where in their system to search for data with a matching .identifier
. If you're in a situation where you need to further sub-divide to understand where to search (e.g. vitals, lab data, assessments, etc. being in different tables), you might have an extension for 'category'. Profile simply tells you what set of validation rules an instance happens to comply with. Removing a profile declaration never removes any meaning from the instance.
Ardon Toonstra (Dec 24 2021 at 15:25):
Thank you both for the clear explanation. I do can follow the logic and agree. We will think of using an extension that may hold a semantic (category) code to pinpoint the precise reference. It is not necessary about searching, but more about being able to convert FHIR data back into another datamodel.
Rik Smithies (Dec 24 2021 at 15:50):
@Ardon Toonstra is this about adding extra meaning or is it about traceability? If the latter then another possibility is to have this info external to the resource in a Provenance, that points back.
Last updated: Apr 12 2022 at 19:14 UTC