POINTS
Number of points 19
Numeric
Cold
Flu
Fracture
Routine Physical
Heart Problem
Lung Disorder
Abdominal Pain
Laceration
URI
Lyme Disease
Ear Ache
RX Codes:
1
2
3
4
5
6
7
8
Immunization
Casting
Beta Blocker
ACE Inhibitor
Antihistamine
Ibuprofen
Aspirin
Antibiotic
Starting
Variable Description
Column
Length Format Codes
---------------------------------------------------------------------ID
Subject ID
1
3
Char
GENDER
Gender
4
1
Char
M,F
DOB
Date of Birth
5
6
MMDDYY
VISIT
Visit Date
11
6
MMDDYY
PRIM_DX
Primary DX Code
17
2
Char
(see list)
SEC_DX
Secondary DX Code
19
2
Char
"
HR
Heart Rate
21
3
Numeric
SBP
Systolic Blood Pres. 24
3
Numeric
DBP
Diastolic Blood Pres. 27
3
Numeric
VITAMINS Pt. Taking Vitamins? 30
1
Char
1=Yes, 0=No
PREGNANT Is PT Pregnant?
31
1
Char
1=Yes, 0=No
DX Codes:
01
02
03
04
05
06
Cold
Flu
Fracture
Routine Physical
Heart Problem
Lung Disorder
07
08
09
10
11
Abdominal Pain
Laceration
Immunization
Lyme Disease
Ear Ache
884M07121609119505 07819014000
258M08098211189504 07214409800
733F090978030495070207412007011
449M10103110189501
10
941F101070101995030408819011001
/* pages 211-212 of The SAS Workbook */
/* Program to Create the SAS Data Set CLINICAL */
*--------------------------------------------------------------------*
| Program Name: CLINICAL.SAS in subdirectory C:\WORKBOOK
|
| Purpose: To Create a Permanent SAS data set called CLINICAL from |
|
the raw data file CLINICAL.DTA along with permanent
|
|
formats. Both the SAS data set and permanent formats are |
|
to be stored in the subdirectory C:\WORKBOOK
|
*--------------------------------------------------------------------* ;
LIBNAME WORKBOOK 'C:\WORKBOOK';
OPTIONS PAGENO=1 NOCENTER FMTSEARCH=(WORKBOOK);
FILENAME CLIN 'C:\WORKBOOK\CLINICAL.DTA';
PROC FORMAT LIBRARY=WORKBOOK;
VALUE $GENDER 'M' = 'Male'
'F' = 'Female';
VALUE $DXCODES '01' = 'Cold'
'02' = 'Flu'
'03' = 'Fracture'
'04' = 'Routine Physical'
'05' = 'Heart Problem'
'06' = 'Lung Disorder'
'07' = 'Abdominal Pain'
'08' = 'Laceration'
'09' = 'Immunization'
'10' = 'Lyme disease'
'11' = 'Ear Ache';
VALUE $YESNO '0' = 'No'
'1' = 'Yes';
RUN;
DATA WORKBOOK.CLINICAL;
INFILE CLIN;
INPUT @1 ID
@4 GENDER
@5 DOB
@11 VISIT
@17 PRIM_DX
@19 SEC_DX
@21 HR
@24 SBP
@27 DBP
@30 VITAMINS
@31 PREGNANT
LABEL
ID
GENDER
DOB
VISIT
=
=
=
=
$3.
$1.
MMDDYY6.
MMDDYY6.
$2.
$2.
3.
3.
3.
$1.
$1.;
'Pt. Number'
'Gender'
'Date of Birth'
'Visit Date'
PRIM_DX
SEC_DX
HR
SBP
DBP
VITAMINS
PREGNANT
=
=
=
=
=
=
=
'Primary DX'
'Secondary DX'
'Heart Rate'
'Systolic Blood Pressure'
'Diastolic Blood Pressure'
'Pt. Taking Vitamins?'
'Is Pt. Pregnant?';
0251011
0261110
0270110
0280110
0291100
0300100
0310001
0320010
0330001
0340100
0350010
0360001
/* page 214 of The SAS Workbook */
/* DEMOG1.DTA and DEMOG2.DTA Data File Descriptions */
Starting
Variable Description
Column
Length
Type
Codes
---------------------------------------------------------------------------ID
Subject ID
1
3
Char
DOB
Date of Birth
4
6
MMDDYY
GENDER
Gender
10
1
Char
M=Male, F=Female
STATE
State of Residence 11
2
Char
EMPLOYED Employed?
13
1
Char
1=Yes, 0=No
/* Listing of Raw Data from DEMOG1.DTA */
1
2
3
4
5
6
123456789012345678901234567890123456789012345678901234567890
-----------------------------------------------------------178102146MNJ1
982110166FNY0
723030452MNJ1
258101074FNY1
139122550FNJ0
145010444MNY1
/* Listing of Raw Data from DEMOG2.DTA */
1
2
3
4
5
6
123456789012345678901234567890123456789012345678901234567890
-----------------------------------------------------------559110168FNY0
714010244MNH0
934052890FNJ0
569112850FNY1
/* page 215 of The SAS Workbook */
/* DIALYSIS.DTA Data File Description */
Starting
Variable Description
Column Length Type
Codes
---------------------------------------------------------------------------ID
Subject ID
1
3
Char
GENDER
Gender
4
1
Char
M=Male, F=Female
DOB
Date of Birth
5
8
MM/DD/YY
VISIT
Visit Number
13
1
Numeric
HR
SBP
DBP
Heart Rate
14
Systolic Blood Pressure 17
Diastolic Blood Pressure 20
3
3
3
Numeric
Numeric
Numeric