Modify SQL statement to include filtering on conditions
When both search and condition filtering are applied, the results should reflect the intersection of both filters.
If a user filters on condition "A", they should see all reports that reference condition "A" OR "A" and other conditions (and all other conditions should also be listed)
Modify and add unit tests
Related Issue
Fixes #2750
Acceptance Criteria
[ ] When passed a condition list, only eCRs with that condition in the RR are returned
[ ] No other eCRs are visible
[ ] If an eCR is multi-condition, any of those conditions can be filtered on
Additional Information
Right now, eCR library table only pulls from Postgres (I don't think we ended up actually implementing reading the ecr Library data from SQL Server?). Writing this ticket separately to pull data from SQL Server.
Placeholder for conditions to filter on has been added until #2751 is worked on (see below for testing).
Checklist (for testing)
[ ] To check that filtering on conditions works, look for the following code in containers/ecr-viewer/src/app/page.tsx
// Placeholder for given array of conditions to filter on, remove in #2751
const filterConditions = undefined;
[ ] Change filterConditions to the array of condition(s) you'd like to filter on, for example:
[ ] Cross-reference eCRs listed in the library with the (number of) results you were expecting
Other things to check:
[ ] Please also check that using search PLUS filtering on conditions results in the expected eCR rows. Example: searching "Cutla" plus adding filtering on "Anthrax (disorder)" should result in 5 rows of eCRs.
[ ] Check that pagination values reflect an search and/or filtering criteria applied
[ ] Check that all conditions for eCRs that match the filtering criteria are displayed, not just the condition(s) filtered on.
^ Making a note that this is right. listEcrData only uses postgres, table also needs to be able to pull from SQL Server. Writing separate ticket for this now
PULL REQUEST
Summary
Related Issue
Fixes #2750
Acceptance Criteria
Additional Information
Checklist (for testing)
containers/ecr-viewer/src/app/page.tsx
filterConditions
to the array of condition(s) you'd like to filter on, for example:Other things to check: