Any AI that can decompile and reprogram itself would be scary...They'd need Janeway or Kirk or whoever leads the division to approve the changes.
I'm not saying the EMH should be able to self-reprogram, just that someone expert in holographic engineering (Tom or B'Elanna, most likely) should make the change. When the Doctor's triage subroutines reach their limit (as they did with Harry and the other ensign), he can make a subjective decision. That's what he did when he chose Harry, after all.