Skip to content

Commit

Permalink
updated demographics.py to have more repeated instruments
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan8456 committed Apr 24, 2024
1 parent 8b0f88b commit 560fa99
Show file tree
Hide file tree
Showing 15 changed files with 510 additions and 3 deletions.
50 changes: 47 additions & 3 deletions src/b2aiprep/demographics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = {
Expand Down
22 changes: 22 additions & 0 deletions src/b2aiprep/resources/adhd.json
Original file line number Diff line number Diff line change
@@ -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"
]
17 changes: 17 additions & 0 deletions src/b2aiprep/resources/custom_affect_scale.json
Original file line number Diff line number Diff line change
@@ -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"
]
42 changes: 42 additions & 0 deletions src/b2aiprep/resources/dsm5.json
Original file line number Diff line number Diff line change
@@ -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"
]
14 changes: 14 additions & 0 deletions src/b2aiprep/resources/dyspnea.json
Original file line number Diff line number Diff line change
@@ -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"
]
23 changes: 23 additions & 0 deletions src/b2aiprep/resources/leicester_cough.json
Original file line number Diff line number Diff line change
@@ -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"
]
14 changes: 14 additions & 0 deletions src/b2aiprep/resources/panas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
"panas_session_id",
"panas_duration",
"upset",
"hostile",
"alert",
"ashamed",
"inspired",
"nervous",
"determined",
"attentive",
"afraid",
"active"
]
14 changes: 14 additions & 0 deletions src/b2aiprep/resources/ptsd.json
Original file line number Diff line number Diff line change
@@ -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"
]
6 changes: 6 additions & 0 deletions src/b2aiprep/resources/random.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
"random_session_id",
"random_recording_acoustic_task_id",
"random_duration",
"random_item_generation_category"
]
50 changes: 50 additions & 0 deletions src/b2aiprep/resources/stroop.json
Original file line number Diff line number Diff line change
@@ -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"
]
14 changes: 14 additions & 0 deletions src/b2aiprep/resources/vhi10.json
Original file line number Diff line number Diff line change
@@ -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"
]
17 changes: 17 additions & 0 deletions src/b2aiprep/resources/vocab.json
Original file line number Diff line number Diff line change
@@ -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"
]
5 changes: 5 additions & 0 deletions src/b2aiprep/resources/voice_perception.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
"voice_perception_session_id",
"voice_perception_duration",
"voice_quality_perception"
]
5 changes: 5 additions & 0 deletions src/b2aiprep/resources/voice_problem_severity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
"voice_severity_session_id",
"voice_severity_duration",
"describe_the_severity_of_a"
]
Loading

0 comments on commit 560fa99

Please sign in to comment.