medOS Operations
Auto-Assign Dispatcher
The nervous system for the assignment brain
A Postgres trigger on the single dispatch funnel maps department type to order type, reads the per-hospital config (off / suggest / auto) and either logs ranked recommendations or auto-accepts rank one — movers land on the gig board, in-place roles on the queue row.
INSERT department_queuesresolve_assignment_recommendations()STAFFLOADPROXIMITYHISTORYSCORERANK
Porter K. Somsak25%same floor0.960.92#1
Porter W. Dao55%1 floor away0.910.85#2
Porter T. Chai80%other wing0.880.71#3
OFFSUGGESTAUTO
AUTO accepts rank-1 · notify via ack dispatcherconsultationattending fallback: assigned_to → clinical_context → hoisted attending
Capabilities
Fires on every queue insert — the single dispatch funnel
Modes per scope: off (default) / SUGGEST (panel) / AUTO (rank-1 accept)
Consultation arm: 3-step attending fallback before fresh assignment
Notify-on-assign through the acknowledgement dispatcher
Config is data rows — roll out to lab/imaging/consult with zero code