Stream: implementers
Topic: Validation Error, valueSet (Required) or Slicing Issue?
John George (May 22 2019 at 16:48):
Hi, please can I get some advice on the following HAPI validation error on a STU3 patient profile :
ERROR — Problem evaluating slicing expression for element in profile <https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1> path Bundle.entry[4].resource.entry[4].resource.name[1] (fhirPath = true and (use memberOf ‘http://hl7.org/fhir/ValueSet/name-use’)).
I can think of two possible causes of the error, but there might be another reason:
1. The error mentions the valueSet “http://hl7.org/fhir/ValueSet/name-use”. Looking at the FHIR base profile this has a binding strength of “Required” for Patient.name(HumanName).use. I think the problem is that in the name.use attribute of the CareConnect-Patient-1 profile, we have used the ValueSet, “https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-NameUse-1” (this references “http://hl7.org/fhir/ValueSet/name-use” and uses the CodeSystem http://hl7.org/fhir/name-use, but has ConceptMap and mapping information, hence it has a different name to the FHIR base resource ValueSet). We did wonder if the ValueSet uses the same CodeSystem as the FHIR base resource, then shouldn’t this pass the HAPI validation tests?
2. The other possibility is that it might not be the ValueSet, but the slicing on .name attribute of the CareConnect-Patient-1 profile, where both .name (other) attribute and name (official) attribute of the CareConnect-Patient-1 profile, are Sliced with a Discriminator: use. A slicing problem could occur where the .name (official).use attribute and the .name (other).use attribute both use “official” as the value, and thus the discriminator can’t work.
If anyone has seen this type of error before, and know what the solution is, I’d very much appreciate some advice.
Many thanks
John
Validation Error, valueSet required or slicingValidation Error, valueSet required or slicing
Lloyd McKenzie (May 22 2019 at 17:03):
@James Agnew (also, you might raise this on the #hapi stream)
Grahame Grieve (May 22 2019 at 19:58):
well, the error will be inside the validator, and it shouldn't relate to how the validator is packaged, so I expect it's something I should look at. @John George can you package it up as a test case?
John George (May 22 2019 at 23:16):
Hi @Grahame Grieve , many thanks for sparing the time to look into this. The error message is:
ERROR — Problem evaluating slicing expression for element in profile https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1 path Bundle.entry[4].resource.entry[4].resource.name[1] (fhirPath = true and (use memberOf ‘http://hl7.org/fhir/ValueSet/name-use’))
The STU3 FHIR profile can be viewed at: < https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1>
For the test case, I have also attached the Validation Report and the relevant XML instance example. Please let me know if there is anything else you need to investigate this.
Many thanks, John
ITK009D_20190515143638865.xml
validation_report_ITK009D_20190515143638865.html.txt
Grahame Grieve (May 23 2019 at 02:27):
looking at this:
<coding> <system value="http://snomed.info/sct" /> <code value="eligcrit" /> <display value="Eligibility criteria" /> </coding>``` is an error from the validator for me. But not flagged as an error in your error report... weird. There's several other snomed issues - unknown codes - which I will take as UK distribution codes
Grahame Grieve (May 23 2019 at 02:29):
and other than that it all validates ok for me
Grahame Grieve (May 23 2019 at 02:29):
it's possible that it's a versioning issue - the 3.8 validator is running behind.
John George (May 23 2019 at 09:45):
Hi @Grahame Grieve, that’s interesting that your version of the validator does not find the error regarding "http://hl7.org/fhir/ValueSet/name-use". We are using HAPI FHIR Software Version: 3.7.0 February 2nd, 2019, do you know when the new version of HAPI will be available for public use?
Thanks for highlighting the SNOMED errors, those should be easy to correct in the XML instance example. Regards, John
Grahame Grieve (May 23 2019 at 12:59):
you'll have to ask on the HAPI support forum what that roadmap is
John George (May 23 2019 at 15:33):
Hi @Grahame Grieve , though I appreciate your validator is not finding the ValueSet error, I am wondering about the way we have constrained a FHIR profile, where the FHIR base resource has a binding strength of “Required” for a valueSet. Looking at the FHIR base profile, Patient.name (HumanName).use, the valueSet <http://hl7.org/fhir/ValueSet/name-use> has a binding strength of “Required”. In our profile, CareConnect-Patient-1, for the name.use attribute we have used a different ValueSet, <https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-NameUse-1>, but this references the FHIR base valueSet <http://hl7.org/fhir/ValueSet/name-use> and uses the CodeSystem <http://hl7.org/fhir/name-use>. It has a different name to the FHIR base resource ValueSet, to allow for the use of ConceptMap and mapping information. Is our approach for a “Required” for this valueSet correct in these circumstances?
Grahame Grieve (May 23 2019 at 19:36):
well, I'm not sure what I'm seeing. I see 'old' multiple times in the value set here: https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-NameUse-1
Grahame Grieve (May 23 2019 at 19:37):
that seems ... weird. Is it a view issue, or is something more implied?
Grahame Grieve (May 23 2019 at 19:38):
the value set is the same, no? I don't understand why to redefine it if you aren't redefining it?
Grahame Grieve (May 23 2019 at 19:38):
thought that's just redundant, not wrong
Morten Ernebjerg (May 24 2019 at 07:19):
@John George James Agnew mentioned in this thread that the new 3.8 release of HAPI is coming next Tuesday.
John George (May 24 2019 at 09:20):
Hi @Grahame Grieve the reason 'old' is displayed multiple times is due to the way our tooling renders the ConceptMap information with the ValueSet. The valueSet itself, only has <code value="old"/> mentioned once, as shown in the XML for that ValueSet here: <https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-NameUse-1/_history/3.0.1?_format=xml>. My limited understanding of this is that we had a requirement for a mapping to patient demographic service (PDS) codes, such as, "PREVIOUS-BACHELOR", which would map to the code of "OLD", in the FHIR base valueSet, so we needed to use a ConceptMap <https://fhir.hl7.org.uk/STU3/ConceptMap/CareConnect-PersonNameType-1>. However, the way our tooling works with ConceptMaps is that we need to use local ValueSets, hence we created <https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-NameUse-1> that references the FHIR base valueSet.
John George (May 24 2019 at 09:22):
Hi @Morten Ernebjerg , thanks for the release date of the latest version of HAPI.
Last updated: Apr 12 2022 at 19:14 UTC