Print Page as PDF
DBIA2343 ICR (2343)

DBIA2343    ICR (2343)

Name Value
NUMBER 2343
IA # 2343
DATE CREATED 1998/03/10
CUSTODIAL PACKAGE KERNEL
CUSTODIAL ISC San Francisco
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE XUSER
NAME DBIA2343
GENERAL DESCRIPTION
The routine XUSER has supported entry points to lookup
a user and to check if a user is active, and also to return a user's full
name.  Also a CPRS check for provider.


STATUS Active
ID XUSER
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
$$LOOKUP
Usage  S LRDOC=$$LOOKUP^XUSER("") This extrinsic
function will do a lookup on the NEW PERSON file screening out uses that are
TERMINATED.  By default the call will ask if the correct user was selected.
ie: Select NEW PERSON NAME: XUUSER,THREE
Is XUUSER,THREE the one you want? YES//

If the parameter is set to "Q" then this extra question is suppressed.

The return is in the same format as a call to DIC. IEN^NAME Adding new entry's
isn't allowed.



VARIABLES TYPE VARIABLES DESCRIPTION
$$LOOKUP Output
The return is in the same format as a call to DIC.
IEN^NAME
$$ACTIVE
Usage S X=$$ACTIVE^XUSER(ien) Parameter: pointer to
the NEW PERSON file.

It returns the following codes:
""  No user record.
0   User can't sign-on.
0^DISUSER  User can't sign-on because of DISUSER flag.
0^TERMINATED^2980310  User terminated on date.
1^NEW  A new user, could sign-on.
1^ACTIVE^2980310.09  An active user, last sign-on date.
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
This is the IEN for the entry to be checked.
$$ACTIVE Output

""  No user record.
0   User can't sign-on.
0^DISUSER  User can't sign-on because of DISUSER flag.
0^TERMINATED^2980310  User terminated on date.
1^NEW  A new user, could sign-on.
1^ACTIVE^2980310.09  An active user, last sign-on date.
$$PROVIDER
This entry point was added for CPRS.  The definition
of a provider is any entry in the new person file that doesn't have a
termination date.  A second parameter could be added to invoke other checks.

Usage S X=$$PROVIDER^XUSER(ien) Parameter: pointer to the NEW PERSON file.

It returns the following codes:
""  No user record.
"0^TERMINATED^2980310"  User terminated on date.
"1" Has a record and no termination date.
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
This is the IEN for the entry to be checked.
$$PROVIDER Output

