Stream: implementers
Topic: Duplicate id value on the validator
David Gutknecht (Aug 05 2020 at 15:27):
I'm trying to validate attached fhir .json with following command line:
java -Duser.language=en -jar org.hl7.fhir.validator.jar mni-patientOverview-bundle-example1.json -version 4.0 -ig https://mednet.swiss/fhir
And it returns me following error:
FAILURE validating mni-patientOverview-bundle-example1.json: error:2 warn:0 info:0
Error @ Bundle.entry[1].resource (line 194, col24) : Duplicate id value '1'
Error @ Bundle.entry[2].resource (line 211, col30) : Duplicate id value '1'
If I replace the Patient ID and the Device ID with unique values for example pat1 and dev1 instead of 1, It works. (See the second file attached)
But normally if the entries are from different types I should be able to use the same id value.
In the documentation http://hl7.org/fhir/R4/resource.html#id the logical id is defined as
"The logical id is unique within the space of all resources of the same type on the same server."
Do someone have some idea ? mni-patientOverview-bundle-example1.json mni-patientOverview-bundle-example1b.json
Lloyd McKenzie (Aug 05 2020 at 22:34):
@Grahame Grieve
Grahame Grieve (Aug 06 2020 at 00:32):
ok. fixed next release
David Gutknecht (Aug 06 2020 at 06:11):
Thanks !
David Gutknecht (Sep 03 2020 at 08:16):
Hello,
is it possible that the bug is still present in the org.hl7.fhir.publisher.jar ?
Best regards,
David
Grahame Grieve (Sep 03 2020 at 08:28):
not that one. You still have a problem?
David Gutknecht (Sep 03 2020 at 10:33):
The problems is on the QA report
If i publish my ig with this example :
duplicateId-example1.json
The QA report still include the error message "Duplicate id value '1'"
grafik.png
I tryied with the latest version of the publisher
Grahame Grieve (Sep 03 2020 at 10:34):
is your ig in github? if it's not, can you send it to me privately so I can debug?
David Gutknecht (Sep 03 2020 at 10:38):
I just gave you access
https://github.com/DavidGutknecht/mni-ig
The duplicateId-example is not included in this IG, but you will se the same error for the example mni-patientOverview-bundle-example1.json
David Gutknecht (Sep 03 2020 at 10:39):
This version is the one published on https://mednet.swiss/fhir
David Gutknecht (Sep 03 2020 at 11:10):
Hello, I think I found a reason.
I still use the publisher FHIR IG Publisher Version 1.1.0
David Gutknecht (Sep 03 2020 at 11:12):
On the top of the QA report you have a link to download the latest version
grafik.png
It forwards to https://storage.googleapis.com/ig-build/org.hl7.fhir.publisher.jar
this is the publisher I downloaded. Is it possible that this publisher is not uptodate ?
Grahame Grieve (Sep 03 2020 at 11:13):
it is indeed out of date, and so out of date the the version detection is broken (we rebuilt the deploy pipeline a little while ago)
Grahame Grieve (Sep 03 2020 at 11:13):
David Gutknecht (Sep 03 2020 at 11:15):
Sorry for the inconvenience.
Grahame Grieve (Sep 03 2020 at 11:15):
np
David Gutknecht (Sep 03 2020 at 11:35):
Did a new compilation with following IG PUblisher Version:
IG Publisher Version: v1.1.17
And the Duplicate error message is still there :-(
Grahame Grieve (Sep 03 2020 at 21:14):
I can't run this -there's no ig.ini, and then:
Unable to find the source file for Bundle/mni-patientOverview-bundle-example1: not specified, so tried Bundle-mni-patientOverview-bundle-example1.xml, mni-patientOverview-bundle-example1.Bundle.xml, Bundle-mni-patientOverview-bundle-example1.json, Bundle/mni-patientOverview-bundle-example1.xml, Bundle/mni-patientOverview-bundle-example1.json, mni-patientOverview-bundle-example1.xml, and mni-patientOverview-bundle-example1.json (and lowercase resource name variants) in dirs [C:\work\org.hl7.fhir.igs\mni-ig\input, C:\work\org.hl7.fhir.igs\mni-ig\input\examples, C:\work\org.hl7.fhir.igs\mni-ig\input\resources]
David Gutknecht (Sep 04 2020 at 10:02):
Hello,
I'm sorry that you can not reproduce it.
Since I'm still working on my IG and just broke many things, I will complete it and tell you when it will be clean enough to be tested
Grahame Grieve (Sep 04 2020 at 10:06):
ok
David Gutknecht (Sep 04 2020 at 11:35):
Hello,
question did you also download the ig template ? Because it includes a dedicated ant script that remove all comments from the example files and rename the files
This is maybe the reason you were not able to compile
I also uploaded the ig.ini
David Gutknecht (Sep 08 2020 at 15:52):
Hello Grahame,
I have update the IG on github.
Don't forget to compile the IG with the template. There is a trick in the template that removes comments to validate the examples json files, and after in the template still show the examples with comments.
You can have a look on the duplicateId-example1.json (or duplicateId-example1-with-comments.json) file it is as simplified test example with few objects.
I tested with the IG Publisher Version: v1.1.19 and still have the Duplicate Id problem.
Thanks in advance,
Best regards,
David
Grahame Grieve (Sep 08 2020 at 21:00):
I don't know what "Don't forget to compile the IG with the template" means?
David Gutknecht (Sep 09 2020 at 06:14):
Hello Grahame,
since I uploaded the ig.ini to github, when you launch the publisher it should automatically take the content of the folder ig-template. You can forget the sentece "Don't forget to compile the IG with the template".
David Gutknecht (Sep 10 2020 at 09:23):
Hello @Grahame Grieve ,
I updated the IG on gitHub.
Now on the QA report they are mostly "Duplicate id value 'x'" error messages.
The other error messages are somehow expected.
David Gutknecht (Sep 10 2020 at 15:44):
I also uploaded the IG to mednet.swiss.
You can see the QAReport directly under https://mednet.swiss/fhir/qa.html
Grahame Grieve (Sep 10 2020 at 17:05):
ok found it. It made a difference whether profiles were resolved or not. Will be fixed in the next release
David Gutknecht (Sep 11 2020 at 07:19):
Thanks a lot !
Last updated: Apr 12 2022 at 19:14 UTC