The OpenIZ stock model represents a series of stock management tracking tables used by the default stock management implementation within OpenIZ. It is envisioned that alternate stock management interfaces may not require these tables and thus, some OpenIZ installations would not carry these tables.
The stock management tables are used to track the amount of material entities associated, or known to exist, within a place entity.
Table |
Column |
Type |
Description |
StockBalance |
(None) |
N/A |
The stock balance table represents a working balance table whose primary purpose is the storage of current inventory balance per material entity within a place. |
StockBalanceId |
UUID |
Uniquely identifies the stock balance tuple. |
|
PlaceEntityId |
UUID |
Identifies the place entity to which the stock entry applies. |
|
MaterialEntityId |
UUID |
Identifies the material that is represented in the balance tuple. |
|
LedgerActionConceptId |
UUID |
Identifies the stock balance type. This may be the balance of allocated items, balance of wasted items, etc. |
|
Quantity |
INT |
Identifies the number of the MaterialEntityId currently stocked at the PlaceEntityId. |
|
CreationTime |
DATETIME |
Identifies the time that the stock balance entry was created. |
|
UpdatedTime |
DATETIME |
Identifies the time that the stock balance was last updated. |
|
UpdatedBy |
UUID |
Identifies the user that was responsible for the updating of the balance entry. |
|
StockLedger |
(None) |
N/A |
The stock ledger table is used as backing data to the balance of the facility. It represents the ledger items for stock within a place entity. All immunizations, allocations, transfers, deposits, etc. of stock are tracked in this table. |
StockLedgerId |
UUID |
Uniquely identifies the stock ledger item. |
|
PlaceEntityId |
UUID |
Identifies the place to which the stock ledger action was performed. |
|
MaterialEntityId |
UUID |
Identifies the material to which the stock ledger action was performed. |
|
Quantity |
INT |
Identifies the number of MaterialEntities to which the stock ledger item was “done” |
|
LedgerActionConceptId |
UUID |
Identifies the ledger action (transfer, adjustment, deposit, use, waste, etc.) |
|
Note |
VARCHAR |
Identifies a note attached to the stock ledger action entered by the user. |
|
CreationTime |
DATETIME |
Identifies the time when the ledger action was created. |
|
CreatedBy |
UUID |
Identifies the user that was responsible for the stock ledger action. |
|
StockOrder |
(None) |
N/A |
The StockOrder table represents a sub-class of an Act that is a stock order. The act of ordering stock will result in the creation of a stock order act. |
ActVersionId |
UUID |
Identifies the version of the act to which the stock order applies. |