Print Page as PDF
XQALBUTL ICR (2788)

XQALBUTL    ICR (2788)

Name Value
NUMBER 2788
IA # 2788
DATE CREATED 1999/03/25
CUSTODIAL PACKAGE KERNEL
CUSTODIAL ISC San Francisco
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE XQALBUTL
NAME XQALBUTL
GENERAL DESCRIPTION
This DBIA lists and defines supported references within
the routine XQALBUTL.

AHISTORY(XQAID,ROOT) - Returns info on alert XQAID in ROOT in global format

$$PENDING(XQAID,XQAUSER) - Indicates whether alert XQAID is pending for user
XQAUSER (1=YES, 0=NO).

$$PKGPEND(XQAUSER,XQAPKG) - Returns 1 if the user indicated by XQAUSER has any
pending alerts in which the first ';'-piece of XQAID contain the package
identifier indicated by XQAPKG.

ALERTDAT(XQAID,ROOT) - Returns info on alert XQAID in ROOT by field and values
(if ROOT is not specified, returned in local variable XQALERTD)

USERLIST(XQAID,ROOT) - Returns list of users who received alert XQAID in array
under ROOT (if ROOT is not specified, returned in local variable XQAUSRS)

USERDATA(XQAID,XQAUSER,ROOT) - Returns info on user XQAUSER for alert XQAID in
ROOT by field and values (if ROOT is not specified, returned in local variable
XQALUSER).
STATUS Active
KEYWORDS
  • XQALBUTL
  • ALERTS
DURATION Till Otherwise Agreed
ID XQALBUTL
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
AHISTORY
Returns information from the alert tracking file for
alert with XQAID as its alert ID.  The data is returned desendent from the
closed root passed in ROOT.

Usually, XQAID will be known based on alert processing.  The following example
illustrates the use of this call and the format of the data returned.

S XQAID="NO-ID;20;2990212.11294719"

D AHISTORY^XQALBUTL(XQAID,"XXXROOT")

ZW XXXROOT

XXXROOT(0)=NO-ID;20;2990212.11294719^2990212.112947^NO-ID^^20 XXXROOT(1)=TEST
MESSAGE (ROUTINE) 20^^^XM XXXROOT(20,0)=^8992.11^20^1
XXXROOT(20,1,0)=20^2990212.112954^2990212.145609^2990212.145621^2990212.145621
XXXROOT(20,"B",20,1)=

This is in the basic structure of the nodes taken from the global for this
entry, which can be seen from a global map view of file 8992.1

