Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FI-3299: Fix Questionnaire Package verification in Payer suite #29

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

tstrass
Copy link
Contributor

@tstrass tstrass commented Nov 21, 2024

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

  • Refactor parts of CQLTest module and scratch usage: scratch[:adaptive_responses], scratch[:next_responses], and scratch[: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. The CQLTest 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)
  • In CQLTest, change library error messages to reference libraries by URL instead of by index (more useful)
  • Fix/improve a few of the affected test descriptions

Testing Guidance

  • Run the Payer suite static workflow against the SMART App suite. It should all pass again.
  • Run the full Payer suite against the reference implementation. The results should all be the same as before, except 2.11 is now passing. It was failing before, but I believe that was due to a bug that I inadvertently fixed.

The payer suite assumed the response to the  questionnaire-package
operation was a Parameters instance, but it can instead be a Bundle.
This change accounts for both possibilities.

There are a lot of changes, because there are many places in the
code that relied on the assumption that the request was a Parameters.
@tstrass tstrass requested a review from karlnaden November 21, 2024 00:39
@tstrass tstrass self-assigned this Nov 21, 2024
Copy link
Contributor

@karlnaden karlnaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good - a few minor comments to potentially address, but I don't need to look at it again.

@tstrass tstrass merged commit 8a968fa into main Nov 21, 2024
3 checks passed
@tstrass tstrass deleted the fi-3299-fix-questionnaire-package-response-verification branch November 21, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants