Summary

This script is an email trigger that evaluates the target (pacemake) and if “With Failure to Capture Consistently” (FAILCAPT) or “With Failure to Sense Patient’s Own Activity” (FAILSENS) is checked then it sends out an email. It determines which environment the script is running on (Staging or Production) and sends out the email to that predetermined list. Staging includes the design/test/approve environment whereas Production is the live/production environment. Please consider the existence of training sites on production. 


Note: -'shouldReconcile' is set to ***false*** so that the script will not be evaluated again upon use of the reconcile utility. This script will execute only when data entry is done. 


Script

<script scriptId="emailPacemaker">
    <body>
        <s:if>
            <s:or>
                <s:contains>
                    <s:question path=".pacemake"/>
                    <s:string value="FAILCAPT"/>
                </s:contains>
                <s:contains>
                    <s:question path=".pacemake"/>
                    <s:string value="FAILSENS"/>
                </s:contains>
            </s:or>
            <s:email>
                <s:to>
                    <s:if>
                        <s:eq>
                            <s:environment/>
                            <s:string value="Staging"/>
                        </s:eq>
                        <s:list>
                            <s:string value="emailtriggers@fountayn.com"/>
                            <s:string value="test1@clientAddress.net"/>
                        </s:list>
                        <s:list>
                            <s:string value="test1@clientAddress.net"/>
                            <s:string value="test2@clientAddress.net"/>
                            <s:string value="test3@clientAddress.net"/>
                        </s:list>
                    </s:if>
                </s:to>
                <s:from>
                    <s:string value="no-reply@fountayn.com"/>
                </s:from>
                <s:subject>
                    <s:string value="Rhythm"/>
                </s:subject>
                <s:body>
                    <s:concat>
                        <s:string value="Patient #: "/>
                        <s:stringPath path="/registration.patID:value"/>
                        <s:string value=" Ascension #: "/>
                        <s:stringPath path=".accessno:value"/>
                        <s:string value=" - Rhythm is With Failure to Capture Consistently
                         or With Failure to Sense Patient's Own Activity"/>
                    </s:concat>
                </s:body>
            </s:email>
        </s:if>
    </body>
    <target typeId="pacemake" action="update" shouldReconcile='false' when="after"/>
</script>




Need more help?

Please visit the Fountayn Contact Information page.