ai_cdss.DataLoader#

class ai_cdss.DataLoader(rgs_mode='plus')[source]#

Loads data from database and CSV files.

Parameters:
rgs_modestr, optional

Mode for fetching RGS data. Default is “plus”.

Methods

load_patient_clinical_data(patient_list)

Load patient clinical data from the RGS interface.

load_ppf_data(patient_list)

Load PPF (precomputed patient-protocol fit) from internal data.

load_protocol_similarity()

Load protocol similarity data from internal storage.

load_session_data(patient_list)

Load session data from the RGS interface.

load_timeseries_data(patient_list)

Load timeseries data from the RGS interface.

load_patient_subscales

load_protocol_attributes

load_protocol_init

load_session_data(patient_list)[source]#

Load session data from the RGS interface. New patients without prescriptions are not included in this table

Return type:

DataFrame[SessionSchema]

Returns:
DataFrame[SessionSchema]

Session data for the specified patients.

load_timeseries_data(patient_list)[source]#

Load timeseries data from the RGS interface. New patients without prescriptions are not included in this table

Return type:

DataFrame[TimeseriesSchema]

Returns:
DataFrame[TimeseriesSchema]

Timeseries data for the specified patients.

load_ppf_data(patient_list)[source]#

Load PPF (precomputed patient-protocol fit) from internal data.

Return type:

DataFrame[PPFSchema]

Returns:
DataFrame[PPFSchema]

PPF data indexed by PROTOCOL_ID.

load_patient_clinical_data(patient_list)[source]#

Load patient clinical data from the RGS interface.

Return type:

DataFrame

Parameters:
patient_listList[int]

List of patient IDs to fetch clinical data for.

Returns:
pd.DataFrame

DataFrame containing clinical data for the specified patients.

load_protocol_similarity()[source]#

Load protocol similarity data from internal storage.

Return type:

DataFrame[PCMSchema]

Returns:
DataFrame[ProtocolSimilaritySchema]

Protocol similarity data with columns: PROTOCOL_ID_1, PROTOCOL_ID_2, SIMILARITY_SCORE.