Electronic health records have been way oversold. Expecting every little medical office to have industrial-grade data protection makes them far more of a liability than they are worth.
At best mostly subjective observations, at worst full of outright errors, they're largely useless from a health care perspective let alone for research purposes.