Activity Get#
- class src.openCHA.tasks.affect.activity_get.ActivityGet(*, name: str = 'affect_activity_get', chat_name: str = 'AffectActivityGet', description: str = 'Gathers physical activity data for a patient over a certain period.', dependencies: List[str] = [], inputs: List[str] = ['user ID in string. It can be refered as user, patient, individual, etc. The input format should be: par_<user_id> for example for user 1 it will be par_1.', "start date of the physical activity data with the following format: '%Y-%m-%d'", "end date of the physical activity data with the following format: '%Y-%m-%d'."], outputs: List[str] = ['returns an array of json objects which contains the following keys:\n**steps_count**: is the total number of steps registered during the day.\n**rest_time**: is the time (in minutes) during the day spent resting, i.e. sleeping or lying down.', '\n**inactive_time**: is the time (in minutes) during the day spent resting, i.e. sitting or standing still.', '\n**low_acitivity_time** is the (in minutes) during the day with low intensity activity (e.g. household work).', '\n**medimum_acitivity_time** is the (in minutes) during the day with medium intensity activity (e.g. walking).', '\n**high_acitivity_time** is the (in minutes) during the day with high intensity activity (e.g. running).'], datapipe: DataPipe = None, output_type: bool = True, return_direct: bool = False, file_name: str = 'activity.csv', device_name: str = 'oura', local_dir: str = 'data/affect', columns_to_keep: List[str] = ['date', 'steps', 'rest', 'inactive', 'low', 'medium', 'high'], columns_revised: List[str] = ['date', 'steps_count', 'rest_time', 'inactive_time', 'low_acitivity_time', 'medimum_acitivity_time', 'high_acitivity_time'])[source]#
Description:
This tasks gets activity affect data for specific patient.
- _execute(inputs: List[Any] = None) str [source]#
Abstract method representing the execution of the task. You should implement this method based on your need. This method is called by the execute method that provides the parsed inputs to this method.
- Parameters:
inputs (List[Any]) – Input data for the task.
- Returns:
Result of the task execution.
- Return type:
str
- Raises:
NotImplementedError – Subclasses must implement the execute method.