Parsing Dates for Diabetic Patients to check changes in lab results
I have a database of diabetic patients which includes patients demographics, dates when different diseases were diagnosed and a bunch of lab values with their dates. I need to do an analysis on Diabetic patients and analyse their lab results before and after they became diabetic.
I have the following information:
DM = 1 (to filter all diabetics)
DM start date - to tell me when they were diagnosed of Diabetes Millitus
Lab test dates
lab test values
So basically I need to use the DM start date of each patient in the dataset and look for all other lab test dates and values prior to this date and after this date...
(keep in mind I have 2000 patients and this date might be different for every patient)
How can I do this...and create some plots - sample data file attached
would be a great help if someone one can help...