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

Patient filter: Add None option for Last admitted to Bed filter to filter patients that are admitted but has no bed assigned #1184

Closed
aparnacoronasafe opened this issue Aug 18, 2022 · 7 comments · Fixed by coronasafe/care_fe#5550 or #1318

Comments

@aparnacoronasafe
Copy link
Member

In Advanced filter on the patient list, https://care.coronasafe.in/patients
The last admitted to bed type filter is not in sync with the updated bed management.

The problem is, how do we search for a patient that is admitted, but for which no bed is allocated yet.

@stale
Copy link

stale bot commented Oct 9, 2022

Hi, This pr/issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs for 7 more days. Thank you for your contributions.

@stale stale bot added the stale label Oct 9, 2022
@siddnikh
Copy link
Contributor

@gigincg we can add an "admitted but not allocated" category to this filter from the backend if you suggest. What do you say?

@stale stale bot removed the stale label Oct 13, 2022
@github-actions
Copy link

Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, @aparnacoronasafe, This issue has been automatically marked as stale because it has not had any recent activity.

@gigincg
Copy link
Member

gigincg commented Oct 28, 2022

@siddnikh This needs to be a backend issue. Yes, we could possibly have a None option as well

@gigincg gigincg removed the stale label Oct 28, 2022
@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, @aparnacoronasafe, This issue has been automatically marked as stale because it has not had any recent activity.

@github-actions github-actions bot added the stale label Feb 7, 2023
@nihal467 nihal467 transferred this issue from coronasafe/care_fe Feb 8, 2023
@rithviknishad rithviknishad changed the title Advanced filter: Last admitted to Bed: Sync with new bed management Patient filter: Add None option for Last admitted to Bed filter to filter patients that are admitted but has no bed assigned May 25, 2023
@rithviknishad rithviknishad added the good first issue Good for newcomers label May 25, 2023
@JahnabDutta
Copy link

Hey, I was going through this issue and I have some doubts.
I found that 'Admitted to(Bed Type)' filter in frontend takes it's options from a constant object called ADMITTED_TO in src/Common/constants.tsx. So, along with the backend, that will also need to be modified right?
Also, in the backend, we need to append a new choice in the BedTypeChoices and that should suffice right?

@rithviknishad
Copy link
Member

rithviknishad commented May 26, 2023

Hey @JahnabDutta

Yes, both the backend and front end needs to be updated to include the None filter option.

About the backend, appending a new choice to BedTypeChoices may not be the right solution as None is not a valid bed type. Say you have a bed, its type will never be None.

However, what we need to achieve is, to check whether a Patient's Last Consultation's Current Bed is None/null or not if the filter value is None (not undefined).

cc: @vigneshhari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment