To demonstrate your problem, it probably doesn't need to be real dataset, often you can just make up some fake data that fits the pattern in your real data. From your description of the data, it sounds like you might have something like this:
data <- replicate(6, sample(letters, 3), simplify = FALSE)
names(data) <- paste0("id_", 1:6)
data
#> $id_1
#> [1] "r" "j" "z"
#>
#> $id_2
#> [1] "r" "n" "w"
#>
#> $id_3
#> [1] "k" "x" "z"
#>
#> $id_4
#> [1] "j" "c" "b"
#>
#> $id_5
#> [1] "b" "y" "v"
#>
#> $id_6
#> [1] "d" "w" "m"
I'm not clear on your expected output but if you want to collapse each vector of diagnoses into a single comma separate character, you can do this:
lapply(data, paste, collapse = ", ")
#> $id_1
#> [1] "r, j, z"
#>
#> $id_2
#> [1] "r, n, w"
#>
#> $id_3
#> [1] "k, x, z"
#>
#> $id_4
#> [1] "j, c, b"
#>
#> $id_5
#> [1] "b, y, v"
#>
#> $id_6
#> [1] "d, w, m"
Created on 2020-01-29 by the reprex package (v0.3.0)