Print Page as PDF
Application Programmer Interfaces (APIs) ICR (2531)

Application Programmer Interfaces (APIs)    ICR (2531)

Name Value
NUMBER 2531
IA # 2531
DATE CREATED 1998/09/04
CUSTODIAL PACKAGE NATIONAL DRUG FILE
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE PSNAPIS
NAME Application Programmer Interfaces (APIs)
GENERAL DESCRIPTION
Since the National Drug File is being redesigned, these
APIs are designed to allow other applications to make a smooth transition to
the new file structure.
STATUS Active
KEYWORDS
  • CPTIER
  • COPAY TIER
DURATION Till Otherwise Agreed
ID PSNAPIS
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
PSA
S X=$$PSA^PSNAPIS(ndc,.array) where ndc is a 12 digit
National Drug Code and array is an array defined by the calling application
returns
array(p50)=Drug name from the DRUG file (#50) and p50 is the internal entry
number in that file for every drug which has the same product name as the name
of the drug identified by the ndc.  Returns X as the number of entries in
array.

PSJING
S X=$$PSJING^PSNAPIS(p1,p3,.array) where p1 and p3
are the first and third "^" pieces of the "ND" node in the DRUG File (#50) for
a selected drug and array is a array defined by the calling application
returns array(ien)=ien^ingredient^strength^unit where ien is the internal
entry number in the DRUG INGREDIENTS file (#50.416) and ingredient is the name
of the ingredient, strength, and unit for each ingredient in the selected
drug. Returns X as the number of entries in array.

PSJDF
S X=$$PSJDF^PSNAPIS(p1,p3) where p1 and p3 are the
first and third pieces of the "ND" node in File #50 for a selected drug
returns X=ien^dose where ien is the internal entry number in the DOSAGE FORM
file (#50.606) and dose is the name of the dosage form for the selected drug.

PSJST
S X=$$PSJST^PSNAPIS(p1,p3) where p1 and p3 are the
first and third pieces of the "ND" node in File #50 for the selected drug
returns X=1^strength where strength is the strength in the VA PRODUCT file
(#50.68).
CLASS
S X=$$CLASS^PSNAPIS(class) where class is a five
character VA Drug Classification Code (e.g. CN103) returns X=1 if class is a
valid code or 0 if it is not.

DRUG
S X=$$DRUG^PSNAPIS(drug name) returns X=1 if drug
name is either a valid Name entry in the VA GENERIC File (#50.6) or a valid
Trade Name entry in the NDC/UPN File (#50.67).  Returns X=0 otherwise.
PROD0
S X=$$PROD0^PSNAPIS(p1,p3) where p1 and p3 are the
first and third pieces of the "ND" node in File #50 for a selected drug
returns product information from the NATIONAL DRUG file (#50.6).
X=VA PRODUCT NAME^DOSAGE FORM ENTRY^STRENGTH ENTRY^UNITS
^^^GCNSEQNO^PREVIOUS GCNSEQNO
PROD2
S X=$$PROD2^PSNAPIS(p1,p3) where p1 and p3 are the
first and third pieces of the "ND" node in File #50 for a selected drug
returns additional product information.
X=VA PRINT NAME^VA PRODUCT IDENTIFIER^TRANSMIT TO CMOP^VA DISPENSE UNIT

DCLASS
S X=$$DCLASS^PSNAPIS(p1,p3) where p1 and p3 are the
first and third pieces of the "ND" node in File #50 returns the VA DRUG
CLASSIFICATION for the selected drug (e.g. CYANIDE ANTIDOTES).

DCLCODE
S X=$$DCLCODE^PSNAPIS(p1,p3) where p1 and p3 are the
first and third pieces of the "ND" node in File #50 for a selected drug
returns the 5 character class code for the selected drug (e.g. AD200).

VAGN
S X=$$VAGN^PSNAPIS(p1) where p1 is the first piece of
the "ND" node in File #50 for a selected drug returns X=VA GENERIC NAME for
the selected drug.

DFSU
S X=$$DFSU^PSNAPIS(p1,p3) where p1 and p3 are the
first and third pieces of the "ND" node in File #50 for a selected drug
returns dose, strength, and units
X=DFIEN^DOSE^STIEN^STRENGTH^UNIEN^UNITS
where DFIEN is the internal entry number of the dosage form, DOSE is
the name of the dosage from, STIEN is the internal entry number of the
strength, STRENGTH is the strength, UNIEN is the internal entry number
of the units and UNITS is the unit.

VAP
S X=$$VAP^PSNAPIS(da,.array) where da is an internal
entry number in the VA GENERIC file (#50.6) and array is an array defined by
the calling application returns array(ien)=ien^VA PRODUCT
NAME^dfien^DOSE^clien^ CLASS^INACTIVE^COPAY TIER where ien is the internal
entry number of the product, dfien is the internal entry number of the DOSAGE
FORM, clien is the internal entry number of the class, CLASS is the five
character class code for all products associated with the selected drug,
inactivation date, and COPAY TIER is the IEN for the COPAY TIER multiple (#45)
of VA Product file (#50.68).
PSPT
S X=$$PSPT^PSNAPIS(p1,p3,.array) where p1 and p3 are
the first and third pieces of the "ND" node in File #50 for a selected drug
and array is defined by the calling application returns
array(psien^ptien)=psien^psize^ptien^ptype
where psien is the internal entry number of the package size, ptien is
the internal entry number of the package type, psize is the package
size, and ptype is the package type for each package size and type
combination for the selected drug.  Returns X equals the number of
entries in array.

DSS
S X=$$DSS^PSNAPIS(p1,p3) where p1 and p3 are the
first and third pieces of the "ND" node in File #50 for a selected drug
returns x equals the five or seven digit DSS identifier for the selected drug.

CPRS
S X=$$CPRS^PSNAPIS(p1,p3) where p1 and p3 are the
first and third pieces of the "ND" node in File #50 for a selected drug
returns X=DOSAGE FORM^CLASS CODE^STRENGTH^UNITS for the selected drug.
CIRN
D CIRN^PSNAPIS(ndc,.array) where ndc is a 12 digit
National Drug Code and array is defined by the calling application returns
array=ndc
array(0)=internal entry number in file 50.6
array(1)=VA GENERIC NAME
array(2)=dose form ien^^class ien
array(3)=strength
array(4)=units ien
array(5)=package size ien
array(6)=package type pointer
array(7)=NDC^MANUFACTURER^TRADE NAME^VA PRODUCT NAME POINTER^ROUTE OF
ADMINISTRATION

If ndc is not a valid entry array is returned as "000000000000" and the seven
elements of array are returned as null.

B
S X=$$B^PSNAPIS returns the closed global root of the
"B" cross reference on the VA Generic Name.

T
S X=$$T^PSNAPIS returns the closed global root of the
"T" cross reference on the Trade Name in the NDC/UPN file (#50.67).

OVRIDE
S X=$$OVRIDE^PSNAPIS(p1,p3) where p1 and p3 are the
first and third pieces of the "ND" node in the DRUG File (#50) for the
selected drug. Returns the value of the OVERRIDE DF DOSE CHK EXCLUSION Field
(#31) from the VA PRODUCT File (#50.68). This field should always be populated
with a '1' for 'YES' or a '0' for 'NO', but if the data is not populated, a
null will be returned.
FDAMG
S X=$$FDAMG^PSNAPIS(ien) where ien is the internal
entry number in the VA PRODUCT file (#50.68), and returns the URL for the
medication guide if one exists or null if it does not.
POSDOS
S X=$$POSDOS^PSNAPIS(ien) where ien is the internal
entry number in the VA PRODUCT file (#50.68). It returns the values from the
following three fields for the VA Product, separated by up-arrow (^):

CREATE DEFAULT POSSIBLE DOSAGE (#40)
POSSIBLE DOSAGES TO CREATE (#41)
PACKAGE (#42)

Example: "N^O^O"
DRGCLS
S X=$$DRGCLS^PSNAPIS(IEN) where IEN = (required)
internal entry number of National Drug Code (NDC) in NDC/UPN file (#50.67).
Returns CODE (#.01) and PARENT CLASS (#2) from VA DRUG CLASS file (#50.605)
for a National Drug Code (NDC).
X=Drug Class code^Parent Class
INTRAN
D INTRAN^PSNAPIS(SCR) where SCR = M code for value of
DIC("S"). Provides input transform lookup functionality for fields that store
NDC codes. If SCR is not defined, all active entries will be returned.
X=NDC field (#1) if input is valid. If no valid input is
available, X will be undefined.
QLIST
D QLIST^PSNAPIS(SCR) where SCR = M code for value of
DIC("S"). Provides executable help ("?" or "??") for fields that store NDC
codes. If SCR is not defined, all active entries will be returned.
Output: List of selectable codes (NDC field (#1))
CPTIER
S X=$$CPTIER^PSNAPIS(VAR1,VAR2,VAR3,VAR4)
Where:
VAR1 = IEN FOR VA PRODUCT file (#50.68)
VAR2 = Date to be verified for Copay Tier
VAR3 = IEN for DRUG file (#50)
VAR4 = 1 for display or null for billing

The data returned by this API varies based on the data passed:
- VAR1 and/or VAR3 or both can be passed but VAR3 takes
precedence.

- VAR4 equal to 1 indicates that the API will return the
stored value for copay tier information to be displayed
for options such as Drug Enter/Edit, Lookup into Dispensed
Drug file, etc.

- A null value for VAR4 means the calling application will
use the returned information for billing purposes.  The
API will return the copay exempt value of 0 (zero) for
products with DEA Special Handling field that contains
S for Supply Items, I for Investigational Drugs or N for
Nutritional Supplement.  The DEA Special Handling
supercedes the copay tier field and zero is returned
regardless of the copay tier defined on the product.

The Pharmacy Product System - National (PPS-N) package is used to define copay
tier information for VA Products.  A check for the DEA Special Handling code
for the drug/product is an additional check made in Pharmacy to determine if a
drug is exempt from copay. The copay exempt DEA Special Handling codes are: I
= Investigational Drug, N = Nutritional Supplement and S for Supply Item.

Copay Tier determination criteria in order of precedence:

1. For NDF and PDM display screens (i.e. PSNACT, PSNLOOK, PSSDEE, PSS LOOK),
this API will return null if the copay tier is not defined or will return the
defined copay tier for the given date. If the drug is not matched to NDF, null
is returned. If the tier is null, the selection of drug or product screens
will not display the Tier field; however, the body of the display will show
the Tier and effective date as null.

2. For billing purposes, this API will return different values based on the
DEA Special Handling Code and copay tier defined as well as whether the drug
is matched to NDF.

a. If the DEA Special Handling Code is exempt from copay and
regardless of the copay tier value, this API will return
zero. For example, Outpatient Pharmacy (OP) calls this API
to determine if a prescription is billable. In this case,
the prescription is not billable and would not be sent to
IB for a copay charge. The DEA Special Handling Code
overrides the nationally defined copay tier.

b. The product is matched to NDF:
-  If the copay tier is 1, 2, or 3 and the DEA code is NOT
exempt from copay, this API will return the defined
copay tier. For example, OP would send the prescription
to IB for a copay charge.

-  If the copay tier is 0 (zero), this API will return 0
(zero).  For example, OP would not would not send the
prescription for copay billing charges.

-  If no copay tier is defined and the product is NOT
exempt from copay, this API will return null. For
example, OP would send the prescription to IB to
charge copay.

c. The product is not matched to NDF:
-  If the DEA special handling code is NOT exempt from
copay, this API will return null. For example, OP
would send the prescription to IB to charge copay.
VARIABLES TYPE VARIABLES DESCRIPTION
VAR1 Input
IEN FOR VA PRODUCT file (#50.68)
VAR2 Input
Date to be verified for Copay Tier
VAR3 Input
IEN for DRUG file (#50)
VAR4 Input
VAR4 equal to 1 indicates that the API will return
the stored value for copay tier information to be displayed for options such
as Drug Enter/Edit, Lookup into Dispensed Drug file, etc.

A null value for VAR4 means the calling application will use the returned
information for billing purposes.  The API will return the copay exempt value
of 0 (zero) for products with DEA Special Handling field that contains S for
Supply Items, I for Investigational Drugs or N for Nutritional Supplement.
The DEA Special Handling supercedes the copay tier field and zero is returned
regardless of the copay tier defined on the product.
TIER Output
COPAY TIER LEVEL field (#.01) from VA PRODUCT file
(#50.68)
EFFECTIVE DATE Output
EFFECTIVE DATE field (#1) from VA PRODUCT file
(#50.68)
END DATE Output
End Date field (#2) from VA PRODUCT field  (#50.68)
CMOP
S X=$$CMOP^PSNAPIS(CODE) Returns the 5 character NAME
field (#.01) for the VA PRODUCT file (#50.68) where CODE = 5-character CMOP
ID. Returns $$CMOP equals corresponding VA Product Name if the CODE is valid
or null if the CODE is not valid.
DATE ACTIVATED: FEB 13, 2017