North Bridge Solutions
A working prototype of a statewide registry that matches Chapter 51 emergency detention patients to appropriate psychiatric beds in real time, and captures the structured refusal data Wisconsin currently has no way to see.
schema.sql— DuckDB / Postgres schema. Eight tables, four analytics views, reference data seeded inline.seed.py— synthetic data generator. Builds a calibrated 30-day dataset across 25 facilities and 72 counties.app.py— Streamlit prototype with three audiences:- Clinician — bed search with structured matching and distance ranking
- Facility — single-facility inventory + refusal patterns
- DHS / County — statewide analytics on placement friction and transport burden
smoke_test.py— minimal end-to-end test of the schema and views.requirements.txt— Python deps.
pip install -r requirements.txt
python seed.py # builds registry.duckdb with 30 days of synthetic data
streamlit run app.pyA bed is not just a bed. The registry matches on:
- Legal status (voluntary, Chapter 51 emergency detention, Chapter 51 final commitment, Chapter 55 protective placement, forensic NGI/IST, minor admission)
- Age range
- Acuity (1–5)
- Medical complexity acceptance
- Aggression / elopement risk ceiling
- Substance use co-occurrence acceptance
- Insurance posture (uninsured, Medicaid, Medicare)
- Transport distance from county of origin
Each view answers a question Wisconsin currently cannot answer with structured data:
v_refusal_patterns— which facilities refuse the most, and whyv_county_transport_burden— how far each county's patients actually travelv_placement_friction— refusals per patient before successful placementv_current_bed_inventory— point-in-time bed availability with staleness flagging
Prototype with synthetic data. The synthetic data is calibrated to mirror reported reality (state MHIs run >95% occupancy; northern rural counties show longer transport distances; clinical refusals dominate over capacity refusals).
