Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Data Validation Examples

Edit Check is supported for below modules and level

  • Participant Fields, Custom Form, and Custom Fields

  • Visit Fields, Custom Form, and Custom Fields

  • Specimen Fields, Events, Custom Forms, and Custom Fields

  • Shipment

  • Order

Fields and Dictionary

We can set up data validation on these 3 types of fields and their combinations:

  1. Core fields

  2. Custom fields

  3. Custom form fields

  4. Combination of the core fields, custom fields, custom form fields

Dictionary

Core Fields Dictionary for Participants, Visits, and Specimens.

Level

Field Name

Field Expression

Level

Field Name

Field Expression

Participant

PPID

#cpr.ppid

Participant

First Name

#cpr.participant.firstName

Participant

Middle Name

#cpr.participant.middleName

Participant

Last Name

Participant

Registration Date

Participant

External Subject ID

Participant

Registration Site

Participant

Birth Date

Participant

Social Security Number

Participant

eMPI

Participant

Gender

Participant

Vital Status

Participant

Death Date

Participant

Races

Participant

Ethnicity

Participant

MRN

Visit

Name

Visit

Name

Visit

Status

Visit

Missed By

Visit

Missed Reason

Visit

Visit Date

Visit

Visit Site

Visit

Clinical Diagnosis

Visit

Clinical Status

Visit

SPR

Visit

Visit Comments

Specimen

Label

Specimen

Barcode

Specimen

Lineage

Specimen

Collection Status

Specimen

Type

Specimen

Anatomic Site

Specimen

Laterality

Specimen

Pathology Status

Specimen

Initial Qty

Specimen

Available Qty

Specimen

Concentration

Specimen

Parent Specimen Label

Specimen

Biohazard

Specimen

Location

Specimen

Created On

Specimen

Freezer Thaw Cycle

Specimen

Increment Freeze Thaw Cycle

Specimen

Comments

Specimen

Collection Date

Specimen

Collector

Specimen

Received Date

Specimen

Receiver

Specimen

Collection Container

Specimen

Collection Procedure

Specimen

Received Quality

Specimen

Frozen Time

Specimen

Frozen Method

Specimen

Frozen Comments

Examples

Participant Page

We can add edit checks on participant fields using the record type as ‘cpr’

Attribute Type

Description

Example JSON

Attribute Type

Description

Example JSON

Text

Patient first name, last name should not be null.

Text

Allow only capital letters in the field first name

Numeric field

The participant’s age registered under the COVID protocol should be between 18-55

Text Custom Field

If the patient is ‘Dead’ then, specify the value ‘Cause of death.’

Dropdown

Only male participant registrations are allowed

Multi-select field

If Race is one of (White or Asian), then Ethnicity should be 'American.'

Dropdown and Muliselect

  1. If Registration Site='MCRI Repository', then Race values is one of 'White' or 'Asian'

  2. If the patient is ‘Alive’ then Ethnicity should be ‘African’ or 'American'

Custom Field

The email id of the participant should be of the form ‘example@something.com’

Custom Form Field

In the ‘Smoking History Form’ attached at the ‘Participant Forms’ level, if the value of ‘Have you ever smoked’ is ‘Yes’, the error ‘Smokers not allowed!’ should be thrown.

Custom Form Field

‘Male’ participants with the value of ‘Have you ever smoked?’ as ‘Yes’ are not allowed. Error ‘Male smokers not allowed!’ should be thrown.

Custom form Date Field

‘Date of participant signed' is a date type custom field. The date is valid if

Valid Date = (Date signed ≤ Today’s Date) otherwise invalid

Calculated Field (Age)

Participant age at the time of registration should be more than 18 years

Dropdown Custom Field

If the patient is ‘Dead’, enter the values for the 'Diagnosed With' field from the dropdown.

Dropdown Multiselect (Custom Field)

If the patient is 'Alive', enter the values for the 'City lived In field from the dropdown.

Fancy Control-User

If the user (Surgeon) is 'Krishna W' then the user needs to provide the death cause value (Custom Field) for the patient.

 

Visit page

We can add edit checks on visit fields using the record type as ‘visit’

Attribute Type

Description

Example JSON

Attribute Type

Description

Example JSON

Dropdown

Clinical diagnosis should be one of 'Cholera', 'Liver cell carcinoma'

Dropdown custom field

If the clinical diagnosis is one of 'Cholera', 'Liver cell carcinoma', then the Diagnosis subtype ID 'Negative'

Date

Participant/Visit fields:

