How gravitate-health/focusing-manager works
Key Components to Include:
API Layer
• Main endpoints from the controllers (explanationController, lensesController, preprocessingController)
Core Service Components
• Four focusing flows mentioned in the README as sub-components
Providers Layer
• FHIR EPI Provider
• FHIR IPS Provider
• Allergies Provider
• Conditions Provider
• Lenses Provider
• Preprocessing Provider
• Profile Provider
Infrastructure Components
• Kubernetes components:
• Service Account
• Role
• Role Binding
• Kubernetes API Client
External Dependencies
• FHIR Server connection
• Kubernetes Cluster connection
Top Level
• [External Clients] → [API Gateway] → [Focusing Manager Core]
Middle Level
• [Focusing Manager Core] → [Provider Layer] → [External Services]
Bottom Level
• [Kubernetes Infrastructure] ↔ [Service Configuration]
Key Relationships to Show:
Four focusing flows as parallel paths within the core component
Important Elements to Include:
Configuration Components
• Environment variables (FOCUSING_LABEL_SELECTOR, PREPROCESSING_LABEL_SELECTOR)
• Kubernetes configurations
• Template files (epi.liquid, lenses.css)
Security Layer
• Service account and role bindings
• Authentication flow
Error Handling
• Error handling components from the error directory
• How errors propagate through the system
Recommendations:
The template-based rendering system
Keep the abstraction level focused on the architectural components while maintaining enough detail to understand the system's operation and dependencies.