FHIR Chat · FHIR Validator Error: Duplicate Resource · implementers

Stream: implementers

Topic: FHIR Validator Error: Duplicate Resource


view this post on Zulip May Terry (Nov 05 2019 at 20:54):

Using FHIR validator tool version 4.0.31-SNAPSHOT, I get the following error when running validation on a FHIR example that worked on an earlier validator tool version back from mid-August. The output is the following:
(base) mayt-PC Tue Nov 05 15:45:40 fhirValidator $ java -jar org.hl7.fhir.validator.jar Patient-example-usr4.json -ig hl7.fhir.us.core FHIR Validation tool Version 4.0.31-SNAPSHOT - Built 2019-11-05T15:35:39.648+11:00 - Git a0ece162e77c Detected Java version: 12.0.2 from /Library/Java/JavaVirtualMachines/adoptopenjdk-12.jdk/Contents/Home on x86_64 (64bit). 4096MB available Arguments: Patient-example-usr4.json -ig hl7.fhir.us.core Directories: Current = /Users/mayt/mltApps/fhirValidator, Package Cache = /Users/mayt/.fhir/packages .. connect to tx server @ http://tx.fhir.org .. definitions from hl7.fhir.core#current Error loading ImplementationGuide-fhir.json: Duplicate Resource http://hl7.org/fhir/ImplementationGuide/fhir Exception in thread "main" org.hl7.fhir.exceptions.FHIRException: Error loading ImplementationGuide-fhir.json: Duplicate Resource http://hl7.org/fhir/ImplementationGuide/fhir at org.hl7.fhir.r5.context.SimpleWorkerContext.fromDefinitions(SimpleWorkerContext.java:203) at org.hl7.fhir.r5.validation.ValidationEngine.loadDefinitions(ValidationEngine.java:409) at org.hl7.fhir.r5.validation.ValidationEngine.loadInitialDefinitions(ValidationEngine.java:356) at org.hl7.fhir.r5.validation.ValidationEngine.<init>(ValidationEngine.java:388) at org.hl7.fhir.r5.validation.Validator.main(Validator.java:489) Caused by: org.hl7.fhir.exceptions.DefinitionException: Duplicate Resource http://hl7.org/fhir/ImplementationGuide/fhir at org.hl7.fhir.r5.context.BaseWorkerContext.cacheResource(BaseWorkerContext.java:188) at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromFileJson(SimpleWorkerContext.java:271) at org.hl7.fhir.r5.context.SimpleWorkerContext.loadDefinitionItem(SimpleWorkerContext.java:212) at org.hl7.fhir.r5.context.SimpleWorkerContext.fromDefinitions(SimpleWorkerContext.java:200) ... 4 more

Any ideas on what to try?

view this post on Zulip Grahame Grieve (Nov 05 2019 at 20:59):

it's on my list to resolve

view this post on Zulip Grahame Grieve (Nov 05 2019 at 21:00):

but you need to specify the version - use the parameter -version 4.0

view this post on Zulip Reece Adamson (Nov 07 2019 at 13:56):

I was also having a similar issue trying to validate a resource with known issues. I previously was able to get validation results back on it, but with the most recent snapshot I'm getting:

Exception in thread "main" java.lang.Error: Not done yet - resolve http://hl7.org/fhir/StructureDefinition/us-core-race

When trying: java -jar org.hl7.fhir.validator.jar patient.json -ig hl7.fhir.us.core -version 4.0

When I remove the us-core-race extension I get a similar Not done yet error on another extension.

Apologies if you were already aware, but I figured I'd bring it up in case it's helpful.

view this post on Zulip Lloyd McKenzie (Nov 07 2019 at 15:41):

Are you using the most recent validator - as found here: https://fhir.github.io/latest-ig-publisher/org.hl7.fhir.validator.jar?

view this post on Zulip May Terry (Nov 07 2019 at 18:31):

@Lloyd McKenzie - I worked on this issue with @Reece Adamson - upon further troubleshooting, it seems like there is some issue regarding error handling. We worked with a FHIR instance that had some errors in it (e.g.: incorrect representation of a complex extension (e.g.: like the race example above), incorrect URLs to coding systems) and each time, the "Not done yet..." type of unhandled exception followed by stack trace appears. As I fixed each error of that severity, it would kick off the same unhandled exception with the next error...all the way until only informational and warning-level errors remained.

view this post on Zulip May Terry (Nov 07 2019 at 18:38):

The version of the FHIR validator used: FHIR Validation tool Version 4.0.31-SNAPSHOT - Built 2019-11-05T15:35:39.648+11:00 - Git a0ece162e77c

view this post on Zulip Lloyd McKenzie (Nov 07 2019 at 21:28):

@Grahame Grieve

view this post on Zulip Grahame Grieve (Nov 07 2019 at 21:28):

it's on my list

view this post on Zulip Grahame Grieve (Nov 08 2019 at 03:20):

I can't reproduce this?

view this post on Zulip Reece Adamson (Nov 08 2019 at 17:18):

patient.json here is the example I used.

Just redownloaded and tried again with the same result.

Validator version: FHIR Validation tool Version 4.0.31-SNAPSHOT - Built 2019-11-05T15:35:39.648+11:00 - Git a0ece162e77c

view this post on Zulip Reece Adamson (Nov 08 2019 at 17:35):

resource.json @Michael O'Keefe and I made another very simple example here that shows the issue. This resource should be valid as far as I can see though.

"system": "http://hl7.org/fhir/v2/0203" seems to be the culprit in this example as without it the validation proceeded.

view this post on Zulip Grahame Grieve (Nov 09 2019 at 21:56):

fixed next release. btw, the source of a lot of this is that you are validating on the wrong version - the instance is not an r4 instance (r2?) (no excuse for the validator failing, of course)

view this post on Zulip Reece Adamson (Nov 12 2019 at 14:37):

Thanks @Grahame Grieve, I'll give it a go with the new release!

view this post on Zulip May Terry (Nov 13 2019 at 13:17):

Thanks @Grahame Grieve ! Looks like this latest validator release 4.0.36-SNAPSHOT fixed my immediate issue.


Last updated: Apr 12 2022 at 19:14 UTC