Print Page as PDF
TEST FOR ADVERSE REACTION TO AGENT ICR (2378)

TEST FOR ADVERSE REACTION TO AGENT    ICR (2378)

Name Value
NUMBER 2378
IA # 2378
DATE CREATED 1998/05/06
CUSTODIAL PACKAGE ADVERSE REACTION TRACKING
CUSTODIAL ISC Salt Lake City
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE GMRAOR
NAME TEST FOR ADVERSE REACTION TO AGENT
GENERAL DESCRIPTION
This integration agreement allows a package to
determine if a patient has an adverse reaction to an agent defined by the
parameters TYP and PTR.
STATUS Active
KEYWORDS
  • ORDER CHECK
  • ALLERGY ORDER CHECK
DURATION Till Otherwise Agreed
ID GMRAOR
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
$$ORCHK(DFN,TYP,PTR,LOC)
This call checks if the patient has an adverse
reaction to an agent defined by the parameters TYP and PTR.

**NOTE: Patch GMRA*4*46 was released on 05/24/2016 with a compliance date of
06/24/2016. This patch included the new $$ORCHK2 component, which is intended
to replace this component. New subscribers should use the $$ORCHK2 component.
A future patch will phase out the use of this component as subscribing
applications move to the $$ORCHK2 component.
VARIABLES TYPE VARIABLES DESCRIPTION
DFN Input
Patient's internal entry number (IEN) in the PATIENT
file (#2).
TYP Input
The type of agent to check. Possible values are:
"CM" - Contrast Media Reaction
"DR" - Drug Reaction
"IN" - Drug Ingredient
"CL" - Drug Class
PTR Input
The agent to check for. Possible values are:
If TYP="CM", PTR is ignored.
If TYP="DR", PTR is formatted as PSNDA.PSNVPN,
where PSNDA is the IEN to the
VA GENERIC file (#50.6) and PSNVPN
is the IEN to the VA PRODUCT file
(#50.68).
If TYP="IN", PTR is the IEN to the DRUG
INGREDIENTS file (#50.416).
If TYP="CL", PTR is the IEN to the VA DRUG CLASS
file (#50.605).
LOC Input
An optional location type flag.

If TYP="CM" and LOC is defined and greater than 0, the type of site that
documented the reaction ("LOCAL", "REMOTE SITE(S)", or "LOCAL AND REMOTE
SITE(S)") will be returned in the second caret piece of $$ORCHK.

If TYP="DR", TYP="IN", or TYP="CL", LOC is ignored.
$$ORCHK Output
For all values of TYP, $$ORCHK will be defined as
either an empty string if the parameters are incorrect or 0 if the patient has
no reactions to the agent defined by the TYP and PTR parameters.

The following additional values are returned depending on the value of TYP:

If TYP="CM", $$ORCHK will be defined as either an empty string if the patient
is not in the Adverse Reaction Tracking database or 1 if the patient has a
reaction to contrast media. Additionally, if LOC is greater than zero, the
second caret piece will contain the type of site that documented the reaction
("LOCAL", "REMOTE SITE(S)", or "LOCAL AND REMOTE SITE(S)").

If TYP="IN" or TYP="CL", $$ORCHK will be defined as 1 if the patient has a
reaction to the agent defined by the PTR parameter.

If TYP="DR" and the patient has a reaction to the agent defined in the PTR
parameter, $$ORCHK will be defined as either 1 or 2. If the patient has a
reaction to one of the ingredients in the agent defined by the PTR parameter,
it will be 1. If the patient has a reaction to one of the drug classes to
which the agent defined by the PTR parameter belongs, it will be 2.
GMRAING Output
The calling application should either NEW this
variable before calling this component or KILL this variable after it is no
longer needed.  If TYP="DR", this array will contain the drug ingredients in
the agent defined by the PTR parameter to which the patient has a reaction to.

Format:
GMRAING(NUM)="ING (SD)"
NUM - has a value of 1 for the first
ingredient and increments by one
for subsequent ingredients.
ING - the name of the ingredient.
SD - the type of site that documented the
reaction. Possible values are "LOCAL" if
only the current site documented the
reaction, "REMOTE SITE(S)" if only a
remote site documented the reaction, or
"LOCAL AND REMOTE SITE(S)" if both the
current and remote sites documented the
reaction.

If TYP="CM", TYP="IN", or TYP="CL", this array will be undefined.
GMRADRCL Output
The calling application should either NEW this
variable before calling this component or KILL this variable after it is no
longer needed.  If TYP="DR" and the patient does not have a reaction to any of
the drug ingredients in the agent defined by the PTR parameter (GMRAING is
undefined), this array will be defined. It will contain the drug classes of
the agent defined by the PTR parameter to which the patient has a reaction to.

Format:
GMRADRCL(NUM)="DCC^DCN (SD)"
NUM - has a value of 1 for the first
drug class and increments by one
for subsequent drug classes.
DCC - five character code assigned to the
drug class.
DCN - the name of the drug class.
SD - the type of site that documented the
reaction. Possible values are "LOCAL" if
only the current site documented the
reaction, "REMOTE SITE(S)" if only a
remote site documented the reaction, or
"LOCAL AND REMOTE SITE(S)" if both the
current and remote sites documented the
reaction.

If TYP="CM", TYP="IN", or TYP="CL", this array will be undefined.
GMRAIEN Output
The calling application should either NEW this
variable before calling this component or KILL this variable after it is no
longer needed.

If TYP="IN", this array will contain the PATIENT ALLERGIES file (#120.8)
internal entry numbers (IENs) that match the ingredient defined by the PTR
parameter as subscripts. If TYP="CL", this array will contain the PATIENT
ALLERGIES file (#120.8) IENs that match the class defined by the PTR parameter
as subscripts.
Format:
GMRAIEN(120.8_IEN)=""

If TYPE="CM" or TYP="DR", this array will be undefined.
$T Output
$T will be defined as 1 (True) if the patient has an
allergy to an agent defined by the TYP and PTR variables, else it returns 0
(False).

**NOTE: As of August 6, 1996 this variable is no longer supported.
$$ORCHK2(DFN,TYP,PTR,LOC,RETURN)
This call checks if the patient has an adverse
reaction to an agent defined by the parameters TYP and PTR.
VARIABLES TYPE VARIABLES DESCRIPTION
DFN Input
Patient's internal entry number (IEN) in the PATIENT
file (#2).
TYP Input
The type of agent to check. Possible values are:
"CM" - Contrast Media Reaction
"DR" - Drug Reaction
"IN" - Drug Ingredient
"CL" - Drug Class
PTR Input
The agent to check for. Possible values are:
If TYP="CM", PTR is ignored.
If TYP="DR", PTR is formatted as
PSNDA.PSNVPN.LPTR,
where PSNDA is the IEN to the
VA GENERIC file (#50.6), PSNVPN
is the IEN to the VA PRODUCT file
(#50.68) and LPTR is the IEN to
the DRUG file (#50). If PSNDA is
passed in, then PSNVPN is required
and LPTR is optional. LPTR may be
passed in by itself, but the caller
must include two preceding periods
(i.e., "..1068").
If TYP="IN", PTR is the IEN to the DRUG
INGREDIENTS file (#50.416).
If TYP="CL", PTR is the IEN to the VA DRUG CLASS
file (#50.605).
LOC Input
An optional location type flag.

If TYP="CM" and LOC is defined and greater than 0, the name of every site that
documented the reaction and when each site documented the reaction will be
returned in the second caret piece of $$ORCHK.

If TYP="DR", TYP="IN", or TYP="CL", LOC is ignored.
RETURN Input
Name of array in which to return order check
messages. The name cannot be RETURN.

If TYP="DR", data is returned in the named array.

If TYP="IN", TYP="CL", or TYP="CM", RETURN is ignored.
$$ORCHK2 Output
For all values of TYP, $$ORCHK2 will be defined as -1
if the parameters are incorrect, an empty string if the patient does not have
an assessment or 0 if the patient has no known reactions to the agent defined
by the TYP and PTR parameters.

The following additional values are returned depending on the value of TYP:

If TYP="CM" and the patient has a reaction to contrast media, $$ORCHK2 will be
defined as 1. Additionally, if LOC is greater than zero, the second caret
piece of $$ORCHK2 will contain the name of every site that documented the
reaction and when each site documented the reaction.

If TYP="IN" or TYP="DR" and the patient has a reaction to the agent defined in
the PTR parameter, $$ORCHK2 will be defined as 1.

If TYP="CL" and the patient has a reaction to the agent defined in the PTR
parameter, $$ORCHK2 will be defined as 2.
GMRAING Output
The calling application should either NEW this
variable before calling this component or KILL this variable after it is no
longer needed. If TYP="IN", this array will contain the drug ingredients in
the agent defined by PTR to which the patient has a reaction to.
Format:
GMRAING(PTR)=Offender(s)^Caret-delimited string
PTR - for local reactions, the internal entry
number (IEN) in the PATIENT ALLERGIES file
(#120.8) and for remote reactions, "R"
followed by the reaction's number in the
^XTMP("ORRDI","ART",DFN) global (DFN is
the patient's IEN in the PATIENT file,
#2).
Offender(s) - Drug ingredient(s) found in both
the reaction and in the agent.
Contains two sub-fields
separated by the pipe character.
Multiple ingredients are separated
by "~".
Sub-field 1: NAME field (#.01) in
the DRUG INGREDIENTS
file (#50.416)
Sub-field 2: IEN in the DRUG
INGREDIENTS file
(#50.416)
Caret-delimited string:
For those pieces that contain sub-fields, the
sub-fields are separated by the pipe
character.
Piece   Value
==================================================
1       Station Documenting Reaction
Sub-field 1: NAME field (#.01) in the
INSTITUTION file (#4)
Sub-field 2: IEN in the INSITUTION file
(#4)
2       Site Type of Documenting Station
Sub-field 1: External format ("REMOTE" or
"LOCAL")
Sub-field 2: Internal format ("R" or "L")
3       ORIGINATION DATE/TIME field (#4) in the
PATIENT ALLERGIES file (#120.8)
Sub-field 1: External format
Sub-field 2: Internal FileMan format
4       Severities String
5       REACTIONS field (#10) in the PATIENT
ALLERGIES file (#120.8)
Sub-field 1: External format
Sub-field 2: Internal format
Multiple reactions are separated from
each other with "~".
6       REACTANT field (#.02) in the PATIENT
ALLERGIES file (#120.8)
7       GMR ALLERGY field (#1) in the PATIENT
ALLERGIES file (#120.8)
Sub-field 1: External format
Sub-field 2: Internal format
8       OBSERVED/HISTORICAL field (#6) in the
PATIENT ALLERGIES file (#120.8)
Sub-field 1: External format
Sub-field 2: Internal format
9       Database Type
Sub-field 1: External format ("VISTA" or
"COTS")
Sub-field 2: Internal format ("V" or "C")
Severities String - The reaction's severities.
Contains two sub-fields separated by "|".
Multiple severities are separated by "~".
Subfield 1: DATE/TIME OF EVENT field (#.01)
in the ADVERSE REACTION
REPORTING file (#120.85)
Subfield 2: SEVERITY field (#14.5) in the
ADVERSE REACTION REPORTING file
(#120.85)

If TYP="CM", TYP="DR", or TYP="CL", this array will be undefined.
GMRADRCL Output
The calling application should either NEW this
variable before calling this component or KILL this variable after it is no
longer needed. If TYP="CL", this array will be defined. It will contain the
drug classes of the agent defined by PTR to which the patient has a reaction
to.
Format:
GMRADRCL(PTR)="Offender(s)^Caret-delimited
string"
PTR - for local reactions, the internal entry
number (IEN) in the PATIENT ALLERGIES file
(#120.8) and for remote reactions, "R"
followed by the number in the
^XTMP("ORRDI","ART",DFN) global (DFN is
the patient's IEN in the PATIENT file,
#2).
Offender(s) - VA drug class(es) found in both
the reaction and in the agent.
Contains two sub-fields separated
by the pipe character. Multiple VA
drug classes are separated by "~".
Sub-field 1: NAME field (#.01) in
the VA DRUG CLASS
file (#50.605)
Sub-field 2: IEN in the VA DRUG
CLASS file (#50.605)
Caret-delimited string: refer to the caret
delimited string section in the GMRAING output
variable.

If TYP="CM", TYP="DR", or TYP="IN", this array will be undefined.
RETURN Output
The calling application should either NEW the
variable identified by the INPUT parameter RETURN before calling this
component or KILL the variable identified by the INPUT parameter RETURN after
it is no longer needed. If TYP="DR", this array will contain the data needed
to construct the order check messages as well as the reaction data related to
the message data.
Format:
RETURN=N
N - total number of order check messages

RETURN(X,PTR)=Caret-delimited string
X - message number; starts at one and
increments by one
PTR - for local reactions, the internal entry
number (IEN) in the PATIENT ALLERGIES
file (#120.8) and for remote reactions,
"R" followed by the reaction's number in
the ^XTMP("ORRDI","ART",DFN) global (DFN
is the patient's IEN in the PATIENT
file, #2).
Caret-delimited string - Reaction data
associated with
message X; all fields
are in internal
format

Piece   Value
==================================================
1       Station Documenting Reaction
IEN in INSTITUTION file (#4)
2       Site Type of Documenting Station
"R" or "L"
3       ORIGINATION DATE/TIME field (#4) in the
PATIENT ALLERGIES file (#120.8)
4       Severities String
5       REACTIONS field (#10) in the PATIENT
ALLERGIES file (#120.8)
Multiple reactions are separated from
each other with "~".
6       REACTANT field (#.02) in the PATIENT
ALLERGIES file (#120.8)
7       GMR ALLERGY field (#1) in the PATIENT
ALLERGIES file (#120.8)
8       OBSERVED/HISTORICAL field (#6) in the
PATIENT ALLERGIES file (#120.8)
9       Database Type
"V" or "C"
Severities String - The reaction's severities.
Contains two sub-fields separated by "|".
Multiple severities are separated by "~".
Subfield 1: DATE/TIME OF EVENT field (#.01)
in the ADVERSE REACTION
REPORTING file (#120.85)
Subfield 2: SEVERITY field (#14.5) in the
ADVERSE REACTION REPORTING file
(#120.85)

RETURN(X,"MESSAGE",1)=N
N - total number of stations included in this
message

RETURN(X,"MESSAGE",1,Y)=Caret-delimited string
Y - internal entry number (IEN) of the
documenting station's entry in the
INSTITUTION file (#4)
Caret-delimited string - site-specific data;
all fields are in
external format
Piece   Value
==================================================
1       Station documenting reaction
NAME field (#.01) in the INSTITUTION file
(#4)
2       Site Type of Documenting Station
"REMOTE" or "LOCAL"
3       ORIGINATION DATE/TIME field (#4) in the
PATIENT ALLERGIES file (#120.8)
4       OBSERVED/HISTORICAL field (#6) in the
PATIENT ALLERGIES file (#120.8)

RETURN(X,"MESSAGE",1,Y,1,Z)=Caret-delimited
string
Z - Severity number; starts at one and
increments by one. Corresponds to the
severity's position number in the
severities string in RETURN(X,PTR).
Caret-delimited string - observation data; all
fields are in
external format

Piece   Value
==================================================
1       DATE/TIME OF EVENT field (#.01) in the
ADVERSE REACTION REPORTING file (#120.85)
2       SEVERITY field (#14.5) in the ADVERSE
REACTION REPORTING file (#120.85)

RETURN(X,"MESSAGE",2)=Caret-delimited string
Caret-delimited string - reaction-specific
data combined from
all sites included in
message X; all fields
are in external
format

Piece   Value
==================================================
1       REACTIONS field (#10) in the PATIENT
ALLERGIES file (#120.8)
2       REACTANT field (#.02) in the PATIENT
ALLERGIES file (#120.8)
3       GMR ALLERGY field (#1) in the PATIENT
ALLERGIES file (#120.8)

RETURN(X,"MESSAGE","OFFENDERS",SUB)=
Tilde-delimited string
SUB - the type of reaction item that was
matched with the agent; "ING" for
ingredient, "CLS" for class or "REC"
for reactant (GMR ALLERGY field, #1,
in the PATIENT ALLERGIES file, #120.8)
Tilde-delimited string - the causative agents
that were matched in
external format
delimited by "~"

If TYP="IN", TYP="CL" or TYP="CM", the variable identified by the INPUT
parameter RETURN will not be modified.
DATE ACTIVATED 1998/06/01