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

$$NPIUSED^XUSNPI1(): Returns an Error or Warning if an NPI is in Use

Reference Type: Controlled Subscription, Category: National Provider Identifier (NPI), ICR#: 6888

Description

The $$NPIUSED^XUSNPI1 extrinsic function returns an error or warning if an NPI is in use.

Call this API from code where a new NPI is being added to a provider. It evaluates whether the NPI is currently or previously used by any entity on any of the following files:

If the API returns:

NOTE: This API was released with Kernel Patch XU*8.0*480.

Format

  $$NPIUSED^XUSNPI1(xusnpi,xusqid,xusqil,xusrslt[,xusien])

Input Parameters

xusnpi:

(required) The NPI being checked. No default.

xusqid:

(required) The Qualified Identifier for the NPI (e.g., "Individual_ID"). No default.

xusqil:

(required) The delimited list of entities already using that NPI. No default. This is the output from $$QI^XUSNPI in the following format:

    Qualified_Identifier^IEN^Effective_date/time^Active/Inactive;
xusien:

(optional) This input parameter is only set if this routine is being called from the Input transform of the NPI field in any of the following files:

  • NEW PERSON (#200)

  • INSTITUTION (#4)

  • IB NON/OTHER VA BILLING PROVIDER (#355.93)

It is set to the IEN of the entity being edited. No Default.

CAUTION: This input parameter should only be set if the routine is being called from an Input transform. It suppresses return of the error or warning message.

Output Parameter

xusrslt:

An array containing either an error or warning message (if any).

Output

returns:

Returns:

  • 0 (Zero; No Error)—If the NPI is not being used, or if the API is called from the Input transform and the NPI was previously used by the current user.

  • 1 (Error)—If an error was found, an error message is returned in xusrslt.

  • 2 (Warning)—If the current file is the NEW PERSON (#200) or IB NON/OTHER VA BILLING PROVIDER (#355.93), and if a provider on the other file has the NPI, a warning message is returned in xusrslt.

    NOTE: A provider can be both a VA and a non-VA provider at the same time.