-
Notifications
You must be signed in to change notification settings - Fork 336
(feat) O3-5169: Extend Renew action to Active Medications and standardize Reorder as Renew #2949
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
base: main
Are you sure you want to change the base?
(feat) O3-5169: Extend Renew action to Active Medications and standardize Reorder as Renew #2949
Conversation
40105b6 to
b69e058
Compare
|
@denniskigen @VeronicaMuthee Could you please review this PR? |
|
@UjjawalPrabhat, this looks good to me per the video you have shared. Please add Ian and Dennis as your reviewers for the technical details |
|
|
@UjjawalPrabhat, you haven't added reviewers as yet. Are you able to do that? |
@VeronicaMuthee, I don't have the required permission to add reviewers. Perhaps you could help me with that? 😅 |
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.
We should add the uuid: order.uuid to line 250 in buildMedicationOrder to fix duplicate order detection in the order basket.
After refactoring to buildMedicationOrder, renew/discontinue basket items no longer get a uuid. The UI still uses uuid for duplicate prevention:
const alreadyInBasket = items.some((x) => x.uuid === medication.uuid);in the OrderBasketItemActions function.
Previously both handleDiscontinueClick and handleReorderClick set uuid: medication.uuid inline (see pre‑refactor code), so the check worked. Now buildMedicationOrder returns no uuid (see this), so alreadyInBasket always returns false and users can add duplicate renew/discontinue items.
Note that this is a client-side field only; it's not sent to the backend (see prepMedicationOrderPostData). The backend uses previousOrder for order linkage, and it will reject overlapping duplicates anyway via AmbiguousOrderException("Order.cannot.have.more.than.one") in OrderServiceImpl, so preventing duplicates client‑side aligns with backend constraints.
|
Can we also change this line to read "renew" instead of "reorder"? |
Requirements
Summary
This PR standardizes medication continuation behavior in OpenMRS O3 by unifying Renew as the single action for continuing medications across both Active and Past Medications.
Previously, Renew termed as 'Reorder' was only available for past medications while active medications required manual re-entry, and the overlapping Reorder action caused inconsistent terminology. This change improves clinician workflow and aligns with agreed community behavior.
Screen Recording
Screen.Recording.2026-01-15.190623.mp4
Related Issue
O3-5169
Other
Talk discussion
Related PR