Document resourceGP records for over 3 million patients are to be shared with researchers as part of a drive to improve the diagnosis, treatment, and prevention of major diseases.