Reference Type: Supported, Category: Alerts, Integration Agreement: 3213
This API establishes a surrogate for alerts. It should be used instead of the SETSURO^XQALSURO API. The SETSURO1^XQALSURO API also tests for cyclic relationships (such that the user eventually would become the surrogate). SETSURO1 does these tests and therefore has the possibility of failure. It returns either of the following values:
Previously, the SETSURO^XQALSURO API returned no value and, as long as
both a user and surrogate were specified, would simply store the values. This
left open the possibility that the user was specified as the surrogate or that
a chain of surrogates ended up pointing again at the user, cases that could
result in a very tight, non-ending, loop being generated if an alert was sent.
These possibilities have been tested for in the interactive specification of
surrogates, and is tested for non-interactive usage in the SETSURO1^XQALSURO
NOTE: The SETSURO1^XQALSURO API should be used instead of the SETSURO^XQALSURO API (i.e., IA# 2790).
(required) User's DUZ number (i.e., Internal Entry Number in the NEW PERSON file [#200]) for which the surrogate should act in receiving alerts.
(required) Surrogate's DUZ number (i.e., Internal Entry Number in the NEW PERSON file [#200]) for the user who will receive and process alerts for XQAUSER.
(optional) The start date/time or the surrogate activity, in VA FileMan internal format. If the start date/time is not specified, the surrogate relationship begins immediately.
(optional) The end date/time for the end of the surrogate relationship, in VA FileMan internal format. If the end date/time is not specified, the surrogate remains active until another surrogate is specified or the surrogate is deleted.
>S XQAUSER=DUZ >S XQASURRO=45 >S XQASTART=3001004.1630 >S XQAEND=3001008.1630 >S X=$$SETSURO1^XQALSURO(XQAUSER,XQASURRO,XQASTART,XQAEND) >I 'X W !,"Could not activate surrogate",!,?5,X Q
August 26, 2011