DF_ICrecords

DF_ICrecords — Check data records for structural inconsistencies

Synopsis

DF_ICrecords {study} [-p #, #-#] [-r status] [-d] [-s]

Description

DF_ICrecords verifies the structural integrity of data records for all or specified plates of the database, including any pending records. Specifically, DF_ICrecords checks each record for:

  1. the correct number of fields as specified by DFschema,
  2. the correct study number,
  3. the correct plate number,
  4. a properly formatted creation date/time field, and
  5. a properly formatted modification date/time field.

This is not an exhaustive list but has been shown to detect structural problems in database records where they exist. The utility program DFcmpSchema should be used to exhaustively check individual data values against the study schema.

DF_ICrecords also checks for:

  1. duplicate primary records (more than one primary record with the same keys), and
  2. orphaned secondary records (secondary record exists but no primary record can be found with the same keys).

A DRF containing the key fields for each data record that fails this structural consistency check can be created by including -d. The DRF is named [4]. This DRF can be subsequently used in DFexplore Data View to retrieve and revalidate problem records. Note however that DFexplore will only be able to locate the records referenced by the DRF if the record keys are still usable despite the structural inconsistency.

For greater detail than is offered by -d, data files with inconsistencies can be exported into 2 files by including -s. Each data file that has an inconsistency is exported so that consistent records are written to plt###.ok and inconsistent records are written to plt###.bad. These files are created in the unique directory $WORKING_DIR/split.$$ (where $$ is the program process id). If necessary, the records in plt###.bad can be corrected via a manual process and then merged back into the database with the DFimport.rpc program.

DF_ICrecords can not check for orphaned secondary records unless records of all statuses are exported (which is the default).

[Note]Status keywords

If -r status is used, be careful not to include the Query database -p #, #-#. The available status keywords are intended for data record statuses and are not equivalent to query statuses.

By default DF_ICrecords includes records with status pending. It is not possible to check pending records separately, but they can be excluded by specifying status primary.

Options

-p #, #-#

Select plates to be checked (default=all). The Query Database can be checked by including 511 in the list of plate numbers.

-r status

Select records with the specified status keyword(s) from the list, final, incomplete, pending, missed, all (default=all).

-d

Create a DRF for any inconsistent records.

-s

Export any data files containing inconsistent records into 2 files: plt###.ok, and plt###.bad.

Examples

Example 2.16. Check only primary records on plates 1-5

-r primary -p 1-5
DF_ICrecords: Check Data Records.                 DFstudy 7. Apr 23,2017 21:04

plt001.dat (NF= 28)     1179 Records:     1179 Ok        0 Bad
plt002.dat (NF= 74)     1149 Records:     1149 Ok        0 Bad
plt003.dat (NF= 53)     1151 Records:     1151 Ok        0 Bad
plt004.dat (NF= 40)     1150 Records:     1150 Ok        0 Bad
plt005.dat (NF= 72)     1147 Records:     1147 Ok        0 Bad

Example 2.17. Check queries and split any inconsistent records

-p 511 -s
DF_ICrecords: Check Data Records.                 DFstudy 7. Apr 23,2017 21:07

DFqc.dat   (NF= 22)    10466 Records:    10466 Ok        0 Bad



[4] This file is overwritten each time that DF_ICrecords is executed.