Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Using WINDOW and DISPLAY in the SAS® System for PCs
for the Patient Registry of the VA Coronary Artery Surgery Study
Gary R. Johnson. VA Cooperative Studies Program
Abstract
A system of programs was designed for the
SAS® System under PC DOS to update and edit
a data library for a registry of patients from
the Veterans Administration randomized study of
coronary artery surgery. Data from yearly
contacts with patients reporting cardiac
events, anginal symptoms, medications, and
hospitalizations are entered and edited in the
system using customized window modules. The
goals of the project were to implement the data
management for the registry on the
microcomputer while maintaining the capability
to update mainframe SAS files. and to provide a
user-friendly means for updating and monitoring
the registry_ The design of the system.
experience with WINDOW and DISPLAY statements.
and an evaluation of using the SAS System Under
PC DOS for the application will be presented.
Introduction
The SAS® system for microcomputers was
used for a data editing and updating
application in the extended patient followrup
of a Veterans Administration (VA) Cooperative
Studies program clinical trial. The features
of the WINDOW and DISPLAY statements were used
to create customized windows for data entry.
Near the completion of the scheduled 10
year follow-up in the randomized study of
coronary artery surgery versus medical therapy.
a five year extension was planned for continued
centralized followrup by the coordinating
center. The registry for extended follow-up
included 319 survivors from the main analysis
cohort. The extension was designed to observe
trends in survival and morbidity. 1 Data'were
collected by the'coordinating center staff
through yearly telephone and mail interviews
with consenting participants. Interviews with
the patients provided information on the
occurrence of cardiac events such as myocardial
infarction. new or repeat bypass surgery. and
angioplasty. the use of cardiac medications.
severity of angina. and hospitalizations.
Verification of events. hospitalizations. and
deaths was obtained through VA patient
treatment files, hospital discharge summaries.
and claims for VA benefits. Follow-up for the
extension was restricted to key endpoint data.
Two data forms were used for data collection: a
Contact Form for coding information from the
interview or 'the survival status of the
participant at the time of the attempted
contact. and an Event Form for coding
hospitalization data and Verification
information on cardiac events and deaths.
Until 1985. all computing for data
management and analysis was performed in a
mainframe environment (IBM 4341s with VM/CMS
and OS/MVS). The main file for the study
contained about 60.000 records. and the main
SAS analysis file included 1015 observations
with 711 variables. In the first 10 years of
the study. many specialized programs were
developed for data management and analysis
using the SAS System and other languages. The
proposal for extended follow-up required a
re-evaluation of data management since data
acquisition was less frequent. less complex.
and on different forms. A new procedure for
data management was needed with the following
characteristics:
(1) Int~ractive editing and updating of the
data.
(2) Easy. fast. user-friendly access to the
data by study personnel.
(3) Capability to update the study "analysis
files on the mainframe with new endpoint
information from the registry.
(4) A system for the registry data
independent of the mainframe.
When the SAS, System under PC DOS was acquired
by the coordinating center it was considered an
attractiVe solution to the problem because of
the familiarity of the study personnel with the
SAS System on the mainframe and the special
features of the SAS system for microcomputers
including:
(1) Customized windows for data entry and
editing defined by the WINDOW statement and
appearing on the screen with the DISPLAY
statement.
(2) The' ability to UPLOAD and DOWNLOAD SAS
files using RLINK.
(3) Conversion of SAS files to other
formats. such as dBASE III and LOTUS files
using the SAS procedures DBF and DIF.
It was anticipated that using a_microcomputer
system would be much cheaper than paying for
mainframe connect-time and proceSSing charges.
With these features in mind. the SAS System
offered a good approach to data management for
the registry.
An IBM PC/AT with 640K memory is the
principal machine used in this application. In
addition to the normal and high density disk
drives and a 20 Mbyte hard disk. a 20 Mbyte
Bernuolli Box is attached. DOS version 3.10
and the SAS System Under PC DOS. Version 6.02
are loaded on the hard disk in addition to
other microcomputer software. A
rnicro-to-mainframe link is available through a
data communications line and a special
communications package unique. to our mainframe
facility. Unfortunately, this link does not
·yet support'RLINK so procedures UPLOAD and
DOWNLOAD are not available.
793
~-
The current file arrangement on the
microcomputer is a data library of seven fiies
in a subdirectory on the hard disk (Table 1).
The PROFILE file contains the participant's
background data such as name. social security
number. treatment codes, the status at the
outset of the registry. and dates and response
codes for each year of foll~up. There are
five CONTACT files. one for each year of
extended followrup with a decreasing number of
observations per file per year. due to deaths
of study participants. The only open-ended
file is the EVENT file in which a participant
may have multiple events. By 1989 •. an
estimated maximum of 2000 records will be in
this file. Disk storage for the CONTACT and
PROFILE files will be less than 500K and the
EVENT file'will require about 540K of storage.
This library will fit on a high density
diskette.
Table 1.
FILE
PROFILE
CONTACT
1985
1986
1981
1988
1989
EVENT
Figure 1.
(1) Enter SAS System
(2) INCLUDE the program PROGRAM EoI'rOR
(3) SUBMIT the program
(4) Execution of the program module:
a. Select subset of profile variables
b. MERGE file to be edited with patient
profile information
c. Set parameter options for edit session
d. Enter patient 10. request next
record. or end edit
e. windows resembling data form appear
on the screen
f. User edits data fields on the screen
g. Review series of windows or proceed
h. Record of all changes is written to
EDITS file
i. Return to enter next 10 (step d.)
j. Replace the original file
k. Print EDITS file (X 'PRINT EDITS.OAT')
1. summary tables appear in OUTPUT WINnow
(5) RetUrn to PROORAM EDITOR (INCLUDE new
program or ENDSAS).
The important features of the data entry
routine are: the selection of an observation
by 10 number (and date of event for the event
file). a record of all changes to the file is
kept. arid the user is allowed to review
windows before the record is output.
Use of,WINDOWs for Data Entry
Several window designs were used in this
application. A WINDOW can be defined as one
panel to fill all or part of the screen for a
small form. an information panel (Figure 2). a
parameter setting panel (Pigure 3), or a panel
for selecting an observation ('igure 4). The
default size of a window is 23 rows by 78
columns but only a smaller area is usable
because the border and command line for each
window are not addressable. A window can be
defined that is larger than the screen
dimensions. but then the whole window does not
appear and access to portions of it is not
easily controlled. A more sophisticated
displaY,can be designed by defining multiple
subpanels pet window. One subpanel
initializes the screen and other subpanels are
overlaid. Several subpanels can also be made
to appear in the same screen. For example. a
subsequent subpanel might be a nested portion
of a questionnaire or a value-checking error
message. In this case, the whole Contact Form
could not appear on one screen. so sections of
the form appe"ar as the user proceeds to
process the form (Figure 5a-d). Partial
display of the form 1s accomplished bY
defining, subpanels with the GROUP=subpanel
option of the WINDOW statement. Each
WINDOW~GROUP appears according to the program
DIS~LAY logic of the data step.
This
application used a combination of multiple
windows per screen with one or more windows
changing to a new data entry subpanel. The
Contact and Event Forms each had six subpanels
for data entry and one final subpanel for
deciding to review the subpanel sequence. The
Profile edit program used only two screens for
data entry with several subpanels for value
checking and other messages.
Extended Followrup SAS Files
(as of 02181)
VARS
BYTES
Q!!§.
35
ll1K
319
29
29
29
29
29
31
312
346
0
0
0
583
91K
85K
3K
3K
3K
180K
Flowchart of Update and Edit System
Enter SAS System
I
INCLUDE Program
I
I
SUBMIT
Contact File",. . , o r _ ....r----profile Pile
Event File--'
Set Edit Parameters
,....-----4/~Select ID ir
DISPLAY ,WINDOWs
dEdit
~
Review JecOrd?--1
Write EditJ to EDITS.OAT
Replace Previous File
I
print EoITS.oAT
+
Return to PROORAM EDITOR
Design ,of update and Edit system
The flowchart for the Update and Edit system
(Figure 1) outlines the steps used to process
a particular file:
794
Figure 2.
Figure 5a.
Introductory Window
JSW:1rJJDJftIJJJlflfllJlffflllfffllflf"'JiiilJflfffffiiIfl:tJfhJlllffflffflflff;
.-cc.aod = )
1WWXJIEJJIfUlIf.lfffftfffftlf""".ftJIIIAriJJlflllfftWJAAJIlfIlJJIft.IfI:;
~~}
:PI' .m: 3315001 NDIE: WW, JLICE B.
SSN: ooo-oo-oooo RX: M!MOL
JBfJTJlTAlfffllffflftfffff-'ffflflffffffIWffffffflfIftJlJJ:tJJJD1Ifflfflfllfff:;
!Carm!uIl = )
iJI'iumG RmIsm' lI'Olft: SYSl'D(
VA 0XI'DA1'IVE
S'rtJDr)l). " -
cc Death: 08/",/86 Otf/II)!YY)
:survival Status: 1 (1=Alive, 2=Dead)
:Date of CCIltact
o:IICIGRY AIl'I'fRY SlIl<DY
..........
......
:Angina
Joo GE 2 times/week
"" LT 1 ti11e11IIBek
5= M:l Ingina
""", u:xr'
Jbllar of bospitalizati.als: VA:
0
l«Jf-VA: 0
''CAPS
light _ t be em: if DOt press "CAPS UXlC" key
INm'I' DJ:de DlISt be oft; if not pn!SS ''lIIS'' key
ztXlllIDie DlISt be off; if DOt pn!SS .,., key
mrm to
(Q-98
or
99=Unknotm.)
: EveDts since last CCI'ltact: (1:oft:l, 2zY'es)
SVBG:
1
MI:
1
PTCA:
1
1D;i.ogt~: 1
Other cardiac: 1
M:lII.-cardi.ac: 1
IfflfWlf"""ffIHUfff'llllfllfllfllflffffffffffffflfIfltllfffBflrflflfflllllll«fffli<
c:oo.tinue:
:KEYS: mmt advances cursor, PGIIl advances wlIIdow
1'flflflflffffHffftlffflffJIIIJffJJllfffffffflffflffftlffffflffffffffff6fl.i'Clf/ffHf(
M"UlffWSLJIftJ _ _JlJitJ£lJJl:tllfUlJI:tIftJlJlJ. .JIJ"",."JJIfMM<
Figure 5b.
Figure 3.
2
2: 1-3 time/day
••••***-"'.........
Press
card M:l.
status: 2 1= GE 4 times/day
..... Please wait wb:i.le tb:i.ngs vet setup ..... Doo."t worry, it". cmly a movie!!!! .....
** ••**
First Data Entry Screen
Second Data Entry Screen
selecting Year of Contact
~l~JJffiH"'''''1Wf'IIIf*J _fMfJAW_AitaI.S1J:HillHlflPffe~
CXJlI'ACT ItIM mI'1'IrG
MI)
.lSBJIIID.iJULiiJjf""'LMlI.fffffftlfffIfJidftlJJJllJlftl1hlfflffftJJfflf""Ul;
:'CaImmd
->
-
:Pr.m: 3315OO11W1E: DALLAS, lILICE B.
SSN: (l()()-OO-{X)OO RX: Im>ICAL
.lENItlATA.WJIJllffJflJlfffffffllflflfffffflllff'ffl.""",.lffflfllfffjIlLitLi'f:;
.-ca.md ....>
UPDlTIlG
Select the year of follow-up JOU wish to EDIT:
Year 1986
(V~ Range:
: cardiac Ked:i.cati.clls:
1985-1989)
Hi"""".,..;",
11...... ,'~,~J
Diqitalis:
2 {l::fb, 2=Yes)
2 (14), 2=YesJ
2 (1=tb, 2=Yes) Dosage of PrqIanoJ.ol: 160
1 (1=No, 2=Yes)
2 (1~, 2=Yes)
2 (1., 2=Yes)
Diuretics:
"""""'"',
other Beta-Blockers:
ca-dlaImel Bl.odr.ers:
Iav-actilG Nitrates:
: Angina Kedicatic:bs - Profile: l«UR-lft'3li
: Nitrate Medi.catials: BO'J1I
.:Press ENmt to IXIltillle or type mT to qUit:
IffffflllfffftlffffflffffBfll_lfffftllffffflHffffffffllfWlffflffllfffffftlflffH
:KEYS: DlIDt advaDC!es cursor, Fa advances windaIr
Jl'J1lf1ff_JiiLJffJlflff.fffJ".iiJllfJJlllffffflflHffJl1J£.wHJl(
m.JIffIII.11fIf.If••lflffllflllfJllllllfflffflflllllfUJ.itlllllllff1f'llflfl.lfllffJ<
JifflfJilfllfllJffffllffflilfft.IIIIf".lffffllfJ:f:t:tzflf.If:HlJitll:t_UJIIIIJfIfIt<
Figure 5c.
Figure 4.
Third Data Entry Screen
selecting 1D Number
.D1l'PI1IM1hhMfUIf"HIIWff!lHfffftlffJflJl:tllftlllii41iiU:t:tJ.__ JJ:t:t:t:tUJJJH'J;
1S4DTIIJ l _ _nn,.".flllflffifftftffffffnlWlffff.Hlffffilfff.fflf;
:Carmand
:Q:amand
=)
->
.'fT.m: 3315OO1lW1E: DAlW, ALICE B.
SSII': ooo-oo-oooo RX: Im>ICAL
:
mfJ.'lJA'tAlfflllffff..""ffiJLlfflfl'llfffffJlfffffffljjjjJJJfJffffHfffffJlIIIS;
.'CaI:maIJd. = )
lINmtIDJ'fffffMff: !dIJJiJJ:tJJJit dJ_IIfIllllffftlllllMSdJSJJf!M!l:titlll(:
!O::mIand = )
: Type of o:ntact: 1
PATmIl'
,.,.,
.....
!JflDIHG RmIS'l'RY lI'DM'E S'lSTDf
a PA~'S IIMIS'ftlY PRaD..I: -
:"**** S!U!tl'
:mmt Patient m: 3315001 (Press Dt'l'm to
:(If last patient then enter: 9999999J
1=Patient
2-Next of Kin
<XJft'DIlE)
"""'"
"""""
6=tble (8IRLS -
To proceed to MElT patient in file, qpe "N"
: Treatment Status: 0
00
reoord)
Q;a Medical Adherer
MEDICAL AlIDER
1" SUrgical (1 ~.)
2= SUrgical Not-aparated
3= SUrgical (>1 ~.)
4- HeI1ical ~ted (1 ~.)
5= Kedical. q,erated (>1 ~.)
:
Jl'ffJIlfJJ:tJSi:tlfffHfl:tllHiJJJiiiffflllHffSSHfffHffffJ1lllfffllHHlff:UIlllfJfJ<
BlfllflflflfJIHlfffJ",.,...""lfMJJitititlft,.,..."""".mnititS£i;<
H/fffffftIJftlllllfJJ!f!:titJJitfftllfffl8llflflfflff. .JJJjitJJftlJiJ• ....."",<
795
.1CEYS: mID. advances cursor, PGIIl advances wiJ:¥br
:
HlfNffIM!ltlililJfffllfHffffilll'lHffflffflHfllffflJf'llflfilffffMIH.lCJfffIIIf<
Figure 5d.
Review Option Subpanel
time. The programs have no safeguards for
recovery should the SAS system fail for some
reason. The ,user must periodically backup the
edited file by methods external to this system
of programs. Also. the system is limited to
record selection by ID number. Forms must be
entered sequentially since this application
does not permit random access to individual
observations. An input/output is required for
each record as the file is processed
sequentially. This is not a problem in this
application because the current files are
small and processing time in the data-entry
step with no selection of observations is
brief (less than 2 minutes). However. as the
event file grows, processing the entire file
may become tedious for the user. Although
each program is menu-driven by the windows
internal to the data steps, the whole system
is not yet menu-driven. A menu for program
selection using BAT programs in DOS to create
a new AUTOEXEC.SAS file. with each menu option
is operational, and can be tmplemented when
needed. This method was presented by Robert
Landon at last year's SUGI.2
Discussion
The SAS System for microcomputers is a
recent addition to the programming tools
available at our coordinating center. This is
the first large-scale application of this
system implemented by our center. Several
limitations in WINDOW and DISPLAY were
encountered while writing the programs for
this system. For example. subscripted array
names can not be used in windows. Assignment
to a dummy variable helps to circumvent this
problem. Another problem was that each data
and text field had to be defined by at least
one option or attribute in addition to the
format. There is no provision to define
options globally in all the data-entry fields
or text fields for an entire window. By using
macros to define options, the coding of
windows can be simplified. For example, if
\LET F= P=YES COLOR~BLACK; then &P can be used
throughout a window for printing a formatted
value, while with \LET D=COLOR=YELLOW; the
macro variable &0 can be used to set the color
for all data entry windows to yellow. Macros
also simplify changing the options.
Value checking for all data fields can be
done only after a subpanel is passed. Unless
each data field is treated as a subpanel. the
user would see erroneous entries only after
completion of the entire panel.
Windows also require random access memory
during the execution of the data step in which
they are defined. It was difficult to
determine how much memory was required, but
insufficient memory problems have occurred in
this relatively small application. Since
windows are within data steps they can not
appear between data steps. This may be merely
an esthetic restriction. However. one window
can not be displayed up to the point of the
windows in the next data step. since the LOG,
OUTPUT. and PGM windows appear between each
step. Thus. the programs do not appear to be
menu-driven.
m:NID.JLJiJlIfffffliffffffmt/fftIfffHffflL'nIfJlftlft.£LiUSLL:ah1lU....n l l...... ___ .,
;O:ammd
=)
--
:PT.ID: 3315OO1lWlE: DAlW, ALICE B.
SSN: 00t>-<XKl000 IX: mllCAL
lENnIATAJJf!IIMfffllHllitJ1MffflJfffflftlff""",fJlJJlJIHIHILUMff£JJJJUm:tJ;
: If you wish to review this patients record again
: type any dlaracter and press the enter key,
: Othenrise press the enter key to cmtiuue.
: Type
a character to review record:
HlfflLJJUUllflfllllfflfllllflHf"lIffffflffffUJffflIflftJIfI'fJiJi!tiU._fH
..ms: EJnDI. advances cursor, PGiJf advances windoN"
JIlflf.llflHlftIffffllfflffftflflflLlffffll!lllHflfflfi'lflfflffflffflf8:JC1fftHll<
The size of a field for data entry is
defined by the format in the field definition
of the WINDOW statement. Any SAS system
INFORMAT is an acceptable input format. such
as the date format MMDOyy8. To display the
value of a variable in a window with a format
from PROC FORMAT, the field must be protected
with PROTECT=YES. Another restriction in
overlaying subpanels is that the BLANK option
must be used to "clear" the subpanel behind
the overlay, in order to prevent overlap of
the text and data-entry fields. Data entry 1s
not permitted when the INSERT switch is on,
because the data field can not be expanded
beyond the length specified by the assigned
format.
within a window the cursor may be moved
from field to field with the ENTER and TAB
keys. or moved one space at a time with the
space bar or the cursor keys. Pata can be
entered only in the areas defined as data
fields. A user can go backward in a window
using the cursor arrow keys to re-enter a data
field, but can not go back to a previous
window or subpanel. The display proceeds to
the next window or subpanel when the last
field in the current window or subpanel is
completed unless some special control has been
added. A dummy variable or switch can be used
as the last field in a subpanel to pause
before proceeding to the next display or to
control which display occurs next. The
page-down (PGDN) key is easily understood by
the user as a way to proceed to the next
subpanel. However, data entered in a subpanel
that is exited using the PGON key is not
saved.
Program Evaluation
The programs for data editing and updating
all use a similar algorithm. An extra loop
was added to the EVENT program to process
multiple observations per participant. It is
a general routine that can easily be modified
for other data ,entry applications. by
substituting a new set of WINDOWs. Additional
functions such as data checks can be added if
desired. but may lengthen program-modification
796
Macro names can be used in a window
statement to help generalize a program.
However. the value assigned to the macro or
parameter can not be changed if the data step
is processed and saved in a SAS stored program
(SSP). In the SSP file. all macros must be
defined to some value. This limitation
extends to attempts to generalize programs
while preserving the time savings of executing
an SSP file (DATA PGM=program.SSP; RUN;).
Alternative approaches may have provided a
more superior interactive system. Perhaps the
economy achieved by saving connect and
processing charges does not compensate for the
power provided by a mainframe system. such as
a series of CMS EXECS and SAS programs. Other
microcomputer packages may have better
data-base functions and provide formatted
"windows" for data entry and summaries. dBASE
III has a more generalized data-access
structure with indexing for direct access and
full-screen edit capability. PRODAS is
reported to have the capability of value
checking for individual data fields.
In conclusion. the familiarity of the
programming and non-programming staff with
Base SAS Software was an important factor in
the decision to use the SAs system for
microcomputers in this application. The
data-entry capabilities are quite flexible,
and complex screens can be created. However.
working with the first two versions of this
product revealed gaps in documentation and
recurrent problems with insufficient memory
and system lock-up, in addition to the window
limitations mentioned above.
Future data entry applications using the
SAS system for microcomputers will need less
development time as a result of this initial
exploration. The SAS System was very
appropriate for the ,size of this data
management application, but alternatives
should probably be considered for handling
larger files. Using a combination of other
microcomputer p'roducts with the SAS system may
be useful for larger applications. Future use
also depends on further development of the SAS
system for microcomputers. including the
enhancements suggested here, and support of
additional procedures in this software product.
BIBLIOGRAPHY
1. PBDUZZI, PN et al.: Centralized 10-15 year
follow-up by the coordinating center in the
Veterans Administration study of coronary
artery bypass surgery - deSign and first year
results. (presented at the seventh Annual
Meeting of the society for Clinical Trials.
May 1986. and submitted to COntrolled clinical
Trials for publication).
2. Ll\NDOII. R:
p 623-632. 1986.
Gary R. Johnson. M.S.
CSPCC (lSI-A)
VA Medical Center
West spring Street
West Haven. CT 06516
(203) 932-5111 X294
~-.
c
dBASEIII to SAS PC DOS - A file
management system. SAS Users Group International Conference proceedings. Eleventh
Annual Conference.
Supported by the Cooperative Studies program
of the Medical Research service.
Veterans Administration Central office.
Washington. DC.
SAS is the registered trademark of the SAS
Institute. Inc .• cary. NC. USA.
dBASE is a trademark of Ashton-Tate.
PRODAS is a trademark of Conceptual SOftware.
Inc.
797