df_anemia_ready <-
df_anemia %>%
janitor::clean_names() %>%
rename(
history = does_the_child_have_a_history_of_the_following_check_all_that_applies,
history_other = other_medical_history_specify,
eat_iron_veges =
does_the_child_eat_adequate_iron_rich_foods_regularly_e_g_meat_beans_leafy_vegetables,
exbf_4mths_older_chn = was_exclusive_breastfeeding_done_for_at_least_4_months_in_older_children,
bld_loss_3mths = recent_blood_loss_past_3_months_before_admission,
transfusion_3mths = recent_blood_transfusion_past_3_months_before_admission,
deworm_6mths = deworming_within_the_past_6_months_non_applicable_for_children_under_1_year,
iron_supp_3mths = iron_supplementation_within_the_past_3_months,
adm_clinical_features =clinical_features_at_admission_select_all_that_apply,
blood_film_comment = blood_film_comment_check_all_that_applies,
anemia_type = type_of_anemia_diagnosed_if_applicable,
txn_required = was_blood_transfusion_required,
picu_required = was_patient_admitted_to_picu,
dura_hosp_stay = duration_of_hospital_stay_days,
missed_vac_opportunity = in_children_with_missed_immunizations_did_the_child_miss_opportunities_for_immunization_during_previous_admissions_or_opd_consultations,
missed_vac_reason = if_missed_vaccination_give_reason_for_incomplete_vaccination_status,
missed_vac_opportunity2 = for_children_who_have_missed_some_vaccinations_did_the_child_also_miss_opportunities_for_immunization_during_previous_admissions,
hb = hb_g_dl,
mal_prev = malaria_prevention_measures) %>%
mutate(
age_days = interval(
date_of_birth, date_of_admission) %/% days(1),
age_months = interval(
date_of_birth, date_of_admission) %/% months(1),
age_years = interval(
date_of_birth, date_of_admission) %/% years(1),
adm_clinical_features = toupper(adm_clinical_features),
across(
c(gender, maternal_education, paternal_education, residence,
iron_supp_3mths, exbf_4mths_older_chn, transfusion_3mths,
picu_required, txn_required, rdt),
~factor(.)),
family_income = factor(
family_income,
levels = c("Low", "Middle", "High")),
eat_iron_veges = factor(
eat_iron_veges,
levels = c("No", "Yes")),
bld_loss_3mths_2 = case_when(
bld_loss_3mths == "None" ~ "No",
TRUE ~ "Yes") %>% factor(),
mal_prev_use = case_when(
mal_prev == "None" ~ "No",
TRUE ~ "Yes") %>% factor(),
mal_prev = toupper(
mal_prev),
mal_prev_itn = case_when(
str_detect(mal_prev, "ITN") ~ "Yes",
TRUE ~ "No" ) %>% factor(),
mal_prev_spray_coil = case_when(
str_detect(mal_prev, "COIL") ~ "Yes",
TRUE ~ "No" ) %>% factor(),
mal_prev_clothes = case_when(
str_detect(mal_prev, "CLOTH") ~ "Yes",
TRUE ~ "No" ) %>% factor(),
mal_prev_repellent = case_when(
str_detect(mal_prev, "REPELLANT") ~ "Yes",
TRUE ~ "No") %>% factor(),
mps_positive = case_when(
malaria_parasites == "Positive" ~ "Yes",
malaria_parasites == "Negative" ~ "No") %>%
factor(),
rdt_positive = case_when(
rdt == "Positive" ~ "Yes",
rdt == "Negative" ~ "No") %>%
factor(),
deworm_6mths_2 = factor(
deworm_6mths, levels = c("No", "Yes")),
immun_status = case_when(
immunization_status == "Fully vaccinated for age" ~ "Full",
immunization_status == "Partially vaccinated for age" ~
"Partial",
immunization_status == "Not vaccinated" ~ "None") %>%
factor(levels = c("Full", "Partial", "None")),
rbc_transfused = case_when(
txn_required == "Yes" ~ "Yes", TRUE ~ "No") %>% factor(),
died = case_when(
outcome_at_discharge == "Died" ~ "Yes",
TRUE ~ "No") %>% factor(),
anemia_cat = case_when(
(age_years >= 15 & gender == "Male" & hb < 8) ~ "Severe",
(age_years >= 15 & gender == "Male" & hb < 11) ~ "Moderate",
(age_years >= 15 & gender == "Male" & hb < 13) ~ "Mild",
(age_years >= 15 & gender == "Male") ~ "None",
(age_years >= 15 & gender == "Female" & hb < 8) ~ "Severe",
(age_years >= 15 & gender == "Female" & hb < 11) ~ "Moderate",
(age_years >= 15 & gender == "Female" & hb < 12) ~ "Mild",
(age_years >= 15 & gender == "Female") ~ "None",
(age_years >= 12 & hb < 8) ~ "Severe",
(age_years >= 12 & hb < 11) ~ "Moderate",
(age_years >= 12 & hb < 12) ~ "Mild",
(age_years >= 12) ~ "None",
(age_years >= 5 & hb < 8) ~ "Severe",
(age_years >= 5 & hb < 11) ~ "Moderate",
(age_years >= 5 & hb < 11.5) ~ "Mild",
(age_years >= 5) ~ "None",
(age_months >= 24 & hb < 7) ~ "Severe",
(age_months >= 24 & hb < 10) ~ "Moderate",
(age_months >= 24 & hb < 11) ~ "Mild",
(age_months >= 24) ~ "None",
(age_months >= 6 & hb < 7) ~ "Severe",
(age_months >= 6 & hb < 9.5) ~ "Moderate",
(age_months >= 6 & hb < 10.5) ~ "Mild",
(age_months >= 6) ~ "None",
(age_months >= 1 & hb < 7) ~ "Severe",
(age_months >= 1 & hb < 8) ~ "Moderate",
(age_months >= 1 & hb < 9) ~ "Mild",
(age_months >= 1) ~ "None") %>%
factor(levels = c("None", "Mild", "Moderate", "Severe")),
anemia = case_when(
anemia_cat == "None" ~ "No",
anemia_cat %in% c("Mild", "Moderate", "Severe") ~ "Yes") %>%
factor(),
mcv_cat = case_when(
age_years > 12 & mcv > 96 ~ "Macrocytic",
age_years > 12 & mcv >= 80 ~ "Normocytic",
age_years > 12 & mcv < 80 ~ "Microcytic",
age_years > 6 & mcv > 90 ~ "Macrocytic",
age_years > 6 & mcv >= 78 ~ "Normocytic",
age_years > 6 & mcv < 78 ~ "Microcytic",
age_years >= 2 & mcv > 86 ~ "Macrocytic",
age_years >= 2 & mcv >= 75 ~ "Normocytic",
age_years >= 2 & mcv < 75 ~ "Microcytic",
age_months >= 5 & mcv > 85 ~ "Macrocytic",
age_months >= 6 & mcv >= 73 ~ "Normocytic",
age_months >= 6 & mcv < 73 ~ "Microcytic",
age_months >= 1 & mcv > 108 ~ "Macrocytic",
age_months >= 1 & mcv >= 74 ~ "Normocytic",
age_months >= 1 & mcv < 74 ~ "Microcytic") %>%
factor(levels = c("Microcytic", "Normocytic", "Macrocytic")),
rdw_cat = case_when(
(gender == "Male" & age_years > 12 & rdw_cv > 13.5) ~ "High",
(gender == "Male" & age_years > 12 & rdw_cv >= 10.9) ~ "Normal",
(gender == "Male" & age_years > 12 & rdw_cv < 10.9) ~ "Low",
(gender == "Female" & age_years > 12 & rdw_cv > 14.6) ~ "High",
(gender == "Female" & age_years > 12 & rdw_cv >= 11.9) ~
"Normal",
(gender == "Female" & age_years > 12 & rdw_cv < 11.9) ~ "Low",
age_years > 6 & rdw_cv > 13.8 ~ "High",
age_years > 6 & rdw_cv >= 11.9 ~ "Normal",
age_years > 6 & rdw_cv < 11.9 ~ "Low",
age_years >= 2 & rdw_cv > 14.6 ~ "High",
age_years >= 2 & rdw_cv >= 12.0 ~ "Normal",
age_years >= 2 & rdw_cv < 12.0 ~ "Low",
age_months >= 6 & rdw_cv > 15.6 ~ "High",
age_months >= 6 & rdw_cv >= 12.3 ~ "Normal",
age_months >= 6 & rdw_cv < 12.3 ~ "Low",
age_months >= 1 & rdw_cv > 16.5 ~ "High",
age_months >= 1 & rdw_cv >= 11.0 ~ "Normal",
age_months >= 1 & rdw_cv < 11.0 ~ "Low") %>%
factor(levels = c("Low", "Normal", "High")) %>%
fct_recode("Normal" = "Low"),
bld_film_done = case_when(
is.na(blood_film_comment) ~ "No",
TRUE ~ "Yes") %>% factor(),
bf_ida = case_when(
str_detect(
blood_film_comment, "Iron deficiency anemia") ~ "Yes",
TRUE ~ "No") %>% factor(),
bf_scd = case_when(
str_detect(
blood_film_comment, "Sickle") ~ "Yes",
str_detect(blood_film_comment, "SCD") ~ "Yes",
TRUE ~ "No") %>% factor(),
bf_infection = case_when(
str_detect(
blood_film_comment, "Infection") ~ "Yes",
TRUE ~ "No") %>% factor(),
bf_liver = case_when(
str_detect(
blood_film_comment, "Liver") ~ "Yes",
TRUE ~ "No") %>% factor(),
bf_renal = case_when(
str_detect(
blood_film_comment, "Renal") ~ "Yes",
TRUE ~ "No") %>% factor(),
bf_malignancy = case_when(
str_detect(
blood_film_comment, "ALL") ~ "Yes",
str_detect(
blood_film_comment, "MALIGNANCY") ~ "Yes",
TRUE ~ "No") %>% factor(),
bf_hemolytic = case_when(
str_detect(
blood_film_comment, "Hemolytic") ~ "Yes",
TRUE ~ "No") %>% factor(),
bf_malaria = case_when(
str_detect(
blood_film_comment, "Malaria") ~ "Yes",
TRUE ~ "No") %>% factor(),
bf_inflamation = case_when(
str_detect(
blood_film_comment, "INFLA") ~ "Yes",
TRUE ~ "No") %>% factor(),
ida = case_when(
bf_ida == "Yes" ~ "Yes",
(hb < 10 & rdw_cv > 15 & mcv_cat == "Microcytic") ~ "Yes",
TRUE ~ "No"),
malaria = case_when(
rdt_positive == "Yes" ~ "Yes",
mps_positive == "Yes" ~ "Yes",
bf_malaria == "Yes" ~ "Yes",
TRUE ~ "No"),
history = toupper(history),
blood_film_comment = toupper(blood_film_comment),
discharge_diagnosis_list = toupper(discharge_diagnosis_list),
discharge_diagnosis_upper = toupper(discharge_diagnosis_upper),
malnutrition = case_when(
str_detect(history, "MALNUTRITION") ~ "Yes",
str_detect(history_other, "MALNUTRITION") ~ "Yes",
str_detect(discharge_diagnosis_upper, "MALNUTRITION") ~ "Yes",
TRUE ~ "No"),
scd = case_when(
str_detect(history, "SICKLE CELL DISEASE") ~ "Yes",
str_detect(history, "SCD") ~ "Yes",
str_detect(history_other, "SICKLE CELL DISEASE") ~ "Yes",
str_detect(history_other, "SCD") ~ "Yes",
str_detect(blood_film_comment, "SICKLE CELL DISEASE") ~ "Yes",
str_detect(blood_film_comment, "SCD") ~ "Yes",
str_detect(discharge_diagnosis_list,
"SICKLE CELL DISEASE") ~ "Yes",
str_detect(discharge_diagnosis_list, "SCD") ~ "Yes",
str_detect(discharge_diagnosis_upper,
"SICKLE CELL DISEASE") ~ "Yes",
str_detect(discharge_diagnosis_upper, "SCD") ~ "Yes",
str_detect(anemia_type, "Sickle cell anemia") ~ "Yes",
TRUE ~ "No"),
g6pd = case_when(
str_detect(discharge_diagnosis_list, "G6PD") ~ "Yes",
str_detect(discharge_diagnosis_upper, "G6PD") ~ "Yes",
str_detect(other_laboratory_findings, "G6PD") ~ "Yes",
str_detect(additional_comments, "G6PD") ~ "Yes",
TRUE ~ "No"),
anemia_of_malig = case_when(
str_detect(blood_film_comment, "MALIGN") ~ "Yes",
TRUE ~ "No"),
anemia_of_chr_dx = case_when(
str_detect(blood_film_comment, "CHRONIC") ~ "Yes",
TRUE ~ "No"))%>%
select(!c(column_42, column_43, timestamp)) %>%
full_join(df_anemia_diag) %>%
mutate(
across(starts_with("diag_"), ~ifelse(is.na(.x), "No", .x)),
age_cat = case_when(
(age_months >= 1 & age_months <= 5) ~ "3 to 5 months",
(age_months >= 6 & age_months <= 23) ~ "6 to 23 months",
(age_months >= 24 & age_months <= 59) ~ "24 to 59 months",
(age_months >= 60 & age_months <= 143) ~ "5 to 11 years",
(age_months >= 144 & age_months <= 179 & gender == "Female") ~
"12 to 14 years(girls)",
(age_months >= 144 & age_months <= 179 & gender == "Male") ~
"12 to 14 years(boys)",
(age_months >= 180 & gender == "Female") ~
">= 15 years (girls)",
(age_months >= 180 & gender == "Male") ~
">= 15 years (boys)") %>%
factor(levels = c(
"3 to 5 months", "6 to 23 months", "24 to 59 months",
"5 to 11 years", "12 to 14 years(girls)",
"12 to 14 years(boys)",">= 15 years (girls)",
">= 15 years (boys)")),
age_cat_2 = case_when(
(age_months >= 6 & age_months <= 59) ~ "6 to 59 months",
(age_months < 6) ~ "< 6 months",
(age_months > 59) ~ "> 59 months"),
exbf_4mths_older_chn = case_when(
age_months <= 48 ~ exbf_4mths_older_chn ),
history_other = toupper(history_other),
hx_scd = case_when(
str_detect(history, "SCD") ~ "Yes",
str_detect(history_other, "SCD") ~ "Yes",
str_detect(history, "SICKLE") ~ "Yes",
str_detect(history_other, "SICKLE") ~ "Yes",
TRUE ~ "No"),
hx_chd = case_when(
str_detect(history, "HEART") ~ "Yes",
str_detect(history_other, "HEART") ~ "Yes",
str_detect(history, "TOF") ~ "Yes",
str_detect(history_other, "TOF") ~ "Yes",
str_detect(history, "PULMONARY STENOSIS") ~ "Yes",
str_detect(history_other, "PULMONARY STENOSIS") ~ "Yes",
TRUE ~ "No"),
hx_hiv = case_when(
str_detect(history, "HIV") ~ "Yes",
str_detect(history_other, "HIV") ~ "Yes",
str_detect(history, "RETRO") ~ "Yes",
str_detect(history_other, "RETRO") ~ "Yes",
str_detect(history, "RVI") ~ "Yes",
str_detect(history_other, "RVI") ~ "Yes",
TRUE ~ "No"),
hx_dm = case_when(
str_detect(history, "DIAB") ~ "Yes",
str_detect(history_other, "DIAB") ~ "Yes",
str_detect(history, "DM") ~ "Yes",
str_detect(history_other, "RDM") ~ "Yes",
TRUE ~ "No"),
hx_malignancy = case_when(
str_detect(history, "WILM") ~ "Yes",
str_detect(history_other, "WILM") ~ "Yes",
str_detect(history, "MALIG") ~ "Yes",
str_detect(history_other, "MALIG") ~ "Yes",
str_detect(history, "AML") ~ "Yes",
str_detect(history_other, "AML") ~ "Yes",
str_detect(history, "MYELODYSPLASTIC") ~ "Yes",
str_detect(history_other, "MYELODYSPLASTIC") ~ "Yes",
str_detect(history, "CARCINOMA") ~ "Yes",
str_detect(history_other, "CARCINOMA") ~ "Yes",
str_detect(history, "CANCER") ~ "Yes",
str_detect(history_other, "CANCER") ~ "Yes",
str_detect(history, "CRANIOPHARYNGIOMA") ~ "Yes",
str_detect(history_other, "CRANIOPHARYNGIOMA") ~ "Yes",
str_detect(history, "HAMARTOMA") ~ "Yes",
str_detect(history_other, "HAMARTOMA") ~ "Yes",
str_detect(history, "RHABDOMYOSRACOMA") ~ "Yes",
str_detect(history_other, "RHABDOMYOSRACOMA") ~ "Yes",
str_detect(history, "LYMPHOMA") ~ "Yes",
str_detect(history_other, "LYMPHOMA") ~ "Yes",
str_detect(history, "TUMOUR") ~ "Yes",
str_detect(history_other, "TUMOUR") ~ "Yes",
TRUE ~ "No"),
hx_ckd = case_when(
str_detect(history, "CKD") ~ "Yes",
str_detect(history_other, "CKD") ~ "Yes",
str_detect(history, "CHRONIC KIDNEY DISEASE") ~ "Yes",
str_detect(history_other, "CHRONIC KIDNEY DISEASE") ~ "Yes",
str_detect(history, "ESRD") ~ "Yes",
str_detect(history_other, "ESRD") ~ "Yes",
str_detect(history, "NEPHROTIC") ~ "Yes",
str_detect(history_other, "NEPHROTIC") ~ "Yes",
TRUE ~ "No"),
hx_asthma = case_when(
str_detect(history, "ASTHMA") ~ "Yes",
str_detect(history_other, "ASTHMA") ~ "Yes",
TRUE ~ "No"),
hx_cerb_palsy = case_when(
str_detect(history, "PALSY") ~ "Yes",
str_detect(history_other, "PALSY") ~ "Yes",
TRUE ~ "No"),
hx_epilapsy = case_when(
str_detect(history, "EPILEPSY") ~ "Yes",
str_detect(history_other, "EPILEPSY") ~ "Yes",
TRUE ~ "No"),
hx_ftt = case_when(
str_detect(history, "FTT") ~ "Yes",
str_detect(history_other, "FTT") ~ "Yes",
str_detect(history, "FAILURE TO THRIVE") ~ "Yes",
str_detect(history_other, "FAILURE TO THRIVE") ~ "Yes",
TRUE ~ "No"),
hx_g6pd = case_when(
str_detect(history, "G6PD") ~ "Yes",
str_detect(history_other, "G6PD") ~ "Yes",
TRUE ~ "No"),
hx_hemophilia = case_when(
str_detect(history, "HEMOPHILIA") ~ "Yes",
str_detect(history_other, "HEMOPHILIA") ~ "Yes",
TRUE ~ "No"),
hx_heri_sphero = case_when(
str_detect(history, "HEREDITARY SPHEROCYTOSIS") ~ "Yes",
str_detect(history_other, "HEREDITARY SPHEROCYTOSIS") ~ "Yes",
TRUE ~ "No"),
hx_hirschprung = case_when(
str_detect(history, "HIRSCHSPRUNG") ~ "Yes",
str_detect(history_other, "HIRSCHSPRUNG") ~ "Yes",
TRUE ~ "No"),
hx_cld = case_when(
str_detect(history, "LIVER DISEASE") ~ "Yes",
str_detect(history_other, "LIVER DISEASE") ~ "Yes",
TRUE ~ "No"),
hx_malnutrition = case_when(
str_detect(history, "MALNUTRITION") ~ "Yes",
str_detect(history_other, "MALNUTRITION") ~ "Yes",
str_detect(history, "WASTED") ~ "Yes",
str_detect(history_other, "WASTED") ~ "Yes",
str_detect(history, "WT/HT <-3SD") ~ "Yes",
str_detect(history_other, "WT/HT <-3SD") ~ "Yes",
TRUE ~ "No"),
hx_ptb = case_when(
str_detect(history, "PTB") ~ "Yes",
str_detect(history_other, "PTB") ~ "Yes",
TRUE ~ "No"),
hx_seizure = case_when(
str_detect(history, "SEIZURE") ~ "Yes",
str_detect(history_other, "SEIZURE") ~ "Yes",
TRUE ~ "No"),
hx_thalasemia = case_when(
str_detect(history, "THALASSAEMIA") ~ "Yes",
str_detect(history_other, "THALASSAEMIA") ~ "Yes",
TRUE ~ "No"),
adm_clinical_features = toupper(adm_clinical_features),
pres_fever = case_when(
str_detect(adm_clinical_features, "FEVER") ~ "Yes",
TRUE ~ "No"),
pres_weakness = case_when(
str_detect(adm_clinical_features, "WEAKNESS") ~ "Yes",
str_detect(adm_clinical_features, "PARAPARESIS") ~ "Yes",
TRUE ~ "No"),
pres_seizure = case_when(
str_detect(adm_clinical_features, "SEIZURE") ~ "Yes",
str_detect(adm_clinical_features, "CONVULSION") ~ "Yes",
TRUE ~ "No"),
pres_abd_dist = case_when(
str_detect(adm_clinical_features, "ABDOMINAL DISTENSION") ~ "Yes",
TRUE ~ "No"),
pres_constipation = case_when(
str_detect(adm_clinical_features, "CONSTIPATION") ~ "Yes",
TRUE ~ "No"),
pres_abd_pain = case_when(
str_detect(adm_clinical_features, "ABDOMINAL PAIN") ~ "Yes",
TRUE ~ "No"),
pres_bld_stool = case_when(
str_detect(adm_clinical_features, "BLOODY STOOLS") ~ "Yes",
str_detect(adm_clinical_features, "BLOODY MUCOID STOOLS") ~ "Yes",
str_detect(adm_clinical_features, "MELAENA") ~ "Yes",
TRUE ~ "No"),
pres_dark_urine = case_when(
str_detect(adm_clinical_features, "DARK URINE") ~ "Yes",
TRUE ~ "No"),
pres_vomiting = case_when(
str_detect(adm_clinical_features, "VOMITING") ~ "Yes",
TRUE ~ "No"),
pres_diarrhoea = case_when(
str_detect(adm_clinical_features, "DIARRHOEA") ~ "Yes",
TRUE ~ "No"),
pres_jaundice = case_when(
str_detect(adm_clinical_features, "JAUNDICE") ~ "Yes",
TRUE ~ "No"),
pres_pallor = case_when(
str_detect(adm_clinical_features, "PALLOR") ~ "Yes",
TRUE ~ "No"),
pres_headache = case_when(
str_detect(adm_clinical_features, "HEADACHE") ~ "Yes",
TRUE ~ "No"),
pres_dev_reg = case_when(
str_detect(adm_clinical_features, "DEVELOPMENTAL REGRESSION") ~ "Yes",
TRUE ~ "No"),
pres_dysphagia = case_when(
str_detect(adm_clinical_features, "DYSPHAGIA") ~ "Yes",
str_detect(adm_clinical_features, "DIFFICULTY SWALLOWING") ~ "Yes",
TRUE ~ "No"),
pres_facial_swell = case_when(
str_detect(adm_clinical_features, "FACIAL SWELLING") ~ "Yes",
TRUE ~ "No"),
pres_fast_breath = case_when(
str_detect(adm_clinical_features, "FAST BREATHING") ~ "Yes",
TRUE ~ "No"),
pres_rash = case_when(
str_detect(adm_clinical_features, "RASH") ~ "Yes",
str_detect(adm_clinical_features, "MULTIPLE CUTANEOUS NODULES") ~ "Yes",
TRUE ~ "No"),
pres_red_eyes = case_when(
str_detect(adm_clinical_features, "CONJUNCTIVITIS") ~ "Yes",
TRUE ~ "No"),
pres_leg_pain = case_when(
str_detect(adm_clinical_features, "LEG PAIN") ~ "Yes",
TRUE ~ "No"),
pres_chest_pain = case_when(
str_detect(adm_clinical_features, "CHEST PAIN") ~ "Yes",
TRUE ~ "No"),
pres_cough = case_when(
str_detect(adm_clinical_features, "COUGH") ~ "Yes",
TRUE ~ "No"),
pres_cyanosis = case_when(
str_detect(adm_clinical_features, "CYANOSIS") ~ "Yes",
TRUE ~ "No"),
pres_thrush = case_when(
str_detect(adm_clinical_features, "THRUSH") ~ "Yes",
TRUE ~ "No"),
pres_dyspnoea = case_when(
str_detect(adm_clinical_features, "RESPIRATORY DIFFICULTY") ~ "Yes",
TRUE ~ "No"),
pres_palpitation = case_when(
str_detect(adm_clinical_features, "PALPITATION") ~ "Yes",
TRUE ~ "No"),
pres_swelling = case_when(
str_detect(adm_clinical_features, "SWELLING") ~ "Yes",
TRUE ~ "No"),
pres_joint_pain = case_when(
str_detect(adm_clinical_features, "JOINT PAIN") ~ "Yes",
str_detect(adm_clinical_features, "KNEE PAIN") ~ "Yes",
TRUE ~ "No"),
pres_throat_pain = case_when(
str_detect(adm_clinical_features, "SORE THROAT") ~ "Yes",
TRUE ~ "No"),
pres_epistaxis = case_when(
str_detect(adm_clinical_features, "EPISTAXIS") ~ "Yes",
TRUE ~ "No"),
pres_hpt = case_when(
str_detect(adm_clinical_features, "HYPERTENSION") ~ "Yes",
TRUE ~ "No"),
pres_imp_conscious = case_when(
str_detect(adm_clinical_features, "IMPAIRED CONSCIOUS") ~ "Yes",
TRUE ~ "No"),
pres_meningitis = case_when(
str_detect(adm_clinical_features, "MENINGITIS") ~ "Yes",
TRUE ~ "No"),
pres_noise_breath = case_when(
str_detect(adm_clinical_features, "NOISY BREATHING") ~ "Yes",
str_detect(adm_clinical_features, "STRIDOR") ~ "Yes",
TRUE ~ "No"),
pres_wasting = case_when(
str_detect(adm_clinical_features, "WASTING") ~ "Yes",
str_detect(adm_clinical_features, "WEIGHT LOSS") ~ "Yes",
TRUE ~ "No"),
pres_bodily_pains = case_when(
str_detect(adm_clinical_features, "GENERALIZED BODY PAIN") ~ "Yes",
TRUE ~ "No"),
pres_poor_feeding = case_when(
str_detect(adm_clinical_features, "POOR APPETITE") ~ "Yes",
str_detect(adm_clinical_features, "POOR FEEDING") ~ "Yes",
TRUE ~ "No"),
pres_mass = case_when(
str_detect(adm_clinical_features, "MASS") ~ "Yes",
TRUE ~ "No"),
pres_rectal_prolapse = case_when(
str_detect(adm_clinical_features, "RECTAL PROLAPSE") ~ "Yes",
TRUE ~ "No"),
pres_urinary_symp = case_when(
str_detect(adm_clinical_features, "URINARY") ~ "Yes",
str_detect(adm_clinical_features, "OLIGURIA") ~ "Yes",
TRUE ~ "No"),
pres_shock = case_when(
str_detect(adm_clinical_features, "SHOCK") ~ "Yes",
TRUE ~ "No"),
pres_poison = case_when(
str_detect(adm_clinical_features, "INGESTION") ~ "Yes",
TRUE ~ "No"),
pres_rta = case_when(
str_detect(adm_clinical_features, "RTA") ~ "Yes",
TRUE ~ "No"),
hx_others = case_when(
hx_dm == "Yes" ~ "Yes",
hx_ckd == "Yes" ~ "Yes",
hx_asthma == "Yes" ~ "Yes",
hx_cerb_palsy == "Yes" ~ "Yes",
hx_epilapsy == "Yes" ~ "Yes",
hx_hemophilia == "Yes" ~ "Yes",
hx_heri_sphero == "Yes" ~ "Yes",
hx_hirschprung == "Yes" ~ "Yes",
hx_cld == "Yes" ~ "Yes",
hx_ptb == "Yes" ~ "Yes",
hx_seizure == "Yes" ~ "Yes",
hx_thalasemia == "Yes" ~ "Yes",
TRUE ~ "No"),
pres_others = case_when(
pres_cyanosis == "Yes" ~ "Yes",
pres_poison == "Yes" ~ "Yes",
pres_imp_conscious == "Yes" ~ "Yes",
pres_mass == "Yes" ~ "Yes",
pres_dysphagia == "Yes" ~ "Yes",
pres_noise_breath == "Yes" ~ "Yes",
pres_poor_feeding == "Yes" ~ "Yes",
pres_throat_pain == "Yes" ~ "Yes",
pres_urinary_symp == "Yes" ~ "Yes",
pres_wasting == "Yes" ~ "Yes",
pres_bodily_pains == "Yes" ~ "Yes",
pres_constipation == "Yes" ~ "Yes",
pres_dev_reg == "Yes" ~ "Yes",
pres_epistaxis == "Yes" ~ "Yes",
pres_facial_swell == "Yes" ~ "Yes",
pres_hpt == "Yes" ~ "Yes",
pres_leg_pain == "Yes" ~ "Yes",
pres_meningitis == "Yes" ~ "Yes",
pres_rectal_prolapse == "Yes" ~ "Yes",
pres_red_eyes == "Yes" ~ "Yes",
pres_rta == "Yes" ~ "Yes",
pres_shock == "Yes" ~ "Yes",
pres_thrush == "Yes" ~ "Yes",
TRUE ~ "No"))