This common comorbidity calculation code does not depend on ICD type. There is some type conversion so the map and input codes are all in 'short' format, fast factor generation, then fast comorbidity assignment.
comorbid_common(x, map, visit_name = NULL, icd_name, return_df = FALSE,
comorbid_fun = comorbidMatMul, ...)
function i.e. the function (not character string) to be called to do the comorbidity calculation