FI-3299: Fix Questionnaire Package verification in Payer suite #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The payer suite assumed the response to the questionnaire-package operation was a Parameters instance, but it can also be a Bundle. This change accounts for both possibilities.
There are a lot of changes here, which is essentially because there were many places in the code that relied on the assumption that the response contained a Parameters instance.
Summary
CQLTest
module and scratch usage:scratch[:adaptive_responses]
,scratch[:next_responses]
, andscratch[:output_parameters]
held any of several types of things: array of $q-p request objects, array of $next-question request objects, or array of Parameters instances. TheCQLTest
module had a bunch of code that tried to work on some or all of these cases. This meant that adding yet another case (a $q-p request that returns a bundle) was very difficult. Ultimately I decided the best thing to do was refactor those parts of the module and scratch usage. The module is now ~100 lines shorter. Here is a summary of the changes I made to the scratch objects:scratch[:adaptive_responses]
->scratch[:adaptive_questionnaire_bundles]
(array of bundles)scratch[:next_responses]
->scratch[:next_question_questionnaire_responses]
(array of questionnaire responses)scratch[:output_parameters]
->scratch[:static_questionnaire_bundles]
(array of bundles)CQLTest
, change library error messages to reference libraries by URL instead of by index (more useful)Testing Guidance