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

$$RPLCTRL^XTIDTRM(): Get Replacement Trail for Term, with Replaced “BY” and Replacement “FOR” Terms (Term/Concept)

Reference Type: Supported, Category: Toolkit—Data Standardization, ICR#: 5078

Description

The $$RPLCTRL^XTIDTRM extrinsic function traverses the REPLACED BY VHA STANDARD TERM (#99.97) field forwards and backwards to find all terms that are replacement terms for the input entry and all terms for which the input entry is a replacement. This is recursively done so that each potential branch of replacement terms forwards and backwards is traversed.

NOTE: For an overview of the Data Standardization API set, read Data Standardization APIs.

For a chart mapping the Data Standardization API set in context, read Replacement Relationships.

Format

  $$RPLCTRL^XTIDTRM(file,ien,drctn,outarr)

Input Parameters

file:

(required) File number.

ien:

(required) Internal Entry Number (IEN).

drctn: (optional) Flags denoting which directions to follow the trail of replacement terms. Possible flag values are:
  • F (default)—Follow the trail forwards.

  • B—Follow the trail backwards.

  • *—Follow the trail in both directions (same as FB/BF).

Input/Output Parameters

outarr:

I: (required) Array to put trail of replacement terms into (closed root)

O: The output array contains the trail of replacement terms.

  • OutArr("BY",Term) = Replacement Term means: Entry "Term" is replaced BY entry "Replacement Term"

  • OutArr("FOR",Replacement Term, Term) = "" means: Entry "Replacement Term" is a replacement FOR entry "Term"

  • Term and Replacement Term is in the format IEN;FileNumber

Example

The $$RPLCTRL^XTIDTRM extrinsic function sets X to IEN_";"_FileNumber of entry that replaces the input entry:

>S X=$$RPLCTRL^XTIDTRM(file,ien,drctn,outarr)

NOTE: