From 560fa99d5aa0a34097e109b4614b37e9e2d00020 Mon Sep 17 00:00:00 2001 From: Evan8456 Date: Wed, 24 Apr 2024 15:40:24 -0400 Subject: [PATCH] updated demographics.py to have more repeated instruments --- src/b2aiprep/demographics.py | 50 +++- src/b2aiprep/resources/adhd.json | 22 ++ .../resources/custom_affect_scale.json | 17 ++ src/b2aiprep/resources/dsm5.json | 42 ++++ src/b2aiprep/resources/dyspnea.json | 14 ++ src/b2aiprep/resources/leicester_cough.json | 23 ++ src/b2aiprep/resources/panas.json | 14 ++ src/b2aiprep/resources/ptsd.json | 14 ++ src/b2aiprep/resources/random.json | 6 + src/b2aiprep/resources/stroop.json | 50 ++++ src/b2aiprep/resources/vhi10.json | 14 ++ src/b2aiprep/resources/vocab.json | 17 ++ src/b2aiprep/resources/voice_perception.json | 5 + .../resources/voice_problem_severity.json | 5 + src/b2aiprep/resources/winograd.json | 220 ++++++++++++++++++ 15 files changed, 510 insertions(+), 3 deletions(-) create mode 100644 src/b2aiprep/resources/adhd.json create mode 100644 src/b2aiprep/resources/custom_affect_scale.json create mode 100644 src/b2aiprep/resources/dsm5.json create mode 100644 src/b2aiprep/resources/dyspnea.json create mode 100644 src/b2aiprep/resources/leicester_cough.json create mode 100644 src/b2aiprep/resources/panas.json create mode 100644 src/b2aiprep/resources/ptsd.json create mode 100644 src/b2aiprep/resources/random.json create mode 100644 src/b2aiprep/resources/stroop.json create mode 100644 src/b2aiprep/resources/vhi10.json create mode 100644 src/b2aiprep/resources/vocab.json create mode 100644 src/b2aiprep/resources/voice_perception.json create mode 100644 src/b2aiprep/resources/voice_problem_severity.json create mode 100644 src/b2aiprep/resources/winograd.json diff --git a/src/b2aiprep/demographics.py b/src/b2aiprep/demographics.py index 4ab56f6..49a78ab 100644 --- a/src/b2aiprep/demographics.py +++ b/src/b2aiprep/demographics.py @@ -62,14 +62,43 @@ def load_data_columns() -> Dict[str, List[str]]: gad7_columns = json.loads(b2ai_resources.joinpath("resources", "gad7.json").read_text()) participant_columns = json.loads(b2ai_resources.joinpath("resources", "participant.json").read_text()) phq9_columns = json.loads(b2ai_resources.joinpath("resources", "phq9.json").read_text()) - + voice_perception_columns = json.loads(b2ai_resources.joinpath("resources", "voice_perception.json").read_text()) + vhi10_columns = json.loads(b2ai_resources.joinpath("resources", "vhi10.json").read_text()) + panas_columns = json.loads(b2ai_resources.joinpath("resources", "panas.json").read_text()) + custom_affect_scale_columns = json.loads(b2ai_resources.joinpath("resources", "custom_affect_scale.json").read_text()) + dsm5_columns = json.loads(b2ai_resources.joinpath("resources", "dsm5.json").read_text()) + ptsd_columns = json.loads(b2ai_resources.joinpath("resources", "ptsd.json").read_text()) + adhd_columns = json.loads(b2ai_resources.joinpath("resources", "adhd.json").read_text()) + dyspnea_columns = json.loads(b2ai_resources.joinpath("resources", "dyspnea.json").read_text()) + dyspnea_columns = json.loads(b2ai_resources.joinpath("resources", "dyspnea.json").read_text()) + leicester_cough_columns = json.loads(b2ai_resources.joinpath("resources", "leicester_cough.json").read_text()) + voice_problem_severity_columns = json.loads(b2ai_resources.joinpath("resources", "voice_problem_severity.json").read_text()) + winograd_columns = json.loads(b2ai_resources.joinpath("resources", "winograd.json").read_text()) + stroop_columns = json.loads(b2ai_resources.joinpath("resources", "stroop.json").read_text()) + vocab_columns = json.loads(b2ai_resources.joinpath("resources", "vocab.json").read_text()) + random_columns = json.loads(b2ai_resources.joinpath("resources", "random.json").read_text()) + data_columns = { 'columns': columns, 'participant_columns': participant_columns, 'demographics_columns': demographics_columns, 'confounders_columns': confounders_columns, 'phq9_columns': phq9_columns, - 'gad7_columns': gad7_columns + 'gad7_columns': gad7_columns, + 'voice_perception_columns': voice_perception_columns, + 'vhi10_columns': vhi10_columns, + 'panas_columns': panas_columns, + "custom_affect_scale_columns": custom_affect_scale_columns, + "dsm5_columns" : dsm5_columns, + "ptsd_columns" : ptsd_columns, + "adhd_columns" : adhd_columns, + "dyspnea_columns": dyspnea_columns, + "leicester_cough_columns": leicester_cough_columns, + "voice_problem_severity_columns": voice_problem_severity_columns, + 'winograd_columns': winograd_columns, + "stroop_columns" : stroop_columns, + "vocab_columns" : vocab_columns, + "random_columns" : random_columns } return data_columns @@ -81,7 +110,22 @@ def get_columns_of_repeat_instrument(repeat_instrument: RepeatInstrument) -> Lis RepeatInstrument.GENERIC_DEMOGRAPHICS: 'demographics_columns', RepeatInstrument.GENERIC_CONFOUNDERS: 'confounders_columns', RepeatInstrument.GENERIC_PHQ9_DEPRESSION: 'phq9_columns', - RepeatInstrument.GENERIC_GAD7_ANXIETY: 'gad7_columns' + RepeatInstrument.GENERIC_GAD7_ANXIETY: 'gad7_columns', + RepeatInstrument.GENERIC_VOICE_PERCEPTION: 'voice_perception_columns', + RepeatInstrument.GENERIC_VOICE_HANDICAP: 'vhi10_columns', + RepeatInstrument.MOOD_PANAS: 'panas_columns', + RepeatInstrument.MOOD_CUSTOM_AFFECT: 'custom_affect_scale_columns', + RepeatInstrument.MOOD_DSM5_ADULT: 'dsm5_columns', + RepeatInstrument.MOOD_PTSD_ADULT: 'ptsd_columns', + RepeatInstrument.MOOD_ADHD_ADULT: 'adhd_columns', + RepeatInstrument.RESP_DYSPNEA_INDEX: 'dyspnea_columns', + RepeatInstrument.RESP_LEICESTER_COUGH: 'leicester_cough_columns', + RepeatInstrument.VOICE_VOICE_PROBLEM_SEVERITY: 'voice_problem_severity_columns', + RepeatInstrument.NEURO_WINOGRAD_SCHEMAS: 'winograd_columns', + RepeatInstrument.NEURO_WORDCOLOR_STROOP: 'stroop_columns', + RepeatInstrument.NEURO_PRODUCTIVE_VOCABULARY : 'vocab_columns', + RepeatInstrument.NEURO_RANDOM_ITEM_GENERATION : 'random_columns' + } repeat_instrument_prefix_mapping = { diff --git a/src/b2aiprep/resources/adhd.json b/src/b2aiprep/resources/adhd.json new file mode 100644 index 0000000..53da83d --- /dev/null +++ b/src/b2aiprep/resources/adhd.json @@ -0,0 +1,22 @@ +[ + "adhd_session_id", + "adhd_duration", + "wrapping_up", + "things_in_order", + "remembering_appt", + "avoidance", + "fidget", + "overly_active", + "careless", + "difficulty_attention", + "difficulty_concentrating", + "misplace", + "distracted", + "remain_seated", + "restless", + "difficulty_unwinding", + "talking_too_much", + "finish_other_sent", + "difficulty_waiting", + "interrupt_others" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/custom_affect_scale.json b/src/b2aiprep/resources/custom_affect_scale.json new file mode 100644 index 0000000..9172099 --- /dev/null +++ b/src/b2aiprep/resources/custom_affect_scale.json @@ -0,0 +1,17 @@ +[ + "custom_affect_scale_session_id", + "custom_affect_scale_duration", + "sad_or_down", + "joyful", + "motivated", + "lack_of_pleasure", + "tired", + "energetic", + "agitated", + "irritated", + "lonely", + "concentrated", + "relaxed", + "worried", + "desire_to_escape" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/dsm5.json b/src/b2aiprep/resources/dsm5.json new file mode 100644 index 0000000..92211e6 --- /dev/null +++ b/src/b2aiprep/resources/dsm5.json @@ -0,0 +1,42 @@ +[ + "dsm_5_session_id", + "dsm_5_duration", + "little_interest", + "feeling_down", + "feeling_more_irritated", + "sleeping_less", + "starting_more_projects", + "feeling_nervous", + "feeling_panic", + "avoiding_situations", + "unexplained_aches", + "illness_not_taken_serious", + "self_harm", + "hearing_things", + "someone_hear_thoughts", + "sleep_quality", + "memory_issues", + "unpleasant_thoughts", + "repeat_acts", + "feeling_detached", + "no_purpose", + "isolated", + "drinking_more", + "smoking_more", + "medication_use", + "q1_happy", + "q2_self_confident", + "q3_sleep", + "q4_talk", + "q5_active", + "social_phobia_1", + "social_phobia_2", + "social_phobia_3", + "social_phobia_4", + "social_phobia_5", + "social_phobia_6", + "social_phobia_7", + "social_phobia_8", + "social_phobia_9", + "social_phobia_10" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/dyspnea.json b/src/b2aiprep/resources/dyspnea.json new file mode 100644 index 0000000..a5d7479 --- /dev/null +++ b/src/b2aiprep/resources/dyspnea.json @@ -0,0 +1,14 @@ +[ + "dyspnea_index_session_id", + "dyspnea_index_duration", + "di_air_in", + "di_tightness_throat", + "di_effort_breathe", + "di_weather_changes", + "di_breathing_worse_stress", + "di_sound_breathing_in", + "di_strain", + "di_exercise", + "di_breathing_stresses_me", + "di_restrict_personal_social_life" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/leicester_cough.json b/src/b2aiprep/resources/leicester_cough.json new file mode 100644 index 0000000..22c5934 --- /dev/null +++ b/src/b2aiprep/resources/leicester_cough.json @@ -0,0 +1,23 @@ +[ + "leicester_cough_session_id", + "leicester_cough_duration", + "lcq_chest_stomach_pains", + "lcq_sputum_phlegm", + "lcq_tired", + "lcq_embarrassed", + "lcq_anxious", + "lcq_interfere_job", + "lcq_interfere_life", + "lcq_exposure_paint", + "lcq_sleep", + "lcq_bout", + "lcq_frustrated", + "lcq_fed_up", + "lcq_hoarse_voice", + "lcq_serious_illness", + "lcq_other_people", + "lcq_interrupt_conversation", + "lcq_partner", + "lcq_felt_in_control", + "lcq_energy" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/panas.json b/src/b2aiprep/resources/panas.json new file mode 100644 index 0000000..cb4fd23 --- /dev/null +++ b/src/b2aiprep/resources/panas.json @@ -0,0 +1,14 @@ +[ + "panas_session_id", + "panas_duration", + "upset", + "hostile", + "alert", + "ashamed", + "inspired", + "nervous", + "determined", + "attentive", + "afraid", + "active" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/ptsd.json b/src/b2aiprep/resources/ptsd.json new file mode 100644 index 0000000..181be1b --- /dev/null +++ b/src/b2aiprep/resources/ptsd.json @@ -0,0 +1,14 @@ +[ + "ptsd_session_id", + "ptsd_duration", + "traumatic_event", + "flashbacks", + "emotionally_upset", + "avoiding_reminders", + "thinking_stressful_event", + "neg_emotional_state", + "losing_interest", + "super_alert", + "feeling_jumpy", + "irritable" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/random.json b/src/b2aiprep/resources/random.json new file mode 100644 index 0000000..e45901b --- /dev/null +++ b/src/b2aiprep/resources/random.json @@ -0,0 +1,6 @@ +[ + "random_session_id", + "random_recording_acoustic_task_id", + "random_duration", + "random_item_generation_category" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/stroop.json b/src/b2aiprep/resources/stroop.json new file mode 100644 index 0000000..61dd81f --- /dev/null +++ b/src/b2aiprep/resources/stroop.json @@ -0,0 +1,50 @@ +[ + "stroop_session_id", + "stroop_recording_acoustic_task_id", + "stroop_duration", + "stroop_item_stimulus_1", + "stroop_item_color_1", + "stroop_item_time_1", + "stroop_item_stimulus_2", + "stroop_item_color_2", + "stroop_item_time_2", + "stroop_item_stimulus_3", + "stroop_item_color_3", + "stroop_item_time_3", + "stroop_item_stimulus_4", + "stroop_item_color_4", + "stroop_item_time_4", + "stroop_item_stimulus_5", + "stroop_item_color_5", + "stroop_item_time_5", + "stroop_item_stimulus_6", + "stroop_item_color_6", + "stroop_item_time_6", + "stroop_item_stimulus_7", + "stroop_item_color_7", + "stroop_item_time_7", + "stroop_item_stimulus_8", + "stroop_item_color_8", + "stroop_item_time_8", + "stroop_item_stimulus_9", + "stroop_item_color_9", + "stroop_item_time_9", + "stroop_item_stimulus_10", + "stroop_item_color_10", + "stroop_item_time_10", + "stroop_item_stimulus_11", + "stroop_item_color_11", + "stroop_item_time_11", + "stroop_item_stimulus_12", + "stroop_item_color_12", + "stroop_item_time_12", + "stroop_item_stimulus_13", + "stroop_item_color_13", + "stroop_item_time_13", + "stroop_item_stimulus_14", + "stroop_item_color_14", + "stroop_item_time_14", + "stroop_item_stimulus_15", + "stroop_item_color_15", + "stroop_item_time_15" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/vhi10.json b/src/b2aiprep/resources/vhi10.json new file mode 100644 index 0000000..ad4bca1 --- /dev/null +++ b/src/b2aiprep/resources/vhi10.json @@ -0,0 +1,14 @@ +[ + "vhi_session_id", + "vhi_duration", + "voice_difficult_hear", + "tough_to_understand", + "voice_restrict_social", + "left_out_convo", + "voice_lose_income", + "strain_voice", + "voice_clarity", + "voice_upsetting", + "voice_handicapped", + "ask_whats_wrong_voice" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/vocab.json b/src/b2aiprep/resources/vocab.json new file mode 100644 index 0000000..70c9379 --- /dev/null +++ b/src/b2aiprep/resources/vocab.json @@ -0,0 +1,17 @@ +[ + "vocabulary_session_id", + "vocabulary_recording_acoustic_task_id", + "vocabulary_duration", + "vocabulary_item_word_1", + "vocabulary_item_difficulty_1", + "vocabulary_item_word_2", + "vocabulary_item_difficulty_2", + "vocabulary_item_word_3", + "vocabulary_item_difficulty_3", + "vocabulary_item_word_4", + "vocabulary_item_difficulty_4", + "vocabulary_item_word_5", + "vocabulary_item_difficulty_5", + "vocabulary_item_word_6", + "vocabulary_item_difficulty_6" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/voice_perception.json b/src/b2aiprep/resources/voice_perception.json new file mode 100644 index 0000000..ad18b6a --- /dev/null +++ b/src/b2aiprep/resources/voice_perception.json @@ -0,0 +1,5 @@ +[ + "voice_perception_session_id", + "voice_perception_duration", + "voice_quality_perception" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/voice_problem_severity.json b/src/b2aiprep/resources/voice_problem_severity.json new file mode 100644 index 0000000..c9edb43 --- /dev/null +++ b/src/b2aiprep/resources/voice_problem_severity.json @@ -0,0 +1,5 @@ +[ + "voice_severity_session_id", + "voice_severity_duration", + "describe_the_severity_of_a" +] \ No newline at end of file diff --git a/src/b2aiprep/resources/winograd.json b/src/b2aiprep/resources/winograd.json new file mode 100644 index 0000000..99fbd30 --- /dev/null +++ b/src/b2aiprep/resources/winograd.json @@ -0,0 +1,220 @@ +[ + "winograd_session_id", + "winograd_duration", + "winograd_score", + "winograd_number_questions", + "winograd_questions_asked", + "winograd_q_1", + "winograd_q_2", + "winograd_q_3", + "winograd_q_4", + "winograd_q_5", + "winograd_q_6", + "winograd_q_7", + "winograd_q_8", + "winograd_q_9", + "winograd_q_10", + "winograd_q_11", + "winograd_q_12", + "winograd_q_13", + "winograd_q_14", + "winograd_q_15", + "winograd_q_16", + "winograd_q_17", + "winograd_q_18", + "winograd_q_19", + "winograd_q_20", + "winograd_q_21", + "winograd_q_22", + "winograd_q_23", + "winograd_q_24", + "winograd_q_25", + "winograd_q_26", + "winograd_q_27", + "winograd_q_28", + "winograd_q_29", + "winograd_q_30", + "winograd_q_31", + "winograd_q_32", + "winograd_q_33", + "winograd_q_34", + "winograd_q_35", + "winograd_q_36", + "winograd_q_37", + "winograd_q_38", + "winograd_q_39", + "winograd_q_40", + "winograd_q_41", + "winograd_q_42", + "winograd_q_43", + "winograd_q_44", + "winograd_q_45", + "winograd_q_46", + "winograd_q_47", + "winograd_q_48", + "winograd_q_49", + "winograd_q_50", + "winograd_q_51", + "winograd_q_52", + "winograd_q_53", + "winograd_q_54", + "winograd_q_55", + "winograd_q_56", + "winograd_q_57", + "winograd_q_58", + "winograd_q_59", + "winograd_q_60", + "winograd_q_61", + "winograd_q_62", + "winograd_q_63", + "winograd_q_64", + "winograd_q_65", + "winograd_q_66", + "winograd_q_67", + "winograd_q_68", + "winograd_q_69", + "winograd_q_70", + "winograd_q_71", + "winograd_q_72", + "winograd_q_73", + "winograd_q_74", + "winograd_q_75", + "winograd_q_76", + "winograd_q_77", + "winograd_q_78", + "winograd_q_79", + "winograd_q_80", + "winograd_q_81", + "winograd_q_82", + "winograd_q_83", + "winograd_q_84", + "winograd_q_85", + "winograd_q_86", + "winograd_q_87", + "winograd_q_88", + "winograd_q_89", + "winograd_q_90", + "winograd_q_91", + "winograd_q_92", + "winograd_q_93", + "winograd_q_94", + "winograd_q_95", + "winograd_q_96", + "winograd_q_97", + "winograd_q_98", + "winograd_q_99", + "winograd_q_100", + "winograd_q_101", + "winograd_q_102", + "winograd_q_103", + "winograd_q_104", + "winograd_q_105", + "winograd_q_106", + "winograd_q_107", + "winograd_q_108", + "winograd_q_109", + "winograd_q_110", + "winograd_q_111", + "winograd_q_112", + "winograd_q_113", + "winograd_q_114", + "winograd_q_115", + "winograd_q_116", + "winograd_q_117", + "winograd_q_118", + "winograd_q_119", + "winograd_q_120", + "winograd_q_121", + "winograd_q_122", + "winograd_q_123", + "winograd_q_124", + "winograd_q_125", + "winograd_q_126", + "winograd_q_127", + "winograd_q_128", + "winograd_q_129", + "winograd_q_130", + "winograd_q_131", + "winograd_q_132", + "winograd_q_133", + "winograd_q_134", + "winograd_q_135", + "winograd_q_136", + "winograd_q_137", + "winograd_q_138", + "winograd_q_139", + "winograd_q_140", + "winograd_q_141", + "winograd_q_142", + "winograd_q_143", + "winograd_q_144", + "winograd_q_145", + "winograd_q_146", + "winograd_q_147", + "winograd_q_148", + "winograd_q_149", + "winograd_q_150", + "winograd_q_151", + "winograd_q_152", + "winograd_q_153", + "winograd_q_154", + "winograd_q_155", + "winograd_q_156", + "winograd_q_157", + "winograd_q_158", + "winograd_q_159", + "winograd_q_160", + "winograd_q_161", + "winograd_q_162", + "winograd_q_163", + "winograd_q_164", + "winograd_q_165", + "winograd_q_166", + "winograd_q_167", + "winograd_q_168", + "winograd_q_169", + "winograd_q_170", + "winograd_q_171", + "winograd_q_172", + "winograd_q_173", + "winograd_q_174", + "winograd_q_175", + "winograd_q_176", + "winograd_q_177", + "winograd_q_178", + "winograd_q_179", + "winograd_q_180", + "winograd_q_181", + "winograd_q_182", + "winograd_q_183", + "winograd_q_184", + "winograd_q_185", + "winograd_q_186", + "winograd_q_187", + "winograd_q_188", + "winograd_q_189", + "winograd_q_190", + "winograd_q_191", + "winograd_q_192", + "winograd_q_193", + "winograd_q_194", + "winograd_q_195", + "winograd_q_196", + "winograd_q_197", + "winograd_q_198", + "winograd_q_199", + "winograd_q_200", + "winograd_q_201", + "winograd_q_202", + "winograd_q_203", + "winograd_q_204", + "winograd_q_205", + "winograd_q_206", + "winograd_q_207", + "winograd_q_208", + "winograd_q_209", + "winograd_q_210", + "winograd_q_211", + "winograd_q_212", + "winograd_q_213" +] \ No newline at end of file