FHIR Chat · FHIR validator with STU3 resources · implementers

Stream: implementers

Topic: FHIR validator with STU3 resources


view this post on Zulip Ravindra Kondiparthi (Jun 09 2020 at 02:24):

Hi,

Looking for some help with FHIR validator. Any help is appreciated.

I am getting below error when validating resources with FHIR validator. My top/parent resource have contained resource which in turn has a local reference.

Error
ref-1: SHALL have a contained resource if a local reference is provided ( (url: prac1234; ids: )) [reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))]

Example:
{
resourceType:”ExplanationOfBenefit”,
contained:[
{
resourceType:”Practitioner”,
id:”prac1234”
},
{
resourceType:”PractitionerRole”,
practitioner:”#prac1234”
}
]
}

Thanks
Ravi

view this post on Zulip Michele Mottini (Jun 09 2020 at 02:59):

Most likely a bug in the validator, it came up recently: https://chat.fhir.org/#narrow/stream/179166-implementers/topic/References.20between.20contained.20resources

view this post on Zulip Ravindra Kondiparthi (Jun 09 2020 at 04:24):

thanks @Michele Mottini

view this post on Zulip Michele Mottini (Jun 09 2020 at 13:05):

...having said that the double-contained resource would make life hard for clients (our will choke on it I am pretty sure)

view this post on Zulip Vassil Peytchev (Jun 09 2020 at 13:36):

They are not double-contained, are they? They are siblings. Or did you mean the intra-contained reference?

view this post on Zulip Michele Mottini (Jun 09 2020 at 14:00):

I mean that example above - with one contained referencing its sibling contained. Most clients would look in the wrong place to resolve that reference (as the validator is doing)

view this post on Zulip Lloyd McKenzie (Jun 09 2020 at 14:15):

What you're doing is legal according to the spirit of the spec, but illegal according to how we've written an invariant in R4 unfortunately. We're going to try to fix that for R5.


Last updated: Apr 12 2022 at 19:14 UTC