USP <797> is a chapter of records: environmental readings, competency, BUDs, batch and release documentation. Pharmacy Flow produces those records as the work happens and refuses the steps the chapter says must not happen.
Sterile compounding fails in two ways: contamination, and paperwork that cannot prove there was none. The first is a facility, technique and monitoring problem. The second is a systems problem, and it is the one that shows up on inspection reports far more often. This page covers what the 2023 revision of USP <797> asks of a compounding operation and, section by section, what Pharmacy Flow records and enforces.
What USP <797> (2023) requires
USP General Chapter <797> Pharmaceutical Compounding — Sterile Preparations was revised with an official date of 1 November 2023. It applies to anyone preparing compounded sterile preparations (CSPs) — 503A pharmacies, hospital pharmacies, physician offices and, as a floor beneath cGMP, 503B outsourcing facilities. The chapter is enforced through state boards of pharmacy, accreditation bodies and, for 503Bs, through FDA's cGMP expectations. Its main sections cover personnel training and competency, personal hygiene and garbing, facilities and engineering controls, certification and recertification of the cleanroom, environmental monitoring (air and surface sampling), cleaning and disinfection, component handling and sterilisation, master formulation and compounding records, release inspection and testing, labeling, BUDs, quality assurance and quality control, and documentation.
CSP categories and beyond-use dates
The revised chapter replaced low/medium/high risk levels with three categories defined by where and how the CSP is made and whether it is sterility tested. The maximum BUDs are set by category, sterilisation method, sterility testing and storage condition. The figures below are the chapter's maxima; a shorter BUD applies if any component's expiry or stability data demands it.
Maximum BUDs from USP <797> (2023). Category 3 also requires sterility testing, more frequent personnel and environmental sampling, and stability data.
Category
Conditions
Controlled room temp
Refrigerated
Frozen
Category 1
Prepared in an ISO 5 PEC outside a cleanroom suite (e.g. a segregated compounding area)
≤ 12 hours
≤ 24 hours
—
Category 2
Aseptically processed in a cleanroom suite, no sterility test
4 days
10 days
45 days
Category 2
Terminally sterilised, no sterility test
14 days
28 days
45 days
Category 2
Aseptically processed, sterility tested
30 days
45 days
60 days
Category 2
Terminally sterilised, sterility tested
45 days
60 days
90 days
Category 3
Aseptically processed, with the additional Category 3 requirements
60 days
90 days
120 days
Category 3
Terminally sterilised, with the additional Category 3 requirements
90 days
120 days
180 days
In Pharmacy Flow the formulation carries the BUD you have assigned under the chapter and your stability data. Each finished lot then receives that BUD or the earliest expiry among the raw-material lots consumed, whichever is sooner. The minimum is computed in the database when the batch is created, so a lot cannot be labeled with a BUD that outlives one of its components.
Environmental monitoring, recorded and trended
The chapter sets minimum frequencies for viable air sampling, surface sampling, pressure-differential monitoring, and temperature and humidity monitoring in classified areas, and requires action levels with an investigation when they are exceeded. Pharmacy Flow's environmental monitoring module records each reading against its room and ISO class with the metric (viable particulate, non-viable at ≥ 0.5 µm and ≥ 5.0 µm, temperature, humidity, differential pressure), the value, the unit and the action limit. Status is derived, not chosen: a reading over its action limit is Action, within 10% of it is Alert, otherwise Pass. The list filters by room, metric, status and period and exports, which is what "trended" means in practice — and an Action reading links directly to the environmental deviation category so the investigation opens against the reading that triggered it.
Quality dashboard: action-limit breaches sit beside the deviations they raised.
Batch records, QC and release
A sterile batch is planned from an approved formulation, consumes named raw-material lots in recorded quantities, and produces a finished lot in Quarantine. The QC tests your procedure specifies — sterility, bacterial endotoxin, potency, visual inspection, pH, whatever the formulation lists — are created as Pending on the lot. The lot's transition to Available is rejected by the database unless every test is recorded as Pass and a release signature is on record; the signature itself requires the pharmacist or QA user to re-enter their password at the moment of signing. Every status change is written to the lot's history with actor and time. The mechanics are the same for a 503A pharmacy and a 503B facility; the difference is which tests your category and regulatory status require.
Only released components can go in
The planner offers only raw-material lots in Available status — lots that have been QA-released after receipt with their certificate of analysis attached. Quarantined, expired and rejected lots cannot be selected. The pharmacist, the facility and the batch number (from a database sequence with a unique index) are fixed on the batch.
BUD enforcement from lot to fill
A BUD that is correct on the lot but ignored at the bench is worth little. Each dispensed unit carries its serial and the lot's BUD as its expiry. At the line, scanning a unit against an order checks four things before the fill is accepted: the serial exists, it belongs to this order, the unit is not under recall, and it is not past its BUD. Any failure refuses the fill with the reason. Inventory lists show lots by expiry band so short-dated lots are used first, and the putaway rule sends refrigerated lots to cold storage and frozen lots to frozen storage on receipt.
Lots by expiry band and storage condition; the location was assigned by the putaway rule from the material's storage requirement.
Excursions, OOS and investigations
Deviations carry a category — temperature excursion, OOS result, label error, fill discrepancy, equipment, documentation, process, environmental — a severity of Critical, Major or Minor, a linked lot where relevant, and a status of Open, Investigating or Closed. A CAPA can be opened from the deviation and runs Open, In Progress, Verification, Closed, so effectiveness verification is a distinct step. Change controls cover formulation, supplier, process, equipment and document changes, each with review and approval signatures. Signature meanings are fixed (Reviewed, Approved, Released, Verified, Witnessed, Rejected) and the approvals table is append-only for application users. The Part 11 explainer describes the signature ceremony; security and compliance describes the data controls.
See an action-limit breach become an investigation
We will record a viable-air reading over its limit, watch the status derive to Action, open the linked deviation, and show the lot that was in process at the time.
Where a sterile product is also hazardous under the NIOSH list — antineoplastics and a number of hormones among them — USP <800> applies on top of <797>. Materials flagged hazardous in the master data are routed to a segregated hazmat location by the putaway rule, and a hazardous packout option carries the segregation through fulfilment. The physical containment — negative-pressure C-SEC, externally vented C-PEC, closed-system transfer devices — is a facility matter; the platform's job is to make sure the hazardous lot never lands in the general bin and the record shows where it went. Our USP <800> checklist covers the programme end to end. For hormone products specifically, see hormone therapy software.
Who this is for
503A sterile pharmacy
Category 1 and 2 CSPs — injectables, ophthalmics, GLP-1 and hormone syringes — shipped to patients, with a board inspection every year or two.
503B outsourcing facility
cGMP sterile manufacturing where <797> is the floor and 21 CFR 211 is the standard. See the 503B page.
Hospital or health-system pharmacy
In-house CSP preparation that needs environmental trending, BUD control and a QMS on the same record as the dispensing.
Does the software assign BUDs automatically under <797>?+
It applies the BUD you set on the formulation under the chapter's category limits and your stability data, then caps each lot's BUD at the earliest expiry among the components consumed. It does not choose your category or your BUD for you — that is a pharmacist decision under the chapter — but it prevents a lot from carrying a BUD longer than its ingredients allow, and it refuses to fill a unit past its BUD.
How is environmental monitoring status decided?+
From the numbers. Each reading is stored with its action limit; over the limit is Action, within 10% is Alert, otherwise Pass. Users cannot mark a breach as Pass. Action readings link to the environmental deviation category.
Does it record personnel competency (media fills, gloved fingertip)?+
The platform's document control module holds controlled documents with versioning and signed approval, and the QMS records deviations and CAPAs. A dedicated competency scheduler with due dates per compounder is not a current module; keep those records in document control and tell us if a scheduler is a requirement for you.
What stops a lot being released before sterility results are back?+
A database trigger. The lot cannot move from Quarantine to Available while any QC test on it is not Pass, or while no release signature is recorded. If sterility is one of the lot's tests, the lot waits for the result.
Can we use it for Category 3 CSPs?+
Yes, from the records side: longer BUDs on the formulation, the additional tests on the lot, and the more frequent environmental readings. The additional Category 3 facility and personnel requirements are yours to meet and document.
Does it cover USP <800> as well as <797>?+
Hazardous materials are flagged in master data, routed to segregated hazmat storage on putaway, and carried as a hazardous packout through fulfilment. The physical containment and PPE programme are outside any software; see the USP <800> checklist.
A working platform, not a slide deck. Book a walkthrough and we'll run a real order from intake to carrier lane — or explore the public directory first, no account needed.