Stream: committers
Topic: FHIRPath engine issue?
Michelle (Moseman) Miller (Feb 08 2017 at 14:27):
@Grahame Grieve , I'm trying to apply a new invariant for CareTeam, GF#12647, but after working with @Bryn Rhodes , he suggested I log GF#12707 to investigate the FHIRPath engine. The issue is that the (local) build chokes on an example, http://build.fhir.org/careteam-example.xml.html, that should be fine.
FYI, @Lloyd McKenzie , the Request pattern has a very similar invariant to what I'm trying to do with GF#12647.
Request pattern invariant expression: (agent is Practitioner) or (agent is Device) or onBehalfOf.exists().not()
CareTeam invariant expression: (member is Practitioner) or onBehalfOf.exists().not()
The exact build error is:
[java] ERROR @ CareTeam.participant[2] (line 0, col0) careteam-example:: CareTeam.participant[2]: onBehalfOf can only be specified if member is practitioner [(member is Practitioner) or onBehalfOf.exists().not()] (src = InstanceValidator)
[java] ERROR @ CareTeam.participant[2] careteam-example:: CareTeam.participant[2]: onBehalfOf can only be specified if member is practitioner [(member is Practitioner) or onBehalfOf.exists().not()] (src = InstanceValidator)
It seems like the issue is related to the "member is Practitioner" part and with Bryn's help, I've tried a few other variations like "member.resolve() is Practitioner" and "member.resolve().is(Practitioner)" with no luck.
Any other suggestions?
Grahame Grieve (Feb 09 2017 at 04:33):
definitely need the .resolve() - but I'm not sure what the actual error you are getting is?
Michelle (Moseman) Miller (Feb 09 2017 at 11:13):
The error I saw after building is below, but was not very descriptive. Just seems like it thinks my example, http://build.fhir.org/careteam-example.xml.html, violates the invariant.
[java] ERROR @ CareTeam.participant[2] (line 0, col0) careteam-example:: CareTeam.participant[2]: onBehalfOf can only be specified if member is practitioner [(member is Practitioner) or onBehalfOf.exists().not()] (src = InstanceValidator) [java] ERROR @ CareTeam.participant[2] careteam-example:: CareTeam.participant[2]: onBehalfOf can only be specified if member is practitioner [(member is Practitioner) or onBehalfOf.exists().not()] (src = InstanceValidator)
Michelle (Moseman) Miller (Feb 09 2017 at 11:16):
Same type of error when I use (onBehalfOf.exists()).not() or (member.resolve() is Practitioner)
[java] careteam-example:: CareTeam.participant[2]: CareTeam.participant.onBehalfOf can only be populated when CareTeam.participant.member is a Practitioner [(onBehalfOf.exists()).not() or (member.resolve() is Practitioner)]
[java] careteam-example:: CareTeam.participant[2]: CareTeam.participant.onBehalfOf can only be populated when CareTeam.participant.member is a Practitioner [(onBehalfOf.exists()).not() or (member.resolve() is Practitioner)]
Grahame Grieve (Feb 09 2017 at 11:25):
hmm. I'm going to have to debug this
Grahame Grieve (Feb 09 2017 at 20:27):
fixed
Michelle (Moseman) Miller (Feb 09 2017 at 20:50):
thanks!!
Last updated: Apr 12 2022 at 19:14 UTC