FHIR Chat · US-Core provenance-1 · implementers

Stream: implementers

Topic: US-Core provenance-1


view this post on Zulip Alexander Zautke (Feb 07 2021 at 14:42):

The .NET validator currently rejects all instances conforming to the US Core profile for Provenance as the provenance-1 is always failing. The constraint is defined on Provenance.agent.onBehalfOf, which is therefore the focus of the FHIRPath evaluation. However, the constraint starts with "$this" instead of "%resource". The "agent" child in "$this.agent.who.resolve()" is due to this never found.

Can someone confirm that this is a bug in the constraint?

view this post on Zulip Lloyd McKenzie (Feb 07 2021 at 16:01):

@Eric Haas, the fact the invariants (and specifically the expressions) don't actually show up on the profile home page is problematic.

And yes, it's wrong. $this is only available in the context of a function. The expression should be using %resource. Can you raise a tracker item?
Also, we probably need a separate tracker item to figure out why the Java reference implementation didn't catch the issue.

view this post on Zulip Eric Haas (Feb 08 2021 at 06:35):

That fact the invariant table is half a page long for the diff view is also problematic. I don’t want my readers sifting through element definition invariants whuch they don’t need to care about.

view this post on Zulip Lloyd McKenzie (Feb 08 2021 at 06:43):

Fair.

view this post on Zulip Alexander Zautke (Feb 08 2021 at 08:49):

Created https://jira.hl7.org/browse/FHIR-31020
Thanks for the clarification

view this post on Zulip Robert Scanlon (Feb 08 2021 at 21:23):

A fairly recent version of the HL7 FHIR Validator raises an exception on this:

org.hl7.fhir.exceptions.FHIRException: Problem processing expression ($this.agent.who.resolve().is Practitioner or Device) implies exists() in profile http://hl7.org/fhir/us/core/StructureDefinition/us-core-provenance path Provenance.agent[0].onBehalfOf: Error in ?? at 1, 2: Found Practitioner expecting a ")"
at org.hl7.fhir.validation.instance.InstanceValidator.checkInvariant(InstanceValidator.java:4833)

view this post on Zulip Robert Scanlon (Feb 08 2021 at 21:25):

Though this is somewhat new, because an older version we are running did not pick up on this issue.

view this post on Zulip Grahame Grieve (Feb 08 2021 at 22:39):

want to raise an issue against the validator?

view this post on Zulip ryan moehrke (Feb 08 2021 at 22:52):

($this.agent.who.resolve().is Practitioner or Device) implies exists() isn't correct fhirpath right? it should be x.is(y) or 'x is y' not 'x.is y'
note: CI build for us-core provenance-1 should be fine and is
(($this.agent.who.resolve() is Practitioner) or ($this.agent.who.resolve() is Device)) implies exists()

view this post on Zulip Lee Surprenant (Mar 16 2022 at 16:53):

so https://jira.hl7.org/browse/FHIR-31020 got closed, but I think this expression is still problematic (for a different reason)

view this post on Zulip Lee Surprenant (Mar 16 2022 at 16:53):

I'll open a new JIRA for it, but thought I'd mention hear as well (in case I got it wrong):

agent is a repeating field and so %resource.agent.who.resolve() is potentially a collection with multiple items. but is only works over singletons

view this post on Zulip Lee Surprenant (Mar 16 2022 at 17:13):

FHIR-36328


Last updated: Apr 12 2022 at 19:14 UTC