#### Welcome!

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

# Rule to checking grid values against a single textbox

Posts: 54
Hi All,

I’ve been working on what is probably not the first (nor the last) implementation of RECIST v.1.1 in OpenClinica. The CRF setup is that target lesions are recorded in rows of a grid on one tab, and sum of lesion measurements field is on the following tab. I’d like to have some way to check that the measurements are totalled correctly by the user. Attached are a couple of screen shots of the CRF to illustrate.

Given that:
- group-calculations don’t work if there is a null value in the array (the field returns ‘’), and
- the value of zero for measurements has a meaning (complete disappearance of the lesion) so zero can’t be used to avoid null, and
- it is appropriate to have a null value in some cases (the lesion was not assessed at the visit), and
- subjects can have 1, 2, 3, 4 or 5 target lesions evaluated throughout the study, but are only expected to add ‘enough’ rows;

the solution I’m thinking of is to write a rule to check whether or not the sum the user has entered is correct. However, rules also fail to run when null values are in the array, so I can’t just write the equivalent of:

‘does lesion 1 value + lesion 2 value + lesion 3 value + lesion 4 value + lesion 5 value = target lesion sum field’

So the rule it seems I need to write has to cover all the cases of there being a value and there being a null, for a minimum of 1 and maximum of 5 lesions, e.g.

- 1 lesion recorded:
- does lesion 1 value = sum

- 2 lesions recorded:
- does lesion 1 value + lesion 2 value = sum,
- does lesion 1 value = sum if lesion 2 value is null,
- does lesion 2 value = sum if lesion 1 value is null

- 3 lesions recorded:
- does lesion 1 value + lesion 2 value + lesion 3 value = sum,
- does lesion 1 value + lesion 3 value = sum if lesion 2 value is null,
- does lesion 2 value + lesion 3 value = sum if lesion 1 value is null

... and so on for all the combinations, for up to 5 lesions. I think works out to about 30 cases.

Before I go off and give myself a headache by writing this gargantuan rule, I wanted to check if anyone out there had come across a similar problem and were willing to share their solution, or if anyone had any insights on writing this rule that might simplify the rule expression.

Best regards,

Lindsay Stevens | Clinical Data Coordinator
NHMRC Clinical Trials Centre, THE UNIVERSITY OF SYDNEY
Office: Level 2, 6-10 Mallett St | Camperdown | NSW | 2050
Mail: Locked Bag 77 | Camperdown | NSW | 1450
T +61 2 9562 5369 | F +61 2 9562 5094
E [email protected] | W www.ctc.usyd.edu.au

This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal
IMPORTANT NOTICE: This e-mail and any attachment to it are intended only to be read or used by the named addressee. It is confidential and may contain legally privileged information. No confidentiality or privilege is waived or lost by any mistaken transmission to you. The CTC is not responsible for any unauthorised alterations to this e-mail or attachment to it. Views expressed in this message are those of the individual sender, and are not necessarily the views of the CTC. If you receive this e-mail in error, please immediately delete it and notify the sender. You must not disclose, copy or use any part of this e-mail if you are not the intended recipient.
tab with target lesion grid.JPG
tab with target lesion sum (response evaluation fields shown with rule).JPG
Attachments:
tab with target lesion grid.JPG 133 KB
tab with target lesion sum (response evaluation fields shown with rule).JPG 32.6 KB

• Posts: 54
Hi All,

I’ve been working on what is probably not the first (nor the last) implementation of RECIST v.1.1 in OpenClinica. The CRF setup is that target lesions are recorded in rows of a grid on one tab, and sum of lesion measurements field is on the following tab. I’d like to have some way to check that the measurements are totalled correctly by the user. Attached are a couple of screen shots of the CRF to illustrate.

Given that:
- group-calculations don’t work if there is a null value in the array (the field returns ‘’), and
- the value of zero for measurements has a meaning (complete disappearance of the lesion) so zero can’t be used to avoid null, and
- it is appropriate to have a null value in some cases (the lesion was not assessed at the visit), and
- subjects can have 1, 2, 3, 4 or 5 target lesions evaluated throughout the study, but are only expected to add ‘enough’ rows;

