"""Import schema for `core.tea.models.Eeg`: the study, its EDF and what the EEG analysis writes back (sleep, channels, duration and the five quality criteria).""" from typing import Optional from webapi.imports.schemas.base import ImportSchema from webapi.imports.schemas.coercion import Bounded, EdfFile, FlexDate, OptionalStr, SourceId _CHANNELS = Bounded(int, 0, None) class EegImportSchema(ImportSchema): # The source's own id, kept so the metrics that reference it still point at this record. eeg_id: SourceId = None eeg_pac_id: Optional[int] = None eeg_ord_id: OptionalStr = None eeg_id_registro_laboratorio: OptionalStr = None eeg_fecha_estudio: FlexDate = None eeg_con_sueno: Bounded(int, 0, 1) = None eeg_canales: Bounded(int, 1, 256) = None eeg_duracion_min: Bounded(float, 0, None) = None eeg_canales_amplitud: _CHANNELS = None eeg_canales_alta_frecuencia: _CHANNELS = None eeg_canales_correlacion: _CHANNELS = None eeg_canales_sin_senal: _CHANNELS = None eeg_ruido_linea_db: Bounded(float, 0, None) = None eeg_estudio: EdfFile = None