O3-4814 Appointments: Show patients with all statuses in one big appointments table; remove status selector bar; add status filter dropdown#2151
Conversation
|
Could you review this when you get the chance, @brandones? |
|
Sure, thanks for the ping @denniskigen . @EDSONZ-WASSWA could you please make the default status in the filter dropdown "All"? When "All" is selected, the table should include a column showing the status. Let me know if you need clarification. |
ae88d96 to
cb4687c
Compare
…statuses-in-one-big-appointments-table-remove-status-selector-bar-add-status-filter-dropdown
|
@brandones I have made the fix as you requested |
|
@EDSONZ-WASSWA this looks obviously bad
It looks like there are a bunch of style overrides that are probably causing problems. Much like human newbie devs, AI likes to add a lot of unnecessary CSS, and you should generally try to delete as much of it as you can. It's amazing how many problems you can fix by deleting CSS other people (or machines) wrote. Also it says "All Appointments Appointments". Look for reference at the service queues one. The top bar there is white rather than grey, but we can still get some sense of how the elements are supposed to look together:
Try to make it look decent. Independent of this PR we should open a conversation with Ciarán, since Appointments has diverged substantially from the designs, but also the designs don't have a search bar at all, nor any filters. |
…statuses-in-one-big-appointments-table-remove-status-selector-bar-add-status-filter-dropdown
…-one-big-appointments-table-remove-status-selector-bar-add-status-filter-dropdown' of https://github.com/EDSONZ-WASSWA/openmrs-esm-patient-management into O3-4814-appointments-show-patients-with-all-statuses-in-one-big-appointments-table-remove-status-selector-bar-add-status-filter-dropdown
I tried following the service queues fully
|
@brandones any more fix needed here? |
|
Why is 'expected' lower case now? |
|
Please look at the results yourself and ask yourself, "Do I see any problems? Does the text look right?" and then if you do not see problems, post here. Please don't make me identify obvious issues for you. |
…ith-all-statuses-in-one-big-appointments-table-remove-status-selector-bar-add-status-filter-dropdown
…ith-all-statuses-in-one-big-appointments-table-remove-status-selector-bar-add-status-filter-dropdown
@brandones I have taken time to go throughout everything. I do not expect any error or wrong spelling |
| status?: string; | ||
| status?: string | null; | ||
| title: string; | ||
| // Optional props for status dropdown (I passed from Extension state) |
There was a problem hiding this comment.
Kindly this comment doesn’t add value at this point. Please remove it to improve code readability.
| location: appointment.location?.name ?? '--', | ||
| provider: appointment.providers?.[0]?.name ?? '--', | ||
| status: <AppointmentActions appointment={appointment} />, | ||
| _appointment: appointment, // for expansion |
| shouldShow ? showExtensionTab(extension.name) : hideExtensionTab(extension.name); | ||
| }, [extension, dateType, showExtensionTab, hideExtensionTab]); | ||
|
|
||
| // When "all" is selected, show only the first extension with null status to get all appointments |
| startDate: startDate, | ||
| endDate: endDate, | ||
| }; | ||
| // .Only include status in request body if it's not null/undefined |
|
Thanks @jwnasambu . The code looks really bad, tons of prop threading etc. But before we rework it I'm waiting to hear back from Palladium about whether we actually need this "ExtensionWrapper" stuff. Hopefully we can just get rid of it and simplify all this code a lot. https://openmrs.slack.com/archives/C039BLMGMMX/p1765473129593799 |
0e6a7b7 to
99e92fd
Compare
…statuses-in-one-big-appointments-table-remove-status-selector-bar-add-status-filter-dropdown
I think enough time has passed that we should just get rid of the ExtensionWrapper. IIRC, it's used to determine whether the "Expected / Competed / Missed Appointments" tabs should be displayed. With this PR merging them all into one big table (with filter), I don't think we need it anymore. |
…statuses-in-one-big-appointments-table-remove-status-selector-bar-add-status-filter-dropdown
There was a problem hiding this comment.
This needs more work:
- There are compilation errors.
- I don't think we can define additional fields like
_appointmentfield for the row object. (I'd love for that to be the case though)
- I don't think we can define additional fields like
- Remove
<ExtensionWrapper>and its corresponding<ExtensionSlot>, since those were only needed to support the different tabs, which are going away. - Remove this whole schema that configures the tabs, since those are no longer in place.
- Figure out what to do with the "Early appointments" tab. See ticket comment.
- Figure out whether to have the filter selections be sticky across date switch / page refresh. See ticket comment.
- The "empty state" that we show within a table looks different than the one in the queues table. See screenshots.
- To be fair, I'm not 100% sure which one is the one we want. But right, now it has extra white padding, and the message "to display to display" is incorrect.







Requirements
Summary
Worked on the Appointments table,
Instead showing appointments with all statuses in one table. That table then has a “Filter by status” dropdown.
Screenshots
After


fixed-Add "All" status filter option
before

Related Issue
Other
One PR for both tickets below
https://openmrs.atlassian.net/browse/O3-4815
https://openmrs.atlassian.net/issues/?filter=-1&selectedIssue=O3-4814