-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update deprecated filters on action/flow list api requests #1375
Conversation
WalkthroughThe pull request introduces consistent changes across multiple JavaScript files in the patient-related modules. The primary modifications involve renaming keys in the Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (11)
🚧 Files skipped from review as they are similar to previous changes (6)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (8)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 4 deprecations on this endpoint https://github.com/RoundingWell/care-ops-backend/blob/64c64036b257cedeff3fd4705964ce89ee2de60b/src/Action/Web/RouteAction.php#L27
RoundingWell Care Ops Frontend
|
Project |
RoundingWell Care Ops Frontend
|
Branch Review |
flow-state-filter
|
Run status |
|
Run duration | 02m 57s |
Commit |
|
Committer | Nick Major |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
1
|
|
0
|
|
0
|
|
313
|
View all changes introduced in this branch ↗︎ |
Pull Request Test Coverage Report for Build e7c01ee3-7841-4100-96d1-7d07b37f6bc2Details
💛 - Coveralls |
ef830ca
to
467c2d7
Compare
filter[flow_states]
instead of deprecated filter[flow.state]
/api/actions
& /api/flows
requests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
src/js/apps/patients/schedule/reduced-schedule/reduced_schedule_state.js
(2 hunks)src/js/apps/patients/schedule/schedule_state.js
(2 hunks)src/js/apps/patients/worklist/worklist_state.js
(2 hunks)test/integration/patients/sidebar/filter-sidebar.js
(22 hunks)test/integration/patients/worklist/reduced-schedule.js
(4 hunks)test/integration/patients/worklist/schedule.js
(5 hunks)test/integration/patients/worklist/worklist.js
(13 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- src/js/apps/patients/schedule/schedule_state.js
- test/integration/patients/sidebar/filter-sidebar.js
🔇 Additional comments (6)
test/integration/patients/worklist/reduced-schedule.js (1)
103-104
: LGTM! Test assertions updated to match new filter parameters.The test assertions have been correctly updated to verify the new plural filter parameter names:
filter[clinicians]
for clinician filteringfilter[states]
for state filteringAlso applies to: 561-561, 587-587, 601-601
test/integration/patients/worklist/schedule.js (1)
465-466
: LGTM! Test assertions updated to match new filter parameters.The test assertions have been correctly updated to verify the new plural filter parameter names:
filter[clinicians]
for clinician filteringfilter[states]
for state filteringAlso applies to: 494-494, 1853-1853, 1879-1879, 1893-1893
test/integration/patients/worklist/worklist.js (1)
332-332
: LGTM! Test assertions updated to match new filter parameters.The test assertions have been correctly updated to verify the new plural filter parameter names:
filter[clinicians]
for clinician filteringfilter[states]
for state filteringfilter[teams]
for team filteringAlso applies to: 1097-1098, 1132-1133, 1155-1156, 1183-1183, 1251-1251, 1268-1268, 1302-1303, 1315-1316, 1962-1962, 4165-4165, 4191-4191, 4205-4205
src/js/apps/patients/worklist/worklist_state.js (3)
155-155
: LGTM: Consistent filter key updateThe change from
state
tostates
aligns with the new API filter parameter naming convention.
158-159
: LGTM: Updated deprecated filter parametersThe changes correctly implement:
- Consistent pluralization of 'state' to 'states'
- Replacement of deprecated 'flow.state' with 'flow_states' as per PR objectives
182-182
: Verify additional filter parameter changesWhile the changes from singular to plural form ('team' → 'teams', 'clinician' → 'clinicians') follow the same pattern as the state filters, these weren't explicitly mentioned in the PR objectives. Please verify that these changes are also required by the backend API.
Let's check if these changes are consistent with other files:
Also applies to: 184-184, 187-187
✅ Verification successful
Filter parameter changes are consistent with the codebase
The changes from singular to plural form ('team' → 'teams', 'clinician' → 'clinicians') are correct and align with the API parameters used consistently across the test suite.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for team/clinician filter usage patterns across the codebase echo "Searching for team filter patterns..." rg "filter\[team" --type js echo "Searching for clinician filter patterns..." rg "filter\[clinician" --type js echo "Searching for updated patterns..." rg "filter\[teams\]|filter\[clinicians\]" --type jsLength of output: 3795
states: this.get('states').join() || NIL_UUID, | ||
flow_states: this.get('flowStates').join() || NIL_UUID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Test files need updating to match new filter parameter convention
Two test files still use the deprecated singular form filter[state]
in their assertions:
test/integration/patients/patient/dashboard.js
test/integration/patients/patient/archive.js
These should be updated to use filter[states]
to match the new API convention.
🔗 Analysis chain
LGTM! Filter parameter names updated as per API changes.
The changes correctly implement the new filter parameter naming convention, replacing deprecated singular forms with plural forms:
states
for state filteringflow_states
for flow state filteringclinicians
for clinician filtering
Let's verify that these are the only instances of the old filter parameters in the codebase:
Also applies to: 70-70
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any remaining instances of old filter parameter names
echo "Searching for old filter parameter names..."
rg "filter\[state\]|filter\[flow\.state\]|filter\[clinician\]" --type js
Length of output: 379
Script:
#!/bin/bash
# Search for variations of both old and new filter parameters with context
echo "Searching for state filter variations..."
rg "filter\[(state|states)\]|states=|state=" --type js -A 2
echo -e "\nSearching for flow state filter variations..."
rg "filter\[(flow\.state|flow_states?)\]|flow_states=|flow\.state=" --type js -A 2
echo -e "\nSearching for clinician filter variations..."
rg "filter\[(clinician|clinicians)\]|clinicians=|clinician=" --type js -A 2
Length of output: 15985
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is true. patient dashboard/archive also need this update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulfalgout Found the exact locations. The changes needed are:
-
In
test/integration/patients/patient/dashboard.js
:// From: .should('contain', 'filter[state]=22222,33333') // To: .should('contain', 'filter[states]=22222,33333')
-
In
test/integration/patients/patient/archive.js
:// From: .should('contain', 'filter[state]=55555,66666,77777') // To: .should('contain', 'filter[states]=55555,66666,77777')
Would you like me to open a GitHub issue to track these additional changes?
🔗 Analysis chain
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for state filter usage in the specified files
echo "=== Dashboard state filter usage ==="
rg "filter\[state\]" "test/integration/patients/patient/dashboard.js" -A 2
echo -e "\n=== Archive state filter usage ==="
rg "filter\[state\]" "test/integration/patients/patient/archive.js" -A 2
Length of output: 500
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good bot 🤖 those have been updated 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
states: this.get('states').join() || NIL_UUID, | ||
flow_states: this.get('flowStates').join() || NIL_UUID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is true. patient dashboard/archive also need this update
467c2d7
to
3fe4eb0
Compare
/api/actions
& /api/flows
requests
Shortcut Story ID: [sc-58220]
Updates:
api/actions
(worklists, schedule, reduced schedule):filter[flow.state]
=>filter[flow_states]
filter[state]
=>filter[states]
filter[team]
=>filter[teams]
filter[clinician]
=>filter[clinicians]
api/flows
(worklists):filter[state]
=>filter[states]
filter[team]
=>filter[teams]
filter[clinician]
=>filter[clinicians]
/api/patients/:id/relationships/actions
(patient dashboard/archive):filter[state]
=>filter[states]
/api/patients/:id/relationships/flows
(patient dashboard/archive):filter[state]
=>filter[states]