Data Interfaces#

ai_cdss.models:

This module defines the main data validation interfaces for the Clinical Decision Support System (CDSS). Each class represents a structured Pandera schema used to validate key data inputs and outputs in the pipeline, including:

  • Session-level data (e.g., patient demographics, protocol metadata, adherence, performance)

  • Time series records (e.g., difficulty modulator and performance estimates across a session)

  • Patient Protocol Fit scores between patients and protocols.

  • Protocol Similarity scores pairwise protocol similarity based on protocol attributes.

  • Recommendation outputs (e.g., protocol assignment scores and therapeutic parameters)

The schemas enforce strict typing and constraints to ensure data consistency throughout the system. All schemas inherit from pandera.DataFrameModel and are used both for runtime validation and structured documentation.

SessionSchema

Schema for RGS session-level data, including patient profile, prescription and session details.

TimeseriesSchema

Schema for timeseries session data. Includes measurements per-second of difficulty modulators (DM) and performance estimates (PE).

PPFSchema

Schema for Patient-Protocol Fit (PPF) data. Represents how well a protocol fits a patient, including a PPF score and feature contributions.

PCMSchema

Schema for protocol similarity matrix. Include pairwise similarity scores between protocols based on clinical domain overlap.

ScoringSchema

Schema for prescription scoring output. Represents the result of a recommendation.