Hundreds of thousands of seniors are affected as record numbers of risky prescriptions are being written for older patients.