Optimizing Ethical Risk Reduction for Medical Intelligent Systems with Constraint Programming