A simple solution
You should bring your health data to the care provider the same way you bring your body.
Open source means transparency, transparency means trust
It is your health data that should be kept top secret, not the source code of the system.
The key functionality of a medical record system is available in a wiki, for free.
IPFS provides a decentralised and secure storage of your health data.