Mamas,, Chew-Graham,, Mallen,, "Using electronic health records to quantify and stratify the severity of type 2 diabetes in primary care in England: rationale and cohort study design", BMJ Open, 2018