I'd expect software that issues prescriptions to be a class II or class III medical device and that any or all of the manufacturer, the institution using it, and any human operator in the loop (if there is one) would be liable for errors, depending on the exact situation.