001 1 4 1/1/2004 1/5/2004
002 1 5 4/5/2004 4/10/2004
003 1 14 6/1/2005 6/15/2009
004 0 . 1/4/2010 .
005 0 . 4/5/2010 .
006 0 . 6/5/2010 .
The difference between line 1 and line 4 is that each one correspond to a different treatment group.
Here is a hypothetical steps:
1) Patient in drug=0 group (example patient 4) first_Date is within the same month and year of a patient in drug=1 group.
2) if step 1 is correct, then randomly select one patient from drug=1 who met the criteria
3) generate drug_Date based on the interval between drug_Date and first_date of the patient selected in step 2 (example patient 3 was selected for patient 4, then the interval= 4)
4) output for patient 4 would be 6/5/2010 + 14= 6/19/2010
... View more