I've did that several times. I have contact with public health institutions in Argentina because my wife is a Dr, and I've created a few applications for them. Specially because I can't see they using old systems (yes, they even used MS Access files shared in flash drives!) and they can't pay for a new development (since public health in Argentina has no money for technology improvements other than basic needs).
I enjoy doing that, and I will continue doing this as far as I get some time. It's like my two cents to health.