FHIR Validator Error: This element does not match any known slice defined in the profile

382 views
Skip to first unread message

skbha...@gmail.com

unread,
Sep 22, 2022, 12:31:35 PM9/22/22
to IHE MHD Implementors
Hello,

I am using the FHIR Validation tool Version 5.6.65 (Git# fce1d1f1fc0a) to validate some of the ITI-65 PDB examples and the validation result OperationOutcome identifies these types of errors below:

This element does not match any known slice defined in the profile https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Minimal.ProvideBundle and slicing is CLOSED: Bundle.entry[0]: Does not match slice 'SubmissionSet' (discriminator: resource.conformsTo('https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Minimal.SubmissionSet')), Bundle.entry[0]: Details for Bundle matching against Profile https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Minimal.SubmissionSet, Bundle.entry[0]: Does not match slice 'DocumentRefs' (discriminator: resource.conformsTo('https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Minimal.DocumentReference'))

In my local FHIR package cache, I have ihe.iti.mhd#4.1.0 and ihe.iti.mhd#dev (I built this IG from the MHD master branch today). Both IGs report the same error against the examples such as this. When the IG was built locally, I noticed there were 9 IG errors in the MHD master branch Validation Results and 35 IG errors in the MHD 4.1.0 release. The reports also pointed out the same error stated above from the FHIR Validator tool.

Can this be fixed in the MHD IG or is the source of the problem somewhere else?

Thanks,
Sunil



Oliver Egger

unread,
Sep 22, 2022, 2:36:21 PM9/22/22
to skbha...@gmail.com, IHE MHD Implementors, John Moehrke
Hi Sunil

I just run the IG Publisher on IHE.MHD master and it does show no error for Bundle-ex-comprehensiveProvideDocumentBundleSimple.json.

However when I validate it with the HL7 Java validator I get the same slicing error as you have. The slicing error is a consequence because of this error message:

  Error @ Bundle.entry[3].resource.ofType(List).identifier[0].system (line 392, col54): Example URLs are not allowed in this context (http://example.org/documents)

If you add the parameter -allow-example-urls true it validates without error, the error message disappears, see output below.

Does that make sense for you?

Best regards,
Oliver

java -jar /Users/oliveregger/.vscode/extensions/yannick-lagger.vscode-fhir-tools-1.5.0/validator_cli.jar "/Users/oliveregger/Documents/github/ITI.MHD/output/Bundle-ex-comprehensiveProvideDocumentBundleComplete.json" -version 4.0.1 -ig ihe.iti.mhd#dev -allow-example-urls true
FHIR Validation tool Version 5.6.65 (Git# fce1d1f1fc0a). Built 2022-09-20T16:29:35.782Z (50 hours old)
  Java:   17.0.2 from /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home on x86_64 (64bit). 4096MB available
  Paths:  Current = /Users/oliveregger/Documents/github/ITI.MHD, Package Cache = /Users/oliveregger/.fhir/packages
  Params: /Users/oliveregger/Documents/github/ITI.MHD/output/Bundle-ex-comprehensiveProvideDocumentBundleComplete.json -version 4.0.1 -ig ihe.iti.mhd#dev -allow-example-urls true
  Jurisdiction: Switzerland
Loading
  Load FHIR v4.0 from hl7.fhir.r4.core#4.0.1 - 4575 resources (00:04.920)
  Load hl7.terminology#4.0.0 - 4164 resources (00:02.226)
  Load R5 Extensions - 84 resources (00:15.731)
  Terminology server http://tx.fhir.org - Version 2.0.14 (00:03.990)
  Load hl7.terminology.r4#4.0.0 - 4164 resources (00:00.752)
  Load ihe.iti.mhd#dev - 44 resources (00:00.003)
  Get set...  go (00:00.627)
Validating
  Validate /Users/oliveregger/Documents/github/ITI.MHD/output/Bundle-ex-comprehensiveProvideDocumentBundleComplete.json
Validate Bundle against http://hl7.org/fhir/StructureDefinition/Bundle..........20..........40..........60..........80.........|
Validate Bundle against https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Comprehensive.ProvideBundleValidate List against https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Comprehensive.SubmissionSet|
Validate List against https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Comprehensive.SubmissionSet..........20..........40..........60..........80.........|
Validate List against https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Comprehensive.Folder|
Validate DocumentReference against https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Comprehensive.DocumentReference|
Validate Binary against http://hl7.org/fhir/StructureDefinition/Binary|
Validate List against https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Minimal.Folder..........20..........40..........60.........|
Validate List against https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Comprehensive.SubmissionSet|
Validate List against https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Minimal.Folder..........20..........40..........60..........80.........|
Validate List against https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Comprehensive.Folder|
.....|
 00:08.561
Done. Times: Loading: 00:28.583, validation: 00:08.562. Memory = 632Mb

Success: 0 errors, 0 warnings, 1 notes
  Information @ Bundle.entry[1].resource.ofType(DocumentReference).content[0].format (line 270, col89): The Coding provided (http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode#urn:ihe:iti:xds-sd:text:2008) is not in the value set http://hl7.org/fhir/ValueSet/formatcodes, and a code is recommended to come from this value set.  (error message = Not in value set http://hl7.org/fhir/ValueSet/formatcodes ([]))




best regards
oliver
 

mobile: +41765795005

ahdis ag
c/o The Hub Zürich Association
Sihlquai 131
8005 Zürich
Switzerland




--
You received this message because you are subscribed to the Google Groups "IHE MHD Implementors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ihe-mhd-implemen...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ihe-mhd-implementors/642cab46-3e72-43c4-a1e5-946da59c14acn%40googlegroups.com.

Sunil Bhaskarla

unread,
Sep 22, 2022, 8:11:41 PM9/22/22
to Oliver Egger, IHE MHD Implementors, John Moehrke
Hi Oliver,

You are correct that running IG Publisher on master does not show the slicing error Bundle-ex-comprehensiveProvideDocumentBundleSimple.json but the error exists on the MHD 4.1.0 release:

"Validation output in <local-path-snipped>/ihe/ITI.MHD-4.1.0/output/qa.html
Errors: 35, Warnings: 6, Info: 8, Broken Links: 0 (02:36.120)
Finished                                                                         (02:36.121)
Done. This IG has been built using the 'normal' process for local use. If building to host on an an external website, use the process documented here: https://confluence.hl7.org/display/FHIR/Maintaining+a+FHIR+IG+Publication) (02:36.121)"

In any case, as you mentioned, supplying the -allow-example-urls true parameter to the FHIR Validator tool gets past the slicing error triggered by example URLs. This gave me a clue in attempting to validate other resources which seems that the slicing error is triggered if a resource has other problems. Once I fixed the resource problems, the slicing error disappeared.

A side note for anyone else building the IG in their local environment, the IG Publisher cannot build due to a missing package dependency on ihe.fhir.template. I did not find any documentation regarding this on the IHE MHD release page or the project Readme, so I manually installed the template package by downloading it from here: https://fhir.org/templates/ihe.fhir.template/package.tgz.

Thanks,
Sunil

John Moehrke

unread,
Sep 22, 2022, 8:29:42 PM9/22/22
to Sunil Bhaskarla, Oliver Egger, IHE MHD Implementors
The ig publisher will go get it. Do you not have internet


John Moehrke - Architect: Standards - Interoperability, Privacy, and Security for Bylight.com
https://healthcaresecprivacy.blogspot.com

   

Sunil Bhaskarla

unread,
Sep 22, 2022, 8:40:10 PM9/22/22
to John Moehrke, IHE MHD Implementors, Oliver Egger
John,

That is not true, the script detected Internet. 

Sunil

John Moehrke

unread,
Sep 23, 2022, 11:42:54 AM9/23/22
to Sunil Bhaskarla, Oliver Egger, IHE MHD Implementors
I found the problem and fixed it. The build was calling for #current version of the IHE template, and the CI Build server had timedout and removed the last current build. It should not have been calling for #current. When no # version is listed, it will use the latest formally published IHE template, which is what should have been pulled. 


John Moehrke 🔥 Architect: Healthcare Informatics Standards - Interoperability, Privacy, and Security
IHE Co-Chair IT Infrastructure Planning and Technical
HL7 Co-Chair Security WG, FHIR FMG, FHIR facilitator, and 
FHIR Foundation founding member
Employee of By Light -- Contractor to VHA MyHealtheVet
JohnM...@gmail.com  |  M +1 920-564-2067  |  John.M...@bylight.com
 https://healthcaresecprivacy.blogspot.com


Sunil Bhaskarla

unread,
Sep 23, 2022, 12:12:20 PM9/23/22
to John Moehrke, Oliver Egger, IHE MHD Implementors
John,

Appreciate your investigation. 

Thanks and regards,
Sunil
Reply all
Reply to author
Forward
0 new messages