ohcnetwork / care_fe

Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.
https://care.ohc.network
MIT License
207 stars 381 forks source link

Events: Adds support for filtering by event types #7877

Open rithviknishad opened 4 months ago

rithviknishad commented 4 months ago

Is your feature request related to a problem? Please describe. Currently it is not possible to filter events by event types.

Describe the solution you'd like Add a multi select filter in the events list to filter by one or more event types.

https://care.ohc.network/facility/0c95c7f0-e1d2-4aff-83fa-933cef60d3a8/patient/7e8fc20f-02da-47f7-8c33-f2d8c7e52dd8/consultation/edfe0bd6-0f50-4a4c-8cd0-2d4ad0e9cea1

image
Atharva-Kanherkar commented 3 months ago

Hi @rithviknishad Can you provide me a high level view on how to get started on this? Also, I wanna work on it, may i?

rithviknishad commented 3 months ago

Hey @Atharva-Kanherkar

Yes you can work on this!

Solution 1

To get the list of available event types, you'll need to fetch the event types from the API: https://careapi.ohc.network/swagger/#/event_types

And then when fetching consultation events, pass the event type id to the filter. https://careapi.ohc.network/swagger/#/events/api_v1_consultation_events_list

You might want to update the backend to support filtering by multiple event type ID's.

Solution 2 (preferred)

Same as solution 1, except that instead of fetching the event types from API, change the consultation events filter to filter by event names instead.

cc: @sainak

rithviknishad commented 3 months ago

The UI could be kept similar to the filter popover present in the daily rounds filter. Feel free to suggest better alternatives if you have any in mind!

image
Atharva-Kanherkar commented 3 months ago

The UI could be kept similar to the filter popover present in the daily rounds filter. Feel free to suggest better alternatives if you have any in mind!

image

Sure! Just give me some time to get to understand the codebase better. I am very interested to contribute to the next js frontend. Please bear with me as I progress. Thank you so much .

rithviknishad commented 3 months ago

Sure! Feel free to drop a comment if you are facing any difficulty understanding something.

Sulochan-khadka commented 3 months ago

@Atharva-Kanherkar Well , if you get stuck at something , do share . Will help if I can...

github-actions[bot] commented 2 months ago

Hi, @coronasafe/care-frontend-maintainers, This issue has been automatically marked as stale because it has not had any recent activity.

rithviknishad commented 1 month ago

@Atharva-Kanherkar unassigning due to no activity.

Atharva-Kanherkar commented 1 month ago

Alright sir

On Mon, 12 Aug, 2024, 11:20 am Rithvik Nishad, @.***> wrote:

@Atharva-Kanherkar https://github.com/Atharva-Kanherkar unassigning due to no activity.

— Reply to this email directly, view it on GitHub https://github.com/coronasafe/care_fe/issues/7877#issuecomment-2283155517, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB6XMZ5M23NGP7RWJ2M5CTLZRBEKNAVCNFSM6AAAAABJESO2Z6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBTGE2TKNJRG4 . You are receiving this because you were mentioned.Message ID: @.***>