Prism
The silent listener that reads every conversation between a clinic's software and its database, so Digital Empathy knows what's happening in the practice in real time.
partial
What it is
Prism is a Chrome browser extension, a companion API, and an operator console that work together to capture clinical data from veterinary practice management software (PIMS) without needing a vendor integration. The extension sits invisibly in a logged-in Chrome session and watches all network traffic between the PIMS front-end and its backend. Any response that contains clinical information — appointments, patients, client records, medical history — gets forwarded to the Prism API, which stores it, deduplicates it, and makes it available to the rest of DE. The operator console is the internal tool used by the DE team to classify and manage what gets captured.
The first PIMS Prism supports is Covetrus Pulse. The architecture is built so that adding a second practice management system later is a configuration change, not a rewrite.
Why it exists
PIMS vendor integrations are slow, politically expensive, and often unavailable entirely. A practice already has all its data — it is flowing through the browser every time a vet tech opens a patient record or checks the schedule. Prism captures that data at the source, with clinic consent, giving DE a working integration layer in days instead of months. This unblocks two concrete products that already have demand: Spotlight pre-appointment forms (which need an owner's email and phone before a visit) and AI-generated SOAP notes (which need the patient's history). Without Prism, both products require manual data exports or vendor cooperation. With Prism, they work automatically.
How it works
When a clinic installs Prism, a staff member visits a DE-hosted install page, which pairs the Chrome extension to that clinic's account via a one-time secure token. After pairing, the extension runs silently in the background whenever the PIMS is open. It uses Chrome's debugger protocol (the same interface developer tools use) to intercept every HTTP response from the practice management server. Responses that match the clinic's allowed domains are checked against a short deny-list — anything related to login, authentication, or session management is dropped. Anything else is added to a local queue in the browser and flushed to the Prism API roughly every ten seconds, or whenever the queue reaches fifty items.
The API receives these batches, authenticates the clinic by API key, runs a deduplication check (so identical payloads captured within an hour are stored only once), compresses each payload, and writes it to a dedicated Aurora MySQL database. Raw payloads are kept for ninety days and then permanently deleted. Every capture includes metadata — the URL, the HTTP method, the response status, and a timestamp — alongside the compressed body.
Phase 2, now live on staging, adds the Oracle Transformation Engine. Oracle reads the captured payloads and translates them into clean, structured records — appointment context, patient identity, client identity — using a versioned definition language that tells the system exactly which JSON fields to pull and how to interpret them. The Oracle was first proven end-to-end on 12 May 2026, successfully transforming real Covetrus Pulse whiteboard payloads into appointment context rows without any AI involvement. When a definition does not cover a payload perfectly, the system can invoke an AI repair loop to generate and evaluate candidate definitions, but that repair path is feature-flagged off until its safety gates are fully tested.
The operator console is the internal dashboard the DE team uses to install transform definitions, launch and stop experiments, and inspect audit trails. It is protected by a separate admin key and is not clinic-facing.
The parts
Chrome Extension (de-prism-extension) — Runs inside a logged-in Chrome session at the clinic. Intercepts HTTP responses from the PIMS using Chrome's debugger protocol, filters out security-sensitive paths, buffers up to fifty captures, and sends them in batches to the Prism API every ten seconds. Has exactly four jobs: listen, filter, buffer, send. All the intelligence lives on the server.
Capture Pipeline (de-prism-api, Domains/Prism) — Receives batches from the extension, authenticates the clinic, deduplicates payloads by SHA-256 hash within a one-hour window, compresses each payload, and writes it to the capture log database. Enforces a ninety-day TTL via a nightly cleanup job. This is Phase 1, and it is live in production.
Oracle Transformation Engine (de-prism-api, Domains/Oracle) — Reads stored raw payloads and transforms them into structured clinical records using a versioned definition language (JSON DSL). A definition tells Oracle exactly which JSON path to use for each field. Runs inside bounded experiments so nothing can affect production until the results are verified. First successful end-to-end run was on 12 May 2026 on staging. Live on staging; not yet in production.
AI Repair Loop (de-prism-api, Domains/Oracle/AiRepair) — When Oracle cannot match a payload to an existing definition, the repair loop can call an AI provider (OpenAI) to generate candidate definitions. Candidates go through a multi-layer evaluation and safety check before they can be promoted. Raw patient data is never sent to OpenAI — only sanitized structural descriptions. Feature-flagged off until safety gates pass. Designed but not yet activated.
Trust Frontier (de-prism-api, Domains/Oracle/Trust) — A diagnostic-only layer that assembles a complete evidence envelope before any transformed data is allowed to move downstream. Checks that source hashes, prompt versions, experiment results, and schema obligations are all current and consistent. Cannot activate anything on its own — it can only tell the system whether the evidence is ready. Lives on staging; the load path that would act on its verdict is the next item on the roadmap.
Operator Console (de-prism-api, Domains/OperatorConsole) — Admin-only web interface for the DE team. Used to install transform definitions, launch and stop experiment runs, review audit reports, and manage the Oracle pipeline. Separate authentication from the clinic-facing API key.
Pairing Flow and Install Page — The one-time setup that connects a clinic's Chrome extension to its account. A staff member visits an install page hosted by DE, which sends a short-lived token to the extension. The extension exchanges the token for an API key and from that point captures automatically. Both the staging and production Chrome Web Store listings exist; staging is approved, production is submitted and pending review.
Where it fits
→Spotlight — Prism is designed to be the data source for Spotlight's pre-appointment form pre-fill (client contact details) and AI-generated SOAP notes (patient history). The Oracle transformation layer produces appointment context and patient identity records specifically for this purpose. The connection is designed but the actual data delivery path (Task 20 on the roadmap) has not shipped yet.designed
→DE Heart — DE Heart is named as a future ingestion consumer for Prism's canonical observation store. Oracle would push through a DE Heart-owned endpoint with a delivery ledger. Defined at the architectural level in ADR-0013 but not yet implemented.designed
→Aurora MySQL (de_prism_staging / de_prism_production) — All captured payloads and Oracle output records are stored in a dedicated Aurora MySQL cluster. The staging and production databases are separate schemas on a shared cluster. Migrations run automatically on container startup.live
→AWS Secrets Manager — One JSON secret per environment holds the database credentials, admin API key, and API key hashing salt. Loaded on container startup; missing values fail the boot loudly.live
→OpenAI (AI repair) — The AI repair loop is wired to call OpenAI (gpt-4o-mini or similar) to generate candidate transform definitions when Oracle cannot match a payload. The integration is built and tested but the feature flag is off and the path has never been exercised in staging or production.designed
→Chrome Web Store — The extension is distributed as an unlisted listing on the Chrome Web Store. Staging listing is approved. Production listing (extension ID obbmoeihbfeophnlbmkpimjkhagidcgm) was submitted 29 April 2026 and was awaiting review as of the last status update.live
Its job in the loop: Prism is DE's primary SENSE instrument. It sits inside the clinician's Chrome browser and watches every request and response flowing between the practice management software and its servers. Every appointment booked, every patient record loaded, every SOAP note saved — Prism sees the raw data before it disappears into the PIMS. Without it, DE has no direct window into what is actually happening at a practice. With it, every other DE product has a live, structured feed of clinical reality.