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

$$DEA^XUSER(): Get DEA Number

Reference Type: Supported, Category: User, Integration Agreement: 2343

Description

This extrinsic function returns a user's Drug Enforcement Agency (DEA) number, if it exists in the DEA# field (#53.2) of the NEW PERSON file (#200). If the DEA# field value is null, the value returned depends on the optional FLAG input parameter (see Input Parameters). This API was requested as part of the Public Key Infrastructure (PKI) Project.

Format

  $$DEA^XUSER([flag][,userien])

Input Parameters

flag:

(optional) This flag controls what is returned when the user does not have a value in the DEA# field (#53.2) of the NEW PERSON file (#200).

  • 1—This routine will check to see if the user has a value in the VA# field (#53.3) of the NEW PERSON file (#200). If a value is found in that field, this routine will return that field value. Otherwise, this routine returns an empty string.

  • NULL or 0—This routine will check to see if the user has values in the VA# field (#53.3) of the NEW PERSON file (#200) and the (new) FACILITY DEA NUMBER field (#52) of the INSTITUTION file (#4). If values are found in both of those fields, this routine will return the following:
    FACILITY DEA NUMBER field (#52)_"-"_VA# field(#53.3)
userien:

(optional) This value can be used to get the DEA# of some user besides the one that signed in. In CPRS, to check that a student's teacher has the required DEA#.

Output

returns:

Returns the DEA# field (#53.2) value or the value returned based on the (optional) flag input parameter.

Example 1

The following are the data values for this example:

If the FLAG input parameter is null or "0", this API would return "AB1234567," since the user has a DEA#:

>S X=$$DEA^XUSER(0,1000118)

>W X
AB1234567

If the FLAG input parameter is "1", this API would return "AB1234567," since the user has a DEA#:

>S X=$$DEA^XUSER(1,1000118)

>W X
AB1234567

Example 2

The following are the data values for this example:

If the FLAG input parameter is NULL or "0", this API would return "VA7654321-789":

>S X=$$DEA^XUSER(0,)

>W X
VA7654321-789

If the FLAG input parameter is "1", this API would return "789":

>S X=$$DEA^XUSER(1,)

>W X
789

Example 3

The following are the data values for this example:

If the FLAG input parameter is NULL or "0", this API would return "":

>S X=$$DEA^XUSER(0,)

>W X

If the FLAG input parameter is "1", this API would return "":

>S X=$$DEA^XUSER(1,)

>W X

In both cases, it returns an empty string.

 


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.