Date: Fri, 9 Nov 2007 21:40:29 -0500
Reply-To: Snow Sweeps <snowsweeps@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Snow Sweeps <snowsweeps@YAHOO.COM>
Subject: DATDIF with multiple observations
I am working with a dateset that has multiple patient observations over a
period of time. I need to determine if their visits were less than 30
days, more than 30 days, or if it's within 30 days of the end date when the
data was collected and cannot be evaluated. I would like to show this with
a new variable days with three options of 'more than 30 days', '30 days or
less', 'na'.
Here is a small portion of the data:
Data abc;
infile datalines firstobs=2 pad;
input @1 ID $2 @5 visit MMDDYY8.; /*other variables just junk to this
question so left out*/
datalines;
01 03/10/04
01 05/25/04
01 09/16/04
02 02/12/04
02 05/15/04
03 01/01/04
03 02/12/04
03 07/06/04
04 06/16/04
04 07/10/04
04 07/21/04
04 08/15/04
04 09/27/04
;
|