df_glycemic_clean <-
df_glycemic %>%
janitor::clean_names() %>%
rename(
caregiver_occup = primary_caregiver_s_occupation,
caregiver_educ = education_level_of_caregiver,
dura_dm = duration_of_diabetes_diagnosis,
free_insulin = do_you_receive_free_insulin_consistently,
disrupt_strip = have_there_been_disruptions_in_the_supply_of_glucometers_or_test_strips,
diff_transport = do_you_have_difficulties_affording_transportation_to_the_clinic,
diff_trans_sp = if_yes_to_transportation_difficulties_specify,
diff_meals = do_you_have_difficulties_in_getting_regular_meals_daily,
diff_meals_sp = if_yes_to_getting_meals_regularly_specify,
add_burden = are_there_any_additional_financial_burdens_related_to_diabetes_management_e_g_medication_tests,
supp_family = do_you_receive_support_for_diabetes_management_from_your_family,
adm_public = have_you_faced_any_challenges_administering_insulin_at_school_workplace_or_in_public_places,
keep_ins = where_do_you_keep_your_insulin_at_school_work,
additional_concerns = do_you_have_any_additional_comments_or_concerns_regarding_your_diabetes_care,
improve_dm = what_improvements_would_you_suggest_for_better_management_of_diabetes_in_your_community,
share_stigma = please_share_any_additional_comments_or_experiences_regarding_stigma_related_to_paediatric_diabetes,
help_stigma = what_type_of_support_do_you_believe_would_help_reduce_stigma_related_to_paediatric_diabetes_select_all_that_apply,
stigma_counsel = have_you_or_your_family_received_any_formal_education_or_counseling_on_how_to_cope_with_stigma_related_to_diabetes,
strategies_stigma = what_strategies_do_you_or_your_family_use_to_cope_with_stigma_or_negative_treatment_related_to_diabetes_select_all_that_apply,
diff_relationship = for_adolescents_and_young_adults_have_you_experienced_difficulties_in_forming_or_maintaining_relationships_because_of_your_diabetes,
avoid_activities = have_you_avoided_participating_in_activities_e_g_sports_church_school_events_because_of_your_diabetes,
facility_avail = which_of_these_facilities_are_available_for_your_use_at_your_school_work_select_all_that_apply,
awareness_work = is_there_sufficient_awareness_and_support_for_diabetes_in_your_school_work,
feel_stigma = do_you_feel_that_diabetes_is_stigmatized_in_your_community,
exp_discrimination = have_you_experienced_any_negative_attitudes_or_discrimination_because_of_your_diabetes,
worries_dm = do_you_have_any_worries_about_people_discovering_that_you_have_diabetes,
worries_dm_desc = description_worries_about_diabetes_status_becoming_known,
awareness_work_res = give_reasons_for_your_answer_about_diabetes_awareness,
inform_dm = who_have_you_informed_that_you_have_diabetes,
unpleasant_desc = please_describe_any_unpleasant_experiences,
desc_rel_diff = description_about_relationship_difficulties,
inj_school = where_place_do_you_inject_at_school_work,
stigma_justify = justify_your_answer_concerning_stigma,
visit_freq = column1
) %>%
mutate(age_of_patient = factor(
age_of_patient,
levels = c(
"0–5 years", "5–10 years", "11–17 years",
"18–25 years", "Above 25 years")),
family_income_level = factor(
family_income_level,
levels = c("Low", "Medium", "High")),
avail_health_p = case_when(
str_detect(facility_avail, "(H|h)ealth") ~ "Yes",
TRUE ~ "No"),
avail_health_clinic = case_when(
str_detect(facility_avail, "(Sick|Pharm|Clinic)") ~ "Yes",
TRUE ~ "No"),
avail_health_fridge = case_when(
str_detect(facility_avail, "(F|f)ridge") ~ "Yes",
TRUE ~ "No"),
inj_p_private = case_when(
str_detect(inj_school, "PRIVATE") ~ "Yes",
TRUE ~ "No"),
inj_p_classroom = case_when(
str_detect(inj_school, "(CLASSROOM|SCIENCE LAB)") ~ "Yes",
TRUE ~ "No"),
inj_p_bathroom = case_when(
str_detect(inj_school, "BATHROOM") ~ "Yes",
TRUE ~ "No"),
inj_p_home = case_when(
str_detect(inj_school, "HOME") ~ "Yes",
TRUE ~ "No"),
inj_p_office = case_when(
str_detect(inj_school, "OFFICE") ~ "Yes",
TRUE ~ "No"),
inj_p_house = case_when(
str_detect(inj_school, "HOUSE") ~ "Yes",
TRUE ~ "No"),
inj_p_sickbay = case_when(
str_detect(inj_school, "(SICK|HOSPITAL)") ~ "Yes",
TRUE ~ "No"),
inj_p_dorm = case_when(
str_detect(inj_school, "(DORM|HOSTEL|PREFECT)") ~ "Yes",
TRUE ~ "No"),
inj_p_teacher_house = case_when(
str_detect(inj_school, "TEACHER'S HOUSE") ~ "Yes",
TRUE ~ "No"),
inj_p_others = case_when(
str_detect(
inj_school,
"(INCOMPLETE|SHOP|UNCOMPLETED|WORKPLACE)") ~ "Yes",
TRUE ~ "No"),
str_talk_family = case_when(
str_detect(strategies_stigma, "All of the above") ~"Yes",
str_detect(
strategies_stigma, "Talking to family members") ~ "Yes",
TRUE ~ "no"),
str_talk_friends = case_when(
str_detect(strategies_stigma, "All of the above") ~"Yes",
str_detect(
strategies_stigma,
"Talking to friends") ~ "Yes",
TRUE ~ "no"),
str_talk_healthp = case_when(
str_detect(strategies_stigma, "All of the above") ~"Yes",
str_detect(
strategies_stigma,
"Talking to health professionals") ~ "Yes",
TRUE ~ "no"),
str_join_supp_grp = case_when(
str_detect(strategies_stigma, "All of the above") ~"Yes",
str_detect(
strategies_stigma,
"Joining a support group") ~ "Yes",
TRUE ~ "no"),
str_avoid_stigma = case_when(
str_detect(strategies_stigma, "All of the above") ~"Yes",
str_detect(
strategies_stigma,
"Avoiding situations where stigma might occur") ~ "Yes",
TRUE ~ "no"),
need_sch_dm_educ = case_when(
str_detect(help_stigma, "All of the above") ~"Yes",
str_detect(
help_stigma,
"More education about diabetes in schools") ~ "Yes",
TRUE ~ "no"),
need_sup_caregiver = case_when(
str_detect(help_stigma, "All of the above") ~"Yes",
str_detect(
help_stigma,
"Support groups for caregivers") ~ "Yes",
TRUE ~ "no"),
need_sup_children = case_when(
str_detect(help_stigma, "All of the above") ~"Yes",
str_detect(
help_stigma,
"Support groups for children with diabetes") ~ "Yes",
TRUE ~ "No"),
need_counselling = case_when(
str_detect(help_stigma, "All of the above") ~"Yes",
str_detect(
help_stigma,
"Counseling services") ~ "Yes",
TRUE ~ "No"),
need_aware_comm = case_when(
str_detect(help_stigma, "All of the above") ~"Yes",
str_detect(
help_stigma,
"Awareness campaigns in the community") ~ "Yes",
TRUE ~ "No"),
hba1c_cat = case_when(
most_recent_hb_a1c < 7.5 ~ "Good Control",
most_recent_hb_a1c <= 9 ~ "Suboptimal",
most_recent_hb_a1c > 9 ~ "Poor control") %>%
factor(
ordered = T,
levels = c("Good Control", "Suboptimal", "Poor control")),
low_fam_income = case_when(
family_income_level == "Low" ~ "Yes", TRUE ~ "No"),
rec_fam_supp = case_when(
supp_family == "No" ~ "No",
supp_family !="" ~ "Yes"),
dura_dm = factor(
dura_dm,
levels = c(
"Less than 1 year",
"1–3 years",
"More than 3 years"),
labels = c("<1 year ", "1–3 years", ">3 years")),
visit_freq = case_when(
visit_freq %in% c(
"DIAGNOSED A MONTH AGO", "JUST STARTED",
"Every 1–3 month") ~ "1–3 months",
visit_freq %in% c("Every 4–6 month") ~ "4–6 months",
visit_freq %in% c("Less frequently") ~ "Less frequently") %>%
factor(levels = c("1–3 months","4–6 months",
"Less frequently")),
free_insulin = case_when(
free_insulin == "Non applicable" ~ NA,
TRUE ~ free_insulin) %>%
factor(),
awareness_work = case_when(
awareness_work == "UNSURE" ~ "Unsure",
awareness_work == "Non applicable" ~ NA,
TRUE ~ awareness_work),
feel_stigma = case_when(
feel_stigma == "No" ~ "No",
feel_stigma == "Yes" ~ "Yes"),
avoid_activities = case_when(
str_detect(avoid_activities, "Yes") ~ "Yes",
avoid_activities == "No" ~ "No"))
labelled::var_label(df_glycemic_clean) <-
list(
age_of_patient = "Age of Patient",
gender = "Sex",
educational_level = "Educational Level",
family_income_level = "Family Income Level",
caregiver_educ = "Caregiver's Educational Level",
caregiver_occup = "Caregiver's Occupation",
type_of_diabetes = "Tyoe of Diabetes",
dura_dm = "Duration of diabetes",
most_recent_hb_a1c = "Most recent HbA1c (%)",
visit_freq = "Clinic visit frequency",
free_insulin = "Consistent access to free insulin",
disrupt_strip = "Disruption of glucometer/test strips",
diff_transport = "Difficulty affording transport to clinic",
diff_meals = "Difficulty obtaining regular meals",
add_burden = "Additional diabetes-related financial burden",
adm_public = "Difficulty administering insulin at school/work",
avail_health_p = "Health professional available",
avail_health_clinic = "Sick bay/clinic/pharmacy available",
avail_health_fridge = "Refrigerator for insulin available",
inj_p_private = "Private space for injection available",
inj_p_classroom = "Place of Injection: Classroom",
inj_p_bathroom = "Place of Injection: Bathroom",
inj_p_home = "Place of Injection: Home",
inj_p_office = "Place of Injection: Office",
inj_p_house = "Place of Injection: House",
inj_p_sickbay = "Place of Injection: Sickbay",
inj_p_dorm = "Place of Injection: Dormitory",
inj_p_teacher_house = "Place of Injection: Teacher's House",
inj_p_others = "Place of Injection: Others",
awareness_work = "Adequate awareness/support for diabetes",
str_talk_family = "Talking to family members",
str_talk_friends = "Talking to friends",
str_talk_healthp = "Talking to health professionals",
str_join_supp_grp = "Joining a support group",
str_avoid_stigma = "Avoiding stigma-prone situations",
stigma_counsel = "Received formal stigma counselling",
need_sch_dm_educ = "Need for school-based diabetes education",
need_sup_caregiver = "Need for caregiver support groups",
need_counselling = "Need for counselling services",
need_aware_comm = "Need for community awareness campaigns")
# df_glycemic_clean %>%
# select(-patient_id) %>%
# gtsummary::tbl_summary() %>%
# gtsummary::bold_labels()