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

$$GETSURO^XQALSURO(): Get Current Surrogate Information

Reference Type: Supported, Category: Alerts, ICR#: 3213

Description

The $$GETSURO^XQALSURO extrinsic function returns the following string of information on the current surrogate for the user with XQAUSER as his or her Internal Entry Number (IEN) in the NEW PERSON (#200) file:

  ien^NAME^FM_STARTDATE^FM_ENDDATE

If there is no surrogate, the result is:

  ^^^

If either of the start or end dates and times is not specified, a NULL value is returned for that piece of the return string.

NOTE: For a description of each piece of information separated by the caret (^), see the "Output" section.

Format

  $$GETSURO^XQALSURO(xqauser)

Input Parameters

xqauser:

(required) This is the Internal Entry Number (IEN) in the NEW PERSON (#200) file of the user for whom the alert surrogate information is to be returned.

Output

returns:

Returns the following string of information, each piece separated by a caret (^):

  IEN^NAME^FM_STARTDATE^FM_ENDDATE
  • IEN—Internal Entry Number (IEN) of the SURROGATE in the NEW PERSON (#200) file.

  • NAME—Contents of the .01 field for the SURROGATE.

  • FM_STARTDATE—Starting date/time for the SURROGATE in internal VA FileMan format.

  • FM_ENDDATE—Ending date/time for the SURROGATE in internal VA FileMan format.

Example

>S X=$$GETSURO^XQALSURO(124)

>W X
2327^KRNUSER,FOUR^3000929.1630^3001006.0800

This indicates that user #2327 (Four Krnuser) becomes active as surrogate at 4:30 PM 9/29/00 and remains surrogate until 8:00 am on 10/06/00.