Wiki Spaces


Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack


Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


The heart of any institution is its people and , the OpenHMIS project is creating tools to enable help that "heart" to run beat more smoothly. Providing quality medical services is a challenge and, while OpenMRS is a great help to meet toward meeting that challenge, but it does not directly address the administrative needs of a medical institution. This is where the OpenHMIS modules come in: we are creating OpenMRS modules that provide the tools to help institutions run more effectively.


Once the module has been installed, an OpenHMIS Inventory Module section will appear on the administration page with the following screenslinks:

Inventory Role CreationAdd or remove the required privileges to use the inventory module to/from a role or create a new role with those privileges.
Manage ItemsAdd, edit, retire, and purge the items (that is, the products and services) that are used by your institution.  
Manage DepartmentsAdd, edit, retire, and purge the item departments.
Manage InstitutionsAdd, edit, retire, and purge the external institutions that item stock can be distributed to.
Manage Stockrooms

Add, edit, retire, and purge the stockrooms and view stockroom details.

Manage Operation TypesAdd, edit and retire the stock operation types.
View Stock OperationsView and process stock operations.
Generate Item MappingsGenerate item to concept mappings.


ItemThe information about a product or service that can be purchased or tracked at an institution.
Item StockA physical item that is located in a stockroom or distributed to an external institution or patient. This includes a quantity and an optional expiration date. Item stock can only be created for items that are marked as having physical inventory.
StockroomA location where item stock is stored.
Stock Operation Type

The kind of stock operation to be performed. The module currently includes six stock operation types:

  1. Adjustment: Item stock quantities that do not match the current system quantity
  2. Disposed: Item stock that have expired and must be removed from circulation
  3. Distribution: Item stock that are distributed to a patient or external institution
  4. Receipt: Item stock that are added into the inventory system from an outside provider
  5. Return: Item stock that are returned to the system after being distributed
  6. Transfer: Item stock that are transferred from one stockroom to another.
Stock OperationMoves one or more item stock into, within, or out from the institution, as defined by the Stock Operation Type.
TransactionRecords the individual changes in item stock in a given stockroom. For example, if a single item stock is transferred from the Main stockroom to the Pharmacy stockroom, two transactions would be created; one for the item stock deduction from Main and another for the item stock addition to Pharmacy.
Batch OperationRefers to the Stock Operation when a given quantity of Item Stock was added into the system.

Operation Status

Stock operations have a status which determines the current state:


Operation TypePendingCompletedCanceled
AdjustmentItem stock changes negated and applied to sourceNothingItem stock changes reversed
DisposedItem stock changes applied to sourceNothingItem stock changes reversed
DistributionItem stock changes negated and applied to sourceNothingItem stock changes reversed
ReceiptNothingItem stock changes applied to destinationNothing
ReturnNothingItem stock changes applied to destinationNothing
TransferItem stock changes negated and applied to sourceItem stock changes applied to destinationSource item stock changes reversed

Stockrooms and Item Stock

Much of inventory management revolves around stockrooms and item stock. The following section explains how the Inventory Module tracks changes to item stock and how to resolve data issues.

Negative Item Stock Quantities

The OpenHMIS Inventory Module is a permissive inventory system and will allow negative item stock quantities in a stockroom.

Image Added

This is allowed so that the system does not get in the way of work that needs to be done however it is important to note that if allowed to go unchecked this will result in data that is meaningless. If the inventory system indicates a different item stock quantity than actually exists, there are two ways to correct this:

  1. An adjustment operation can be created to update the system quantites to match the actual quantities.
  2. The missing operations can be created to bring the item stock quantities to the expected values. This assumes that there was not some extra-system reason why the quantities are different (ie, theft or a typo).

The second of these options is almost always preferable as it reflects what actually occurred rather than just adjusting the quantities to "magically" match. A future version of the inventory module will support creating historical stock operation that can be applied so that all subsequent stock operations get updated appropriately.

Item Stock Detail

The item stock quantities that can be viewed on the stockroom detail page can be a little deceptive. The item stock quantity is actually broken down by both the item stock expiration date (if there is one) and the originating operation (called the Batch Operation). These details are not currently visible in the Stockoom detail but will be added in a future version. When transferring or distributing item stock it is currently assumed that item stock from the oldest batch operation are moved first then, if there is still any remaining quantity to move, the next oldest item stock batch operation is used and so on. The same logic applies for item stock with an expiration, except that the item stock that will expire the soonest is chosen and users can select specific item stock with a specific expiration when creating a new stock operation.

Image Added

When Auto is selected rather than a specific expiration the system will satisfy the item stock request from the closest expiration first, then the next closest, and so on until the requested quantity has been met. Unless there is some specific reason that the closest to expire item stock is not being transfered or distributed, the Auto option should be selected as this allows the system to self correct in the situation where the quantity becomes negative.

When viewing a stock operation with item stock details that were automatically selected the details will not show the specific batch or expiration, instead they will be listed as (Auto).

Image Added

Inventory Dashboard

The Inventory Dashboard is the landing page to perform inventory-related activities. From this dashboard users can view and process their stock operations as well as create new stock operations. The dashboard is accessed from the Inventory link on the right side of the OpenMRS header: