Stream: implementers
Topic: Reference.identifier - How to know the resource type?
Theo Stolker (Jun 14 2017 at 07:09):
We are recommending our clients to use the Reference.identifier filled with a business identifier in cases where they need a reference to a resource of which they do not know the id yet.
However, in case of references that can have multiple types, we are not sure how to figure out what the type of the linked resource in the server. Would it be required to register each possible value of Reference.identifier.system, and map that to a resource type? What approaches have other people used to address this challenge?
Paul Knapp (Jun 14 2017 at 15:39):
I had previously identified this issue and requested that type be added to the Reference data type but that was turned down so in resources where the resource type is variable, sometimes it is known to be of a single type, we have specified a companion element to convey the resource type.
John Moehrke (Jun 14 2017 at 15:48):
I expected Reference.identifier.type to hold the resource type. using http://build.fhir.org/valueset-resource-types.html
Michel Rutten (Jun 14 2017 at 15:51):
@John Moehrke But isn't Identifier.type intended to specify the type of the identifier itself, not the type of the identified object?
John Moehrke (Jun 14 2017 at 15:54):
possibly. I didn't say I was authoritative... I just said that I expected it... Seems like the 'kind' of identifier is the 'kind' of object the identifier points at... so not sure one way or the other. There is no useful code in the valueset provided, so I used logic to extend to the other valueset.
Michel Rutten (Jun 14 2017 at 16:03):
Maybe FHIR should provide a standard extension to specify the type of a reference target?
Stefan Lang (Jun 14 2017 at 16:07):
Reference.identifier.type is definitely the type of the identifier, not of the resource.
To my understanding of the use case, the identifier is used as a kind of promise that there will be a resource with the very same identifier at some point in the future. I suppose this is beyond the 80% rule, so a standard extension as @Michel Rutten says, may be useful.
Stefan Lang (Jun 14 2017 at 16:11):
On the other hand, there still is the paradigm that references always should point back in time, which implies that one (theoretically) should never have the problem of not knowing the referenced resource's id.
Stefan Lang (Jun 14 2017 at 16:14):
Isn't it thought to be either a reference to an existing resource or an identifier of some entity beyond the scope of the specific implementation?
Lloyd McKenzie (Jun 14 2017 at 16:39):
Agree that Reference.identifier.type should not be used to convey the resource type - though occasionally it may communicate that incidentally. (If it's a medical record number, the resource is likely Patient; if it's a provider licence number, it's likely Practitioner) My expectation is that how the identifier gets resolved to a resource relies on process rules outside the scope of the spec. Some systems won't be able to resolve at all - and there's no expectation that systems must or should be able to. Some systems will be able to take the combination of Identifier.type, system and value and possibly some look-up processes to figure out what they're dealing with.
Theo Stolker (Jun 19 2017 at 09:41):
All, Thanks for the replies. So I am looking for a standard FHIR extension now, otherwise we will have to define our own.
@Paul Knapp, the "companion element" you mention, I assume is also an extension? What is the extension.url that you are using? I am curious if it would be worth promoting to a standard extension
Lloyd McKenzie (Jun 19 2017 at 14:49):
@Theo Stolker Feel free to submit a tracker item
Theo Stolker (Jun 20 2017 at 06:50):
Paul Knapp (Jul 05 2017 at 21:05):
@Theo Stolker We aren't using an extension, we have an element named 'resource' adjacent to the identifier element which contains the resource type - it was called resourceType but that caused a conflict with JSON parsers due
Theo Stolker (Jul 10 2017 at 13:17):
@Paul Knapp, you cannot just add properties in a FHIR message, so your reply doesn't make sense. We will use an extension, since that is the only way to exchange additional information.
Paul Knapp (Jul 10 2017 at 17:39):
@Theo Stolker Where our committee has identifier situations where the 'referred' to resource would not be known we have added an element to the resource to provide that information. You could either suggest similar changes to resources or add an extension.
Theo Stolker (Jul 10 2017 at 17:50):
@Paul Knapp , I have studied http://build.fhir.org/references-definitions.html#Reference.identifier and http://build.fhir.org/datatypes.html#Identifier and I do not see te element you said has been added. Where can I find it?
Paul Knapp (Jul 11 2017 at 19:11):
@Theo Stolker An element does not exist in either the identifier or specifically within the reference datatypes to disambiguate the resource which the identifier identifies. In some resources, such as Claim, where the payee may be one of a small set of resource type we added a resourceType element to record the type of the resource if the payee.identifier is used. (Note, in the current build we are planning to change the way that concept is represented to be a code but the pattern of use will remain - unless of course a type element for the resource is added to the reference datatype).
John Moehrke (Jul 12 2017 at 16:06):
FHIR Core-team -- Please help us understand Reference.identifier use. The current specification seems to say I can put 'any' business identifier into this, yet elsewhere say that it can only be a business identifier that would identify a FHIR Resource, yet I can't even identify what kind of Resource to go looking for. This needs clarification. Who is responsible for clarifying (MNM, FHIR-I, etc) ? When will this be discussed? How can I track this to conclusion. Security (AuditEvent, and Provenance) need resolution as both cases have times when an identifier is all that is known. Consent also has need when a rule is made about data identified by identifier... Please help
Lloyd McKenzie (Jul 12 2017 at 16:36):
The reference points to a "logical" resource. It may not be something that is actually exposed or retrievable in FHIR form, but it must refer to a business object that would, if expressed in FHIR, correspond to one of the resources allowed for the reference. It's not clear why you'd need to know what specific resource type applies - resolution is done via business processes, not FHIR. You've got a globally unique identifier. That means that someone ought to recognize the identifier.system and understand where to find things identified by that system, go retrieve that thing, figure out what it is and behave accordingly. Why would AuditEvent or Provenance care what type of resource the identifier corresponds to?
John Moehrke (Jul 12 2017 at 16:39):
Audit and Provenance doesn't care. It just needs some place to put a business identifier. Given that it is often not a FHIR Reference, we need a place to save the value (e.g. HL7 v2 order number, CDA document unique ID, DICOM UID, etc). We get conflicting input that we do or do not need an additional identifier data element now that Reference includes an identifier data element. Do we? Or do we NOT? We need definitive answer that doesn't conflict across the whole of the FHIR model.
John Moehrke (Jul 12 2017 at 16:40):
Other cases in this thread have explained why sometimes one does need t explain what type of FHIR Resource that the Resource.identifier is describing. I think that does need to be addressed too.
Lloyd McKenzie (Jul 12 2017 at 16:43):
Well, the question is whether you're referencing something that's a logical resource or not. If the answer is you might reference things that can't be expressed as a resource, then you can't use Reference.
John Moehrke (Jul 12 2017 at 18:26):
okay, but... an HL7 v2 order, CDA document, DICOM UID ... all could be business identifiers that could be found in FHIR resources
Lloyd McKenzie (Jul 12 2017 at 19:05):
My interpretation is that all of those would be fine as Reference.identifier
Elliot Silver (Jul 12 2017 at 19:56):
If I have a Reference.identifier which is an OID, is there a way that I can tell whether that is the business identifier for an ImagingManifest or to an ImagingStudy, or some other resource?
Lloyd McKenzie (Jul 12 2017 at 20:05):
Nope. Not unless something elsewhere in the instance gives you a hint.
Lloyd McKenzie (Jul 12 2017 at 20:05):
In theory if you know the OID hierarchy you might know
John Moehrke (Jul 12 2017 at 20:09):
That is why previously in this thread there was interest in qualifying the Reference.identifier with a Resource type identification. I think it should exist, rather than everyone needing to use an extension.
John Moehrke (Jul 12 2017 at 20:25):
Just to get specific... Provenance.entity.what[x] structure should be simplified to just a Reference, or is good (needing guidance such as GF#13570 )? Note that Provenance has the additional URI element where source entity used isn't even a business identifier but just a URI. Similar for AuditEvent.entity (GF#13571 ) ---- advice from FHIR core-team is welcome.
Grahame Grieve (Jul 12 2017 at 20:28):
what's the interaction between the type of the resource referenced, and the identifier.type?
Lloyd McKenzie (Jul 12 2017 at 21:38):
So the question I have is - why do you need to know what type of resource the identifier might resolve to? How does that change what you're doing with the Provenance or AuditEvent?
John Moehrke (Jul 13 2017 at 11:58):
See GF#13543 by @Theo Stolker - I am interested, but this issue is not mine.
John Moehrke (Jul 13 2017 at 11:59):
We have wondered, given only an ID, how one would know which type of Resource it represents. In the context of Provenance.entity.what[x] can point at ANY Resource; so, to validate against a StructureDefinition that might say that at least one entity must be an Observation; there would be no way to check this.
Grahame Grieve (Jul 13 2017 at 14:50):
not everything can be checked
John Moehrke (Jul 13 2017 at 14:53):
understood... but if I know what type of a Resource the identifier would be about, where can I say that? So, I know that it is a DICOM UID, and would be an ImagingStudy Resource... No way for me to say that?
John Moehrke (Jul 13 2017 at 14:58):
But, my problem is... Can I use Reference.Identifier for business identifiers that are NOT ever a FHIR Resource type. So I have a CDA document unique ID; can I put that into Provenance.entity.whatReference.identifier; or does Provenance need to continue to have Provenance.entity.whatIdentifier for this use-case? Or where I have a URL to some evidence on a web-page, do I need Provenance.entity.whatURI to hold that, or can that too go into a Reference.identifier. My problem is some are saying that Provenance.entity.what[x] should be simplified to just a Reference as Reference.identifier can hold ANY business identifier regardless of if that business identifier will ever show up in a FHIR Resource.
Lloyd McKenzie (Jul 13 2017 at 17:07):
If the data could be converted into FHIR by someone willing to do so, then I think Reference.identifier is ok to use. (Feel free to submit a change request for us to make this clear in the spec.) As for knowing the type of the resource, what's the use-case for saying it?
Lloyd McKenzie (Jul 13 2017 at 17:08):
We could certainly define a common extension for that, but I'm not sure it makes sense as part of core.
John Moehrke (Jul 13 2017 at 17:29):
Well, given that Binary exists.... then I guess there is no need for anything other than Reference.identifier. I think this is going to get confusing, as the logic says that Provenance.entity.what[x] should be simplified into just a Reference.
Lloyd McKenzie (Jul 13 2017 at 20:48):
There's also Basic
Last updated: Apr 12 2022 at 19:14 UTC