Pilot · Harbor City Health Department
Source code FeaturedOverdose spike situational brief generator
Result in one line: Cut brief turnaround from three days to under one hour
Assembles naloxone runs, emergency department visits and medical examiner reports into a one-page situational brief within an hour of a spike alert.
Published July 22, 2025
- Skills needed to set it up
- Analyst or data scientist
- Readiness
- Needs customization Needs a data agreement Human review built in
- Data it touches
- Health information (PHI) De-identified data Criminal justice data (CJIS)
- Who sees the output
- Internal staff
- License
- Apache 2.0
- Cost to stand up
- No new spend
- Portable to other platforms
- Yes — platform-agnostic
- Use case category
- Communications, media & writing
- Reviews it went through
- Privacy review Community or advisory review Equity impact assessment
What do these mean?
- Analyst or data scientist
- Someone who works in Python, R or SQL.
- Needs customization
- Your team will need to adapt it before use.
- Needs a data agreement
- A data-sharing or BAA-type agreement is required.
- Human review built in
- A person checks the AI's output before it is used.
- Health information (PHI)
- Identifiable health information covered by HIPAA.
- De-identified data
- Personal identifiers removed before use.
- Criminal justice data (CJIS)
- Data subject to CJIS security policy.
- Internal staff
- Used only inside the organization.
- Apache 2.0
- Permissive, with a patent grant.
- No new spend
- Built with licences, staff and infrastructure the organization already had.
- Yes — platform-agnostic
- Runs on any comparable stack with configuration changes only.
- Communications, media & writing
- Drafting, translating, summarising and publishing.
Problem
When the substance use division declares a spike, leadership wants a brief the same day. Assembling one meant three people pulling from three systems, agreeing on a time window, rebuilding the same charts, and writing the narrative by hand. In practice the brief arrived two or three days after the alert, by which point the question had usually moved on.
What we built
A small Streamlit app that an analyst runs on a workstation inside our network. The analyst picks an alert window and the neighbourhoods to include. The app pulls each feed, computes deltas against an eight-week baseline, renders the charts, and drafts the narrative paragraphs. The analyst edits the draft and exports a one-page PDF.
How it works
Every feed is queried at record level inside our environment. The model only ever receives the aggregate table that ends up in the brief — counts by day, by neighbourhood, and the baseline comparison. No record-level data, no names, no addresses leave the network boundary.
The law enforcement naloxone feed comes from a system covered by criminal justice data rules, so it arrives through a standing data-sharing agreement and is aggregated before it reaches the app at all. That agreement was the longest part of the project by a wide margin.
We also used an AI coding assistant while building the app, mostly for the chart code and the PDF export. That is why this entry is tagged as both AI in the product and AI used to build it.
Results
The first brief produced under the new process was ready 52 minutes after the alert. Across the pilot, median turnaround was under an hour against a previous median of three days. Analyst editing is still substantial — roughly a quarter of the drafted narrative gets rewritten — but starting from a draft with the numbers already correct is what saves the time.
Lessons learned
Keeping the model on the aggregate side of the boundary made every governance conversation shorter. Reviewers stopped asking about the model and started asking about the data agreement, which was the right question.
How to reuse
The repository ships with a synthetic sample dataset so you can run the whole flow end to end before you connect anything real. Swap the three loader functions for your own sources and adjust the baseline window. Expect the data agreement, not the code, to set your timeline.
About
- Area of work
- Epidemiology & surveillance
- Clinical & community services
- Review status
- Reviewed & approved
How it's built
- How AI is involved
- Both
- Types of AI
- Generative text (LLM)
- AI tools & models
- OpenAI API
- Streamlit
- Python
- GitHub Copilot
- Where it runs
- On-premises
- Desktop or local
Sharing & licensing
- Portability notes
- A local Python tool: it reads a CSV, calls a locally hosted model, and writes a document. Nothing vendor-specific.
What it took
- Cost to keep running
- Under $10k/yr
- How it was bought
- Grant funded
- Interagency agreement
- Who it affects
- Overdose geography is also policing geography, so a brief that names a corner can be read as a deployment recommendation. The harm-reduction advisory board asked us to report at neighborhood rather than block level and to suppress counts under five, and the brief header states in writing that it is not for law enforcement targeting.
Data & access
- No PII/PHI in the shared material
- Yes
- Data sources
- EMS naloxone administrations
- Emergency department chief complaints
- Medical examiner preliminary reports
- Law enforcement naloxone reports
- Data-governance caveats
- Runs on-premises against identifiable EMS and medical-examiner extracts under an existing data-use agreement; the repository and this entry contain synthetic data only, and briefs are reviewed before any distribution.