Arguably there should be laws mandating that medical equipment MUST be open for everyone to inspect, contribute, and share.
That does not answer your question though. It goes both ways: if the doctor recognises that a firmware tweak may save your life, then she should be able to do so.