Kiroween 2026 · Frankenstein category

Chimera Rx

A modern pharmacy system: one connected ledger for every lot, patient and prescription, AI agents working in the background, and a pharmacist who decides.

Synthetic data only Eight AI agents A pharmacist approves every message MIT licence

Demo video

Pharmacy software, rebuilt around the lot

A 2:55 walkthrough of the running app, told by two narrators: why pharmacy systems need modernizing, then all fourteen tabs of the pharmacist's workspace in the order the work happens, the AI agents at work in the background and the integration seams. Captions included.

Modernization

The pharmacy runs on yesterday's software

Most pharmacies still run on fax machines, phone calls, paper logs and separate systems that never talk to each other. Chimera Rx replaces those islands with one connected ledger, open standards and agents that watch it all day, with a pharmacist making every decision.

AreaTodayWith Chimera Rx
Lot and serialOn the carton. The wholesaler knows it, the pharmacy system does not.Scanned from the GS1 DataMatrix at receiving and at fill, tied to the patient.
Prescription checksOne popup at a time, mostly overridden.Deterministic rules plus the Rx Guardian, an agent that checks the whole history and cites its evidence.
Prescriber contactFax and phone.NCPDP SCRIPT-shaped change requests (sandbox).
RefillsA reminder on the due date.Adherence (PDC), med sync, and refills held when a lot is recalled.
TraceabilityA separate system or paper.DSCSA-style EPCIS 2.0 export and import, a sandbox verifier and suspect cases.
Front store and storesA separate till. Phone and spreadsheet between stores.A register that knows verified prescriptions. Two stores, with transfers that keep lot and serial.
IntegrationBatch files and screen scraping.REST, MCP and FHIR R4 behind scoped OAuth, plus signed webhooks.
AuditLogs anyone can edit.A hash-chained audit log with a verify route.

The full current-state and future-state map, the agent roadmap and a 90-day pilot plan: docs/MODERNIZATION.md.

The gaps

What disconnected systems leave behind

When systems don't share data, people fill the gaps by hand. The sharpest example is the recall: wholesalers track a package by lot and serial, dispensing software tracks the patient, and the two never meet, so a recall means warning everyone or no one.

289 / 510

Alerts overridden

Relevant drug interaction alerts in community pharmacies were overridden with no action.

Source: PubMed 17381663

74.9%

Pharmacists report burnout

Of 412 surveyed community pharmacists, in at least one domain.

Source: Pharmacy Times

Fax and phone

Recalls still travel on paper

Recalls and prescriber changes arrive by fax and phone. Cold-chain and count checks sit on paper or a spreadsheet.

Source: MODERNIZATION.md

DSCSA

Package-level traceability

Small dispensers have an FDA exemption to November 27, 2027. Check your own status with the FDA.

Source: FDA

Chimera Rx captures the lot when it is in your hand, at receiving and at fill, so one ledger holds the lot, the patient and the prescription history. Full case with all sources: README and docs/MODERNIZATION.md.

How it works

One ledger, from the dock to the medicine cabinet

Each step writes to the same record, so the recall step can answer in seconds.

  1. Receive

    Scan the GS1 DataMatrix, or read a label with OCR. Lot, expiry and serial are captured. Transaction information and statement (TI/TS) are kept for DSCSA.

  2. Shelve

    Each unit gets a put-away spot. Warm-fridge items, extra Schedule II and expired packages are flagged at the dock.

  3. Fill and verify

    Rx Watcher rules and the Rx Guardian check the order. Scanning the package links the exact lot and serial to the prescription and the patient.

  4. Pickup and register

    The cashier sees pickup columns only. A prescription is verified before it can be sold.

  5. Recall

    Enter the recall number or upload the fax. The Coroner reads the lots. A lot must appear verbatim in the notice, and the pharmacist confirms each uncertain lot.

  6. Quarantine

    Every on-shelf unit of a confirmed lot moves to quarantine. A recalled lot stays blocked at receiving and at fill, even after the recall closes.

  7. Patients

    The impact list names each patient who took a unit home, matched by the lot recorded at fill, with their consented contact channels.

  8. Sandbox messages

    Drafts go out only after the pharmacist attests. They land in the sandbox outbox. Nothing reaches a real person.

