DF_PTlist — List subject data grouped by subject ID and visit number
DF_PTlist
{study}
[-u]
{
{
[-X plate field~list]
| [-x plate field format]
| [-F format plate field~list]
| [-R plate field~list]
}
[
[-S selectcondition]
| [-s selectcondition]
]
[-e]
...}
[
[-H variable_names]
| [-U]
| [-G]
]
[-I #, #-#]
[-c #, #-#]
[-v #, #-#]
[
[-b lines #]
| [-b cases #]
]
[-d]
[-t]
[-l]
[-f file]
[-p]
DF_PTlist is a simple subject-listing program which displays subject data in a spreadsheet-like format. The columns are selected variables (e.g. age sex, diagnosis, etc.), and the rows are individual subject ID and visit number combinations on which the data was collected. DF_PTlist is simple to use, but also limited. It is not intended to be a general-purpose report generator and will not replace your need for more sophisticated reporting software.
DF_PTlist relies heavily on the ability to specify field and plate numbers. As a result it is useful to have a current listing from DF_SSschema or DF_SSvars available when constructing the option list.
The diversity of uses for DF_PTlist is best learned by following the examples.
-u | Display program usage, including a few examples, and exit |
-X plate field~list | List fields with default formatting |
-x plate field format | List fields with specified formatting |
-F format plate field~list | List fields using specified format string |
-R plate field~list | Repeat/normalize fields in previous -x|-X record |
-S selectcondition, -s selectcondition | Select subjects (with -S) or
records (with -s)
meeting these criteria |
-e | End/remove last
-s|-S selection
criteria |
-H variable_names | Variable column headers for previous retrieval |
-U | Use variable alias from DFschema. This can also be specified using -H DFalias |
-G | Use variable name from DFschema (default). This can also be specified using -H DFname |
-I | Select only specified subjects. By default, all subjects from all sites, including the error monitor site, appear in the output. |
-c | Select only subjects from specified sites. By default, subjects from all sites, including the error monitor site, appear in the output. |
-v | Select only specified visits |
-b lines #, -b cases # | Insert page breaks into output after specified lines or cases (subjects) |
-d | Data only.
Writes | delimited ASCII records |
-t | Translate codes to value labels, where defined |
-l | Include missed records (values displayed using x) |
-f file |
Read options from the specified file.
When options are stored in a file and read in this manner, the full
path name to file
must be specified, unless DF_PTlist is being executed from a UNIX
command-line, in which relative pathnames are taken relative to the
directory that the report is invoked from.
|
-p | Display status and validation level for each plate (e.g. 1f6 = plate 1, final, level 6) |
These examples are based upon study 254, the DFdiscover Acceptance Test Study. The number of records in the database has been intentionally limited so that the examples can demonstrate the input with very little output.
Example 2.20. List, with default formatting, fields 9 and 21-25 from plate 1, and fields 10 and 12 from plate 5
-X 1 9 21~25 -X 5 10 12
DF_PTlist: Subject Data Listings. DFstudy 254. Nov 11,2017 08:10
SUBJECT VISIT AGE S2SBP1 S2DBP1 S2SBP2 S2DBP2 S2SBP3 FSBP1 FSBP2
99002 0 64 172 098 168 096 166 . .
99002 21 . . . . . . 154 150
99002 22 . . . . . . 150 146
99002 23 . . . . . . 144 140
99002 24 . . . . . . 136 138
Example 2.21. From plate 1, list fields 8 and 9, right justified in columns that are 10 and 12 characters wide, respectively
-x 1 8 %10s 9 %12s
DF_PTlist: Subject Data Listings. DFstudy 254. Nov 11,2017 08:12
SUBJECT VISIT PINIT AGE
99002 0 JAM 64
Example 2.22. Normalize the 3 blood pressure measurements in fields 21 through 26 on plate 1
-X 1 21 22 -R 1 23 24 -R 25 26
DF_PTlist: Subject Data Listings. DFstudy 254. Nov 11,2017 08:29
SUBJECT VISIT S2SBP1 S2DBP1
99002 0 166 094
99002 0 168 096
99002 0 172 098
Notice how the default column labeling is taken from the variables
requested by -X.
This can be changed with the addition of -H new_names as in:
-X 1 21 22 -H SBP DBP -R 1 23 24 -R 25 26
DF_PTlist: Subject Data Listings. DFstudy 254. Nov 11,2017 08:44
SUBJECT VISIT SBP DBP
99002 0 166 094
99002 0 168 096
99002 0 172 098
Example 2.23. List cases in which the 5th
field extracted equals 1, where x[i] is the
ith field in the next -x,
-X or -R
-S "if(x[5]==1)" -X 5 10-14
DF_PTlist: Subject Data Listings. DFstudy 254. Nov 11,2017 08:52
SUBJECT VISIT FSBP1 FDBP1 FSBP2 FDBP2 FARM
99002 21 154 092 150 090 1
99002 23 144 090 140 086 1
99002 24 136 082 138 080 1
Example 2.24. List field 8 through 10 of plate 1 for subjects 99000-99999
-X 1 8-10 -I 99000-99999
DF_PTlist: Subject Data Listings. DFstudy 254. Nov 11,2017 08:55
SUBJECT VISIT PINIT AGE SEX
99002 0 JAM 64 1
Example 2.25. Print a page break and column titles every 50 lines
In this case the option would be a part of a complete option string.
-b lines 50
Example 2.26. Print every subject on a new page
The data for this example are not from the same study 254 as the other
examples.
There are also many other options specified.
The important one in this case is -b cases 1.
-X 1 3 9 -X 2 3 9 -v 1 3~5 -I 1101 1103 -p -b cases 1DF_PTlist: Subject Data Listings. DFstudy 253. Nov 11,2017 08:57 SUBJECT VISIT STATUS DFRASTER edate DFRASTER vdate002 1101 1 1f6 9532/0040005 07/08/95 . . 1101 1 2f6 . . 9532/0054001 07/09/95 1101 3 1f6 9533/0177004 07/14/95 . . 1101 4 1f6 9533/0177007 08/10/95 . . 1101 5 1f6 9540/0098002 10/04/95 . .pagebreakSUBJECT VISIT STATUS DFRASTER edate DFRASTER vdate002 1102 1 1f6 9532/0035007 07/24/95 . . 1102 1 2f6 9532/0035007 07/24/95 9532/0035001 07/24/95 1102 3 1f6 9534/0119003 07/27/95 . . 1102 4 1f6 9534/0125007 08/25/95 . . 1102 5 1f6 9542/0105002 10/20/95 . .
-X is used to select fields 3 and 9 from plates 1
and 2.
This option produces automatic formatting of columns, with each column
being just as wide as it needs to be to accommodate the column title and data.
-p
requests the plate number, status, and validation level of each
record from which data is extracted.
This is displayed in the column with the STATUS heading
and is a single string of 3 to 5 characters in length,
where the first digits up to the first character are the plate number,
the single character is a code for the record status from the list:
f=final, i=incomplete, p=pending, L=missed, and the trailing digit is the record's validation level.
The column headings SUBJECT and
VISIT are fixed by DF_PTlist, they cannot be changed
nor removed.
All other titles are the variable names from the study schema.
-v selects only visits 1, 3, 4 and 5; otherwise, all visits
for which data values are available would be displayed.
Data values that do not exist in the database because that plate is not present for the subject, are indicated by a single dot. In this example plate 2 only occurs at visit 1 and thus dots appear under the plate 2 data columns for visits 3-5.
Example 2.27. List fields 9 to 12 from plate 1, and fields 15, 12 and 16 (in that order) from plate 2
-X 1 9~12 -X 2 15 12 16
DF_PTlist: Subject Data Listings. DFstudy 254. Nov 11,2017 09:25
SUBJECT VISIT AGE SEX RACE RACEOTH HTIN WTKG PULSE
99002 0 64 1 1 . . .
99002 1 . . . . 072.0 056
The RACEOTH variable in the first row, and
WTKG in the second row, are blank observations (which
are different from observations marked with . which
indicate that the record containing the observation is missing).
Example 2.28. List fields 8 and 9 from plate 1, formatted using field widths of 5 and 12 characters respectively
-x 1 8 %5s 9 %12s -c 12~14 22 -I 6001 -v 1 51~59 -b lines 50
In addition to formatting, this option string requests:
Subject at sites 12,13,14
and 22 (-c), plus subject 6001 (-I),
and visits 1 and 51 to 59 (-v)
a page break every 50 lines (-b)
When using -x with specified formatting ensure that the
specified field widths are wide enough to accommodate the widest value
and the column label.
Values or labels wider than the specified width are displayed intact
resulting in misalignment of subsequent columns.
To truncate fields at a desired width, say 5 characters, use a format
string of %5.5s.
Example 2.29. List fields 12 to 16 from plate 5 where field 12 of plate 5 equals 1, and fields 21 and 22 from plate 8
-S "if(x[1]==1)" -X 5 12~16 -e -X 8 21 22
Fields 12 to 16 map to x[1] through x[5]
for the -S case selection coding.
Also note that -e is necessary to turn off
the case selection code so that it is not applied to the selection of fields
from the next -X specification (i.e. for plate 8).
If -e was not specified, the selection code would
also be applied to x[1] of plate 8, that being field 21.
The result would be that only cases that met both selection criteria
would be printed.
It is legal to have a different case selection specification for each
-X|-x.
For example if field 12 on plate 5 was gender (coded 1=male, 2=female),
and fields 21 and 22 on plate 8 were systolic and diastolic blood
pressure readings, we could select male subjects with hypertension by
specifying:
-S "if(x[1]==1)" -X 5 12~16 -S "if(x[1]>140 || x[2]>90)" -X 8 21 22
Example 2.30. List multiple events, e.g. adverse events, for each subject
-X 1 9 10 -s "if(x[1]>0)" -x 7 9 %9s 10 %9s 11 %20.15s -R 7 12~14 -R 7 15~17
The first -X specification gets fields 9 and 10
from plate 1 (e.g. age and sex).
Next suppose that we want to list 3 fields for each adverse event:
an AE code, start date, and description.
The -s specification results in the creation of records if
the AE code is greater than zero.
The -x specification identifies where the first AE is
recorded and specifies the output format for each field.
AE code and start date will be printed in fields 9 characters wide,
and the description will be limited to the first 15 characters, output in a
space 20 characters wide.
Remember to make fields wide enough to allow some space
between fields so that the field columns can be clearly distinguished.
The -R (repeat) specifications identify where other
adverse events are recorded.
They will be printed using the formatting given in the preceding
-x.
The preceding -s will also be applied to these fields, so
that records will only be created if an adverse event exists.
The result will be a list that includes at least age and sex for all subjects,
plus a list of adverse events for those subjects that have experienced them.
If -s was changed to -S,
the meaning would be different.
-S indicates case selection criteria
(as opposed to record selection),
and thus would result in only listing those subjects who had experienced
adverse events.
Multiple -s and -S criteria may be
used in the same report.
Each criterion remains in effect until the next one is specified.
To list only subjects over 50 who have had adverse events, the input
string could be modified to:
-S "if(x[1]>50)" -X 1 9 10 -S "if(x[1]>0)" -x 7 9 %9s 10 %9s 11 %20.15s -R 7 12~14 -R 7 15~17
Example 2.31. Using -e to end previous selection
criteria
-S "if(x[1]>50 && x[2]==1)" -X 1 9 10 -e -X 2 13~17
Since -S and -s
selection criteria remain in effect for subsequent -X|-x
specifications,
a method of ending previous selection criteria is needed when they are not to
be applied to the next -X|-x.
This is accomplished by -e.
In this example, age and sex, from fields 9 and 10 of plate 1, are
to be listed along with vital signs from fields 13 to 17 of plate 2.
Further we want to limit the list to men over 50.
The -S specification used to select men
over 50 must be turned off before the -X
specification for vital signs.
Otherwise, -S selection criteria would be applied
to the vital signs as well, i.e. only men over 50 who also had plate 2,
field 13 > 50 and plate 2, field 14 equal to 1, would be listed.
In this example it is unlikely that this would
be desired (or that it would produce any output). However in those cases where
the same variables are stored on several plates and the same selection criteria
are desired for the fields pulled form each plate, having the
-S selection criteria carry forward is exactly what is needed.