Stream: implementers
Topic: Constraint that a contained resource have an `id`
Preston TW (Mar 16 2020 at 15:40):
Hello!
Looking at dom-3
(https://www.hl7.org/fhir/domainresource.html#invs), it says that a contained resource shall either be referenced or should reference the containing resource. Should there also be a constraint saying that the contained resource has an id
if it doesn't reference the containing resource? (Does one of the constraints already contain this logic? From what I can tell there isn't any, but I could be reading them incorrectly.)
Thank you,
Preston
Lloyd McKenzie (Mar 16 2020 at 15:45):
It's certainly worth making expectations clear. Can you submit a change request?
Preston TW (Mar 16 2020 at 15:55):
Registered for an account, I'll submit a change request when I'm approved!
Lloyd McKenzie (Mar 16 2020 at 16:14):
I see an id request on gForge, but we don't use gForge anymore. You'll need to request your id here: https://jira.hl7.org/projects/NEWID
Preston TW (Mar 16 2020 at 17:01):
Ahh, I was going to ask but went ahead with gForge anyway. Should I make a change request to update https://wiki.hl7.org/FHIR_Change_requests too?
Lloyd McKenzie (Mar 16 2020 at 17:40):
No, because that's an archived page - as noted at the top, our mediawiki has now been superseded by Confluence. However, we hadn't ported an equivalent page into Confluence, so I just created one here: https://confluence.hl7.org/display/FHIR/Change+Requests
Preston TW (Mar 16 2020 at 17:59):
Requested a Jira account, thank you. Somehow I missed the banner at the top.
Preston TW (Mar 16 2020 at 18:56):
Change request at https://jira.hl7.org/browse/FHIR-26593
Preston TW (Mar 19 2020 at 02:23):
@Lloyd McKenzie Should a contained resource always have an id
regardless of whether it references the containing resource?
Lloyd McKenzie (Mar 19 2020 at 02:27):
I believe so - @Grahame Grieve ?
Grahame Grieve (Mar 19 2020 at 05:07):
yes
Corey Spears (Jun 17 2020 at 22:22):
@Lloyd McKenzie I know it has been a while, but can we have the same explanation (on Confluence) posted on the FHIR GForge project space (located here: https://gforge.hl7.org/gf/project/fhir). I think every once in a while people are still going in to GForge, and the project site still says this is where FHIR requests are tracked.
Chris Stadler (Sep 24 2020 at 18:43):
Hi all,
I'd like to clarify something about https://jira.hl7.org/browse/FHIR-26593 (I can't seem to comment on the ticket itself). It seems like there are two distinct concerns here:
- There is a bug in the fhirpath expression for
dom-3
that allows it to be satisfied even if there are no references between the containing and contained resource: if the contained resource has noid
then this empty value is propagated through the fhirpath expression by the+
,in
, andor
operators. This results incontained.where({}).empty()
, which is true (regardless of whether or not there are any references). - Should all
contained
resources be required to have anid
? The answer from above seems to be "yes", but I don't think this is suggested by any of the existing constraints so a new constraint should be added.
Are both of these being addressed, or should I file another ticket for one ofthem?
Thanks!
Lloyd McKenzie (Sep 24 2020 at 19:18):
Jira doesn't allow comments on tickets that are already resolved (because the high likelihood is that no one would end up reading what you wrote). You can submit a new ticket referencing the existing one if you feel that further clarification/change is needed.
Last updated: Apr 12 2022 at 19:14 UTC