Skip to content
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

(feat): O3-3975-For requisitions containing multiple drugs, the system should allow you to issue one and leave out the other. #239

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TrevorAntony
Copy link
Contributor

@TrevorAntony TrevorAntony commented Nov 18, 2024

Requirements

  • 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 implements selective drug issuance functionality for stock issues that are created from requisitions. The feature allows users to:

  • View and select specific drugs to issue when processing a requisition-based stock issue
  • Partially issue selected drugs from a requisition
  • Track issuance status for individual drugs

Related Issue

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

Other

Copy link
Collaborator

@jabahum jabahum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking we can just have checkboxes on the row item other than necessarily creating a new component on a another view . cc @makombe @donaldkibet

@jabahum
Copy link
Collaborator

jabahum commented Dec 2, 2024

I am thinking we can just have checkboxes on the row item other than necessarily creating a new component on a another view . cc @makombe @donaldkibet

If we taking this up, lets make it configurable so that we can turn it on or off for cases where its not necessary.cc @TrevorAntony

@makombe
Copy link
Contributor

makombe commented Dec 9, 2024

I am thinking we can just have checkboxes on the row item other than necessarily creating a new component on a another view . cc @makombe @donaldkibet

In total agreement. Also, selecting the item at the end looks odd to me. @TrevorAntony can you also update the screenshot to reflect any new changes you have made. Thanks

@makombe
Copy link
Contributor

makombe commented Dec 9, 2024

@TrevorAntony Just for my understanding of the workflow, after doing partial issuance of the items, what happens to that requisition, is it marked as completed/fulfilled or will still remain active until all other items have been issued?

@TrevorAntony TrevorAntony marked this pull request as draft December 10, 2024 09:46
@TrevorAntony
Copy link
Contributor Author

@makombe essentially the following behaviour should be present:

View and Select Specific Drugs:
Users can view all drugs from the requisition and select specific ones to issue using checkboxes
Each drug row shows details like name, quantity requested, available stock, etc.
The selection state is tracked using the drugIssuanceStatus array containing {drugUuid, isIssued} objects

Partial Issuance:
We split the requisition items into:
Selected items that will be issued
Remaining unissued items

Tracking Status:
The issuance status for each drug is tracked via the drugIssuanceStatus state
The UI updates to reflect which drugs are selected/deselected
Available stock quantities are displayed to help inform issuance decisions
Regarding what happens after partial issuance:

The requisition handling after partial issuance should work as follows:

If some items remain unissued:
A new requisition is created with the remaining unissued items
The original requisition is completed for the issued items
User gets a success message indicating partial issuance and creation of new requisition
If all items are issued:
The requisition is marked as completed
User gets a success message indicating full issuance

However, i am finding it very challenging to implement The requisition handling after partial issuance. I am not sure if i am able to complete the feature this way
Screenshot 2024-12-10 at 12 46 47
Screenshot 2024-12-10 at 12 47 23
Screenshot 2024-12-10 at 12 47 35

@jabahum
Copy link
Collaborator

jabahum commented Dec 11, 2024

@makombe essentially the following behaviour should be present:

View and Select Specific Drugs: Users can view all drugs from the requisition and select specific ones to issue using checkboxes Each drug row shows details like name, quantity requested, available stock, etc. The selection state is tracked using the drugIssuanceStatus array containing {drugUuid, isIssued} objects

Partial Issuance: We split the requisition items into: Selected items that will be issued Remaining unissued items

Tracking Status: The issuance status for each drug is tracked via the drugIssuanceStatus state The UI updates to reflect which drugs are selected/deselected Available stock quantities are displayed to help inform issuance decisions Regarding what happens after partial issuance:

The requisition handling after partial issuance should work as follows:

If some items remain unissued: A new requisition is created with the remaining unissued items The original requisition is completed for the issued items User gets a success message indicating partial issuance and creation of new requisition If all items are issued: The requisition is marked as completed User gets a success message indicating full issuance

However, i am finding it very challenging to implement The requisition handling after partial issuance. I am not sure if i am able to complete the feature this way Screenshot 2024-12-10 at 12 46 47 Screenshot 2024-12-10 at 12 47 23 Screenshot 2024-12-10 at 12 47 35

cc @slubwama some guidance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants