dylanglenister
Merge branch 'hf_main' into hf_mongo
b4fcc38

TODO

Checklist

  • Untangle memory
  • Untangle history
  • Untangle all components that rely on state
  • Accounts
  • Saving chats
  • MongoDB hosting

Suggestions

  1. Dependency Injection: — Investigated
  • The MedicalHistoryManager could use a more formal DI pattern
  • Consider using FastAPI's dependency injection more extensively
  1. Configuration Management: — Half done
  • Magic numbers and constants should be moved to a central config file
  • Environment variables should be validated at startup
  1. Error Handling:
  • Need more specific exception types instead of generic Exception
  • Should have consistent error handling patterns across modules
  1. Service Layer Separation:
  • Business logic in MedicalHistoryManager could be split into separate services
  • Summary generation could be its own service class
  1. Interface Definitions:
  • Missing clear interface definitions for major components
  • Should define abstract base classes for key services
  1. Testing Structure:
  • No clear separation of unit vs integration tests
  • Missing test fixtures and mocks
  1. Logging Strategy: — Done
  • Inconsistent logging levels across components
  • Missing structured logging format definition
  1. Type Hints:
  • Some function parameters missing type hints
  • Return types could be more specific using TypeVar
  1. Documentation:
  • Missing detailed API documentation
  • Inconsistent docstring formats
  1. State Management:
  • Global state in MedicalState could be improved
  • Session management could be more robust

PHASE 2:

  • EMR enhancement
  • Naive RAG integration
  • Chat history consistency
  • Summary history to EMR

PHASE 3:

  • Multimodal integration
  • Reasoning orchestrator
  • Dynamic/Tree/Graph RAG
  • Integrate specialist model

PHASE 4:

  • Multimodal validation
  • Orchestrator validation
  • RAG validation
  • UI Enhancement
  • Future suggestions