the solution I’m thinking of is to write a rule to check whether or not the sum the user has entered is correct. However, rules also fail to run when null values are in the array, so I can’t just write the equivalent of:

‘does lesion 1 value + lesion 2 value + lesion 3 value + lesion 4 value + lesion 5 value = target lesion sum field’

So the rule it seems I need to write has to cover all the cases of there being a value and there being a null, for a minimum of 1 and maximum of 5 lesions, e.g.

- 1 lesion recorded:
- does lesion 1 value = sum

- 2 lesions recorded:
- does lesion 1 value + lesion 2 value = sum,
- does lesion 1 value = sum if lesion 2 value is null,
- does lesion 2 value = sum if lesion 1 value is null

- 3 lesions recorded:
- does lesion 1 value + lesion 2 value + lesion 3 value = sum,
- does lesion 1 value + lesion 3 value = sum if lesion 2 value is null,
- does lesion 2 value + lesion 3 value = sum if lesion 1 value is null

... and so on for all the combinations, for up to 5 lesions. I think works out to about 30 cases.

Before I go off and give myself a headache by writing this gargantuan rule, I wanted to check if anyone out there had come across a similar problem and were willing to share their solution, or if anyone had any insights on writing this rule that might simplify the rule expression.

Best regards,

Lindsay Stevens | Clinical Data Coordinator
NHMRC Clinical Trials Centre, THE UNIVERSITY OF SYDNEY
Office: Level 2, 6-10 Mallett St | Camperdown | NSW | 2050
Mail: Locked Bag 77 | Camperdown | NSW | 1450
T +61 2 9562 5369 | F +61 2 9562 5094
E [email protected] | W www.ctc.usyd.edu.au

This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal
IMPORTANT NOTICE: This e-mail and any attachment to it are intended only to be read or used by the named addressee. It is confidential and may contain legally privileged information. No confidentiality or privilege is waived or lost by any mistaken transmission to you. The CTC is not responsible for any unauthorised alterations to this e-mail or attachment to it. Views expressed in this message are those of the individual sender, and are not necessarily the views of the CTC. If you receive this e-mail in error, please immediately delete it and notify the sender. You must not disclose, copy or use any part of this e-mail if you are not the intended recipient.
tab with target lesion grid.JPG
tab with target lesion sum (response evaluation fields shown with rule).JPG
Attachments:
tab with target lesion grid.JPG 133 KB
tab with target lesion sum (response evaluation fields shown with rule).JPG 32.6 KB
• ✭✭✭ Posts: 818 ✭✭✭
Hi Lindsay,

An alternative could be that you add another Item to your GRID with lesions, called MForTotal. This would hold the Measurement for total. You can fill this Item with an InsertAction:
If Measurement equals “” then insert 0
If Measurement not equals “” then insert Measurement

This way all rows have a value and then you can add an Item with a group-calculation.
I attached the (mini-)CRF plus the Rule file, but basically that’s it.
Hope this helps,

Gerben Rienk
http://www.trialdatasolutions.com

I_TDSLE_MEASUREMENT

I_TDSLE_MEASUREMENT

Insert value for measurement total
I_TDSLE_MEASUREMENT eq ""

Van: [email protected] [mailto:[email protected]] Namens Lindsay Stevens
Verzonden: donderdag 25 oktober 2012 9:38
Aan: '[email protected]'; '[email protected]'
Onderwerp: [Users] Rule to checking grid values against a single textbox

Hi All,

I’ve been working on what is probably not the first (nor the last) implementation of RECIST v.1.1 in OpenClinica. The CRF setup is that target lesions are recorded in rows of a grid on one tab, and sum of lesion measurements field is on the following tab. I’d like to have some way to check that the measurements are totalled correctly by the user. Attached are a couple of screen shots of the CRF to illustrate.

Given that:
- group-calculations don’t work if there is a null value in the array (the field returns ‘’), and
- the value of zero for measurements has a meaning (complete disappearance of the lesion) so zero can’t be used to avoid null, and
- it is appropriate to have a null value in some cases (the lesion was not assessed at the visit), and
- subjects can have 1, 2, 3, 4 or 5 target lesions evaluated throughout the study, but are only expected to add ‘enough’ rows;

