DF_ICkeys — Check key fields (id,visit,plate) and subject initials
DF_ICkeys
{study}
[-P #, #-#]
[-K IVP]
[-R status]
[-V vsp]
[-I #]
[-L sc]
DF_ICkeys checks each id for consistency with the sites database, each visit with the visit map, each plate with the list of legal plates, and optionally checks the consistency of subject initials across all database records within subject.
DF_ICkeys exports the keys for each database record and checks them as follows:
Ids are counted as errors if they do not appear
in the source (i.e., study schema, sites database, or both) specified for
legal range definitions.
When -L is specified, all subject
IDs specified in the sites database
are considered legal for all plates defined for the study.
With c-L , only the study schema is used,
where different legal subject IDs
may be specified for each plate. If no legal ID specifications are
defined for a plate, no legal ID checking is performed on that plate.
With s-L , both schema and sites database
are consulted, but if a
legal range is defined for a plate in the study schema, that definition
takes precedence and the sites database is ignored.
This allows users to set specific legal criteria at the plate level
that override the general specifications in the sites database.
This might be useful for side studies where
certain CRF forms are only completed at those clinical sites
participating in the side study.
sc
Visit/sequence numbers are counted as errors if they are
inconsistent with one or more specifications.
The specifications to use can be chosen, using
-V
from the visit map, schema, and/or page map.
When the visit map is used, the legal visit/sequence numbers for each plate are
those visits for which the plate is specified as required,
optional or a missed visit notification plate.
When the schema is used, the legal values are those defined in field 6 of
each record (this is always the visit/sequence number in a DFdiscover database).
When the page map is used, the legal values are those visits for which
a visit and plate pair appears in the file.
When more than one file is selected, the priority order is:
visit map first, then schema, and then page map.
If there are no legal visit/sequence numbers specified for a plate, visit
checking is disabled for that plate.
vsp
Plate numbers are counted as errors if they differ from the plate data file that contains them (this would be very rare and likely a serious error).
When -I is used to check subject initials,
the initials read from the first record (the lowest plate number)
read for each subject are saved and compared with the
initials on all subsequent records for the same id.
If the lowest plate number should not be used as the source of
correct subject initials, -P can be used
to alter the plate selection order so that another plate number will be
used as the source.
By default, DF_ICkeys checks all 3 keys (id,visit and plate) in records of all statuses (primary, secondary and missed) in all study plates, except for plate 501. It does not check initials by default because there is no default field in which subject initials can always be found.
A subset of the defined plates can be checked
using -P .
This option can also be used to change the order in which plates are
checked.
This is important when used in conjunction with
#, #-#-I
because that option uses the first selected plate as the source of the
correct subject initials.
Queries can be checked for consistency of keys by including plate 511 in the
list of plates in #-P , but subject
initials will never be checked on that plate.
#, #-#
By default, each of the id, visit, and plate keys is checked.
However, by using -K, a subset of the keys can be selected
by including combinations (with no intervening spaces or commas)
of the letters I for id, V
for visit, and/or P for plate, in the option string.
-V is used to select the source(s) of legal
visit/sequence numbers for each plate to use.
Any combination (with no intervening spaces or commas)
of the letters v, s, and
p may be used but they must be specified as a single
string.
The letter v specifies that the legal visit/sequence numbers
for each plate can be determined from the study visitmap.
Similarly, s indicates that the legal range from the study
schema should be used, and p indicates that the entries
in the study page map should be used.
When more than one source is used, the combination of sources is used with
precedence given first to visit map, then schema and then page map, when a
conflict occurs.
By default, records of all statuses are selected.
Use -R to select only records of specified statuses.
Any legal status keyword from the list:
final, incomplete, pending, missed, all
may be used.
Multiple keywords must be separated by spaces and the entire string
enclosed in "".
DF_ICkeys creates a DRF named [3] which lists the records, if any, that had key inconsistencies. This file can be used in DFexplore Data View to retrieve and review the problem records. The specific error (id, visit, plate or initials) is written to the 5th field of each record in .
![]() | Note |
|---|---|
|
DF_ICkeys reports the number of records with errors for each plate and also reports the number of errors in ids, visit numbers, plates and initials. Some plates may have more than one type of error, and as a result, the number of plates with errors may be less than the sum of the the different types of errors. |
-P | Select the plates to be checked (default=all).
This option can also be used to change the order of checked plates
(this is useful in conjunction with | |||
-R status | Select only records with one of the specified status
codes. Valid codes are from the list: | |||
-K IVP | Select the key fields to be checked (default=all),
from the list:
| |||
-V vsp | Determine the legal visit/sequence numbers for each plate using the specifications in the:
or a combination thereof. | |||
-I # | In addition to the selected key fields,
also check the subject initials that can be found in field
| |||
-L sc | Determine the source for legal subject IDs from:
|
Example 2.12. Check key fields and initials (found in field 8) on plates 1-3
-P 1~3 -I 8
DF_ICkeys: Check Key Fields (ID,SEQ,PLT,Initials) DFstudy 7. Apr 22,2017 23:44
Plate 001: 26 errors in 1664 records (26 Initials)
Plate 002: 60 errors in 1675 records (60 Initials)
Plate 003: 44 errors in 1333 records (1 Seqs, 43 Initials)
Total: 130 errors in 4672 records
Use DF_ICkeys.drf to review problem records.
Example 2.13. Check key fields and initials on final and missed records for plates 1-10
-R "final missed" -P 1~10
DF_ICkeys: Check Key Fields (ID,SEQ,PLT,Initials) DFstudy 7. Apr 22,2017 23:48
Plate 001: 0 errors in 1143 records
Plate 002: 0 errors in 1106 records
Plate 003: 1 errors in 1139 records (1 Seqs)
Plate 004: 0 errors in 1092 records
Plate 005: 0 errors in 1096 records
Plate 006: 0 errors in 1147 records
Plate 007: 0 errors in 1143 records
Plate 008: 0 errors in 4242 records
Plate 009: 0 errors in 1123 records
Plate 010: 0 errors in 1079 records
Total: 1 errors in 14310 records
Use DF_ICkeys.drf to review problem records.
Example 2.14. Check initials but not the keys on all primary records of plates 11-20
Notice the use of -K "" to disable checking on the
key fields.
The header line of the output is a standard line and does not reflect the subset of keys selected for the current run.
-I 8 -K "" -R "primary" -P 11~20
DF_ICkeys: Check Key Fields (ID,SEQ,PLT,Initials) DFstudy 7. Apr 22,2017 23:51
Plate 011: 0 errors in 1101 records
Plate 012: 4 errors in 1101 records (4 Initials)
Plate 013: 14 errors in 1063 records (14 Initials)
Plate 014: 30 errors in 1974 records (30 Initials)
Plate 015: 19 errors in 914 records (19 Initials)
Plate 016: 8 errors in 926 records (8 Initials)
Plate 017: 11 errors in 926 records (11 Initials)
Plate 018: 10 errors in 923 records (10 Initials)
Plate 019: 16 errors in 921 records (16 Initials)
Plate 020: 1 errors in 57 records (1 Initials)
Total: 113 errors in 9906 records
Use DF_ICkeys.drf to review problem records.
Example 2.15. Check key fields on plates 1-2 using only the study schema as the source for legal subject IDs.
-P 1~2 -L s
DF_ICkeys: Check Key Fields (ID,SEQ,PLT,Initials) DFstudy 253. Feb 11,2017 15:07
Plate 001: 30 errors in 53 records (30 IDs)
Plate 002: 11 errors in 26 records (11 IDs)
Total: 41 errors in 79 records
Use DF_ICkeys.drf to review problem records.