Multiple variable as input and output
You could approach this in two ways:


Association-rule learning


Intuitively, it's like trying to infer rules such that: if the reasons are X and Y, the diagnosis will likely be Z.

The most common algorithm is Apriori, which is easy to implement.


Classification/Supervised learning


Your features could be binary (0 if reason X is not applied, 1 if it is). You could have one for each reason, and even combination of reasons etc. You might run into some issues if you have many possible reasons (your features will be very sparse).

If this is the case, I'd look into dimensionality reduction to make your features denser.