stockmanagement
Table: stockmanagement
The stockmanagement table stores the vaccine stock movements, balances, and wastage details for each vaccination center.
Columns
| Column Name | Data Type | Constraints | Description |
|---|---|---|---|
| stockId | int(11) | NO | Primary key identifying each stock record |
| closingBalance | int(11) | NO | Closing stock balance for the day |
| consumedDoses | int(11) | NO | Number of doses consumed |
| createdDate | datetime | YES | Date when the stock record was created |
| lastEditedDate | datetime | YES | Date when the stock record was last edited |
| openingBalance | int(11) | NO | Opening stock balance for the day |
| recievedDoses | int(11) | NO | Number of doses received |
| stockDate | date | YES | Date of the stock entry |
| vaccinationCenterId | int(11) | YES | ID of the vaccination center |
| vaccineId | smallint(6) | YES | ID of the vaccine |
| voided | tinyint(1) | YES | Flag indicating if record is voided |
| voidedDate | datetime | YES | Date when record was voided |
| voidedReason | varchar(50) | YES | Reason for voiding the record |
| wastage | int(11) | NO | Number of doses wasted |
| createdByUserId | int(11) | YES | User who created the record |
| lastEditedByUserId | int(11) | YES | User who last edited the record |
Indexes
stock_vaccinationCenterId_vaccinationcenter_mappedId_FK— Index onvaccinationCenterIdstockvaccine_vaccineId_vaccine_vaccineId_FK— Index onvaccineIdmappedIdIdMapper_pk_fk— Index oncreatedByUserId
Foreign Key Relations
vaccinationCenterId → vaccinationcenter.mappedIdcreatedByUserId → user.mappedIdvaccineId → stockvaccine.stockVaccineId
Usage Notes
- Tracks daily stock activities, including opening, closing, wastage, consumption, and receipts.
- Helps in monitoring inventory levels and auditing stock movements.