the solution I’m thinking of is to write a rule to check whether or not the sum the user has entered is correct. However, rules also fail to run when null values are in the array, so I can’t just write the equivalent of:

‘does lesion 1 value + lesion 2 value + lesion 3 value + lesion 4 value + lesion 5 value = target lesion sum field’

So the rule it seems I need to write has to cover all the cases of there being a value and there being a null, for a minimum of 1 and maximum of 5 lesions, e.g.

- 1 lesion recorded:
- does lesion 1 value = sum

- 2 lesions recorded:
- does lesion 1 value + lesion 2 value = sum,
- does lesion 1 value = sum if lesion 2 value is null,
- does lesion 2 value = sum if lesion 1 value is null

- 3 lesions recorded:
- does lesion 1 value + lesion 2 value + lesion 3 value = sum,
- does lesion 1 value + lesion 3 value = sum if lesion 2 value is null,
- does lesion 2 value + lesion 3 value = sum if lesion 1 value is null

... and so on for all the combinations, for up to 5 lesions. I think works out to about 30 cases.

Before I go off and give myself a headache by writing this gargantuan rule, I wanted to check if anyone out there had come across a similar problem and were willing to share their solution, or if anyone had any insights on writing this rule that might simplify the rule expression.

Best regards,

Lindsay Stevens | Clinical Data Coordinator
NHMRC Clinical Trials Centre, THE UNIVERSITY OF SYDNEY
Office: Level 2, 6-10 Mallett St | Camperdown | NSW | 2050
Mail: Locked Bag 77 | Camperdown | NSW | 1450
T +61 2 9562 5369 | F +61 2 9562 5094
E [email protected] | W www.ctc.usyd.edu.au

This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal
IMPORTANT NOTICE: This e-mail and any attachment to it are intended only to be read or used by the named addressee. It is confidential and may contain legally privileged information. No confidentiality or privilege is waived or lost by any mistaken transmission to you. The CTC is not responsible for any unauthorised alterations to this e-mail or attachment to it. Views expressed in this message are those of the individual sender, and are not necessarily the views of the CTC. If you receive this e-mail in error, please immediately delete it and notify the sender. You must not disclose, copy or use any part of this e-mail if you are not the intended recipient.
Attachments:
Lesions.zip 14.8 KB
• Posts: 54
Hi Gerben,

Sorry I didn’t see your reply until now – thanks for this suggestion. I ended up not programming the gargantuan rule. Instead, checking that the sum is correct was just added to the list of things to be manually checked on the study.

However along the way I did come up with an alternative that is similar to your suggestion, using decode. Basically the measurement field is replaced with a code list, -1 = Not assessed, 0 = 0, 1 = 1 ... 999=999. A hidden field with a decode function replaces and -1 values with 0 so that a group-calculation will consistently work, so no rule is needed.

The CRF with this method is attached in case it is useful to anyone else. A pdf with some screen grabs is also attached so you can see what it looks like / what it does without having to upload it.

Best regards,

Lindsay Stevens | Clinical Data Coordinator
NHMRC Clinical Trials Centre, THE UNIVERSITY OF SYDNEY
Office: Level 2, 6-10 Mallett St | Camperdown | NSW | 2050
Mail: Locked Bag 77 | Camperdown | NSW | 1450
T +61 2 9562 5369 | F +61 2 9562 5094
E [email protected] | W www.ctc.usyd.edu.au
Sent: Friday, 26 October 2012 7:32 AM
To: [email protected]
Subject: Re: [Users] Rule to checking grid values against a single textbox

Hi Lindsay,

An alternative could be that you add another Item to your GRID with lesions, called MForTotal. This would hold the Measurement for total. You can fill this Item with an InsertAction:
If Measurement equals “” then insert 0
If Measurement not equals “” then insert Measurement

This way all rows have a value and then you can add an Item with a group-calculation.
I attached the (mini-)CRF plus the Rule file, but basically that’s it.
Hope this helps,

Gerben Rienk
http://www.trialdatasolutions.com

