Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard error for multiple ValueSets with same value of meta.source element #920

Open
basharmsen opened this issue Jul 2, 2024 · 2 comments
Labels
Approved Change has been reviewed and accepted and can now be applied to the templates bug Something isn't working

Comments

@basharmsen
Copy link

I'm writing an ImplementationGuide and when building it using the IG Publisher, I encounter the following error:

Publishing Content Failed: Name 'http://decor.nictiz.nl/fhir/4.0/mp-' already exists (value = "MedicatieToedieningRedenVanAfwijkenCodelijst") (00:10.313 / 02:00.008, 929Mb)
                                                                                                     (00:00.000 / 02:00.009, 929Mb)
Use -? to get command line help                                                                      (00:00.000 / 02:00.009, 929Mb)
                                                                                                     (00:00.000 / 02:00.009, 929Mb)
Stack Dump (for debugging):                                                                          (00:00.000 / 02:00.009, 929Mb)
org.hl7.fhir.utilities.json.JsonException: Name 'http://decor.nictiz.nl/fhir/4.0/mp-' already exists (value = "MedicatieToedieningRedenVanAfwijkenCodelijst")
        at org.hl7.fhir.utilities.json.model.JsonElement.check(JsonElement.java:44)
        at org.hl7.fhir.utilities.json.model.JsonObject.add(JsonObject.java:31)
        at org.hl7.fhir.utilities.json.model.JsonObject.add(JsonObject.java:68)
        at org.hl7.fhir.igtools.publisher.Publisher.saveCSList(Publisher.java:9079)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSummaryOutputs(Publisher.java:8692)
        at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:7597)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:1194)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:1016)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:13007)

The package contains several ValueSets for which the meta.source element is the same, namely http://decor.nictiz.nl/fhir/4.0/mp-. This seems to be the cause of the issue. Removing these elements in the local package cache resolves the issue.

I'm not quite familiar with this element, but when reading the FHIR standard it seems to me that it should be allowed for a package to contain multiple Resources with the same value for the meta.source element. Even if this situation is not allowed according to the standard, a hard error as I encounter when building the package with the current version of the publisher seems inappropriate. A warning or a clearer error message would be more suitable.

Kind regards,

Bas Harmsen

@grahamegrieve
Copy link
Contributor

it's not the source, it's the way that the files are generated. Attach a full example that reproduces this problem

@basharmsen
Copy link
Author

I've written an Example that reproduces it. I've tried to keep it as simple as possible. An attempt to leave out the reference to the external package by adding my own ValueSets didn't succeed.

Example

@lmckenzi lmckenzi added bug Something isn't working Approved Change has been reviewed and accepted and can now be applied to the templates labels Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Change has been reviewed and accepted and can now be applied to the templates bug Something isn't working
Projects
Development

No branches or pull requests

3 participants