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

$$SETMASTR^XTID(): Set Master VUID Flag (Term/Concept)

Reference Type: Supported, Category: Toolkit—VHA Unique ID (VUID), ICR#: 4631

Description

The $$SETMASTR^XTID extrinsic function stores (sets) the value of the MASTER ENTRY FOR VUID flag for a given term/concept reference. The MASTER ENTRY FOR VUID flag is used to distinguish references that might be duplicates.

Format

  $$SETMASTR^XTID(file[,field],iref,mstrflag)

Input Parameters

file:

(required) VistA file/subfile number where term/concept is defined.

field:

(optional) Field number in the file input parameter where term/concept is defined:

  • Not Defined—If not defined, this field defaults to the .01 field number. It represents the terms defined in the file entered in the file input parameter.

  • Defined:

    • Entered as .01; it represents the terms defined in the file entered in the file input parameter.

    • Otherwise, the field number entered must be a SET OF CODES data type field in the file entered in the file input parameter.
iref:

(required) Internal reference for term/concept:

  • File Entries—This is an IENS. For example:

    iref = "5,"

  • SET OF CODES—This is the internal value of the code. For example, any of the following:

    iref = 3
    iref = "f"
    iref = "M"
mstrflag:

(required) The internal value of the MASTER ENTRY FOR VUID field. Possible values are as follows:

  • 0—NO

  • 1—YES

Output

returns:

Returns results of operation as follows:

  • Successful—1

  • Unsuccessful—0^<error message>

Examples

Example 1

For terms defined in fields that are SET OF CODES:

>S file=2,field=.02,iref="M",mstrflag=0

>W $$SETMASTR^XTID(file,field,iref,mstrflag)
1

Example 2

For terms defined in a single file:

>S file=16000009,field=.01,iref="3,",mstrflag=1

>W $$SETMASTR^XTID(file,field,iref,mstrflag)
1

Example 3

>S file=16000009,field=.01,iref="6,",mstrflag=1

>W $$SETMASTR^XTID(file,field,iref,mstrflag)
0^pre-existing master entry