pycpshealthcare.db package
Subpackages
- pycpshealthcare.db.Chronotype package
- Submodules
- pycpshealthcare.db.Chronotype.functions module
- pycpshealthcare.db.Chronotype.study module
ChronotypeStudy
ChronotypeStudy.get_activitymodule_results()
ChronotypeStudy.get_activitymodule_results_grouped()
ChronotypeStudy.get_corepill_results()
ChronotypeStudy.get_corepill_results_grouped()
ChronotypeStudy.get_equivital_results()
ChronotypeStudy.get_equivital_results_grouped()
ChronotypeStudy.get_oscar_results()
ChronotypeStudy.get_oscar_results_grouped()
ChronotypeStudy.get_salivette_results()
ChronotypeStudy.get_salivette_results_grouped()
ChronotypeStudy.get_sunsprite_results()
ChronotypeStudy.get_sunsprite_results_grouped()
ChronotypeStudy.get_survey_data_results()
value()
- pycpshealthcare.db.Chronotype.participant_study module
ChronotypeStudyOcurrence
ChronotypeStudyOcurrence.get_activitymodule_results()
ChronotypeStudyOcurrence.get_activitymodule_results_grouped()
ChronotypeStudyOcurrence.get_corepill_results()
ChronotypeStudyOcurrence.get_corepill_results_grouped()
ChronotypeStudyOcurrence.get_equivital_results()
ChronotypeStudyOcurrence.get_equivital_results_grouped()
ChronotypeStudyOcurrence.get_oscar_results()
ChronotypeStudyOcurrence.get_oscar_results_grouped()
ChronotypeStudyOcurrence.get_salivette_results()
ChronotypeStudyOcurrence.get_salivette_results_grouped()
ChronotypeStudyOcurrence.get_sunsprite_results()
ChronotypeStudyOcurrence.get_sunsprite_results_grouped()
ChronotypeStudyOcurrence.get_survey_data_results()
ParticipantChronotypeStudiesGroup
ParticipantChronotypeStudiesGroup.get_activitymodule_results()
ParticipantChronotypeStudiesGroup.get_activitymodule_results_grouped()
ParticipantChronotypeStudiesGroup.get_corepill_results()
ParticipantChronotypeStudiesGroup.get_corepill_results_grouped()
ParticipantChronotypeStudiesGroup.get_equivital_results()
ParticipantChronotypeStudiesGroup.get_equivital_results_grouped()
ParticipantChronotypeStudiesGroup.get_oscar_results()
ParticipantChronotypeStudiesGroup.get_oscar_results_grouped()
ParticipantChronotypeStudiesGroup.get_salivette_results()
ParticipantChronotypeStudiesGroup.get_salivette_results_grouped()
ParticipantChronotypeStudiesGroup.get_sunsprite_results()
ParticipantChronotypeStudiesGroup.get_sunsprite_results_grouped()
ParticipantChronotypeStudiesGroup.get_survey_data_results()
ParticipantChronotypeStudiesGroup.get_test_instance()
value()
- pycpshealthcare.db.Pancreas package
- Submodules
- pycpshealthcare.db.Pancreas.functions module
- pycpshealthcare.db.Pancreas.study module
PancreasStudy
PancreasStudy.get_empatica_accel_vector_magnitude()
PancreasStudy.get_empatica_accel_vector_magnitude_grouped()
PancreasStudy.get_empatica_results()
PancreasStudy.get_empatica_results_grouped()
PancreasStudy.get_equivital_results()
PancreasStudy.get_equivital_results_grouped()
PancreasStudy.get_fitbit_results()
PancreasStudy.get_fitbit_results_grouped()
PancreasStudy.get_fitnesspal_ejercicio_results()
PancreasStudy.get_fitnesspal_ejercicio_results_grouped()
PancreasStudy.get_fitnesspal_nutricion_results()
PancreasStudy.get_fitnesspal_nutricion_results_grouped()
PancreasStudy.get_guardian_results()
PancreasStudy.get_guardian_results_grouped()
PancreasStudy.get_oscar_results()
PancreasStudy.get_oscar_results_grouped()
value()
- pycpshealthcare.db.Pancreas.participant_study module
PancreasStudyOcurrence
PancreasStudyOcurrence.get_empatica_accel_vector_magnitude()
PancreasStudyOcurrence.get_empatica_results()
PancreasStudyOcurrence.get_empatica_results_grouped()
PancreasStudyOcurrence.get_equivital_results()
PancreasStudyOcurrence.get_equivital_results_grouped()
PancreasStudyOcurrence.get_fitbit_results()
PancreasStudyOcurrence.get_fitbit_results_grouped()
PancreasStudyOcurrence.get_fitnesspal_ejercicio_results()
PancreasStudyOcurrence.get_fitnesspal_ejercicio_results_grouped()
PancreasStudyOcurrence.get_fitnesspal_nutricion_results()
PancreasStudyOcurrence.get_fitnesspal_nutricion_results_grouped()
PancreasStudyOcurrence.get_guardian_results()
PancreasStudyOcurrence.get_guardian_results_grouped()
PancreasStudyOcurrence.get_oscar_results()
PancreasStudyOcurrence.get_oscar_results_grouped()
ParticipantPancreasStudiesGroup
ParticipantPancreasStudiesGroup.get_empatica_results()
ParticipantPancreasStudiesGroup.get_empatica_results_grouped()
ParticipantPancreasStudiesGroup.get_equivital_results()
ParticipantPancreasStudiesGroup.get_equivital_results_grouped()
ParticipantPancreasStudiesGroup.get_fitbit_results()
ParticipantPancreasStudiesGroup.get_fitbit_results_grouped()
ParticipantPancreasStudiesGroup.get_fitnesspal_ejercicio_results()
ParticipantPancreasStudiesGroup.get_fitnesspal_ejercicio_results_grouped()
ParticipantPancreasStudiesGroup.get_fitnesspal_nutricion_results()
ParticipantPancreasStudiesGroup.get_fitnesspal_nutricion_results_grouped()
ParticipantPancreasStudiesGroup.get_guardian_results()
ParticipantPancreasStudiesGroup.get_guardian_results_grouped()
ParticipantPancreasStudiesGroup.get_oscar_results()
ParticipantPancreasStudiesGroup.get_oscar_results_grouped()
ParticipantPancreasStudiesGroup.get_test_instance()
value()
- pycpshealthcare.db.MealTracker package
- Submodules
- pycpshealthcare.db.MealTracker.functions module
- pycpshealthcare.db.MealTracker.study module
- pycpshealthcare.db.MealTracker.participant_study module
MealTrackerStudyOcurrence
ParticipantMealTrackerStudiesGroup
ParticipantMealTrackerStudiesGroup.get_fitbit_at_meals()
ParticipantMealTrackerStudiesGroup.get_fitbit_at_meals_grouped()
ParticipantMealTrackerStudiesGroup.get_fitbit_results()
ParticipantMealTrackerStudiesGroup.get_fitbit_results_grouped()
ParticipantMealTrackerStudiesGroup.get_meals_results()
ParticipantMealTrackerStudiesGroup.get_test_instance()
- pycpshealthcare.db.Marcoleta package
- Submodules
- pycpshealthcare.db.Marcoleta.functions module
- pycpshealthcare.db.Marcoleta.study module
MarcoletaStudy
MarcoletaStudy.get_autoreports_results()
MarcoletaStudy.get_autoreports_results_grouped()
MarcoletaStudy.get_fitbit_v2_metadata_results()
MarcoletaStudy.get_fitbit_v2_results()
MarcoletaStudy.get_fitbit_v2_results_grouped()
MarcoletaStudy.get_holter_results()
MarcoletaStudy.get_holter_results_grouped()
value()
- pycpshealthcare.db.Marcoleta.participant_study module
MarcoletaStudyOcurrence
MarcoletaStudyOcurrence.get_autoreports_results()
MarcoletaStudyOcurrence.get_fitbit_v2_metadata_results()
MarcoletaStudyOcurrence.get_fitbit_v2_results()
MarcoletaStudyOcurrence.get_fitbit_v2_results_grouped()
MarcoletaStudyOcurrence.get_holter_results()
MarcoletaStudyOcurrence.get_holter_results_grouped()
ParticipantMarcoletaStudiesGroup
ParticipantMarcoletaStudiesGroup.get_autoreports_results()
ParticipantMarcoletaStudiesGroup.get_fitbit_v2_metadata_results()
ParticipantMarcoletaStudiesGroup.get_fitbit_v2_results()
ParticipantMarcoletaStudiesGroup.get_fitbit_v2_results_grouped()
ParticipantMarcoletaStudiesGroup.get_holter_results()
ParticipantMarcoletaStudiesGroup.get_holter_results_grouped()
ParticipantMarcoletaStudiesGroup.get_test_instance()
value()
- pycpshealthcare.db.SanPedro package
- Submodules
- pycpshealthcare.db.SanPedro.functions module
- pycpshealthcare.db.SanPedro.study module
SanPedroStudy
SanPedroStudy.get_alimentacion_results()
SanPedroStudy.get_alimentacion_results_grouped()
SanPedroStudy.get_fitbit_results()
SanPedroStudy.get_fitbit_results_grouped()
SanPedroStudy.get_fitbit_v2_metadata_results()
SanPedroStudy.get_fitbit_v2_results()
SanPedroStudy.get_fitbit_v2_results_grouped()
SanPedroStudy.get_freestyle_librelink_results()
SanPedroStudy.get_freestyle_librelink_results_grouped()
SanPedroStudy.get_holter_results()
SanPedroStudy.get_holter_results_grouped()
SanPedroStudy.get_inbody_results()
SanPedroStudy.get_inbody_results_grouped()
SanPedroStudy.get_patrones_minsal_2018_results()
SanPedroStudy.get_patrones_minsal_2018_results_grouped()
value()
- pycpshealthcare.db.SanPedro.participant_study module
ParticipantSanPedroStudiesGroup
ParticipantSanPedroStudiesGroup.get_alimentacion_results()
ParticipantSanPedroStudiesGroup.get_alimentacion_results_grouped()
ParticipantSanPedroStudiesGroup.get_fitbit_results()
ParticipantSanPedroStudiesGroup.get_fitbit_results_grouped()
ParticipantSanPedroStudiesGroup.get_fitbit_v2_metadata_results()
ParticipantSanPedroStudiesGroup.get_fitbit_v2_results()
ParticipantSanPedroStudiesGroup.get_fitbit_v2_results_grouped()
ParticipantSanPedroStudiesGroup.get_freestyle_librelink_results()
ParticipantSanPedroStudiesGroup.get_freestyle_librelink_results_grouped()
ParticipantSanPedroStudiesGroup.get_holter_results()
ParticipantSanPedroStudiesGroup.get_holter_results_grouped()
ParticipantSanPedroStudiesGroup.get_inbody_results()
ParticipantSanPedroStudiesGroup.get_inbody_results_grouped()
ParticipantSanPedroStudiesGroup.get_patrones_minsal_2018_results()
ParticipantSanPedroStudiesGroup.get_patrones_minsal_2018_results_grouped()
ParticipantSanPedroStudiesGroup.get_test_instance()
SanPedroStudyOcurrence
SanPedroStudyOcurrence.get_alimentacion_results()
SanPedroStudyOcurrence.get_alimentacion_results_grouped()
SanPedroStudyOcurrence.get_fitbit_results()
SanPedroStudyOcurrence.get_fitbit_results_grouped()
SanPedroStudyOcurrence.get_fitbit_v2_metadata_results()
SanPedroStudyOcurrence.get_fitbit_v2_results()
SanPedroStudyOcurrence.get_fitbit_v2_results_grouped()
SanPedroStudyOcurrence.get_freestyle_librelink_results()
SanPedroStudyOcurrence.get_freestyle_librelink_results_grouped()
SanPedroStudyOcurrence.get_holter_results()
SanPedroStudyOcurrence.get_holter_results_grouped()
SanPedroStudyOcurrence.get_inbody_results()
SanPedroStudyOcurrence.get_inbody_results_grouped()
SanPedroStudyOcurrence.get_patrones_minsal_2018_results()
SanPedroStudyOcurrence.get_patrones_minsal_2018_results_grouped()
value()
- pycpshealthcare.db.ChronoNevado package
- Submodules
- pycpshealthcare.db.ChronoNevado.functions module
- pycpshealthcare.db.ChronoNevado.study module
ChronoNevadoStudy
ChronoNevadoStudy.get_cpet_environment_data()
ChronoNevadoStudy.get_cpet_environment_data_grouped()
ChronoNevadoStudy.get_cpet_participant_data()
ChronoNevadoStudy.get_cpet_participant_data_grouped()
ChronoNevadoStudy.get_cpet_raw_data()
ChronoNevadoStudy.get_cpet_raw_data_grouped()
ChronoNevadoStudy.get_cpet_test_data()
ChronoNevadoStudy.get_cpet_test_data_grouped()
ChronoNevadoStudy.get_finapres_data()
ChronoNevadoStudy.get_finapres_data_grouped()
ChronoNevadoStudy.get_finapres_raw_data()
ChronoNevadoStudy.get_finapres_raw_data_grouped()
ChronoNevadoStudy.get_spo2_raw_data()
ChronoNevadoStudy.get_spo2_raw_data_grouped()
value()
- pycpshealthcare.db.ChronoNevado.participant_study module
ChronoNevadoStudyOcurrence
ChronoNevadoStudyOcurrence.get_cpet_environment_data()
ChronoNevadoStudyOcurrence.get_cpet_environment_data_grouped()
ChronoNevadoStudyOcurrence.get_cpet_participant_data()
ChronoNevadoStudyOcurrence.get_cpet_participant_data_grouped()
ChronoNevadoStudyOcurrence.get_cpet_raw_data()
ChronoNevadoStudyOcurrence.get_cpet_raw_data_grouped()
ChronoNevadoStudyOcurrence.get_cpet_test_data()
ChronoNevadoStudyOcurrence.get_cpet_test_data_grouped()
ChronoNevadoStudyOcurrence.get_finapres_data()
ChronoNevadoStudyOcurrence.get_finapres_data_grouped()
ChronoNevadoStudyOcurrence.get_finapres_raw_data()
ChronoNevadoStudyOcurrence.get_finapres_raw_data_grouped()
ChronoNevadoStudyOcurrence.get_spo2_raw_data()
ChronoNevadoStudyOcurrence.get_spo2_raw_data_grouped()
ParticipantChronoNevadoStudiesGroup
ParticipantChronoNevadoStudiesGroup.get_cpet_environment_data()
ParticipantChronoNevadoStudiesGroup.get_cpet_environment_data_grouped()
ParticipantChronoNevadoStudiesGroup.get_cpet_participant_data()
ParticipantChronoNevadoStudiesGroup.get_cpet_participant_data_grouped()
ParticipantChronoNevadoStudiesGroup.get_cpet_raw_data()
ParticipantChronoNevadoStudiesGroup.get_cpet_raw_data_grouped()
ParticipantChronoNevadoStudiesGroup.get_cpet_test_data()
ParticipantChronoNevadoStudiesGroup.get_cpet_test_data_grouped()
ParticipantChronoNevadoStudiesGroup.get_finapres_data()
ParticipantChronoNevadoStudiesGroup.get_finapres_data_grouped()
ParticipantChronoNevadoStudiesGroup.get_finapres_raw_data()
ParticipantChronoNevadoStudiesGroup.get_finapres_raw_data_grouped()
ParticipantChronoNevadoStudiesGroup.get_spo2_raw_data()
ParticipantChronoNevadoStudiesGroup.get_spo2_raw_data_grouped()
ParticipantChronoNevadoStudiesGroup.get_test_instance()
value()
Submodules
pycpshealthcare.db.connectors module
Submodule for managing MongoDB connection, dabases and connections.
- class pycpshealthcare.db.connectors.CpsConnection(connection_uri=None, host=None, username=None, password=None, port=None, database_names={'ChronoNevado': 'ChronoNevado', 'Chronotype': 'Chronotype', 'GlobalInfo': 'GlobalInfo', 'Marcoleta': 'Marcoleta', 'MealTracker': 'MealTrackerV2', 'Pancreas': 'Pancreas', 'SanPedro': 'SanPedro'}, tzinfo=None)[source]
Bases:
object
A class that manages the MongoDB client, databases and collections.
- Parameters:
connection_uri (str, optional) – The full MongoDB connection uri. Not needed if host, username and password are passed.
host (str, optional) – Database host. Not needed if connection_uri is passed.
username (str, optional) – Database username. Not needed if connection_uri is passed.
password (str, optional) – Database password. Not needed if connection_uri is passed.
port (str|int, optional) – Database port. Not needed if connection_uri is passed.
database_names (dict, optional) – Database dict that maps pycpshealthcare studies names to databases names, defaults to { “mealtracker”: “MealTracker”, “pancreas”: “Pancreas”, “globalinfo”: “GlobalInfo”, “sanpedro”: “SanPedro”, “marcoleta”: “Marcoleta”, “chrononevado”: “ChronoNevado”}
tzinfo (pytz.Timezone, optional) – Timezone for results, defaults to pytz.UTC.
Example with connection_uri:
connection = CpsConnection(uri="mongodb://user:pass@localhost:27017")
Example without connection_uri:
connection = CpsConnection(username="user", password="pass", host="localhost", port="27017")
pycpshealthcare.db.cps_exceptions module
pycpshealthcare.db.participant module
- class pycpshealthcare.db.participant.Participant(raw_data, connection)[source]
Bases:
object
A class for representing a GlobalInfo.ParticipantInfo MongoDB document as a Python object. Contains ParticipantStudiesGroup family instances for each of the studies.
- Parameters:
raw_data (dict) – A MongoDB document as a dictionary.
connection (pycpshealthcare.db.connector.CpsConnection) – A pycpshealthcare.db.connector.CpsConnection instance.
pycpshealthcare.db.participant_info module
pycpshealthcare.db.results module
pycpshealthcare.db.utils module
- pycpshealthcare.db.utils.generate_narray_pipeline(id_match, bin_size=60, bin_unit='minute', timestamp_start=None, timestamp_end=None, types=[])[source]