We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Incorrect handling of the ne() validation?

I have an item in my CRF concerning anti-conception. It must be answered
with "Yes", but is only relevant for females. So I have defined the field
like this:
Type: radio
Reponse set: Yes, No // 1, 0
Data type: INT
Validation: ne(0)
Required: 0
-allowing the field not to be answered if the subject is male.
But if I leave the field unanswered, the validation fails! The value of the
field should be NULL or "" or whatever the appropriate null-value is, which
is not equal to 0 (zero). Too, I guess the validation shouldn't be fired at
all since the field isn't populated.
Can anyone help me out here? How can I make this validation work the way I
intend it to do? And is this a bug in OpenClinica? I'm running 3.0.4.
Best regards,
Janus

Comments

  • JanusJanus Posts: 260
    I have an item in my CRF concerning anti-conception. It must be answered
    with "Yes", but is only relevant for females. So I have defined the field
    like this:
    Type: radio
    Reponse set: Yes, No // 1, 0
    Data type: INT
    Validation: ne(0)
    Required: 0
    -allowing the field not to be answered if the subject is male.
    But if I leave the field unanswered, the validation fails! The value of the
    field should be NULL or "" or whatever the appropriate null-value is, which
    is not equal to 0 (zero). Too, I guess the validation shouldn't be fired at
    all since the field isn't populated.
    Can anyone help me out here? How can I make this validation work the way I
    intend it to do? And is this a bug in OpenClinica? I'm running 3.0.4.
    Best regards,
    Janus
  • kristiakkristiak Posts: 1,338 ✭✭✭
    Hi Janus,
    I have a similar CRF where a question about pregnancy is asked. I have added
    another radio button which I named "Not applicable" and it works fine.
    Thus my fields are:
    Type: radio
    Reponse set: Yes, No, Not Applicable // 2, 1, 0
    Data type: INT
    Validation:
    Required: 1
    I agree that it requires an answer but that I think is OK. In OC 3.1 we can
    use dynamic forms which allows for much more flexibility.
    Regards
    Krister
    -----Original Message-----
    On Behalf Of [email protected]
    Sent: den 21 januari 2011 13:31
    To: [email protected]; [email protected]
    Subject: [Users] Incorrect handling of the ne() validation?
    I have an item in my CRF concerning anti-conception. It must be answered
    with "Yes", but is only relevant for females. So I have defined the field
    like this:
    Type: radio
    Reponse set: Yes, No // 1, 0
    Data type: INT
    Validation: ne(0)
    Required: 0
    -allowing the field not to be answered if the subject is male.
    But if I leave the field unanswered, the validation fails! The value of the
    field should be NULL or "" or whatever the appropriate null-value is, which
    is not equal to 0 (zero). Too, I guess the validation shouldn't be fired at
    all since the field isn't populated.
    Can anyone help me out here? How can I make this validation work the way I
    intend it to do? And is this a bug in OpenClinica? I'm running 3.0.4.
    Best regards,
    Janus
  • Hi Janus,
    At some point, when creating a CRF (I'm not logged in right now) you are asked to define the default values for the case that no value is entered. If you choose 0 (zero) here, the validation should work, I guess.
    Hope this helps,
    all the best Carsten
    Am 21.01.2011 13:31, schrieb [email protected]:
    > I have an item in my CRF concerning anti-conception. It must be answered
    > with "Yes", but is only relevant for females. So I have defined the field
    > like this:
    >
    > Type: radio
    > Reponse set: Yes, No // 1, 0
    > Data type: INT
    > Validation: ne(0)
    > Required: 0
    >
    > -allowing the field not to be answered if the subject is male.
    >
    > But if I leave the field unanswered, the validation fails! The value of the
    > field should be NULL or "" or whatever the appropriate null-value is, which
    > is not equal to 0 (zero). Too, I guess the validation shouldn't be fired at
    > all since the field isn't populated.
    >
    > Can anyone help me out here? How can I make this validation work the way I
    > intend it to do? And is this a bug in OpenClinica? I'm running 3.0.4.
    >
    >
    > Best regards,
    > Janus
    >
    >
    >
  • JanusJanus Posts: 260
    Hi Carsten and Krister,
    That is true, you can set the default value to 0. But I don't want a
    default value, as the field shoud be left empty if the subject is male. In
    that case, the questions doesn't apply to the subject.
    I see it as there's a discrepancy between the use of validations and
    marking a field as not required. The validation overrides the not required
    flag, which I think it shouldn't. It's true that we get dynamics in 3.1,
    and I'm looking very much forward to this, but never the less I still think
    the above mentioned override isn't correct and should be changed.
    Best regards,
    Janus

    Carsten Raschke
    To
    Sent by: [email protected]
    [email protected] cc
    nclinica.com
    Subject
    Re: [Users] Incorrect handling of
    21-01-2011 18:07 the ne() validation?


    Please respond to
    [email protected]
    .com


    Hi Janus,
    At some point, when creating a CRF (I'm not logged in right now) you are
    asked to define the default values for the case that no value is entered.
    If you choose 0 (zero) here, the validation should work, I guess.
    Hope this helps,
    all the best Carsten
    Am 21.01.2011 13:31, schrieb [email protected]:
    I have an item in my CRF concerning anti-conception. It must be
    answered
    with "Yes", but is only relevant for females. So I have defined the
    field
    like this:
    Type: radio
    Reponse set: Yes, No // 1, 0
    Data type: INT
    Validation: ne(0)
    Required: 0
    -allowing the field not to be answered if the subject is male.
    But if I leave the field unanswered, the validation fails! The value
    of the
    field should be NULL or "" or whatever the appropriate null-value is,
    which
    is not equal to 0 (zero). Too, I guess the validation shouldn't be
    fired at
    all since the field isn't populated.
    Can anyone help me out here? How can I make this validation work the
    way I
    intend it to do? And is this a bug in OpenClinica? I'm running 3.0.4.
    Best regards,
    Janus
This discussion has been closed.