Scanner Label-Requirements Knowledge Base (KB) — v1.2¶
Date stamped: 2026-06-01 Owner: Director of Pharmacy Operations, Rx360 Inc. Status: v1.2 — US federal + 50 states + DC, Canada (all 13), EU-27 + EEA + Switzerland, Japan, UK, Australia. 97 jurisdictions; 87 carry primary-source provenance. Consumers: Rx360 prescription-label scanner AI (extraction agent) + the engineering team that loads the guardrails.
0. The two ideas this whole KB reduces to (read this first)¶
Everything in here is two concepts. If you only read this section, you can use the KB correctly.
Idea 1 — label_model is the master switch¶
Not every country puts the dispensing information on the bottle the way the US does. Before you validate anything, branch on the jurisdiction's label_model:
label_model |
Count | What it means for the scanner |
|---|---|---|
affirmative |
14 | A pharmacy-applied dispensing label is mandated (all US states, Canada, JP, UK, AU, + 11 EU). Expect a label; validate its required fields. This is the familiar case. |
no-intact-pack-label |
14 EU | The intact manufacturer pack legally governs; the pharmacy is not required to apply its own dispensing label. required[] is empty. The scanner MUST NOT hard-flag the absence of a dispensing label here — a do-not-hard-flag validation rule is baked into each of these entries. |
conditional-affirmative |
5 EU | A dispensing label is required only when the pack is split/repackaged or a trigger condition is met. Validate conditionally, never unconditionally. |
US entries have no label_model key — they are all implicitly affirmative and inherit common_core_required. Non-US entries do NOT inherit common_core_required — each carries its own explicit required[]. Never apply the US common core to an international label.
Idea 2 — "unverified beats invented"¶
Every cell in this KB is either citation-backed or flagged U (unverified) — and a U cell is treated as optional (no hard-fail). We never assert a requirement we could not open a primary source for. When the scanner sees a U/unverified field, it must not flag its absence and must not assume the field is mandated. 174 of 714 US cells are currently U; they are concentrated in 19 jurisdictions whose primary sources were access-blocked this pass (see RE_PULL_BLOCKERS.md). A U is a known gap, not a confirmed "not required."
1. Purpose¶
Rx360's scanner captures multiple 2D camera frames of a prescription bottle (label text wraps around the cylinder), stitches them, and runs a vision/LLM agent to extract structured medication metadata — drug name, strength, SIG/directions, prescriber, pharmacy, Rx number, fill/refill data, warnings, etc. The agent hallucinates and mis-extracts.
This KB is the jurisdictional guardrail layer: a structured, machine-consumable reference of exactly which data elements are mandated on a dispensed prescription label in each jurisdiction. The scanner uses it to (a) know which fields to expect, (b) validate extractions against, and (c) flag when an extraction is implausible for a given jurisdiction.
This is not a consumer document and not a legal compliance manual. It is a reference that trains/constrains an AI extraction agent.
2. The federal-vs-state distinction (US)¶
The single most important US regulatory fact in this KB:
U.S. federal law does NOT mandate most patient prescription-label content. That content is governed by each state Board of Pharmacy (its pharmacy practice act / board regulations).
Federal law touches the dispensed label in only two ways: 1. Controlled substances — DEA rules (21 CFR 1306.14 / 1306.24) set required label elements for CS, and 21 CFR 290.5 sets the verbatim federal transfer warning for Schedule II–IV. 2. FDA governs the manufacturer label (21 CFR Part 201 — NDC, lot, "Rx only"), not the dispensed pharmacy label the scanner reads.
The AI must not conflate the manufacturer label with the dispensed pharmacy label, and must not assume a federal mandate for a content element that is actually state-governed. Details in us_federal_baseline.md.
The EU has a structurally identical split (Idea 1 above): Directive 2001/83/EC harmonizes only the manufacturer-pack labelling; the dispensing label is left to national law — which is why 14 EU states require no pharmacy dispensing label at all. Details in international_appendix.md.
3. Files in this KB¶
| File | What it is |
|---|---|
README.md |
This cover note — start here. |
KB_Explorer.html |
Interactive single-file explorer. Open it directly in any browser (double-click; no server needed — data is inlined). Searchable/filterable/sortable table of all 97 jurisdictions × the 13 common columns, with a slide-in drawer showing every field's tier, verbatim quote, source URL, and confidence. This is the human sense-making view. |
canonical_label_schema.md |
Master field dictionary — the canonical union of every dispensed-label element, with definitions, data types, examples, and CS-specificity. The AI validates against this. |
us_federal_baseline.md |
Federal/DEA/FDA layer. Verbatim CS transfer warning. Manufacturer-vs-pharmacy-label distinction. |
us_state_matrix.md |
50-state + DC matrix (rows = jurisdictions, columns = canonical fields) generated from the JSON. Status legend R / R* / C / O / U / CS. Per-state notes + the cell-distribution summary. |
international_appendix.md |
Protocol-grade international layer organized by label_model: Canada (all 13, DIN handling), EU-27 + EEA + CH (by label model), Japan, UK, Australia. |
jurisdiction_guardrails.json |
The machine-readable artifact engineering loads. Keyed by jurisdiction code (US-CA, EU-DE, JP…) + a US-FEDERAL baseline. Required/optional/conditional/unverified fields, per-field provenance, and validation rules. v1.2. |
verification_protocol.md |
The 4-part citation protocol every cell was held to (statute §-level + dated URL opened + retrieval date + verbatim quote ≤300 chars). Defines what "verified" means. |
RESEARCH_EXPANSION_PLAN.md |
The phased research plan that produced v1.2 (US burn-down + international extension). |
NET_NEW_FIELDS_PROPOSAL_QUEUE.md |
171 candidate field IDs surfaced during the international sweep, with alias-cluster analysis. Input to a canonical-schema reconciliation pass — not yet merged into the schema. |
RE_PULL_BLOCKERS.md |
The 43 access-blocked cells across 19 jurisdictions that need an out-of-band re-pull (PDF download, alternate mirror, authenticated portal). Deferrals (resolved findings) listed separately. |
_research_template.md |
Blank per-jurisdiction research worksheet for future pulls. |
_research/ |
Raw per-jurisdiction research batches + the _merge/ tooling (build_explorer.py, merge scripts, side-files). |
4. How to use this as AI guardrails¶
Runtime flow for the scanner extraction agent:
- Determine jurisdiction. Extract
pharmacy_address(state/country) from the label, or use the app's known dispensing jurisdiction. Selects the jurisdiction object (US-XX,EU-XX,JP…). - Branch on
label_model(Idea 1). Ifno-intact-pack-label, do not expect or flag a dispensing label. Ifconditional-affirmative, validate only when the trigger is met. Ifaffirmative(or US), proceed. - Compose the expected field set. US: union the
US-FEDERALCS overlay (via CS logic only) with the jurisdiction'srequired+ applicableconditional. Non-US: use only that jurisdiction's explicitrequired[]— do not add the US common core. - Validate the extraction.
requiredfield missing → flag (likely a stitching/OCR miss).conditionalfield whose condition is met but value missing → flag.requiredfield present but implausible → flag for review.optional/unverified(Idea 2) → never hard-fail on absence.- Apply per-jurisdiction
validation_rules. E.g. theno-intact-pack-labeldo-not-flag rule; WA's all-legend transfer-warning; JP's fused 用法用量 SIG block and 「麻」 narcotic mark; AU's literal "KEEP OUT OF REACH OF CHILDREN" string. - Use the CS overlay as a hallucination check. Only expect
cs_transfer_warningwhencs_schedule∈ {CII, CIII, CIV}. A transfer warning on a clearly non-controlled drug is either an invented extraction or a WA-style all-legend mandate — disambiguate by jurisdiction.
The field_tiers, confidence_levels, and provenance_schema blocks at the top of the JSON define these terms precisely for engineering.
5. Scope, confidence & coverage¶
- In scope (v1.2): US federal baseline; all 50 states + DC; Canada all 13; EU-27 + EEA (IS/LI/NO) + Switzerland; Japan; UK; Australia. 97 jurisdictions; 87 with primary-source provenance.
- Confidence is uneven and labeled (Idea 2). US common-core elements (patient, Rx number, fill date, drug name/strength, SIG, prescriber, pharmacy name/address) are confirmed across all 51. Variable elements (pharmacy phone, physical description, manufacturer-on-generic, beyond-use date) are confirmed only where a primary source was opened; elsewhere
U. Current US cell distribution: 358 R / 47 R* / 51 C / 51 CS / 33 O / 174 U of 714. - 43 cells are access-blocked, not unknowable — they need an out-of-band channel (
RE_PULL_BLOCKERS.md). EU-EE and EU-LT are provisional holds (do not enable any rule until verbatim text is locked). - Not legal advice. Engineering reference only; compliance/legal review is a separate workstream.
6. Sourcing methodology¶
- Grounded in primary regulatory sources held to the 4-part protocol (
verification_protocol.md): DEA/CFR, FDA (for the manufacturer-label contrast), state pharmacy practice acts / board regs, provincial pharmacy acts + NAPRA, EU national gazettes + Directive 2001/83/EC, Japan's Pharmaceuticals and Medical Devices Act, UK Human Medicines Regs 2012, AU SUSMP. - Each non-obvious requirement carries a per-field
provenanceblock (tier / source / dated URL / verbatim quote / confidence) in the JSON. - No fabricated citations. Where an element could not be confirmed against an openable primary source, it is
U/unverifiedrather than guessed (Idea 2).
7. Maintenance note¶
Pharmacy regulations change. This KB is date-stamped 2026-06-01 and requires periodic review (at least semi-annually, and before any new jurisdiction launch). Open burn-down for v1.3:
- Re-pull the 43 blockers (
RE_PULL_BLOCKERS.md) — priority: US full-common-core states AR/MS/NM/CT (~26 cells flip fromUto validated on success); then release the EE/LT provisional holds. - Canonical-schema reconciliation — process
NET_NEW_FIELDS_PROPOSAL_QUEUE.md: collapse the documented alias clusters (171 raw IDs → ~60–75 real fields) before adding any tocanonical_label_schema.md. - Re-confirm full-treatment jurisdictions against then-current text (CA patient-centered label + WA accessible-label rules both have active rulemaking).
- Regenerate
KB_Explorer.htmlfrom the JSON after any data change:python3 _research/_merge/build_explorer.py.
When updating, bump $schema_version in the JSON, the version header in each .md, and re-validate the JSON before shipping to engineering.