We are currently working on the forum. For the short-term, all forum content will be in read-only format. We apologize for the interruption and look forward to collaborating with you shortly. All the best in your research!

Writing Validation syntax

I am developing an OpenClinica database that should be able to give me adequate data validation checks at data entry level. The variables are single select dichotomous with only two responses Yes and No. I need a validation rule that allows one to only enter Yes for some variables and No for others.
Suppose I have a variable called "infage" which asks if the patient is within the age bracket, what validation rule do I need to make sure only a Yes is entered?
Moses Ngari
KEMRI - Wellcome Trust Programme
Kenya
This e-mail (including any attachment to it) contains information
which is confidential. It is intended only for the use of the named
recipient. If you have received this e-mail in error, please let us know
by replying to the sender, and immediately delete it from your system.
Please note, that in these circumstances, the use, disclosure,
distribution or copying of this information is strictly prohibited. We
apologize for any inconvenience that may have been caused to you.
KEMRI-Wellcome Trust Programmecannot accept any responsibility for the accuracy
or completeness of this message as it has been transmitted over a public
network. KEMRI-Wellcome Trust Programme reserves the right to monitor all incoming and
outgoing email traffic. Although the Programme has taken reasonable
precautions to ensure no viruses are present in emails, it cannot
accept responsibility for any loss or damage arising from the use of the
email or attachments. Any views expressed in this message are those of
the individual sender, except where the sender specifically states them
to be the views of KEMRI- Wellcome Trust Programme".

Comments

  • Hello Moses,
    The type of validation that you are asking about can be accomplished in more than one way.
    If you are only looking to validate the input for a single field, you can build the edit check into the CRF in the 'Validation' column. When building edit checks in the CRF, you can use basic excel functions (as detailed in the instructions worksheet of the template), and regular expressions.
    Example: If your response options text were Yes,No and response values are 1,0 and you want to make sure that the data entry person is entering only Yes, or is forced to enter a discrepancy note you could use:
    func: eq(1) or regexp: /1/ with a validation error message "If no was selected, please enter a discrepancy note before saving this section.."
    Additionally, if the validation is study specific or should be cross-field or cross-form, a rule can be written to validate the same input.
    I hope this is helpful.
    Best Regards,
    Alicia
    . . . . . . . . . . . . . . . . . . . .
    Alicia Goodwin
    Akaza Research
    400 One Kendall Square
    Cambridge, MA 02139
    tel: 617.621.8585 ext. 24
    [email protected]
    www.akazaresearch.com
    www.openclinica.org
    Open Source Platform for Clinical Research
    Register Now for the OpenClinica European Summit 2009

    -----Original Message-----
    Sent: Tuesday, March 24, 2009 3:27 AM
    To: [email protected]
    Subject: [Users] Writing Validation syntax
    I am developing an OpenClinica database that should be able to give me adequate data validation checks at data entry level. The variables are single select dichotomous with only two responses Yes and No. I need a validation rule that allows one to only enter Yes for some variables and No for others.
    Suppose I have a variable called "infage" which asks if the patient is within the age bracket, what validation rule do I need to make sure only a Yes is entered?
    Moses Ngari
    KEMRI - Wellcome Trust Programme
    Kenya
    This e-mail (including any attachment to it) contains information
    which is confidential. It is intended only for the use of the named
    recipient. If you have received this e-mail in error, please let us know
    by replying to the sender, and immediately delete it from your system.
    Please note, that in these circumstances, the use, disclosure,
    distribution or copying of this information is strictly prohibited. We
    apologize for any inconvenience that may have been caused to you.
    KEMRI-Wellcome Trust Programmecannot accept any responsibility for the accuracy
    or completeness of this message as it has been transmitted over a public
    network. KEMRI-Wellcome Trust Programme reserves the right to monitor all incoming and
    outgoing email traffic. Although the Programme has taken reasonable
    precautions to ensure no viruses are present in emails, it cannot
    accept responsibility for any loss or damage arising from the use of the
    email or attachments. Any views expressed in this message are those of
    the individual sender, except where the sender specifically states them
    to be the views of KEMRI- Wellcome Trust Programme".
  • mngarimngari Posts: 5
    Thank Alicia.
    This is what I have been looking for. It has solved my problem.
    Thank once more.
    Kind regards
    Moses
    >>> >>> "Alicia Goodwin" 3/24/2009 4:40 PM >>>
    Hello Moses,
    The type of validation that you are asking about can be accomplished in more than one way.
    If you are only looking to validate the input for a single field, you can build the edit check into the CRF in the 'Validation' column. When building edit checks in the CRF, you can use basic excel functions (as detailed in the instructions worksheet of the template), and regular expressions.
    Example: If your response options text were Yes,No and response values are 1,0 and you want to make sure that the data entry person is entering only Yes, or is forced to enter a discrepancy note you could use:
    func: eq(1) or regexp: /1/ with a validation error message "If no was selected, please enter a discrepancy note before saving this section.."
    Additionally, if the validation is study specific or should be cross-field or cross-form, a rule can be written to validate the same input.
    I hope this is helpful.
    Best Regards,
    Alicia
    . . . . . . . . . . . . . . . . . . . .
    Alicia Goodwin
    Akaza Research
    400 One Kendall Square
    Cambridge, MA 02139
    tel: 617.621.8585 ext. 24
    [email protected]
    www.akazaresearch.com
    www.openclinica.org
    Open Source Platform for Clinical Research
    Register Now for the OpenClinica European Summit 2009

    -----Original Message-----
    Sent: Tuesday, March 24, 2009 3:27 AM
    To: [email protected]
    Subject: [Users] Writing Validation syntax
    I am developing an OpenClinica database that should be able to give me adequate data validation checks at data entry level. The variables are single select dichotomous with only two responses Yes and No. I need a validation rule that allows one to only enter Yes for some variables and No for others.
    Suppose I have a variable called "infage" which asks if the patient is within the age bracket, what validation rule do I need to make sure only a Yes is entered?
    Moses Ngari
    KEMRI - Wellcome Trust Programme
    Kenya
    This e-mail (including any attachment to it) contains information
    which is confidential. It is intended only for the use of the named
    recipient. If you have received this e-mail in error, please let us know
    by replying to the sender, and immediately delete it from your system.
    Please note, that in these circumstances, the use, disclosure,
    distribution or copying of this information is strictly prohibited. We
    apologize for any inconvenience that may have been caused to you.
    KEMRI-Wellcome Trust Programmecannot accept any responsibility for the accuracy
    or completeness of this message as it has been transmitted over a public
    network. KEMRI-Wellcome Trust Programme reserves the right to monitor all incoming and
    outgoing email traffic. Although the Programme has taken reasonable
    precautions to ensure no viruses are present in emails, it cannot
    accept responsibility for any loss or damage arising from the use of the
    email or attachments. Any views expressed in this message are those of
    the individual sender, except where the sender specifically states them
    to be the views of KEMRI- Wellcome Trust Programme".
This discussion has been closed.