num-codex / odm2fhir

This tool maps study/patient data in CDISC ODM based on the GECCO data dictionary to HL7 FHIR which adheres to the GECCO profiles, value sets and code systems.
MIT License
4 stars 1 forks source link

Json bundle cannot validate in HAPI test server #8

Closed pdi-uk closed 3 years ago

pdi-uk commented 3 years ago

Describe the bug Error messages on HAPI test server when trying to validate json-bundle gererated by ODMtoFHIR

To Reproduce Steps to reproduce the behavior:

  1. Go to '...' grafik in Postman
  2. add json file as body
    1. Send

Expected behavior Status 201 created

Screenshots Status 412

Error Messages:

{ "severity": "error", "code": "processing", "diagnostics": "bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles) [(type = 'history') or entry.where(fullUrl.exists()).select(fullUrl & resource.meta.versionId).isDistinct()]", "location": [ "Bundle", "Line 1, Col 2" ] }

Desktop (please complete the following information):

holger-stenzhorn commented 3 years ago

@pdi-uk: Can you perhaps provide us with the input ODM that provokes this error? From the provided error message it looks like you might tried to send the output of a single ODM2FHIR run several times to your FHIR server (as we currently generate a new, unique UUID for each resource during each run of ODM2FHIR).

cerbelding commented 3 years ago

The ODM2FHIR app already has a built-in HAPI FHIR validator, which ensures that invalid FHIR resources are not added to the bundle.

When testing the method you described above with our dummy data output, the online validator only delivers errors/warnings of the following types:

I cannot reproduce the error you described. So it would be good to get a copy of your input-ODM, as @holger-stenzhorn already said.

pdi-uk commented 3 years ago

this is our input ODM:

TestGECCO_CDISC_ODM_2020-12-10_1140t.txt

cerbelding commented 3 years ago

Thanks! I will check the problem and come back to you tomorrow.

holger-stenzhorn commented 3 years ago

@pdi-uk Admittedly, this does not really concern your reported issue but still... :-) Which version of the data dictionary did you actually import into REDCap to create the instruments in there? It looks like you used the quite outdated one from 23.10.2020 which sadly does not work correctly with the recent ODM2FHIR. ...or did you just accidentally provide here an ancient export from 10.12.2020 and you have a more recent one based on the data dictionary from 13.11.2020 or (even better) 11.12.2020?

pdi-uk commented 3 years ago

The version information of the data dictionary is lost in RedCap after uploading, but I think we used the data dictionary from 13.11.2020. However, we will try again with the newest version of the data dictionary.

cerbelding commented 3 years ago

You have to remember that if you update the data dictionary, the already filled in forms WILL NOT BE UPDATED!

Changes can therefore only be determined in the forms edited afterwards.

pdi-uk commented 3 years ago

We updated the data dictionary and created a new sample patient. The error mentionted above does not appear any more when trying to validate the bundle.

cerbelding commented 3 years ago

Okay, thats good! I will close the issue as it's solved.