Summary

This article covers a script example of Before Informed Consent check.


Table of Contents


Description

This script checks to make sure that the date entered to the specified question does not occur before the date that the subject signed informed consent. The first part of the script checks to make sure each target question and the informed consent question is set. Then the script compares each target question date to ensure that it is greater than or equal to the informed consent date. Listing dependent question paths allow the script to trigger when a dependent variable existing on another form is updated with a new value.

Note: This script will not work for partial date formats.


Script

<script scriptId="beforeInformedConsentCheck">
    <body>
        <s:alert>
            <s:expression>
                <s:or>
                    <s:not>
                        <s:isSet/>
                    </s:not>
                    <s:not>
                        <s:isSet>
                            <s:question>
                                <s:question path="/screening/ic.icdt"/>
                            </s:question>
                        </s:isSet>
                    </s:not>
                    <s:gte>
                        <s:datePath path=":value"/>
                        <s:datePath path="/screening/ic.icdt:value"/>
                    </s:gte>
                </s:or>
            </s:expression>
            <s:correction>
                <s:string value="optional"/>
            </s:correction>
            <s:text>
                <s:string value="The Date is less than the 'Date subject signed informed consent' on the Informed Consent form. Please review and clarify."/>
            </s:text>
        </s:alert>
    </body>
<target typeId="questions" when="preprocess" shouldReconcile='true'/>
<target typeId="go" when="preprocess" shouldReconcile='true' />
<target typeId="here" when="preprocess" shouldReconcile='true' />
<dependent path="/screening/ic.icdt"/>
</script>



Need more help?

Please visit the Fountayn Contact Information page.