© 2024 IQVIA - All Rights Reserved

Gender-specific Validation

Summary

Methods and edit checks have access to a variety of data in the volunteer profile. This is made available to the formal expression via the formJson variable which is implicitly passed to all executions. Note that the form data itself is removed from the below, showing only the study and subject context that is available.

{ "form": { "name": "Vital Signs", "studyEventName": "Day -1", "cohort": { "id": 499, "name": "Cohort 1", "epoch": { "id": 256, "name": "Treatment" } }, "timepoint": null, "canceled": false, "dataCollectionStatus": "Complete", "subject": { "id": 216, "locked": false, "screeningNumber": "S001", "leadInNumber": null, "randomizationNumber": "1001", "subjectStudyStatus": "Active", "subjectEligibilityType": "Eligible", "volunteer": { "id": 645, "initials": "ECT", "age": 45, "sexMale": true, "dateOfBirth": "1975-07-04" } } } }

In this case the task is to validate based on a subject’s age. The age is available in the Json directly, and can be accessed by:

formJson.form.subject.volunteer.sexMale

Note that this is a general technique that can be applied to many use cases and leverage any data passed in formJson.

Form Setup and Edit Check

Any form will work for this scenario since all executions have access to the volunteer profile info. In this example we are applying validation that is age dependent for the systolic pressure.

Here is an example form setup for this method.

And here is a method which applies gender-specific validations.

Note that the impact here is to simply compare the selected gender to the value in the volunteer profile. If they do not match, the check returns false and the item is flagged as nonconformant.

var selectedGender = itemJson.item.value; var isVolunteerMale = formJson.form.subject.volunteer.sexMale if (isVolunteerMale) { return selectedGender == "MALE" } else { return selectedGender == "FEMALE" }

Exported and Printed Copies Are Uncontrolled