health_plan.py 626 B

1234567891011121314151617181920212223
  1. from pydantic import BaseModel
  2. from typing import Optional, List
  3. class HealthPlanGenerateRequest(BaseModel):
  4. member_ids: Optional[str] = None
  5. dimensions: Optional[str] = None
  6. goal: str = ""
  7. family_id: Optional[int] = None
  8. class HealthPlanSection(BaseModel):
  9. key: str # "nutrition" | "diet" | "exercise"
  10. title: str
  11. content: str # markdown text
  12. items: List[dict] = [] # structured items for UI rendering
  13. class HealthPlanResponse(BaseModel):
  14. overview: str = ""
  15. sections: List[HealthPlanSection] = []
  16. abnormal_indicators: List[dict] = []
  17. knowledge_sources: List[dict] = []