A hospital has this computer (AI?) that helps treating patients. Something goes wrong and it starts killing them. At one time the protagonist becomes a patient too (a broken leg I think) and barely escapes death. Must be an older movie (it’s not Coma, 1978).
Terminal Choice (1985)?
Might be, not sure though. Have to check it out. Thanks.