Red steps are the recall path. Where the serial is missing at fill, the app assumes the oldest on-shelf unit of that lot and labels it inferred, never as scanned.

Recall impact screen: 197 units quarantined, 17 patients matched by lot recorded at fill, with a list of affected patients and contact channels
Recall impact for a synthetic recall: units on shelf, patients already served, and who can be reached by which channel.

Roles

Four roles, enforced on the server

Every route is checked against one access table, with default deny. A cashier or admin gets 403 on every clinical read. Read matrix in SECURITY.md.

Pharmacist

Final decision on every clinical and patient-facing action.

Can

  • Confirm recall lots, verify fills, approve flagged orders
  • Draft and send patient messages after attestation
  • Switch background agents on, change the AI provider
  • Read the audit log and verify its chain

Technician

Runs receiving, fill queue and worklists.

Can

  • Receive, shelve and prepare fills
  • Read recalls, patients, refills and DSCSA records
  • Run read-only agents

Cannot

  • Send recall voicemail or read the call list
  • Read the audit log or other stores

Cashier

Hands over prescriptions and runs the register.

Can

  • See pickup columns and register sales

Cannot

  • See allergies, date of birth or email
  • Read recalls, patient profiles or agent output

Admin

Runs the site, not the clinic.

Can

  • Read the audit log, export it, view integrations
  • Switch background agents on

Cannot

  • Read any clinical data or fill-queue rows
  • Send anything to patients

AI agents

Eight agents, one rule

Rules decide, the model explains, a gate checks the model, a pharmacist decides.

Every agent has a deterministic core that always runs, an optional model layer, and a gate that drops anything the rules or the source text do not back up. With no model, or when a call fails, the agent shows its output labelled “rules only”.

AgentWhat it doesGate on the model
CoronerReads a recall notice, lists lots and NDCsA lot must appear verbatim in the notice
Rx Watcher ExplainerExplains rule findings for one order, drafts a prescriber messageRule hits copied through unchanged; “looks fine” is dropped
Recall Outreach DrafterRewrites the approved SMS, email and voicemail templatesNames, other phones and unknown placeholders are refused
Refill OutreachDrafts refill reminders for due patientsSame gates, and recalled or Schedule II is skipped
Night WatchDigest of open recalls, shortages, expiring lots and held ordersEvery number must exist in the digest; never confirms a lot
Stock and Shortage AdvisorReorder, expiry risk, shortagesA number not in its item is dropped
Pharmacist CopilotAnswers questions with up to three read-only toolsTools outside the list never run; only tool-result numbers allowed
Rx GuardianChecks each order against the patient’s whole history (duplicate therapy, interactions, allergy class, dose, fill gaps)Every rule hit stays; unbacked claims are dropped

Background mode

A pharmacist or admin can switch four agents on: Rx Guardian (checked each minute), Night Watch, Stock Advisor and Refill Outreach (daily). Each switch is audited. The Guardian never changes an order: it raises a suggestion with evidence, and a pharmacist accepts or dismisses it.

Bring your own model

Providers: Amazon Bedrock (default), Anthropic, any OpenAI-compatible endpoint (including Ollama, LM Studio and vLLM), an offline mock, or none. A key pasted in the UI stays in server memory only. docs/AGENTS.md

Integrations

Open to other systems, honest about the edges

REST and MCP

Scoped partner API, plus MCP (JSON-RPC) with read-only agent tools behind OAuth scopes.

FHIR R4

Read access for partner systems, behind OAuth 2.0 client credentials and per-partner scopes.

