Date: Tue, 24 Mar 2009 23:17:01 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: one file for each subject?
In-Reply-To: <fd5d33210903242053n27e33817me9755f1eb9bd1735@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Sounds like you should look at Proc Report or Proc Tabulate. Those both
work with By statements that lets you organize by patient ID (or whatever)
and display your survey variables in a very customizable way.
I suggest either browsing the list archives for examples of the two procs,
or searching one of the sites that collects papers, such as
http://www.lexjansen.com/ , and search for one of the two procs.
In general, I have a feeling PROC REPORT is the one to use for this
particular use (as you aren't trying to add up multiple patients together),
but that could just be my superior familiarity with it speaking.
-Joe
On Tue, Mar 24, 2009 at 10:53 PM, Sarah Cox <saslearner2006@gmail.com>wrote:
> Hi, all,
>
> Suppose I have a big flat file with every record include all information
> from a survey about every patient. E.g
>
> ID Age Gender Medicare HeartDisease Weight Height Pulse.
> 001 20 F Yes No 120 5.5
> 66
> 002 44 M Yes Yes 160 5.9
> 72
> ......
>
> What I really want to now is to generate one file for each patient (not
> necessarily one file, but at least page by ID) and group different
> variables. As above, Age and Gender will go to the group
> Demographics..................
>
> Patient 001
>
>
> *DEMOGRAPHICS*
>
> Age
>
> 20
>
> Gender
>
> F
>
> *MEDICAL HISTORY*
>
> Medical History
>
> Yes
>
> Ever have heart disease
>
> NO
> *CLINICAL EXAM*
> Weight
> 120
> Height
> 5.5
> Pulse
> 66
> Any good idea or fancy way to do this. What I am thinking is to transpose
> the data by Id first then re-group. Wondering if anybody have good
> solution.
>
> Any suggestion is appreciated in advance!
>
> Sarah
>
|