Stream: conformance
Topic: Validator error on urn ValueSets
Noemi Deppenwiese (Sep 13 2019 at 14:07):
In my profile (https://simplifier.net/bbmri.de/specimen under collection.bodySite.coding) I specified a ValueSet using its urn (got that from ART-DECOR). Now the validator (in the IG publisher) throws an org.hl7.fhir.exceptions.FHIRException: not done yet: can't fetch urn:oid:1.3.6.1.4.1.19376.1.3.11.36 . So, is a ValueSet binding via urn valid? If yes, could this exception be downgraded to a warning so the IG Publisher can run and generate an IG?
Thanks!
Grahame Grieve (Sep 13 2019 at 15:03):
where does it blow up? what's the stack?
Noemi Deppenwiese (Sep 16 2019 at 08:04):
Exception in thread "main" java.lang.Error: org.hl7.fhir.exceptions.FHIRException: not done yet: can't fetch urn:oid:1.3.6.1.4.1.19376.1.3.11.36 at org.hl7.fhir.r5.context.BaseWorkerContext.fetchResource(BaseWorkerContext.java:857) at org.hl7.fhir.r5.context.SimpleWorkerContext.fetchResource(SimpleWorkerContext.java:565) at org.hl7.fhir.igtools.publisher.IGKnowledgeProvider.resolveBinding(IGKnowledgeProvider.java:489) at org.hl7.fhir.igtools.publisher.IGKnowledgeProvider.resolveBinding(IGKnowledgeProvider.java:424) at org.hl7.fhir.r5.conformance.ProfileUtilities.generateDescription(ProfileUtilities.java:3021) at org.hl7.fhir.r5.conformance.ProfileUtilities.generateDescription(ProfileUtilities.java:2930) at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:2649) at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:2711) at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:2711) at org.hl7.fhir.r5.conformance.ProfileUtilities.generateTable(ProfileUtilities.java:2504) at org.hl7.fhir.igtools.renderers.StructureDefinitionRenderer.snapshot(StructureDefinitionRenderer.java:350) at org.hl7.fhir.igtools.publisher.Publisher.generateOutputsStructureDefinition(Publisher.java:5895) at org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:5263) at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:3876) at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:735) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:612) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6451) Caused by: org.hl7.fhir.exceptions.FHIRException: not done yet: can't fetch urn:oid:1.3.6.1.4.1.19376.1.3.11.36 at org.hl7.fhir.r5.context.BaseWorkerContext.fetchResourceWithException(BaseWorkerContext.java:800) at org.hl7.fhir.r5.context.BaseWorkerContext.fetchResource(BaseWorkerContext.java:855) ... 16 more
Grahame Grieve (Sep 16 2019 at 09:24):
you need to include the value set in the IG so that the publisher can find it. It's ok for it to have a urn: but the error messag reflects that this is not normal behavior (we encourage use of http: urls but it's not mandatory)
Thomas Tveit Rosenlund (Oct 18 2019 at 11:50):
Did you get any feedback on this issue? Seems to be a problem with any unresolvable ValueSet binding. This also shows up in the official validator package when I try to validate this resource:
https://simplifier.net/hl7norwayno-basis/relatedperson-example-duplicate-2
Thomas Tveit Rosenlund (Oct 18 2019 at 11:54):
A quick follow up on this. How do you make this work when you validate against a directory of Conformance resources? Should you include an XML file with the oid as the filename? Or define a Valuset with the oid as the ValueSet.url?
Noemi Deppenwiese (Oct 18 2019 at 12:09):
I made it work by using the ArtDecor URL for the ValueSet ("valueSet": "http://art-decor.org/fhir/ValueSet/1.3.6.1.4.1.19376.1.3.11.36--20151113191623") instead of just the URN in the profile... The publisher still complains about not finding a ValueSet there, but it continues the publishing process and and no longer throws an Exception. The output looks good enough and I dindn't encounter any further issues yet. publisher.png
When validating resources (using just the urn as system), the validator only issues a warning and not an error which is good enough for our use case.
Thomas Tveit Rosenlund (Oct 21 2019 at 07:32):
you need to include the value set in the IG so that the publisher can find it. It's ok for it to have a urn: but the error messag reflects that this is not normal behavior (we encourage use of http: urls but it's not mandatory)
@Grahame Grieve Should the validator really stop the validation process when it can't locate a ValueSet definition? I think that is unwanted behaviour.
Thomas Tveit Rosenlund (Oct 21 2019 at 10:20):
I made it work by using the ArtDecor URL for the ValueSet ("valueSet": "http://art-decor.org/fhir/ValueSet/1.3.6.1.4.1.19376.1.3.11.36--20151113191623") instead of just the URN in the profile... The publisher still complains about not finding a ValueSet there, but it continues the publishing process and and no longer throws an Exception. The output looks good enough and I dindn't encounter any further issues yet. publisher.png
When validating resources (using just the urn as system), the validator only issues a warning and not an error which is good enough for our use case.
Thank you for the quick update @Noemi Deppenwiese
I can confirm this is working in my profiles as well. But I don't think this is the "right" solution. The spec is quite clear that a ValueSet binding using a oid value should be possible (urn:oid:, and in Norway we want to use this method for legacy ValueSets/CodeSystems that don't have any FHIR representation yet. The validator behaviour makes this more of an issue than necessary in my opinion.
Grahame Grieve (Oct 21 2019 at 18:26):
ok, I'm home, and catching up. How are you invoking the validator?
How do you make this work when you validate against a directory of Conformance resources? Should you include an XML file with the oid as the filename? Or define a Valuset with the oid as the ValueSet.url?
The second. the filename doesn't matter - it will just load all the files it sees and see the value set. The fact that it's using a urn:oid: should be irrelevant, as long as you tell the validator to load it from somewhere
Thomas Tveit Rosenlund (Oct 22 2019 at 07:39):
Thanks for your feedback.
ok, I'm home, and catching up. How are you invoking the validator?
The second. the filename doesn't matter - it will just load all the files it sees and see the value set. The fact that it's using a urn:oid: should be irrelevant, as long as you tell the validator to load it from somewhere
I use command line like this:
java -jar /home/thomas/Downloads/org.hl7.fhir.validator.jar no-basis-Practitioner-example.xml -ig /media/sf_GitRepo/for-validation -version 4.0.0
the -ig value points at a catalog containing all my StructureDefinitions, also tried to indlude ValueSet/CodeSystem definition for the oid identified ValuSets/CodeSystems, but the validator still can't identify them and crashes with the "not done yet: can't fetch urn:oid:xxx" error message.
It actually validates the SD's OK, but only until I try to validate the actual examples, then it seems to crash when resolving the ValueSet defined in the Profile.
This is the profile in question:
https://simplifier.net/hl7norwayno-basis/nobasispractitioner
And the example:
https://simplifier.net/hl7norwayno-basis/practitioner-example
It only crashes on the last qualification part, because this is the only part where I remembered to add an actual binding of the value coding (have to fix that in the profile):
<qualification>
<code>
<coding>
<system value="urn:oid:2.16.578.1.12.4.1.1.7426" />
<code value="152" />
<display value="Ortopedisk kirurgi" />
</coding>
</code>
</qualification>
Thomas Tveit Rosenlund (Oct 22 2019 at 08:59):
@Grahame Grieve
Turns out i did at least one mistake on my own.
I used the same url value for my CodeSystem and ValueSet. When I introduced a ValueSet definition using the url: urn:oid:2.16.578.1.12.4.1.1.7426
And identified the CodeSystem using: urn:oid:2.16.578.1.12.4.1.1.7426.codesystem
The validation still fails (my mock up CodeSystem does not actually define any codes yet) but the CodeSystem and ValueSet is resolved correctly by the validator, and the validator don't crash.
Grahame Grieve (Oct 22 2019 at 09:25):
Oh good!
Thomas Tveit Rosenlund (Oct 22 2019 at 10:34):
Oh good!
Well, actually that did not fix it completely.
I got this error that I expected, but the information bit turned out to be quite important:
*FAILURE* validating no-basis-Practitioner-example.xml: error:1 warn:0 info:1 Error @ Practitioner.qualification[2].code.coding[0] (line 64, col12) : Unknown Code urn:oid:2.16.578.1.12.4.1.1.7426.codesystem#152 in urn:oid:2.16.578.1.12.4.1.1.7426.codesystem for 'urn:oid:2.16.578.1.12.4.1.1.7426.codesystem#152' Information @ Practitioner.qualification[2].code (line 63, col9) : This element does not match any known slice for the profile http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner
The validator seems to find the CodeSystem where I now defined the code I am using. But It does not actually manage to find the ValueSet defined by urn:oid:xxx.
The last change I made did I did not have a match for the slicing in the profile, because I did not remember to change the fixed string in the slice definition to match my new CodeSystem url. When I fixed that one, the validator (again) tries to resolve the ValueSet binding in no-basis-Practitioner and crashes. The crash occurs even if I have defined the ValueSet in a file and put the file in the "for-validation" catalog just like the CodeSystem definition. (Now remembering to define different url's for the CodeSystem and the ValueSet).
So there appears to be a problem when the validator tries to resolve ValueSet bindings identified by urn:oid:xxx
Thomas Tveit Rosenlund (Oct 22 2019 at 12:04):
If I rename the valueset to something like this (like @Noemi Deppenwiese did in her profiles) it all works out. The Validator finds both the ValueSet and the CodeSystem I have defined in the for-validation catalog, and validates the code defined in CodeSystem.
Grahame Grieve (Oct 24 2019 at 21:34):
so I can't reproduce this - can you package up a folder containing all the relevant resources so I can make sure I have what you have to reproduce the problem?
Thomas Tveit Rosenlund (Oct 25 2019 at 05:40):
so I can't reproduce this - can you package up a folder containing all the relevant resources so I can make sure I have what you have to reproduce the problem?
Shure, i will send you a link for download.
Last updated: Apr 12 2022 at 19:14 UTC