Stream: IG creation
Topic: This element does not match any known slice
Grahame Grieve (Jan 29 2020 at 01:21):
if you've been used to seeing this message in your IG... it's about to change. Now, you're going to get, instead of no hint why, a list of slices, along with why the validator doesn't think the slice matches. Given that the failure can be >3 hops away, you can get an absolute dump of information
Sarah Gaunt (Jan 29 2020 at 01:23):
Can we supress all of them? Because for something like a Document Bundle, where only the first Composition entry slice is stated in the profile, we'll get a fair few of them, I imagine...
Grahame Grieve (Jan 29 2020 at 01:23):
are you getting those messages now? it only happens where you have specified slices, and then failed to meet any of them
Sarah Gaunt (Jan 29 2020 at 01:23):
Or will they just be one message for each as it is now, but with lots of info...
Sarah Gaunt (Jan 29 2020 at 01:24):
I think I do get them in a few places, yes.
Grahame Grieve (Jan 29 2020 at 01:24):
on message, just with a great deal of information
Grahame Grieve (Jan 29 2020 at 01:25):
Grahame Grieve (Jan 29 2020 at 01:25):
from IPS
Grahame Grieve (Jan 29 2020 at 01:25):
where the fail was 2 hops away
Sarah Gaunt (Jan 29 2020 at 01:26):
Yes, eCR has 2 of them - both bundles and both definitely have the one slice. In fact, I'm pretty sure that the validator recognises the slice because it's 1..1 and it would error if the slice wasn't there. So not sure that this " it only happens where you have specified slices, and then failed to meet any of them" can be true.
Grahame Grieve (Jan 29 2020 at 01:27):
it means your example - that you think conforms to the slice - doesn't.
Sarah Gaunt (Jan 29 2020 at 01:28):
Why doesn't it error on the 1..1 slice then?
This is the Bundle profile: http://build.fhir.org/ig/HL7/case-reporting/StructureDefinition-eicr-document-bundle.html
It HAS to have the Composition slice.
Grahame Grieve (Jan 29 2020 at 01:28):
hmm. it should.
Sarah Gaunt (Jan 29 2020 at 01:29):
It doesn't error because that slice is there.
Sarah Gaunt (Jan 29 2020 at 01:30):
I always assumed that warning was just to let you know you had other slices. I even surpressed it with this message "// Examples have optional slices that are not defined in the profile - not matching is expected behaviour".
Sarah Gaunt (Jan 29 2020 at 01:31):
This is the first entry in one of the Bundle examples that gets that message about no known slice:
<entry> <fullUrl value="Composition/composition-eicr-zika" /> <resource> <Composition xmlns="http://hl7.org/fhir"> <id value="composition-eicr-zika" /> <meta> <versionId value="27" /> <lastUpdated value="2019-10-20T11:00:43.000-04:00" /> <profile value="http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-composition" /> </meta>
Sarah Gaunt (Jan 29 2020 at 01:33):
BTW - I'm only getting it on Bundles (at least in eCR).
Sarah Gaunt (Jan 29 2020 at 04:33):
So back to this now @Grahame Grieve
[Deleted rest of message]- realised this was because I wasn't looking at the right level in the path...Oops.
Sarah Gaunt (Jan 29 2020 at 04:39):
This one:
Bundle/bundle-eicr-document-zika: Bundle.entry[1] Slicing Information This element does not match any known slice defined in the profile http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle: Bundle.entry[1]: Does not match slice'sliceEICRComposition' (discriminator = true and $this.resource.conformsTo('http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-composition')) , Bundle.entry[1]: Profile http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-composition does not match for Bundle because of the following profile issues: resource: Specified profile type was 'Composition', but found type 'MedicationAdministration'
Definitely does have the one slice that the validator is looking for:
<entry> <fullUrl value="Composition/composition-eicr-zika" /> <resource> <Composition xmlns="http://hl7.org/fhir"> <id value="composition-eicr-zika" /> <meta> <versionId value="27" /> <lastUpdated value="2019-10-20T11:00:43.000-04:00" /> <profile value="http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-composition" /> </meta>
It is the first entry in the Bundle.
There are 15 entries in that bundle, and the validator is complaining about 14 of them. i.e. all of them except for the first and only slice that is specified in the profile it conforms to.
Sarah Gaunt (Jan 29 2020 at 04:40):
It couldn't be a 0 vs 1 starting index type thing could it? Because ALL of them are ignoring entry[0] and starting at entry[1]... Though that is probably because the first one is the only one specified and is actually correct.
For reference:
http://build.fhir.org/ig/HL7/case-reporting/branches/master/qa.html
Grahame Grieve (Jan 29 2020 at 05:02):
it's not complaining about them. it's just telling you that they didn't match any slice, and why. And you know that they didn't, for those ones
Sarah Gaunt (Jan 29 2020 at 05:03):
Right, but I thought you said it should only tell you about them if there wasn't any slice matched?
Sarah Gaunt (Jan 29 2020 at 05:03):
Or sorry - specified slices and then those aren't matched.
Grahame Grieve (Jan 29 2020 at 05:04):
right. it tells you, for each item that doesn't match one of the slices, that it didn't match, and why not (as much as I can get it to)
Sarah Gaunt (Jan 29 2020 at 05:05):
Oh ok. Well that's fine then. I can suppress them. You just stated earlier: " it only happens where you have specified slices, and then failed to meet any of them". Maybe I wasn't understanding what that meant.
Grahame Grieve (Jan 29 2020 at 05:06):
you don't need to suppress them. FMG will approve with them present
Sarah Gaunt (Jan 29 2020 at 05:07):
FMG has already approved! But ok. I just don't like seeing them... Is there anything wrong with suppressing them?
Grahame Grieve (Jan 29 2020 at 05:07):
no.
Grahame Grieve (Jan 29 2020 at 05:08):
though... I don't know if you can suppress these monster multi-line messages...
Sarah Gaunt (Jan 29 2020 at 05:08):
Yeah, just about to try
Sarah Gaunt (Jan 29 2020 at 05:09):
Might not be worth the copy and paste effort if I have to put the whole thing in. There isn't any wildcard or regex stuff allowed in that file is there?
Grahame Grieve (Jan 29 2020 at 05:16):
no
Lloyd McKenzie (Jan 29 2020 at 16:32):
Yeah, we're going to have to figure out an appropriate way to suppress those. We definitely want to suppress them. Once you know that a slice isn't supposed to match, you don't want to have to wade through and re-verify that each time you look. (And similarly, you don't want to start ignoring all warnings that look like that because some of them might actually be errors.) Ideally all IGs should be free of unsuppressed warnings and information messages at the time of publication - and the suppression file would document why each one was deemed appropriate to suppress.
Sarah Gaunt (Jan 29 2020 at 21:54):
I did end up adding them all to the suppress warnings file.
Grahame Grieve (Jan 29 2020 at 22:02):
did that work, did it?
Sarah Gaunt (Jan 29 2020 at 22:23):
Yes it did. I copied them all out of qa.txt and it worked like a charm!
Sarah Gaunt (Jan 29 2020 at 22:32):
It's pretty ugly down at the bottom, but the top is all beautiful and green: http://hl7.org/fhir/us/ecr/STU1/qa.html
Sarah Gaunt (Jan 29 2020 at 22:34):
Except for the warning I just noticed I missed. :cry:
Last updated: Apr 12 2022 at 19:14 UTC