Signed webhooks

HMAC-signed events to a sandbox sink.

DSCSA and EPCIS 2.0

Export and dry-run import, sandbox verification requests, suspect-product cases. A sandbox, not a filing.

Two stores

Stock transfers between stores, and recalls mirrored from one store to the other.

Placeholder map

Designed seam, not wired, sandbox today. The repo has no provider code, SDK or credentials for these. Each one throws “not configured in this demo” and has its env var, allowed data and pharmacist attestation written down in docs/INTEGRATION_PLACEHOLDERS.md.

SMSCarrier or CPaaS APISandbox outbox today
EmailTransactional email APISandbox outbox today
Outbound voiceTelephony APIRendered, never dialled
e-PrescribingNCPDP SCRIPT networkStored locally
Wholesaler feedEDI and EPCISSandbox today
DSCSA verificationVerification routerSimulated today
Pharmacy systemDispensing system (PMS)Not wired
EHRFHIRNot wired
PayerClaims switchNot wired
Secrets managerCredential storeNot wired
KMSData key in a managed serviceThrows today
IdentityOIDC or SAML SSONot wired

Security and safety

HIPAA-style safeguards, not certified

Chimera Rx is a sandbox pilot with synthetic data. It makes no compliance claim. SECURITY.md lists what is encrypted and what is not.

Encryption at rest

Patient fields (name, date of birth, contact, allergies, conditions, message bodies) are encrypted with AES-256-GCM, each value with its own IV. Keys can rotate.

Server-side roles

One access table with default deny. Tests walk the live route table for anonymous users and all four roles.

Hash-chained audit

Every change and every profile view is logged with a patient ID, never a name. The chain can be verified from the app.

Independent review

An independent review found eight issues (five P1, three P2). All eight are fixed on the branch. Read the review.

Pharmacy safety rules, in short

  • Synthetic data only. Nothing reaches a real person.
  • A pharmacist decides: only a pharmacist confirms lots, verifies fills and sends patient messages.
  • Never invent a lot: a lot must appear verbatim in the source. Below 0.95 confidence, or without an expiry, one lot at a time.
  • Rules run before the model, and the model can never remove a rule hit.
  • An inferred serial is never shown as scanned. A recalled lot stays blocked.
  • Messages name only the patient they go to. Voicemail never names the medicine.

All rules mapped to code and tests

Built with Kiro

Spec-driven, with the gaps stated

Kiro wrote most of this repo from a written spec and uploaded mockups, with a person directing each step. The account in docs/KIRO_USAGE.md marks what was not measured or run.

Specs

Coroner and Summoner specs with EARS requirements, design and tasks. Requirement IDs travel into tests.

Steering

Product, tech and pharmacy-safety files load on every request. GS1 and Coroner prompt steering load on demand.

Hooks

A PHI guard blocks commits that look like patient data. Property tests run on save.

Custom agent

A Coroner agent scoped to its packages that must finish with property tests passing.

Property-based tests

fast-check properties on lot extraction and GS1 parsing found real bugs.

Kiro Crew

Parallel workers built the agents, the encryption and the reviews, each with an evidence file.

AI-DLC

The planning record reached User Stories. The build then ran outside the approval gates, because the tool could not record gate approvals. This is stated in the repo.

Screens

The running app

Screenshots of the current build with synthetic data.

Try it

Running in a minute

The live app runs entirely in your browser tab with synthetic data: nothing to install, no GitHub login, resets on reload. Codespaces and Docker run the full server version.

Docker

git clone https://github.com/pjborad/Chimera-Rx
cd Chimera-Rx
docker compose up
# open http://localhost:4000

Node 22.5+ and pnpm

pnpm install --frozen-lockfile
pnpm setup
pnpm dev
# open http://localhost:5173

Synthetic logins

Type them on the sign-in page. The form is not pre-filled.

Then open Recalls and look up D-0417-2026.