cqframework/cqf-tooling

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

alackerbauer opened this issue · 2 comments

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

pull request: #439

Completed as per discussion with @alackerbauer. Closing this issue