EEG study serves its ADOS-2 association rows; TEA gate as roundtrips

This commit is contained in:
Roberto Treviño
2026-11-28 21:28:38 -06:00
parent f6e8b09dd0
commit d8d834f308
3 changed files with 109 additions and 17 deletions
+22
View File
@@ -38,12 +38,34 @@ class Metric(BaseModel):
electrodes: list[Site] = []
class Relation(BaseModel):
"""One pair of the champion EEG–ADOS-2 association, for this EEG (models.tea.association)."""
biomarker: str
metric: str
zone: str
outcome_code: str # ados2_item_NN or CSS
kind: str # item or domain
event: str # what counts as altered (>=1 for an item, >=8 for the CSS)
z: float
probability: float
reference_probability: float # a child of her age and module with z = 0
observed: float | None = None # what her ADOS-2 shows: the item's score, or the CSS
odds_ratio: float
ci_low: float | None
ci_high: float | None
q: float | None
n: float
model: str
class Analysis(BaseModel):
id: str
valid: bool | None
level: str | None
age_months: float | None
metrics: list[Metric]
relation: list[Relation] = []
@router.get("")