If it's some random cat pic frontend website code and it breaks, yeah whatever, just fix it as it breaks because you have the luxury of hourly deploys. but on the other side of the spectrum, if you're writing firmware and it's isn't remotely updatable, you don't just sling the code over the wall in the same way. in that realm you have the luxury of an actual spec and a less complicated system.
everyone gets scared. what you do in the face of it is up to you.
Have a good test suite with realistic scenarios. Add more to that all of the time.
Get outside feedback on whether you documentation and diagrams are readable and keep them up to date.
If you can do that, you can write mission critical code.
I have some friends trying to fix this[1] and they have amazing tech, but it's a difficult industry to break in to.
was this part of the DICOM protocol?
i have worked with medical imaging devices as well, but was not fortunate enough to work with the CT modality. cool stuff!
Last year I had to go to the ER it was pretty cool to see that some of the equipment was stuff I've worked on. I needed a CT scan with contrast, I had worked on the standards body that defined the protocol that allowed CT scanner talk to a contrast injector, and they were using the device I worked on with the feature I defined and implemented.
Its pretty cool to see your work keep you alive.