-
Type:
Task
-
Resolution: Unresolved
-
Priority:
High
-
Affects Version/s: None
-
None
-
Sprint 56, Sprint 57, Sprint 59
-
STOP TB
-
UAT
Title: Backend APIs for Drug Master List and Local Stock Management
Description:
Implement backend support for Drug Master List and stock management in StopTB.
Requirements
1. Drug Master List API
- Create a GET API to fetch the Drug Master List from the local server.
- This API should be called immediately after user login.
- The API should return the following details for each drug:
-
- Drug ID
-
- Drug Name
-
- Dose
-
- Available Quantity
-
- (Any additional required fields)
2. Prescription Submission
- When the Nurse submits a prescription, the existing Prescription Submit API will send:
-
- Drug ID
-
- Dispensed Quantity
- After processing the request, the backend should:
-
- Deduct the dispensed quantity from the available stock.
-
- Maintain and update the stock on the local server.
-
- Return the latest available quantity for each submitted drug in the API response.
Acceptance Criteria
- Drug Master List API returns all active drugs with the latest stock.
- Drug Master List API is called after successful user login.
- Prescription Submit API accepts Drug ID and Dispensed Quantity.
- Backend updates the stock after every successful prescription submission.
- Updated available quantity is returned in the Prescription Submit API response.
- Stock is maintained and calculated on the local server.
- Proper validation should be implemented for insufficient stock.
- is blocked by
-
STOP-147 Druglist should be integrated with inventory module
-
- Todo/Open
-