(feat) future and past start dates (medications component) (O3-5374)#2973
(feat) future and past start dates (medications component) (O3-5374)#2973Sadashii wants to merge 7 commits intoopenmrs:mainfrom
Conversation
- Add future medications table to medications summary - Add future medications extension to patient summary panel - Updated usePatientOrders hook to handle future, active, past with single api call instead of current that makes 2
- Add logic for past/future medicine scheduling - Show correct 'start date' in UI
- Allow same medicine to be ordered if active/future prescription - Add visual cue for medicines that have active/future order in search results
|
Nuance, for medications with start date as today, we store the date as today + hour + minutes, but for future or past, it is set as 00:00. This makes it more intuitive on the 'Active medications' tab, as it shows up as 'Today, x time' instead of 'Today, 12:00' So, in case a medication starts today (28th), at 11ampm, for 3 days, in terms of validation, it ends 3 days from now (31st, 11am). And the doctor wants the patient to start the next medication once this is over, if he schedules the date as 31st, it will show overlap as technically the previous med runs till 11am (thats after midnight), or he can schedule for 1st but that seems 'wrong'. Possible alternative:
|
|
Complicaed the commit-history trying to merge the updated main - apologies. |
|
@bmamlin @ibacher @mogoodrich A reminder ping if either of you could look at this PR and share your opinions on the current implementation. |
|
Thanks @Sadashii for the great work on this PR — the changes look solid! One small suggestion: the commit history is a bit busy and might be hard to follow. Could you squash or reorganize the commits into a few logical units? That would make the review process even smoother. |
257d9de to
c7ce098
Compare
|
@ELVIS-KATO My bad - git's kinda annoying. I believe I have fixed it. What else do I need to add to this PR as of now? |
Take a look at this. |
6df564d to
8046f34
Compare

Requirements
Summary
As per discussions held on:
This PR introduces the first set of changes as belows (as a brief)
Screenshots
Related Issue
https://openmrs.atlassian.net/browse/O3-5375
https://openmrs.atlassian.net/browse/O3-5376
Other