I_TDSLE_MEASUREMENT

I_TDSLE_MEASUREMENT

Insert value for measurement total
I_TDSLE_MEASUREMENT eq ""

Van: [email protected] [mailto:[email protected]] Namens Lindsay Stevens
Verzonden: donderdag 25 oktober 2012 9:38
Aan: '[email protected]'; '[email protected]'
Onderwerp: [Users] Rule to checking grid values against a single textbox

Hi All,

I’ve been working on what is probably not the first (nor the last) implementation of RECIST v.1.1 in OpenClinica. The CRF setup is that target lesions are recorded in rows of a grid on one tab, and sum of lesion measurements field is on the following tab. I’d like to have some way to check that the measurements are totalled correctly by the user. Attached are a couple of screen shots of the CRF to illustrate.

Given that:
- group-calculations don’t work if there is a null value in the array (the field returns ‘’), and
- the value of zero for measurements has a meaning (complete disappearance of the lesion) so zero can’t be used to avoid null, and
- it is appropriate to have a null value in some cases (the lesion was not assessed at the visit), and
- subjects can have 1, 2, 3, 4 or 5 target lesions evaluated throughout the study, but are only expected to add ‘enough’ rows;

the solution I’m thinking of is to write a rule to check whether or not the sum the user has entered is correct. However, rules also fail to run when null values are in the array, so I can’t just write the equivalent of:

‘does lesion 1 value + lesion 2 value + lesion 3 value + lesion 4 value + lesion 5 value = target lesion sum field’

So the rule it seems I need to write has to cover all the cases of there being a value and there being a null, for a minimum of 1 and maximum of 5 lesions, e.g.

- 1 lesion recorded:
- does lesion 1 value = sum

- 2 lesions recorded:
- does lesion 1 value + lesion 2 value = sum,
- does lesion 1 value = sum if lesion 2 value is null,
- does lesion 2 value = sum if lesion 1 value is null

- 3 lesions recorded:
- does lesion 1 value + lesion 2 value + lesion 3 value = sum,
- does lesion 1 value + lesion 3 value = sum if lesion 2 value is null,
- does lesion 2 value + lesion 3 value = sum if lesion 1 value is null

... and so on for all the combinations, for up to 5 lesions. I think works out to about 30 cases.

Before I go off and give myself a headache by writing this gargantuan rule, I wanted to check if anyone out there had come across a similar problem and were willing to share their solution, or if anyone had any insights on writing this rule that might simplify the rule expression.

Best regards,

Lindsay Stevens | Clinical Data Coordinator
NHMRC Clinical Trials Centre, THE UNIVERSITY OF SYDNEY
Office: Level 2, 6-10 Mallett St | Camperdown | NSW | 2050
Mail: Locked Bag 77 | Camperdown | NSW | 1450
T +61 2 9562 5369 | F +61 2 9562 5094
E [email protected] | W www.ctc.usyd.edu.au

This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal
IMPORTANT NOTICE: This e-mail and any attachment to it are intended only to be read or used by the named addressee. It is confidential and may contain legally privileged information. No confidentiality or privilege is waived or lost by any mistaken transmission to you. The CTC is not responsible for any unauthorised alterations to this e-mail or attachment to it. Views expressed in this message are those of the individual sender, and are not necessarily the views of the CTC. If you receive this e-mail in error, please immediately delete it and notify the sender. You must not disclose, copy or use any part of this e-mail if you are not the intended recipient.
This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal
IMPORTANT NOTICE: This e-mail and any attachment to it are intended only to be read or used by the named addressee. It is confidential and may contain legally privileged information. No confidentiality or privilege is waived or lost by any mistaken transmission to you. The CTC is not responsible for any unauthorised alterations to this e-mail or attachment to it. Views expressed in this message are those of the individual sender, and are not necessarily the views of the CTC. If you receive this e-mail in error, please immediately delete it and notify the sender. You must not disclose, copy or use any part of this e-mail if you are not the intended recipient.
Attachments:
LS_FUNC_TEST3_v.0.0.1.xls 72.0 KB
target lesion measurements.pdf 308 KB
This discussion has been closed.