Files
PTSRaiAgent/config
ElebobaandClaude Opus 5.5 251f946691
CI / ruff · pytest (pull_request) Successful in 1m3s
feat(backend): demo scheduler on the virtual clock — doses, missed, check-ins, scales, silence
- app/scheduler/demo.py: run_until(now) replays due and fresh events in time order: dose rows +
  med_reminder, missed after 2 h without an answer → monitoring, daily_checkin, scale_due by the
  config/modules.yaml schedules, daily monitoring pass (silence, missed doses) → reach_out/scale_due
- idempotent via scheduler_events (unique token+key); stale events are not sent; no contact without
  consent or during an open crisis
- config/scheduler.yaml: times and windows; runs while the questionnaire release is off
- POST /demo/clock/advance replays the scheduler up to the new time

Refs #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 03:25:44 +03:00
..

config/

Конфигурация клинической логики (ADR-008). Схемы задаёт зона core, значения утверждает психиатр (clinical).

  • scales/ — шкалы: пункты, варианты, градации, флаги
  • rules.yaml — правила алертов и действий
  • modules.yaml — модули и расписания шкал
  • lexicon/risk_ru.yaml — лексикон риска
  • texts/ — тексты для пациента (кризисный скрипт, согласие, перефразировки)