How lowellowuor/amr_nexus- works
AMR Nexus is Kenya’s antimicrobial-resistance surveillance and clinical decision-support platform. A clinician or analyst uses the authenticated frontend to submit isolate data or explore surveillance results; prediction requests pass through the backend to prediction and storage services, while analytics support maps, comparisons, and reports. Separate workflows handle alerts, notifications, administration, audit, and data-subject rights. The README documents these capabilities; sampled source supports the frontend routing, authenticated API client, backend entry point, isolate search, offline drafts, and LLM integrations, but does not expose every router-to-service call.
Main entry points: main.py ASGI application · models.py Application database · App.jsx Authenticated app routes · predictions.py Prediction endpoints
Components 24
User application
- Authenticated app routes
frontend/src/App.jsx - Isolate prediction
frontend/src/pages/Predict.jsx - Dashboards and exploration
frontend/src/pages/NationalDashboard.jsx - Reports and comparisons
frontend/src/pages/Reports.jsx - Authenticated API client
frontend/src/api/client.js - Offline drafts
frontend/src/utils/offlineStorage.js
Clinical prediction
- Prediction endpoints
Backend/amr_nexus_ml/src/api/routers/predictions.py - Prediction service
Backend/amr_nexus_ml/src/services/prediction_service.py - Model and fallback
Backend/amr_nexus_ml/src/core/ml.py - SHAP explanations
Backend/amr_nexus_ml/src/services/shap_service.py
Surveillance analytics
- Analytics endpoints
Backend/amr_nexus_ml/src/api/routers/analytics.py - Pathogen exploration
Backend/amr_nexus_ml/src/api/routers/analyst.py - Historical isolate search
Backend/amr_nexus_ml/src/api/routers/search_router.py - Time-series forecasts
Backend/amr_nexus_ml/src/services/forecast_service.py
Alerts and governance
- Alert lifecycle
Backend/amr_nexus_ml/src/api/routers/alerts.py - Notification dispatch
Backend/amr_nexus_ml/src/services/notification_service.py - Audit trail
Backend/amr_nexus_ml/src/core/audit_middleware.py - Identity and user rights
Backend/amr_nexus_ml/src/api/routers/user_router.py - Clinical narrative insights
Backend/amr_nexus_ml/src/services/llm_service.py
Backend runtime
- ASGI application
Backend/amr_nexus_ml/src/main.py - Application database
Backend/amr_nexus_ml/src/db/models.py
Other components
- Clinician or analyst
- Google Gemini
- Email and SMS providers
Connections 29
- Clinician or analyst → Authenticated app routes: uses
- Authenticated app routes → Isolate prediction: routes to
- Authenticated app routes → Dashboards and exploration: routes to
- Authenticated app routes → Reports and comparisons: routes to
- Isolate prediction → Authenticated API client: requests API
- Dashboards and exploration → Authenticated API client: requests API
- Reports and comparisons → Authenticated API client: requests API
- Isolate prediction → Offline drafts: saves drafts
- Authenticated API client → ASGI application: sends requests
- ASGI application → Prediction endpoints: dispatches
- ASGI application → Analytics endpoints: dispatches
- ASGI application → Pathogen exploration: dispatches
- ASGI application → Historical isolate search: dispatches
- ASGI application → Alert lifecycle: dispatches
- ASGI application → Identity and user rights: dispatches
- Prediction endpoints → Prediction service: requests prediction
- Prediction service → Model and fallback: runs inference
- Prediction service → SHAP explanations: requests explanation
- Prediction endpoints → Application database: records outcomes
- Analytics endpoints → Application database: queries surveillance data
- Historical isolate search → Application database: queries isolates
- ASGI application → Time-series forecasts: requests forecast
- Time-series forecasts → Application database: reads surveillance data
- Alert lifecycle → Notification dispatch: dispatches notifications
- Notification dispatch → Email and SMS providers: sends email or SMS
- ASGI application → Audit trail: records privileged actions
- Identity and user rights → Application database: manages user data
- Prediction endpoints → Clinical narrative insights: requests insight
- Clinical narrative insights → Google Gemini: generates narrative