So, i am constructing a dataset (from doctor prescription notes and diagnosis) where
X (input features) represent the various snowmed codes for illnesses/surgeries performed/chronic conditions etc.
Y is a set of pills prescribed for X.
Presently I do not have this data in a matrix format. For ex. i have the snowmed codes for an illness that reads as follows: "Diabetes, Hypertension, Cardiac arrest, Left MCA stroke". Y is the set of pills that the doctor noted down for the above.
As one can note, the above data is not in a matrix format. There are many snowmed codes and various different pills overall. I'd like to apply ML algorithms to predict the pills for a given set of snowmed codes about the illness.
How to organize this data in a format convenient for ML? I am open to other analytics approaches as well. Any discussion in this matter will be helpful.