Date: Fri, 25 Jan 2008 18:27:30 -0800 gopilth@YAHOO.COM "SAS(r) Discussion" gopilth@YAHOO.COM http://groups.google.com Re: Calculating time intervals To: sas-l@uga.edu text/plain; charset=ISO-8859-1

On Jan 25, 8:38 pm, gopi...@yahoo.com wrote: > On Jan 25, 7:07 pm, muthia.kachira...@GMAIL.COM (Muthia Kachirayan) > wrote: > > > > > On Jan 25, 2008 5:51 PM, <gopi...@yahoo.com> wrote: > > > > Hi, > > > I need to calculate the time intervals for each visit from the day of > > > diagnosis. > > > > Pt may have multiple visits with the same diagnosis and also other > > > visits with a different diagnosis. > > > Following is the type of data I have. > > > > Pt diag_dt serv_dt visit_typ > > > 1 22jan07 23jan07 hiv > > > 1 22jan07 13frb07 sup > > > 1 22 jan07 20mar07 tot > > > 1 22jan07 30mar07 hiv > > > 1 22jan07 03jul07 sup > > > 1 22jan07 20jul07 tot > > > 2 10feb07 15feb07 tot > > > 2 10feb07 01mar07 hiv > > > 2 10feb07 25mar07 tot > > > 2 10feb07 03apr07 tot > > > 2 10feb07 15may07 sup > > > 2 10feb07 25jul07 hiv > > > 2 10feb07 10aug07 sup > > > 3 15feb07 25feb07 sup > > > 3 15feb07 30mar07 hiv > > > 3 15feb07 15apr07 hiv > > > 3 15feb07 25may07 tot > > > > For example pt " 1" in the above example has total of 6 visits 2 for > > > hiv treatment, 2 for supportive care and two for other reasons. > > > From this I want to calculate the time intervals between each visit > > > for all 3 types of visits i.e Time b/w diag_dt and 1st serv_dt for > > > tot > > > Time b/w diag_dt and 2nd serv_dt for tot > > > Time b/w diag_dt and 3rd serv_dt for tot and soon... until > > > last visit date. > > > Then for > > > Time b/w diag_dt and 1st serv_dt for hiv > > > Time b/w diag_dt and 2nd serv_dt for hiv > > > Time b/w diag_dt and 3rd serv_dt for hiv and soon... until > > > last visit date. > > > Then for > > > Time b/w diag_dt and 1st serv_dt for sup > > > Time b/w diag_dt and 2nd serv_dt for sup > > > Time b/w diag_dt and 3rd serv_dt for sup and soon... until > > > last visit date. > > > > I hope this is clear. Thanks in advance > > > Gopi > > > Gopi, > > > Do you mean the dates noted in ( ) below for the Pt = 1 for SUP ? If not, > > just fill the correct dates inside parentheses. > > > Time b/w diag_dt (22jan07) and 1st serv_dt (23feb07) for sup > > Time b/w diag_dt(22jan07) and 2nd serv_dt(03jul07) for sup > > Time b/w diag_dt(22jan07) and 3rd serv_dt (???) for sup and soon... > > until last visit date. > > > Regards, > > Muthia Kachirayan- Hide quoted text - > > > - Show quoted text - > > Time b/w diag_dt (22jan07) and 1st serv_dt (13feb07) for sup > > > Time b/w diag_dt(22jan07) and 2nd serv_dt(03jul07) for sup > > Time b/w diag_dt(22jan07) and 3rd serv_dt (???) for sup and soon... > > until last visit date. > > Are the dates for sup visit for pt1.- Hide quoted text - > > - Show quoted text -

second visit is the last visit for pt1 for sup.

Back to: Top of message | Previous page | Main SAS-L page