openmrs-esm-patient-chart icon indicating copy to clipboard operation
openmrs-esm-patient-chart copied to clipboard

(feat) O3-3507 Add revised medications table to the medications dashboard

Open arodidev opened this issue 10 months ago • 7 comments

Requirements

  • [x] This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • [ ] My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • [ ] My work includes tests or is validated by existing tests.

Summary

This PR introduces a table which tracks revised medications within the medications dashboard. The data presented in the table differs in that it is filtered based on the action property to only return data where action = 'REVISE'.

const revisedPatientOrders = patientOrders?.filter((order) => order.action == 'REVISE');

The table component has been slotted into the patient-chart-medications-dashboard-slot for configurability's sake.

Screenshots

Screenshot 2024-04-02 at 09 14 00 Screenshot 2024-04-02 at 11 05 37

Related Issue

https://openmrs.atlassian.net/browse/O3-3507

Other

arodidev avatar Apr 02 '24 08:04 arodidev

@arodidev thanks for this work. I am wondering how this is eventually used on the ground. My raw interpretation of this task was to highlight medications which have been revised at dispensing or something of the sort and for that you'd need to highlight what exactly was changed/revised i.e. quantity, duration, etc. As it is now, one will still be asking how the revised order is different from the original one. Do you think this is a valid case?

ojwanganto avatar Apr 02 '24 10:04 ojwanganto

@arodidev thanks for this work. I am wondering how this is eventually used on the ground. My raw interpretation of this task was to highlight medications which have been revised at dispensing or something of the sort and for that you'd need to highlight what exactly was changed/revised i.e. quantity, duration, etc. As it is now, one will still be asking how the revised order is different from the original one. Do you think this is a valid case?

Hello @ojwanganto, yes I do agree that this is a valid case made. During the discussions phase we did not fully discuss what this would look like in its final form, hence I opted for an initial MVP which could be build upon further down the line. I am open to further discussions on what this could look like as a final product and how it can best be modified to serve the user's needs. cc: @Rugute

arodidev avatar Apr 02 '24 11:04 arodidev

@arodidev Since this is a WIP and it's not clear that it will be included in the RefApp, please either (A) remove the "slot" property from the extension declaration in the routes.json file, so the extension does not appear by default but can be added using configuration (/ the implementer tools), or (B) create a feature flag which, when disabled, causes the widget to return null. I think (A) is probably the better option.

brandones avatar Jun 28 '24 21:06 brandones

CC @ibacher @denniskigen if they have thoughts about how we should go about maintaining these kinds of extensions, which are not attached in the default RefApp. Would be great not to have this be a way that dead code proliferates.

brandones avatar Jun 28 '24 21:06 brandones

I really don't get the use case here. Are revised medications currently active medications that have been changed since originally prescribing? Are Past Medications, medications that are no longer active in any form/dose? Is there some definitions somewhere in the design documents I could review?

askanter avatar Jun 29 '24 21:06 askanter

@askanter

Right now the official designs only contain an "Active Medications" and "Past Medications" table; this "Revised Medications" table is the invention of the Ampath team.

Are revised medications currently active medications that have been changed since originally prescribing?

Yes. The medication will appear both under "active medications" (with its updated prescription details) and "revised medications" (with the old details).

Are Past Medications, medications that are no longer active in any form/dose?

Since the official designs only have "Active Medications" and "Past Medications," the Past Medications table contains all non-active prescriptions, including those that have been revised.

So Ampath will, with their "Revised Medications" table, see some of the same prescriptions duplicated in that table and the Past Medications table.

Hopefully that clears things up. Thanks for your participation in this, please keep the questions coming (though the UX Advisory slack channel is more likely to produce the kind of engagement that will be useful). This PR won't affect the RefApp.

brandones avatar Jul 01 '24 16:07 brandones

@arodidev Is it clear to you how to move forward with this?

brandones avatar Sep 15 '24 10:09 brandones