Skip to content

feat: Wire Triage module into the UI sidebar navigation #15

@DeepRatAI

Description

@DeepRatAI

Summary

The Emergency Triage module is fully implemented across all layers (backend engine, API endpoint, Reflex state, and UI panel) but is not accessible from the sidebar navigation, making it invisible to users.

Evidence

Layer Status Location
Backend engine ✅ Implemented src/medex/medical/triage.py — full ESI 5-level triage with red-flag detection, vital signs analysis
API endpoint ✅ Registered run_api.pyPOST /api/v1/triage/assess
UI State ✅ Defined ui/medex_ui/state.pyperform_triage(), triage state variables
UI Panel ✅ Built ui/medex_ui/app.pytriage_panel() component with form inputs, vital signs
Content routing ✅ Registered ui/medex_ui/app.pytriage_panel present in content_area() conditional
Nav item ✅ Defined ui/medex_ui/app.pynav_triage() function exists
Sidebar Missing ui/medex_ui/app.pysidebar() calls nav_chat(), nav_tools(), nav_research(), nav_history() but never calls nav_triage()

Root Cause

nav_triage() is defined but never invoked inside the sidebar() function. The triage panel is fully wired in content routing, so adding the nav call should be sufficient.

Proposed Fix

Add nav_triage() to the sidebar items list in the sidebar() function, between nav_tools() and nav_research().

Priority

Medium — the module is complete and functional; this is a one-line wiring fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions