Stream: shorthand
Topic: References for 4B Snapshot #1
Giorgio Cangioli (Mar 09 2022 at 19:57):
I've a new errors in the FHIR for FAIR IG moving from FHIR 4b to FHIR 4b snapshot 1.
The problem seems to be related to the fact that in one of the extension defined
- value[x] only Reference(Resource)
is now converted into a CodeableReference instead of a Reference.
Is there a way to force the element to be a Reference ?
Chris Moesel (Mar 09 2022 at 20:22):
Hi @Giorgio Cangioli. Wow. I thought maybe I misunderstood what you were saying, but I just tried this in an R4B Snapshot1 project myself with simple extension:
Extension: MyExtension
* value[x] only Reference(Resource)
and see this in the resulting SD JSON:
{
"id": "Extension.value[x]",
"path": "Extension.value[x]",
"type": [
{
"code": "CodeableReference",
"targetProfile": [
"http://hl7.org/fhir/StructureDefinition/Resource"
]
}
]
}
Yikes! That is surprising. I have no idea why that would happen, but we'll definitely look into it!
Chris Moesel (Mar 09 2022 at 20:26):
Luckily, there is a harmless workaround if you just need this to work now. It is to first restrict the type to a Reference
and then to a Reference(Resource)
. E.g., this works as expected:
Extension: MyExtension
* value[x] only Reference
* value[x] only Reference(Resource)
resulting in:
{
"id": "Extension.value[x]",
"path": "Extension.value[x]",
"type": [
{
"code": "Reference",
"targetProfile": [
"http://hl7.org/fhir/StructureDefinition/Resource"
]
}
]
}
Chris Moesel (Mar 09 2022 at 20:32):
Giorgio Cangioli (Mar 10 2022 at 07:12):
Thank you so much @Chris Moesel :-)
Last updated: Apr 12 2022 at 19:14 UTC