FHIR Chat · Validation Warning - URN reference is not locally · hapi

Stream: hapi

Topic: Validation Warning - URN reference is not locally


view this post on Zulip Kevin Mayfield (Nov 06 2021 at 16:07):

In HAPI Validation this is returned as a warning.
However for FHIR Messages I think this should be an error (the message should be self contained).

Is this correct?

Is it possible to upgrade these referencing warnings to errors via a setting?

view this post on Zulip Grahame Grieve (Nov 07 2021 at 20:16):

it's not stated as true in the specification - that messages should be entirely self contained. All that the spec says is that MessageHeader.focus SHALL be in the message. let me know if that's not being enforced. Otherwise, you can make a profile to say that where you want to say it (see ElementDefinition.type.aggregation)

view this post on Zulip Kevin Mayfield (Nov 08 2021 at 08:30):

Let me test that.
I've a feeling when our resource A is in a REST interaction, its referenced and when in a message interaction it's bundled.

view this post on Zulip Grahame Grieve (Nov 08 2021 at 09:42):

bw, this code is org.hl7.fhir.validation.instance.type.BundleValidator.validateMessage

view this post on Zulip Kevin Mayfield (Nov 08 2021 at 10:10):

It works.
Looking at https://www.hl7.org/fhir/valueset-resource-aggregation-mode.html
What I'm after is just slightly different to:
The resource the reference points to will be found in the same bundle as the resource that includes the reference.
Something like
if Bundle.type = message then apply rule else ignore

I'll get some other internal views


Last updated: Apr 12 2022 at 19:14 UTC