projecttacoma / fqm-execution-demo

Apache License 2.0
2 stars 0 forks source link

Added dynamic output tabs to results page #33

Closed sarahmcdougall closed 3 years ago

sarahmcdougall commented 3 years ago

Summary

Depending on which output type is desired, multiple output views may appear on the results page. In the past, these output views all appeared on the results page in a Grid. Now, the output views appear on the results page in a tabular form so that we have easier navigation of our results.

New behavior

After choosing measure/patient bundles, output type, calculation type, report type, and measurement period, the user will press the "Calculate" button and arrive at the results page, which now has a tab bar if the combination of output type, calculation type, and report type calls for more than one output view. If the desired output type only calls for JSON output (which is the case for raw results, for example), then the tab bar does not appear on the results page. The tabs are generated dynamically and they depend on what combination of output type, calculation type, and report type is selected.

Code changes

Changes were made to the src/components/Results/Results.tsx file to reflect the addition of tabs. The previous code for the different output views were put into separate functions called displayJSONResults(), displayHTMLResults(), displayTabularResults(), and displayAccordionResults(). Boolean functions were created to check which tabs should appear in the results page. A ternary operator was used to decide whether to render the tab bar or to simply show the JSON output.

Testing guidance

First, use the Connectathon Repository to select a measure bundle and patient bundle (EXM130, for example), or upload the appropriate bundle files from your local machine. Then, for each combination of valid output type, calculation type, and report type, check that the correct tabs appear in the results page, or that the tab bar does not appear in the case that only the JSON output should be returned. The intended output views are as follows:

Note: For Measure Reports, it is possible to check the HTML box and then select "summary" afterwards, in which the HTML box stays checked but is grayed out. This causes the HTML tab to appear in the tab bar, but no HTML output is provided on the results page. We believe this may be a bug, generating an HTML array when it should not be.

eperelli commented 3 years ago

Looks good to me! This is awesome!