Case Study
How One Psychiatrist Replaced 2 Hours of Manual PMP Lookups with an Automated Intelligence Pipeline
Inpatient Psychiatry — Community Hospital, Western NC — 2026
A single physician built and deployed an automated patient intelligence system that generates clinical-grade PMP reports, DOC records searches, risk triage scoring, and AI-written digests — from a census screenshot to a full report in under 10 minutes.
The Problem
Every morning before rounds, the attending psychiatrist on a 16-bed inpatient unit needed to review each patient's controlled substance history. The process was entirely manual:
Before
- Log into NC PMP AWARxE
- Search each patient individually
- Wait for each report to load
- Manually note NarxScores
- Cross-reference DOC records separately
- Write notes by hand
- Repeat x16 patients
After
- Screenshot the Epic census
- Paste into the system
- Full report auto-generated
- Risk-triaged, color-coded
- AI clinical digests written
- DOC records included
- Ready before rounds
At 7-10 minutes per patient for manual lookup, the daily PMP review consumed nearly 2 hours — time that could be spent with patients.
The Solution
The physician designed and built an end-to-end automated pipeline that transforms a census screenshot into a comprehensive intelligence report. The system:
- Reads the census — AI vision extracts patient names, DOBs, and room numbers from an Epic screenshot
- Runs bulk PMP searches — headless browser automation uploads a batch CSV to NC PMP AWARxE and extracts results for all patients simultaneously
- Searches DOC records — automated HTTP queries against the NC Department of Adult Correction public offender database
- Extracts medications — parses drug names, dosages, and fill dates from PMP data with active/inactive classification
- Scores risk — composite triage scoring based on Rx volume, prescriber count, NarxScores, overdose risk, DOC records, and drug class overlap
- Generates clinical digests — AI writes a 30-second briefing for each patient, highlighting what matters for rounds
- Produces an interactive report — single HTML file with searchable TOC, per-patient cards, embedded PDF links, keyboard navigation
The Results
8 min
Census to full report
14
Data points per patient
3
Data sources integrated
What the Report Contains
Each patient's section includes:
- Risk triage score (0-20) with color coding — HIGH/MODERATE/LOW/CLEAN
- AI clinical digest — written like a colleague giving you a 30-second briefing
- Medication list with active/inactive status and last fill dates
- NarxScores — Narcotics, Sedatives, Stimulants with overdose risk assessment
- Prescriber list by name with count
- Pharmacy locations with out-of-state fill detection
- Cash pay flags — controlled substance fills paid with cash
- NC DOC records — full offender details when present
- Raw PMP PDF — one-click link to the full AWARxE report
Clinical Impact
The risk triage scoring surfaces patients who need attention first. In a typical 16-patient census:
- 6 patients flagged as HIGH risk (multiple prescribers, high NarxScores, DOC records, opioid-benzo overlap)
- 2 patients flagged as MODERATE
- 2 patients LOW risk
- 6 patients CLEAN — no controlled substance history
The psychiatrist now starts rounds knowing exactly which patients need deeper PMP review and which are clean — before entering a single room.
"The system caught an out-of-state pharmacy fill pattern I would have missed with manual lookups. A patient was filling controlled substances in Massachusetts while receiving inpatient treatment in North Carolina. That's the kind of finding that changes a treatment plan."
Technical Architecture
The system runs on a single Linux server and requires no enterprise infrastructure:
- Python automation scripts with Chrome CDP (headless browser)
- HTTP API clients for DOC and eCourts
- Claude AI for clinical digest generation and census image reading
- PostgreSQL for roster management
- Self-contained HTML reports (no external dependencies)
- Accessible via Tailscale VPN (HIPAA-aligned access control)
The entire system was designed, built, and deployed by a single physician — demonstrating that clinical AI tools don't require enterprise IT projects or vendor contracts.
Replicability
This system was built for one department at one hospital. But the architecture is replicable anywhere PMP AWARxE is available (all 50 states use a PMP system). The key differentiator is that it was designed by a clinician, for the clinical workflow — not by an IT team guessing at what psychiatrists need.
Praxis can deploy a version of this system for your department, customized to your state's PMP, your EHR, and your clinical priorities.
Want this for your department?
We can have a customized version running within your first engagement month.
[email protected]