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

$$DEA^XUSER(): Get User's DEA Number

Reference Type: Supported, Category: User: DEA ePCS Utility, ICR#: 2343

Description

The $$DEA^XUSER extrinsic function returns a user's DEA number, if it exists in the DEA# (#53.2) field in the NEW PERSON (#200) file. If the DEA# field value is NULL, the value returned depends on the optional flag input parameter.

NOTE: Fee Basis and C&A providers only return DEA# or NULL.

NOTE This API was originally requested as part of the Public Key Infrastructure (PKI) Project. This API was updated with Kernel Patch XU*8.0*580, which was created in support of the Drug Enforcement Agency (DEA) e-Prescribing of Controlled Substances (ePCS) Utility. This utility uses Public Key Infrastructure (PKI) and meets the requirements proposed by the DEA Interim Final Rule (IFR) for Electronic Prescriptions for Controlled Substances effective as of June 1, 2010.

Format

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

Input Parameters

flag:

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

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

        FACILITY DEA NUMBER (#52) field_"-"_VA# (#53.3) field

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

This is the NEW PERSON (#200) file IEN for the entry to be checked.

Output

returns:

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

Examples

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.

If the flag input parameter is 1, this API would return 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.

If the flag input parameter is 1, this API would return 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 "" (an empty string).

If the flag input parameter is 1, this API would return "" (an empty string).

In both cases, it returns an empty string.

Example 4

The following are the data values for this example:

If the flag input parameter is NULL or 0, this API would return "" (an empty string).

If the flag input parameter is 1, this API would return "" (an empty string).

In both cases, it returns an empty string.