NarcCount makes narcotic reconciliation software for Canadian pharmacies. This post is not a product tour. It walks through the arithmetic every controlled-substance reconciliation rests on, the data problems that make it harder than it looks, and the one parameter that changes from province to province: how often the count has to happen. If you build inventory, health or compliance software, the shape of the problem is worth knowing.
One line of arithmetic
For each drug and strength:
expected = last_count + received + returned_to_stock - dispensed - destroyed variance = counted - expected
Enter fullscreen mode
Exit fullscreen mode
A variance of zero means the shelf matches the records. Everything else in a reconciliation, from the log format to the investigation and the signed record, exists to make sure each of those inputs is complete and dated correctly.
A worked example. One drug and strength has an opening balance of 48 tablets. A wholesaler order adds 100. Dispenses over the period total 56.…