Lot-based inventory
Lot-based inventory, with certificates of analysis and expiration dates.
Every inflow, outflow and adjustment becomes a ledger entry in a stock ledger that is never erased, and each lot’s balance is computed from it.

Nothing is erased: the error is reversed and corrected on top. Illustrative values.
The module agents
André prepares. You post.
André Sato prepares receipts and adjustments by lot, with the lot’s factors and the category’s policy. Beatriz Lima records the certificate-of-analysis assays and organizes the expiration alerts. Inventory documents only take effect when someone on the team posts them.


Prepares the receipt line by line, with lot, expiration date and lot factors
Prepares adjustments numbered by branch, in the number/year format
Prepares the correction as a reversal and a new ledger entry, for you to post; the original stays in the stock ledger
Enter the receipt for order 0187, with the 3 lots and the certificate data I gave you.

I prepared the receipt for order 0187 with the 3 lots and the expiration date, density and correction factor you provided for each one. The category requires quarantine, so the lots go into quarantine until release. All that is left is for you to post it.
Illustrative example.
The lot
The lot carries its own factors.
Each lot stores its pharmaceutical factors, when they are provided. In quantity conversion, the lot’s density, IU/g and TRU/g replace the product’s; the correction factor, concentration and potency are recorded but are not used in the conversion. The factors can only be edited while the lot is in quarantine; after release, any change is rejected.
Density, correction factor, IU/g, CFU/g and TRU/g
Concentration, potency and dynamization method
Parent lot, when there is one
Quarantine and release according to the policy the pharmacy declared in the category
Lot version history
The stock ledger
A correction is recorded on top.
The stock ledger does not accept changes or deletions. An error is corrected by a reversal and, where applicable, by a new ledger entry that indicates which entry it supersedes.
01
Single entry point
Receiving entries, adjustments, movements and the import save through the same path and go through the same rules, whether they come from the screen or from a system routine.
02
Computed balance
Each lot’s balance is computed from the ledger entries, not typed in by hand, and can be rebuilt from the stock ledger.
03
Pure substance and control
Each ledger entry records the pure substance, the quantity and the factor used, and the product’s Portaria 344/98 list.
Day to day
Receiving, adjustments and movements.
Lot-based receiving
Each receiving line records the lot and its factors. When linked to a purchase order, the order’s received quantity is updated in the same operation.
Numbered adjustments
Each adjustment receives a sequential number by branch and series, in the number/year format. Adjustments made at the same time neither repeat a number nor leave a gap.
Post and reverse
The Lots, Receiving, Adjustments, Movements and Balances screens include the post and reverse actions.
Certificate of analysis
The assay result stays tied to the lot.
The assay results for each raw-material lot are recorded and linked to the lot, with version history. Evaluating the result is up to the pharmacist; the system records it.
Assay types set up by the pharmacy, shared by all branches
Assays by raw-material lot, with version history
A reissued assay points to the assay it supersedes


Expiration date
Expired and soon-to-expire lots, flagged every day.
A daily routine, run separately for each branch, creates alerts for lots with a balance that have expired or that expire within a configurable threshold, 90 days by default. The alert does not block the lot or send an email or message: the team acknowledges it and then resolves it.
Each lot has at most one open alert, which the team acknowledges and resolves. Illustrative values.
Pharmaceutical rules
Whatever falls outside the rules is rejected before saving.
Before saving a stock operation, the system checks the rules declared by the pharmacy and rejects whatever does not follow them.
Lot and zero-quantity policy of the product’s category
Lot factors changed after release
Pure substance and control list of the ledger entry
Source identity changed outside the import
