Summary

This article covers a script example of dynamic filter. 

Table of Contents


Description

This script is used along with the dynamic filter set up on the App Properties tab. In this case, the script evaluates the patient id question and if it is equal to “0000″ it categorizes that patient as “screenFailure” for the dynamic filter named “tracking”. If the patient id question is not equal to “0000″ it categorizes that patient as “randomized” for the dynamic filter named “tracking”. Once set up, this dynamic filter is viewable on all of the managers in eClinical.
App Properties Configuration

Row 1 Column A: “recordDynamicStatus1″ Column B: “tracking||Tracking Filter”

Row 2 Column A: “recordDynamicStatus1Options” Column B: “screenFailure||Screen Failure::randomized||Randomized”

Script

<script scriptId="setDynamicFilter">
    <body>
        <s:if>
            <s:eq>
                <s:numberPath path=":value"/>
                <s:number value="0000"/>
            </s:eq>
            <s:setDynamicStatus>
                <s:object>
                    <s:record />
                </s:object>
                <s:name>
                    <s:string value="tracking" />
                </s:name>
                <s:value>
                    <s:string value="screenFailure" />
                </s:value>
            </s:setDynamicStatus>
            <s:if>
                <s:ne>
                    <s:numberPath path=":value"/>
                    <s:number value="0000"/>
                </s:ne>
                <s:setDynamicStatus>
                    <s:object>
                        <s:record />
                    </s:object>
                    <s:name>
                        <s:string value="tracking" />
                    </s:name>
                    <s:value>
                        <s:string value="randomized" />
                    </s:value>
                </s:setDynamicStatus>
            </s:if>
        </s:if>
    </body>
    <target typeId="patid" when="after" shouldReconcile='true' />
</script>


Need more help?

Please visit the Fountayn Contact Information page.