Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

SETSURO1^XQALSURO(): Establish a Surrogate for Alerts

Reference Type: Supported, Category: Alerts, Integration Agreement: 3213

Description

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 API.

NOTE: The SETSURO1^XQALSURO API should be used instead of the SETSURO^XQALSURO API (i.e., IA# 2790).

Format

  SETSURO1^XQALSURO(xqauser,xqalsuro[,xqalstrt][,xqalend])

Input Parameters

xqauser:

(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.

xqalsuro:

(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.

xqalstrt:

(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.

xqalend:

(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.

Output

returns:

Returns:

  • IEN (value > 0; True)—Surrogate was created successfully.

  • Text String (False)—Text explaining why the surrogate was not created.

Example

>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

 


VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.