"Visit date should be the same or later than the registration date!"

Dropdown (Core fields)

The values for clinical diagnoses should be ‘Breast implant status’ and ‘Other disorders of breast.’

Dropdown (Core fields)

If ‘Clinical Diagnoses’ is one of List a then acceptable ‘Anatomic Site’ values will be among List b.
List a: '10 weeks gestation of pregnancy, '11 weeks gestation of pregnancy', '12 weeks gestation of pregnancy', '13 weeks gestation of pregnancy, '14 weeks gestation of pregnancy
List b: Extrahepatic bile duct Intrahepatic bile duct Liver

Dropdown (Custom Form fields)

If the ‘Tumor Site/Anatomic site’ value from the custom form is ‘Extrahepatic bile duct', 'Intrahepatic bile duct', 'Liver', then the allowed values for the 'Tumor Morphology Diagnosis’ field from the custom form will be '10 weeks gestation of pregnancy', '11 weeks gestation of pregnancy', '12 weeks gestation of pregnancy, '13 weeks gestation of pregnancy, '14 weeks gestation of pregnancy'

Dropdown (Core and Custom Form)

If the 'Primary Site' values (Custom Form) are 'Extrahepatic bile duct', 'Intrahepatic bile duct', 'Liver', the allowed value for Clinical Diagnosis (Core) should be in {'10 weeks gestation of pregnancy', '11 weeks gestation of pregnancy', '12 weeks gestation of pregnancy', '13 weeks gestation of pregnancy', '14 weeks gestation of pregnancy'}

Dropdown (Core and Custom Form)

If the diagnosis field from the visit level form contains values from the below List, then the allowed value for Clinical Diagnosis (Core) should be 'Non-malignant'.

List:

‘8006/2 Observation for suspected malignant neoplasm’, '8009/1 Non-malignant diagnosis, no history of cancer (Other Medical Care)'.

Why is RegEx used in the edit check? Providing these long multi-choice values in the edit check is not flexible, so RegEx checks for the statement and matches the values.

Specimen page

We can add edit checks on specimen fields using the record type as ‘specimen’

Attribute Type

Description

Example JSON

Attribute Type

Description

Example JSON

Dropdown core

If the participant gender is ‘Male’, then the anatomic site cannot include 'Female genital tract, NOS', 'Overlapping lesion of female genital organs', 'Other specified parts of female genital organs', 'Breast, NOS'

Date

Registration Date vs. Collection Date

The specimen collection date should be the same or later than the registration date.

Dropdown custom

The anatomic site should be Brain NOS OR Abdomen NOS for tissue samples

Date field (core)

Specimen data should be the same or later than the Visit date!

(Visit date allows only ‘Date' whereas Specimen collection date allows 'Date and time data entry. In this Edit check, similar date format is provided for both the date fields.)


Shipment page

We can add edit checks on shipment fields using the record type as ‘shipment’

Attribute Type

Description

Example JSON

Shipment Shipped Date

Shipment Shipped date should be lesser than current date/time

Received Date

Shipment received date should be lesser than current date/time

Shipment Shipped Date Vs. Specimen Collection Date

Shipment Shipped date should be greater than the specimen collection date

 

Shipment Received Date Vs. Specimen Collection Date

Shipment received date should be greater than the specimen collection date

Shipment shipped Date Vs. Specimen Collection Date

Shipment shipped date should be greater than the specimen collection date, where the collection is date considered as one day earlier than actual.

Passing condition:

Shipped date:07-02-2023 00:00

Collection date:07-02-2023 22:14

Failed condition:

Shipped date:07-02-2023 00:00

Collection date:08-02-2023 02.14

Shipment shipped Date Vs. Specimen Collection Date

Shipment shipped date should be greater than the specimen collection date on specimen event page edit.

The regular expression of comparing shipped Vs collection date doesn’t work on Specimen Event page. To ensure the check validate on ‘Editing' the ‘Collection Event date and time’ this expression is used.

Shipment shipped Date Vs. Specimen Collection Date

The Shipment shipped date can be lesser than specimen collection date by 24 hours, not more than that.

Passing condition:

Shipped date:06-02-2023 20:00

Collection date:07-02-2023 18:14

Failed condition:

Shipped date:06-02-2023 20:00

Collection date:08-02-2023 22.14

 

Shipment shipped Date Vs. Specimen Collection Date

This expression only compares both shipped date Vs Collection Date and ignore the time attached to both fields.


Order page

We can add edit checks on order fields using the record type as ‘order’

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com