cqf-tooling icon indicating copy to clipboard operation
cqf-tooling copied to clipboard

Simple ordering of POST calls by resource type

Open echicoine-icf opened this issue 4 months ago • 2 comments

When running Refresh and specifying a FHIR server to persist the resources to, I found resources that would fail in the initial attempt, but POST in the second attempt, indicating a dependency on some other resource to POST first. I've identified an order for these resources to be posted in: Bundle, Library Dependencies, Value Sets, Tests, and Patient Group files. With this grouping of resources and creating an order in which they are sent to the server, the initial attempt at posting the resources is far more successful and consistent.

When calling HttpClientUtils.post, the enum HttpPOSTResourceType can be specified. When executing the tasks, HttpClientUtils.resourceTypePostOrder is used to execute each group of tasks in the order specified.

  • [X] I've read the contribution guidelines
  • [X] Code compiles without errors
  • [X] Tests are created / updated
  • [X] Documentation is created / updated

echicoine-icf avatar Oct 01 '24 01:10 echicoine-icf