FHIR Chat · Workflow-related extensions · committers

Stream: committers

Topic: Workflow-related extensions


view this post on Zulip Lloyd McKenzie (Jun 26 2018 at 19:48):

Just a note that if your work group is looking at adding extensions to support some of the elements from the workflow patterns, there are already standard collections of extensions in the "profiles" folder for the request, event and definition patterns. Please add your resource to the context of the existing extensions or add new extensions to those existing repositories rather than creating your own. (The workflow reports won't catch extensions you define elsewhere.)

view this post on Zulip Michelle (Moseman) Miller (Jun 29 2018 at 12:56):

http://build.fhir.org/extension-event-instantiatescanonical.html is an existing extension, but it just has a type of "canonical". Is that correct? I am questioning if it should have a type of "canonical(ActivityDefinition | Measure | OperationDefinition | PlanDefinition | Questionnaire)"

view this post on Zulip Lloyd McKenzie (Jun 29 2018 at 13:57):

That would be better, yes.

view this post on Zulip Lloyd McKenzie (Jun 29 2018 at 13:57):

Feel free to make the fix

view this post on Zulip Michelle (Moseman) Miller (Jun 29 2018 at 14:53):

Will do whenever the build is successful again (it's been failed for the past week....)

view this post on Zulip Grahame Grieve (Jun 30 2018 at 22:19):

@Josh Mandel .html pages must be well formed.

view this post on Zulip Josh Mandel (Jun 30 2018 at 22:58):

Argh, I broke the build? Whoops, sorry and will fix when I'm back at a computer!

view this post on Zulip Josh Mandel (Jun 30 2018 at 22:58):

(can't wait til we move to GitHub and can prevent broken changes from breaking the master branch.)

view this post on Zulip Grahame Grieve (Jun 30 2018 at 23:14):

I'll fix it

view this post on Zulip Grahame Grieve (Jun 30 2018 at 23:14):

not sure that preventing changes from breaking the build will make everyone happy...

view this post on Zulip Josh Mandel (Jun 30 2018 at 23:18):

Thanks Grahame, and sorry for the trouble. (Everyone may not be happy, but perhaps we can strive for "enlightened"?)

view this post on Zulip Grahame Grieve (Jun 30 2018 at 23:29):

well, we will all be happy with that particular outcome, but I suspect we will all struggle with the side consequences

view this post on Zulip Michelle (Moseman) Miller (Jul 02 2018 at 19:14):

I checked out a fresh, clean build (made NO changes) and my local build is failing, so I am officially baffled. Here are the errors:

 [java] ERROR @ CapabilityStatement (line 0, col0): capabilitystatement-messagedefinition:: CapabilityStatement: If kind = instance, implementation must be present and software may be present [(kind != 'instance') or implementation.exists()] (src = InstanceValidator)
 [java] ERROR @ CapabilityStatement: capabilitystatement-messagedefinition:: CapabilityStatement: If kind = instance, implementation must be present and software may be present [(kind != 'instance') or implementation.exists()] (src = InstanceValidator)
 [java] ERROR @ CareTeam.participant[2] (line 0, col0): careteam-example:: CareTeam.participant[2]: CareTeam.participant.onBehalfOf can only be populated when CareTeam.participant.member is a Practitioner [onBehalfOf.exists() implies (member.resolve() is Practitioner)] (src = InstanceValidator)
 [java] ERROR @ CareTeam.participant[2]: careteam-example:: CareTeam.participant[2]: CareTeam.participant.onBehalfOf can only be populated when CareTeam.participant.member is a Practitioner [onBehalfOf.exists() implies (member.resolve() is Practitioner)] (src = InstanceValidator)
 [java] ERROR @ List (line 0, col0): list-example:: List: A date can only be used if the mode of the list is "working" [mode = 'working' or entry.date.empty()] (src = InstanceValidator)
 [java] ERROR @ List: list-example:: List: A date can only be used if the mode of the list is "working" [mode = 'working' or entry.date.empty()] (src = InstanceValidator)

view this post on Zulip Grahame Grieve (Jul 02 2018 at 21:27):

I don't know anything about the careteam ones

view this post on Zulip Grahame Grieve (Jul 02 2018 at 21:27):

I just fixed the other ones

view this post on Zulip Michelle (Moseman) Miller (Jul 02 2018 at 21:32):

Thanks, I'll try another build and see if that fixes all of them. Nothing has changed with CareTeam -- and the example should be compliant with the invariant provided the expression is correctly written: onBehalfOf.exists() implies (member.resolve() is Practitioner)

view this post on Zulip Michelle (Moseman) Miller (Jul 03 2018 at 14:15):

@Grahame Grieve There are some odd things gong on with the build.
#1 - I saw you made a change to the careteam-example, but now the example isn't valid. CareTeam.participant.onBehalfOf only supports a Reference(Organization), but you changed it to be a Reference(Practitioner). I would have expected the build to fail.
#2 - I still get failures when doing a full build locally (without making any changes). The errors are noted below, but there is a small theme around contained resource references. For example, the errors are related to CareTeam invariant, which says if onBehalfOf is populated, then the member must be a Practitioner (and it is, but it is a reference to a contained practitioner). I also see some errors related to contained references for PlanDefinition, too.

[java] ERROR @ CareTeam.participant[2] (line 0, col0): careteam-example:: CareTeam.participant[2]: CareTeam.participant.onBehalfOf can only be populated when CareTeam.participant.member is a Practitioner [onBehalfOf.exists() implies (member.resolve() is Practitioner)] (src = InstanceValidator)

[java] ERROR @ CareTeam.participant[2]: careteam-example:: CareTeam.participant[2]: CareTeam.participant.onBehalfOf can only be populated when CareTeam.participant.member is a Practitioner [onBehalfOf.exists() implies (member.resolve() is Practitioner)] (src = InstanceValidator)

[java] ERROR @ PlanDefinition (line 0, col0): plandefinition-example-cardiology-os:: PlanDefinition: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource [contained.all(('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists())] (src = InstanceValidator)

[java] ERROR @ C:\buildTEST\publish\plandefinition-example-cardiology-os.xml (line 461, col59): plandefinition-example-cardiology-os:: C:\buildTEST\publish\plandefinition-example-cardiology-os.xml: cvc-complex-type.2.4.a: Invalid content was found starting with element 'options'. One of '{"http://hl7.org/fhir":readOnly, "http://hl7.org/fhir":maxLength, "http://hl7.org/fhir":answerValueSet, "http://hl7.org/fhir":answerOption, "http://hl7.org/fhir":initial, "http://hl7.org/fhir":item}' is expected. (src = InstanceValidator)

[java] ERROR @ PlanDefinition: plandefinition-example-cardiology-os:: PlanDefinition: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource [contained.all(('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists())] (src = InstanceValidator)

view this post on Zulip Michelle (Moseman) Miller (Jul 03 2018 at 14:32):

Note: It is odd that my build succeeds when committed, but still fails locally (with and without my changes applied).
Upon further investigation into the care team local build (only) failure, is this the correct xpath for an invariant that is trying to check that a reference is to Practitioner, specifically?

xpath: starts-with(f:member/f:reference/@value, 'Practitioner/') or contains(f:member/f:reference/@value, '/Practitioner/') ....

The thing that caught my attention was that a contained reference value doesn't have "Practitioner" in the path. Is the build or xpath smart enough to recognize that #pr1 contained resource is a Practitioner resource?

<reference value="#pr1"/>

view this post on Zulip Eric Haas (Jul 03 2018 at 14:36):

RE: "http://build.fhir.org/extension-event-instantiatescanonical.html is an existing extension, but it just has a type of "canonical". Is that correct? I am questioning if it should have a type of "canonical(ActivityDefinition | Measure | OperationDefinition | PlanDefinition | Questionnaire)""

It is unclear to me what this notation means, canonical is a primitive and not a reference? Does that limit your choices in validation, and where is this documented -( I looked and did not see it by the data-type)

view this post on Zulip Michelle (Moseman) Miller (Jul 03 2018 at 14:43):

FYI, I just applied the changes to the common event extension as described earlier. I'm not sure where it is clearly defined, which is why I raised the question to begin with -- I had seen other instances where canonical has specific resources listed. For example QuestionnaireResponse.questionnaire has type canonical(Questionnaire) only. The awkward thing (I'll log a tracker) is that the resource types don't show up until you drill down into the details (http://build.fhir.org/questionnaireresponse-definitions.html#QuestionnaireResponse.questionnaire)

view this post on Zulip Michelle (Moseman) Miller (Jul 03 2018 at 15:06):

GF#17438 has been logged

view this post on Zulip Lloyd McKenzie (Jul 03 2018 at 15:07):

I'd be in favor of qualifying the canonical reference to the allowed types

view this post on Zulip Eric Haas (Jul 03 2018 at 15:09):

how does this work - is it a binding with url as "codes"

view this post on Zulip Eric Haas (Jul 03 2018 at 15:10):

because I've been tempted to do that in the recent past (except I made codes for the types or profiles like we did for resource types)

view this post on Zulip Lloyd McKenzie (Jul 03 2018 at 15:15):

targetProfile, the same as for Reference

view this post on Zulip Eric Haas (Jul 03 2018 at 15:32):

Where it this documented? ( I missed it)

view this post on Zulip Lloyd McKenzie (Jul 03 2018 at 15:32):

Submitted a change proposal yesterday to update the documentation on ElementDefinition..targetProfile to make clear it can be used for canonical as well as Reference

view this post on Zulip Lloyd McKenzie (Jul 03 2018 at 15:33):

(So I guess you're just not as on top of things as you should be ;))

view this post on Zulip Eric Haas (Jul 03 2018 at 15:33):

as well as in the http://build.fhir.org/references.html page?

view this post on Zulip Lloyd McKenzie (Jul 03 2018 at 15:35):

Feel free to add a comment. GF#17433

view this post on Zulip Grahame Grieve (Jul 03 2018 at 20:08):

the CI build does not run the validation - it was taking too long and failing, so I had to turn it off. But that's not sustainable, since some committers are ignoring the validation errors locally

view this post on Zulip Lloyd McKenzie (Jul 03 2018 at 20:55):

Did you warn us about that? I've been presuming that successful CI build means everything is fine...

view this post on Zulip Michelle (Moseman) Miller (Jul 05 2018 at 14:05):

How can I use xpath to check that a contained resource reference is a given resource type? Currently, the invariant xpath is as follows, which I fear is failing on an example where the resource reference is contained (e.g. no "Practitioner" in the reference value).

xpath: starts-with(f:member/f:reference/@value, 'Practitioner/') or contains(f:member/f:reference/@value, '/Practitioner/') ....

view this post on Zulip Lloyd McKenzie (Jul 05 2018 at 14:19):

or exists(ancestor::*/f:contains/f:Practitioner/f:id[@value=substring-after(current()/f:member/f:reference/@value, '#')])


Last updated: Apr 12 2022 at 19:14 UTC