Stream: IG creation
Topic: Constraining 'Resource' to a 'Reference'
Chris Moesel (Nov 12 2019 at 03:28):
(deleted)
Chris Moesel (Nov 12 2019 at 03:37):
I'm trying to determine all the ways that one type might be constrained to another. I found that Bundle.entry.resource
provides an interesting use case since it can be constrained to multiple types -- effectively increasing the type array from 1 item to many (e.g., [{ "code": "Resource" }]
can be constrained to [{ "code": "MedicationRequest" } , { "code": "MedicationStatement" }]
).
In researching what is and is not possible, I found the Da Vinci Alerts Bundle Profile. In this profile, { "code": "Resource"}
(from Bundle
) gets "constrained" to { "code": "Reference", "targetProfile": [""http://hl7.org/fhir/us/davinci-alerts/StructureDefinition/alerts-communication""] }
. I'm trying to understand how/why this works, because Reference
is not a specialization or constraint of Resource
. It is, in fact, a complex-type
that specializes Element
. So how/why is it allowed as a constraint of a Resource
type?
Eric Haas (Nov 12 2019 at 06:43):
first that IG never went to ballot and we need to 'unpublish' it. Its been totally replaced and that profile is not being used. secondly I don't know what I was doing that should be Resource and not Reference. and I am not sure why it was not picked up by the validator...
Chris Moesel (Nov 12 2019 at 14:17):
Hmm... OK. I did look at the QA for that IG and it is clean -- so the IG Publisher definitely did let it through (which is why I assumed it must be ok, even if I don't understand it). I feel like I saw that happen in other IGs too... but maybe not -- I looked at a lot of IGs for examples, so my memory is a little murky. (BTW -- I found that IG in the IG registry).
For now I will assume that it was a mistake for the IG publisher to allow it -- and that you shouldn't be allowed to constrain Resource
to Reference
. Thanks, @Eric Haas!
Grahame Grieve (Nov 12 2019 at 19:58):
if the QA was clean, there's a problem somewhere...
Chris Moesel (Nov 12 2019 at 21:01):
It was built Aug 5, so may be a moot point now. Perhaps would not come up clean again in a rebuild: http://hl7.org/fhir/us/davinci-alerts/2019Sep/qa.html
Grahame Grieve (Nov 12 2019 at 21:06):
doesn't feature in the current qa.html
Last updated: Apr 12 2022 at 19:14 UTC