Stream: IG creation
Topic: discriminators based on profiles is not yet supported
Rob Hausam (Jun 04 2018 at 21:51):
The more complete error message is "Validating against slices with discriminators based on profiles is not yet supported by the FHIRPath engine". Is there any general suggestion on how to work with this or around it to fix the error? I'll provide more specifics if that's helpful.
Grahame Grieve (Jun 04 2018 at 21:54):
hmm. I'll have to fix that. I'm not sure when though in the next few weeks. That sounds like a flight to Boston thing....
Rob Hausam (Jun 04 2018 at 22:16):
ok - any suggestions for what would be good for us to do in the meantime?
Grahame Grieve (Jun 04 2018 at 23:32):
I'm not sure
Richard Townley-O'Neill (Jul 26 2018 at 06:10):
@Grahame Grieve @Rob Hausam
Any progress?
Is #17553 relevant?
Rob Hausam (Jul 26 2018 at 13:10):
have the same question - anything further on it @Grahame Grieve?
Grahame Grieve (Jul 26 2018 at 13:16):
nothing happening on ig publisher until the main build is under control
Sarah Gaunt (Aug 08 2018 at 09:32):
So I presume that this error (Validating against slices with discriminators based on profiles is not yet supported by the FHIRPath engine: reference) will get ignored if it is showing up in our IG ballot builds?
Grahame Grieve (Aug 08 2018 at 11:09):
don't know
Rob Hausam (Aug 08 2018 at 13:05):
I've been getting that one, too, and if possible it would be great to get it fixed
Grahame Grieve (Aug 08 2018 at 13:13):
ok well, I'll get onto it. I started today with a small task to find out why I had some bad expansions. 16 hours later.... I am committing now
Grahame Grieve (Aug 09 2018 at 01:57):
so i'm debugging my implementation of profile based slicing... but I'm not understanding the profiles using it....
Grahame Grieve (Aug 09 2018 at 01:58):
@Sarah Gaunt what profile are you suing it in?
Chris Moesel (Aug 09 2018 at 02:00):
I think we've used it in the past (but maybe not anymore) to slice on Observation.related
and indicate that certain profiles of Observation should exist.
Sarah Gaunt (Aug 09 2018 at 02:01):
http://build.fhir.org/ig/HL7/case-reporting/StructureDefinition-eicr-composition.html
Sarah Gaunt (Aug 09 2018 at 02:04):
This is probably a better example: http://build.fhir.org/ig/HL7/case-reporting/StructureDefinition-rr-communication.html
Sarah Gaunt (Aug 09 2018 at 02:05):
Though maybe not - they are both pretty much the same thing...
Grahame Grieve (Aug 09 2018 at 02:27):
so I think you want profile:resolve() as your discriminator, not profile:reference
Sarah Gaunt (Aug 09 2018 at 02:37):
Ok, will test out - thanks
Grahame Grieve (Aug 09 2018 at 02:46):
I'll need to commit before it works.
Sarah Gaunt (Aug 09 2018 at 02:46):
kk
Richard Townley-O'Neill (Aug 09 2018 at 02:47):
Should it be profile:reference.resolve() ?
Grahame Grieve (Aug 09 2018 at 02:48):
no.
Grahame Grieve (Aug 09 2018 at 02:48):
.resolve() is defined work with either
Richard Townley-O'Neill (Aug 09 2018 at 02:49):
ta
Sarah Gaunt (Aug 09 2018 at 02:52):
So:
<discriminator> <type value="profile" /> <path value="reference.resolve()" /> </discriminator>
?
Sarah Gaunt (Aug 09 2018 at 02:56):
Ooops I mean:
<discriminator> <type value="profile" /> <path value="resolve()" /> </discriminator>
Grahame Grieve (Aug 09 2018 at 02:57):
yes.
Grahame Grieve (Aug 09 2018 at 02:58):
committing now...
Sarah Gaunt (Aug 09 2018 at 02:58):
Okie dokie
Grahame Grieve (Aug 09 2018 at 03:00):
structuredefinition-eicr-composition.xml structuredefinition-rr-communication.xml - these are my copies, in case of any doubt
Sarah Gaunt (Aug 09 2018 at 03:01):
Tx
Sarah Gaunt (Aug 09 2018 at 03:17):
Errors gone!! Thanks @Grahame Grieve
Sarah Gaunt (Aug 15 2018 at 03:40):
So I am still having a small problem with these slices... (i.e. only giving me severity=information messages) but something is clearly not working.
I have a slice set up as follows (http://build.fhir.org/ig/HL7/case-reporting/StructureDefinition-eicr-composition.xml):
<element id="Composition.section:sliceProblemSection.entry"> <path value="Composition.section.entry" /> <slicing> <discriminator> <type value="profile" /> <path value="resolve()" /> </discriminator> <rules value="open" /> </slicing> <mustSupport value="true" /> </element> <element id="Composition.section:sliceProblemSection.entry:sliceEICRCondition"> <path value="Composition.section.entry" /> <sliceName value="sliceEICRCondition" /> <type> <code value="Reference" /> <targetProfile value="http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-condition" /> </type> <mustSupport value="true" /> <isModifier value="false" /> </element>
The profile doesn't error or produce a warning or anything.
But when I create an example (http://build.fhir.org/ig/HL7/case-reporting/Composition-eicr-composition-zika.xml):
<entry> <reference value="Condition/eicr-condition-eve-everywoman-common-cold" /> <display value="Common cold (disorder)" /> </entry>
I get the following: This element does not match any known slice for the profile http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-composition
The condition I'm referencing conforms to the eicr-condition referenced in the targetProfile of the slice.
I can't see what I'm doing wrong....
Chris Moesel (Aug 15 2018 at 03:46):
If you haven't tried it yet, you might try changing your discriminator path to be:
<path value="reference.resolve()" />
In the examples of the discriminator doc, they always seem to resolve on the Reference's reference
element (whereas you're resolving on the root of the Reference).
Sarah Gaunt (Aug 15 2018 at 03:47):
Yeah, I tried that... That makes the example have an actual error (rather than just information message). Tried just "reference" too... Thanks though...
Sarah Gaunt (Aug 15 2018 at 03:49):
@Grahame Grieve stated earlier in this topic that it should be just resolve() btw...
Grahame Grieve (Aug 15 2018 at 04:06):
is this all committed?
Sarah Gaunt (Aug 15 2018 at 04:09):
Yes
Sarah Gaunt (Aug 15 2018 at 04:09):
Grahame Grieve (Aug 15 2018 at 07:01):
@Sarah Gaunt a side issue - how are you authoring your profiles? you're not following the guidance for use of name/title
Sarah Gaunt (Aug 15 2018 at 07:02):
Manually and/ or Forge
Where do I find the guidance on that? Will fix.
Grahame Grieve (Aug 15 2018 at 07:03):
http://build.fhir.org/structuredefinition.html#metadata
Sarah Gaunt (Aug 15 2018 at 07:04):
Oh... Oops! Another bulk editing job!
Sarah Gaunt (Aug 15 2018 at 07:05):
Can the name be the same as the id?
Grahame Grieve (Aug 15 2018 at 07:05):
yes can be if that makes sense
Sarah Gaunt (Aug 15 2018 at 07:06):
Ok
Grahame Grieve (Aug 15 2018 at 07:08):
All authors should check this
Grahame Grieve (Aug 15 2018 at 10:55):
underlying problem fixed - I forgot to try resolving the references in the entire IG. And then once I did, I had a bunch of issues to fix
Lloyd McKenzie (Aug 15 2018 at 14:39):
Is there now a place we can capture the title distinct from the name in spreadsheets?
Eric Haas (Aug 15 2018 at 16:36):
Well that should be in metadata page: headers 'name' and 'display'
Lloyd McKenzie (Aug 15 2018 at 18:39):
How does that work for multiple profiles per workbook? (and for extensions in a workbook?)
Eric Haas (Aug 15 2018 at 19:51):
it doesn't I had to split the vitals profile - there is a task already for this
Lloyd McKenzie (Aug 15 2018 at 20:36):
I'll maybe change the code to generate a name from the id if you've got multiple profiles per spreadsheet
Lloyd McKenzie (Aug 15 2018 at 20:36):
And for extensions
Sarah Gaunt (Aug 15 2018 at 21:14):
@Grahame Grieve now I'm getting errors in my example.
pasted image
So in the profile (https://github.com/HL7/case-reporting/blob/master/source/resources/profiles/structuredefinition-eicr-composition.xml ) I have this:
<element id="Composition.section:sliceSocialHistorySection.entry"> <path value="Composition.section.entry" /> <slicing> <discriminator> <type value="profile" /> <path value="resolve()" /> </discriminator> <rules value="open" /> </slicing> <mustSupport value="true" /> </element> <element id="Composition.section:sliceSocialHistorySection.entry:sliceTravelHistory"> <path value="Composition.section.entry" /> <sliceName value="sliceTravelHistory" /> <type> <code value="Reference" /> <targetProfile value="http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-travel-history" /> </type> <mustSupport value="true" /> <isModifier value="false" /> </element> <element id="Composition.section:sliceSocialHistorySection.entry:slicePregnancyStatus"> <path value="Composition.section.entry" /> <sliceName value="slicePregnancyStatus" /> <max value="1" /> <type> <code value="Reference" /> <targetProfile value="http://hl7.org/fhir/us/ecr/StructureDefinition/pregnancy-status" /> </type> <mustSupport value="true" /> <isModifier value="false" /> </element> <element id="Composition.section:sliceSocialHistorySection.entry:sliceOccupationHistory"> <path value="Composition.section.entry" /> <sliceName value="sliceOccupationHistory" /> <type> <code value="Reference" /> <targetProfile value="http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-occupationhistory" /> </type> <mustSupport value="true" /> <isModifier value="false" /> </element>
In the example (https://github.com/HL7/case-reporting/blob/master/source/resources/examples/eicr-composition-zika.xml) I have this:
<!-- eICR Travel History --> <entry> <reference value="Observation/eicr-travel-history-eve-everywoman-201801" /> <display value="eICR Travel History: Eve Everywoman 2018-01" /> </entry> <!-- eICR Pregnancy Status --> <entry> <reference value="Observation/eicr-pregnancy-status-eve-everywoman" /> <display value="eICR Pregnancy Status Example 1" /> </entry> <!-- eICR Occupation History --> <entry> <reference value="Observation/eicr-occupation-history-eve-everywoman" /> <display value="eICR Occupation History: Eve Everywoman" /> </entry>
I have double checked the stuff (eg. https://github.com/HL7/case-reporting/blob/master/source/resources/examples/eicr-pregnancy-status-eve-everywoman.xml) that is being referenced and they each conform to the correct profile:
<id value="eicr-pregnancy-status-eve-everywoman" /> <meta> <profile value="http://hl7.org/fhir/us/ecr/StructureDefinition/pregnancy-status" /> </meta>
Is there still an issue? Am I doing something wrong?
Grahame Grieve (Aug 16 2018 at 00:08):
well, I'm just committing an update that parses the metadata like this:
if there's a metadata entry for title, then :
- profile.title = metadata('title')
- profile.name = metadata('name')
else
- profile.title = metadata('name')
- profile.name = metadata('name')
Lloyd McKenzie (Aug 16 2018 at 00:24):
How does that work for multi-profile spreadsheets or extensions?
Grahame Grieve (Aug 16 2018 at 01:10):
don't know. Stop using spreadsheets...
Lloyd McKenzie (Aug 16 2018 at 01:11):
Stop using spreadsheets essentially means handcode the structuredefinitions, which isn't a terribly viable option
Sarah Gaunt (Aug 16 2018 at 03:53):
I'm still getting the same error that I was getting this morning, btw: Profile http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-composition, Element matches more than one slice - sliceTravelHistory, slicePregnancyStatus
Grahame Grieve (Aug 16 2018 at 11:15):
How does that work for multiple profiles per workbook?
Add 2 new columns Profile.name and Profile.title, and give them a value only in the first row
Grahame Grieve (Aug 16 2018 at 11:16):
Extensions pick up name and title from the [Name] and [Display] columns, but these are dual used, so if you want to override them, you can also use Profile.name and Profile.title on each extension (root extensions)
Lloyd McKenzie (Aug 16 2018 at 14:30):
Thank you!
Lloyd McKenzie (Aug 16 2018 at 14:31):
@Jean Duteau, we'll need to do this for ours.
Grahame Grieve (Aug 17 2018 at 01:58):
this is the same error that Stefan is getting. I'm not going to fix it, for ow. It won't prevent it going to ballot
Sarah Gaunt (Aug 17 2018 at 01:59):
Ok will ignore errors...
Sarah Gaunt (Aug 17 2018 at 02:03):
Sorry - maybe build hasn't completed yet? I saw a bot come up but it looks like it was an IG build, not main build. Will wait.
Sarah Gaunt (Aug 17 2018 at 02:24):
Works! Thanks GG!
Last updated: Apr 12 2022 at 19:14 UTC