extract_diabetes function

Extract diabetes status prior to an index date.