cqframework / cqf-tooling

Tooling for CQL and IG Authors
Apache License 2.0
19 stars 22 forks source link

Running the data roller in 2.4.0 with prefetch items duplicates the entire resource #438

Closed alackerbauer closed 11 months ago

alackerbauer commented 1 year ago

Describe the bug When refreshing the test data (including data roller), the updated dates only appear in a newly inserted nested resource element within the original resource.

To Reproduce Steps to reproduce the behavior:

  1. check out the opioid IG branch https://github.com/cqframework/opioid-cds-r4/tree/258-remove-response-resource-v2016
  2. open file input/pagecontent/requests/OpioidCDSREC01/request-example-rec-01-in-outpatient-opioid.json as one example
  3. copy the content of the file somewhere to later compare with the incorrectly modified file
  4. run sh _updateCQFTooling.sh to make sure you are executing the following steps on the defined tooling version 2.4.0
  5. run sh _updateTestData.sh to execute the data roller functionality
  6. re-open modified file input/pagecontent/requests/OpioidCDSREC01/request-example-rec-01-in-outpatient-opioid.json
  7. compare the content with the initial content of step 2
  8. find that the dates in the relevant elements haven't changed, but a new nested duplicated resource has been inserted, with changed dates

Expected behavior The data roller updates dates directly in the relevant elements of the resource, and the nested resource duplication does not happen.

Additional context Found as part of the Opioid IG project, mentioned as "duplication bug" here and here

Screenshot 2023-05-03 at 09 07 11
alackerbauer commented 1 year ago

pull request: https://github.com/cqframework/cqf-tooling/pull/439

Chris0296 commented 11 months ago

Completed as per discussion with @alackerbauer. Closing this issue