^XTV(8992.1,D0,0)= (#.01) NAME [1F] ^ (#.02) DATE CREATED [2D] ^ (#.03) PKG
==>ID [3F] ^ (#.04) PATIENT [4P] ^ (#.05) GENERATED BY [5P] ^
==>(#.06) GENERATED WHILE QUEUED [6S] ^ (#.07) STATUS [7S] ^
==>(#.08) RETENTION DATE [8D] ^

^XTV(8992.1,D0,1)= (#1.01) DISPLAY TEXT [1F] ^ (#1.02) OPTION FOR PROCESSING
==>[2F] ^ (#1.03) ROUTINE TAG [3F] ^ (#1.04) ROUTINE FOR
==>PROCESSING [4F] ^

^XTV(8992.1,D0,2)= (#2) DATA FOR PROCESSING [E1,245F] ^

^XTV(8992.1,D0,20,0)=^8992.11PA^^  (#20) RECIPIENT

^XTV(8992.1,D0,20,D1,0)= (#.01) RECIPIENT [1P] ^ (#.02) ALERT FIRST DISPLAYED
==>[2D] ^ (#.03) FIRST SELECTED ALERT [3D] ^ (#.04)
==>PROCESSED ALERT [4D] ^ (#.05) DELETED ON [5D] ^
==>(#.06) AUTO DELETED [6D] ^ (#.07) FORWARDED BY [7P]
==>^ (#.08) DATE/TIME FORWARDED [8D] ^ (#.09) DELETED
==>BY USER [9P] ^

A set of newer entry points are available for returning this information in a
more user (developer) friendly form which may be more desirable than this
format.

ALERTDAT - returns basic information about the alert
USERLIST - returns the list of users who have received the alert
USERDATA - returns information about one user with respect to the
specified alert
VARIABLES TYPE VARIABLES DESCRIPTION
XQAID Input
This is the value XQAID which is the alert
identifier.  It is passed to the routine or option which is run when the alert
is selected.  It can also be obtained from a listing of all of the XQAIDs for
a specified user and/or patient.
ROOT Input
This argument is a closed reference to a local or
global root.  The information associated with the desired entry in the alert
tracking file is returned descendent from the specified root. The data
returned reflects the global structure of the Alert Tracking file. A more user
(developer) friendly call would be ALERTDAT described within this same unit
which returns the data in an array with the field numbers and names as the
subscripts and the internal and external (if different) values as the value.
PENDING
Returns whether the user specified has the alert
indicated by the argument XQAID pending.  (1=YES, 0=NO).

Usage is as $$PENDING^XQALBUTL(XQAUSER,XQAID)


S XQAID="NO-ID;20;2990212.11294719" W $$PENDING^XQALBUTL(20,XQAID) 0
<===== Not pending


S XQAID="NO-ID;20;2990212.15540723" W $$PENDING^XQALBUTL(20,XQAID) 1
<===== Pending
VARIABLES TYPE VARIABLES DESCRIPTION
XQAUSER Input
This is the internal entry number in file 200 (DUZ
value) for the desired user.
XQAID Input
This is the value XQAID which is the alert
identifier.  It is passed to the routine or option which is run when the alert
is selected.  It can also be obtained from a listing of all of the XQAIDs for
a specified user and/or patient.
ALERTDAT
Returns information from alert tracking file for
alert with XQAID in array specified by ROOT.  If ROOT is not specified, then
the data is returned in an array XQALERTD.  If the specified alert is not
present, the array root is returned with a NULL value.

Usage: D ALERTDAT^XQALBUTL(XQAID,ROOT)

S XQAID="NO-ID;20;2990212.11294719" D
ALERTDAT^XQALBUTL(XQAID,$NA(^TMP($J,"A")))


D ^%G Global ^TMP($J,"A"
TMP($J,"A" ^TMP(539056198,"A",.01) = NO-ID;20;2990212.11294719
^TMP(539056198,"A",.01,"NAME") = ^TMP(539056198,"A",.02) = 2990212.112947^FEB
12, 1999@11:29:47 ^TMP(539056198,"A",.02,"DATE CREATED") =
^TMP(539056198,"A",.03) = NO-ID ^TMP(539056198,"A",.03,"PKG ID") =
^TMP(539056198,"A",.04) = ^TMP(539056198,"A",.04,"PATIENT") =
^TMP(539056198,"A",.05) = 20^USER,XXX ^TMP(539056198,"A",.05,"GENERATED BY") =
^TMP(539056198,"A",.06) = ^TMP(539056198,"A",.06,"GENERATED WHILE QUEUED") =
^TMP(539056198,"A",.07) = ^TMP(539056198,"A",.07,"STATUS") =
^TMP(539056198,"A",.08) = ^TMP(539056198,"A",.08,"RETENTION DATE") =
^TMP(539056198,"A",1.01) = TEST MESSAGE (ROUTINE) 20
^TMP(539056198,"A",1.01,"DISPLAY TEXT") = ^TMP(539056198,"A",1.02) =
^TMP(539056198,"A",1.02,"OPTION FOR PROCESSING") = ^TMP(539056198,"A",1.03) =
^TMP(539056198,"A",1.03,"ROUTINE TAG") = ^TMP(539056198,"A",1.04) = XM
^TMP(539056198,"A",1.04,"ROUTINE FOR PROCESSING") = ^TMP(539056198,"A",2) =
^TMP(539056198,"A",2,"DATA FOR PROCESSING") =

The data elements at the top level of the Activity Tracking file are returned
subscripted by the field numbers.  This subscript is sufficient to obtain the
data.  The values are shown as internal^external if the internal and external
forms are different.  The next subscript after the field number will provide
the field names if they are desired.
VARIABLES TYPE VARIABLES DESCRIPTION
XQAID Input
This is the value XQAID which is the alert
identifier.  It is passed to the routine or option which is run when the alert
is selected.  It can also be obtained from a listing of all of the XQAIDs for
a specified user and/or patient.
ROOT Input
This argument is a closed reference to a local or
global root.  The desired information is returned descendent from the
specified root.
USERLIST
Returns recipients of alert with ID of XQAID from
alert tracking file in the array specified by ROOT.  If ROOT is not specified,
then the data is returned in the array XQALUSRS.  If the specified alert is
not present, the array root is returned with a NULL value.

Usage:  D USERLIST^XQALBUTL(XQAID,ROOT)

or

Usage: D USERLIST^XQALBUTL(XQAID) (DATA RETURNED IN XQALUSRS)

D USERLIST^XQALBUTL(XQAID)

ZW XQALUSRS XQALUSRS(1)=20^USER,XXX
VARIABLES TYPE VARIABLES DESCRIPTION
XQAID Input
This is the value XQAID which is the alert
identifier.  It is passed to the routine or option which is run when the alert
is selected.  It can also be obtained from a listing of all of the XQAIDs for
a specified user and/or patient.
ROOT Input
This argument is a closed reference to a local or
global root.  The desired information is returned descendent from the
specified root.  If this value is not specified, the data will be returned in
the local array XQALUSRS.
USERDATA
Returns information from alert tracking file related
to alert with ID of XQAID for user specified by XQAUSER. Data is returned
descendent from the closed root specified by ROOT (or if ROOT is not passed,
under the array XQALUSER).  If the specified alert is not present, the array
root is returned with a NULL value.

Usage:  D USERDATA^XQALBUTL(XQAID,XQAUSER,ROOT)

or

Usage: D USERDATA^XQALBUTL(XQAID,XQAUSER) (data returned in local array
XQALUSER)

D USERDATA^XQALBUTL(XQAID,20,"XXX") ZW XXX XXX(.01)=20^USER,XXX
XXX(.01,"RECIPIENT")= XXX(.02)=2990212.112954^FEB 12, 1999@11:29:54
XXX(.02,"ALERT FIRST DISPLAYED")= XXX(.03)=2990212.145609^FEB 12,
1999@14:56:09 XXX(.03,"FIRST SELECTED ALERT")= XXX(.04)=2990212.145621^FEB 12,
1999@14:56:21 XXX(.04,"PROCESSED ALERT")= XXX(.05)=2990212.145621^FEB 12,
1999@14:56:21 XXX(.05,"DELETED ON")= XXX(.06)= XXX(.06,"AUTO DELETED")=
XXX(.07)= XXX(.07,"FORWARDED BY")= XXX(.08)= XXX(.08,"DATE/TIME FORWARDED")=
XXX(.09)= XXX(.09,"DELETED BY USER")=
VARIABLES TYPE VARIABLES DESCRIPTION
XQAID Input
This is the value XQAID which is the alert
identifier.  It is passed to the routine or option which is run when the alert
is selected.  It can also be obtained from a listing of all of the XQAIDs for
a specified user and/or patient.
XQAUSER Input
This is the internal entry number in file 200 (DUZ
value) for the desired user.
ROOT Input
This argument is a closed reference to a local or
global root.  The desired information is returned descendent from the
specified root.  If this value is not specified, the data will be returned in
the local array XQALUSER
PKGPEND
Returns whether the user specified has an alert with
XQAID containing the first ';'-piece (PACKAGE identifier) indicated by the
argument XQAPKG pending.  (1=YES, 0=NO).  If a value of 1 is returned, it
indicates one or MORE alerts pending containing the specified package
identifier.  The package identifier used can be a complete package identifier
(e.g., XU-TSK) or a more general part (e.g., XU) to find users with any XU
package alert.


Usage is as $$PKGPEND^XQALBUTL(XQAUSER,XQAPKG)


S XQAPKG="XU" W $$PKGPEND^XQALBUTL(20,XQAPKG) 0
<===== Not pending


S XQAPKG="XU" W $$PKGPEND^XQALBUTL(20,XQAPKG) 1
<===== Pending (one or more)
VARIABLES TYPE VARIABLES DESCRIPTION
XQAUSER Input
This is the internal entry number in file 200 (DUZ
value) for the desired user.
XQAPKG Input
This variable is the package identifier portion of
the alert identifier (XQAID).  It is a textual identifier for the package
which created the alert and is the first ';'-piece of the XQAID.  It can be
used in this context to determine whether the user specified by XQAUSER has
any alerts pending containing the specified package identifier.  The return
value of one indicates one or more pending alerts for the user containing the
specified package string in the package part of the XQAID.