""  No user record.
"0^TERMINATED^2980310"  User terminated on date.
"1" Has a record and no termination date.
$$DEA
The DEA ePCS project requires an API to obtain the
value stored in the DEA# field (#53.2) in the NEW PERSON file (#200). This
patch provides this new API and also adds a new field, FACILITY DEA NUMBER
(#52), to the INSTITUTION file (#4). The specific API information follows:

Usage:   S X=$$DEA^XUSER(FLAG,IEN)

This routine will return a user's 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 below.

*NOTE:  Fee Basis,C&A providers only return DEA# or null.


VARIABLES TYPE VARIABLES DESCRIPTION
$$DEA Output
DEA# field (#53.2) value or the value returned based
on the (optional) FLAG input parameter, see "Input Parameter" above.

*Note:  Fee Basis,C&A providers will only return DEA# or null.


Example 1:
---------

DEA# (#53.2) field is "AB1234567"

FACILITY DEA NUMBER field (#52) is "VA7654321"

VA# field (#53.3) is "789"

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:
---------

DEA# (#53.2) field is null

FACILITY DEA NUMBER field (#52) is "VA7654321"

VA# field (#53.3) is "789"

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:
---------

DEA# (#53.2) field is null

FACILITY DEA NUMBER field (#52) is "VA7654321"

VA# field (#53.3) is null

If the FLAG input parameter is null or "0", this API would return "".

If the FLAG input parameter is "1", this API would return "" In both cases it
returns an empty string.


Example 4:
---------

DEA# (#53.2) field is null

FACILITY DEA NUMBER field (#52) is "VA7654321"

VA# field (#53.3) is "789"

PROVIDER TYPE field (#53.6) is "FEE BASIS" or "C&A"

If the FLAG input parameter is null or "0", this API would return "".

If the FLAG input parameter is "1", this API would return "" In both cases it
returns an empty string.


IEN Input
This is the New Person file (#200) IEN for the entry
to be checked.


FLAG(optional) Input
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).


* FLAG is 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)

* FLAG is "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.


$$NAME
This entry point returns the full name of the
specified user in a mixed case displayable format; the user's given name (i.e.
First Last) will be returned unless a second parameter of "F" is passed in to
get the Family name (i.e. Last,First)

Usage:  S NAME=$$NAME^XUSER(IEN[,format])


VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
This is the IEN of the user in the New Person file
#200.
FORMAT(optional) Input
This should be either "F" or "G", to indicate if the
user's name should be returned formatted by Family or Given name,
respectively.  For example,
"F"-Family (e.g., "Xuuser,Two")
"G"(default)-Given (e.g., "Two Xuuser")


$$NAME Output
The full name of the specified user in a mixed case
displayable format; the user's given name (i.e. First Last) will be returned
unless a second parameter of "F" is passed in to get the Family name (i.e.
Last,First)

$$SDEA
The DEA e-Prescribing of Control Substances project
requires an API to utilize the following 'Privileges Algorithm' to check for
prescribing privileges:

-Blank = never answered (Allow all schedules but system to send the
followingelectronic message:  "DEA credentials have not been populated, call
TBD responsible person.")

-Any or all fields are answered = provide explicit set of permissions (that
have been identified).

-If it is answered that Prescriber has No privileges for all schedules =
remove DEA number or VA number from file 200.

-If Prescriber has been issued a DEA number, you have privileges.

-If the Prescriber has been issued a VA number, this is a presumption of
privileges.


(Note: All of these checks do not apply to documentation of non-VA
medication.)

This API calls the $$DEA^XUSER() API (documented within this ICR).

Usage:  S X=$$SDEA^XUSER(FG,IEN,PSDEA)





VARIABLES TYPE VARIABLES DESCRIPTION
FG(optional) Input
This flag is used for $$DEA call refer to description
under $$DEA^XUSER component.

IEN Input
This is the New Person file (#200) IEN for the entry
to be checked.
PSDEA Input
This parameter is DEA schedule.  DEA schedule is a
2-6 position field. It comes from the DRUG file (#50) in Pharmacy. This field
is used, by this API, to verify the provider is allowed to write orders for
specific controlled substances. For example: if the schedule is 2A, this
indicates a controlled substance, schedule 2.

Chart for all values:

0          MANUFACTURED IN PHARMACY

1          SCHEDULE 1 ITEM

2          SCHEDULE 2 ITEM

3          SCHEDULE 3 ITEM

4          SCHEDULE 4 ITEM

5          SCHEDULE 5 ITEM

6          LEGEND ITEM

9          OVER-THE-COUNTER

L          DEPRESSANTS AND STIMULANTS

A          NARCOTICS AND ALCOHOLS

P          DATED DRUGS

I          INVESTIGATIONAL DRUGS

M          BULK COMPOUND ITEMS

C          CONTROLLED SUBSTANCES - NON NARCOTIC

R          RESTRICTED ITEMS

S          SUPPLY ITEMS

B          ALLOW REFILL (SCH. 3, 4, 5 ONLY)

W          NOT RENEWABLE

F          NON REFILLABLE

E          ELECTRONICALLY BILLABLE

N          NUTRITIONAL SUPPLEMENT

U          SENSITIVE DRUG



$$SDEA Output
Returns: DEA# or Facility DEA_"-"_user VA# similar to
the $$DEA call.  1 - DEA# is null from the $$DEA call.  2 - when all schedules
equals '0'.  4^expiration date - DEA# expiration date has expired.  It will
check if DEA# and expiration date are not null.  The expiration date is
returned in external format.


$$DETOX
The DEA e-Prescribing of Control Substances project
requires an API to obtain the value storted in the DETOX/MAINTENANCE ID NUMBER
field (#53.11) in the New Person file (#200).

This routine will return a user's DETOX/MAINTENANCE ID number, if it exists in
the field (#53.11) of the NEW PERSON file (#200).

The value is null if DETOX/MAINTENANCE ID number is null or the DEA EXPERATION
DATE field (#747.44) in the NEW PERSON file (#200) is unpopulated.

The third value that is returned is the DEA EXPIRATION DATE (#747.44).  This
date is returned when the DETOX/MAINTENANCE ID number is valid but the DEA
EXPIRATION DATE has expired.

Usage:  S X=$$DETOX^XUSER(IEN)



VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
The IEN of user in NEW PERSON file (#200).
$$DETOX Output
The return value is one of three values:

DETOX/MAINTENANCE ID number - if valid.

Null, the DETOX/MAINTENANCE ID number is null or the DEA EXPERATION DATE field
(#747.44) in the NEW PERSON file (#200) is unpopulated.

DEA EXPIRATION DATE (#747.44), when the DETOX/MAINTENANCE ID number is valid
but the DEA EXPIRATION DATE has expired.

$$VDEA
The DEA electronic Prescribing of Controlled
Substances (ePCS) project requires an API to determine if a user in the NEW
PERSON file (#200) is able to sign orders for controlled substances.

Usage:  S X=$$VDEA^XUSER(.RETURN,IEN)

VARIABLES TYPE VARIABLES DESCRIPTION
RETURN Input
This is a reference to an array where the reasons why
the user cannot sign orders for controlled substances and which DEA schedules
the user can prescribe will be returned in. For example,
RETURN("Is permitted to prescribe all schedules.)=""


IEN Input
This is the IEN of the user in the NEW PERSON file
(#200).

$$VDEA Output
Returns 1 if the user is able to sign orders for
controlled substances and 0 if the user is not able to sign orders for
controlled substances.

RETURN Output
This array contains the reasons why the user cannot
sign orders for controlled substances and which DEA schedules the user can
prescribe. For example,
RETURN("Is not permitted to prescribe any schedules.")=""


CREATOR MENDOZA,RAUL E
DBA Comments
7/23/14-Reactivate ICR #2343.  The ICR was opened for edits on
10/26/11.  Raul indicated he added a new API for the DEA ePCS project ($$SDEA,
$$DETOX and $$VDEA). Mohamed requested ICR be activated on 6/17/14 for the
Safety Updates for Medication/Prescription Management (SUMPM).  Patch # is
PSO*7*408.


Raul made additional updates to $$LOOKUP and $NAME - changed names to XUSER
format, $$DEA - reworded description and removed TPD, and $$DETOX - change
53.1 to 53.11.
DATE ACTIVATED 2014/07/23
MAIL MESSAGE 58389812
DATE/TIME EDITED
DATE/TIME EDITED ACTION AT THE REQUEST OF WITH CONCURRENCE OF
2011/10/26 13:16 DEACTIVATED FOR EDITS MENDOZA,RAUL
2014/07/23 09:49 APPROVED ANWER,MOHAMED MENDOZA,RAUL
Generated from JAN 24, 2019@ IA Listing Descriptions