Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XTID

XTID.m

Go to the documentation of this file.
  1. XTID ;OAKCIOFO/JLG - API set for VUID-Term/Concepts in VistA ;08/18/2008 15:12
  1. ;;7.3;TOOLKIT;**93,108**;Apr 25, 1995;Build 8
  1. ;Per VHA Directive 2004-038, this routine should not be modified
  1. Q
  1. ; API set for VUID Term/Concepts in VistA
  1. ; supported by IA # 4631
  1. ; official definition of API set can be viewed online
  1. ; in the VistA Document Library website
  1. GETVUID(TFILE,TFIELD,TIREF) ;
  1. ;Function: Returns the VHA unique id (VUID) for a given term
  1. ; reference, TIREF. TIREF is represented differently based
  1. ; in its context--the combined value of TFILE and TFIELD
  1. ;
  1. ;Input:
  1. ; TFILE = VistA file # where term is defined.
  1. ; (req)
  1. ; TFIELD = field #, in TFILE where term is defined.
  1. ; (opt) When defined, it must be of type SET OF CODES.
  1. ; When not defined, TFILE represents a "table" of terms
  1. ; TIREF = term reference, as internal reference value.
  1. ; (req) When TFIELD is defined (SET OF CODES), TIREF is the
  1. ; internal value used in the set of codes.
  1. ; When TFIELD is not defined, TIREF is the IEN of the term
  1. ; in TFILE.
  1. ;
  1. ;Returns: Returns the VHA unique id (VUID) as a number for
  1. ; a given term reference. On error, it returns
  1. ; "0^<error message>"
  1. ;
  1. G GETVUID^XTID1
  1. ;
  1. SETVUID(TFILE,TFIELD,TIREF,TVUID) ;
  1. ;Function: Assigns (stores) a VHA unique id (VUID) to a given term
  1. ; reference, TIREF. TIREF is represented differently based in its
  1. ; context--the combined value of TFILE and TFIELD.
  1. ;
  1. ;Input:
  1. ; TFILE = VistA file # where term is defined.
  1. ; (req)
  1. ; TFIELD = field #, in TFILE where term is defined.
  1. ; (opt) When defined, it must be of type SET OF CODES.
  1. ; When not defined, TFILE represents a "table" of terms
  1. ; TIREF = term reference, as internal reference value.
  1. ; (req) When TFIELD is defined (SET OF CODES), TIREF is the
  1. ; internal value used in the set of codes.
  1. ; When TFIELD is not defined, TIREF is the IEN of the term
  1. ; in TFILE.
  1. ; TVUID = The VUID number to assign to term reference.
  1. ; (req)
  1. ;
  1. ;Returns: Returns indication of operation as
  1. ; 1 for successful; or
  1. ; "0^<error message>" for unsuccessful
  1. ;
  1. ;Modifies: updates or creates new entry in file 8985.1 or
  1. ; updates TFILE file
  1. ;
  1. G SETVUID^XTID1
  1. ;
  1. GETSTAT(TFILE,TFIELD,TIREF,TDATE) ;
  1. ;Function: Returns the status information for the given term (TIREF)
  1. ; and date (TDATE). TIREF is represented differently based in its
  1. ; context--the combined value of TFILE and TFIELD
  1. ;
  1. ;Input:
  1. ; TFILE = VistA file # where term is defined.
  1. ; (req)
  1. ; TFIELD = field #, in TFILE where term is defined.
  1. ; (opt) When defined, it must be of type SET OF CODES.
  1. ; When not defined, TFILE represents a "table" of terms
  1. ; TIREF = term reference, as internal reference value.
  1. ; (req) When TFIELD is defined (SET OF CODES), TIREF is the
  1. ; internal value used in the set of codes.
  1. ; When TFIELD is not defined, TIREF is the IEN of the term
  1. ; in TFILE.
  1. ; TDATE = FileMan date/time, defaults to NOW.
  1. ; (opt)
  1. ;
  1. ;Returns: Returns the status representation for a given
  1. ; term reference as
  1. ; "<internal value>^<FileMan effective date/time>^<external value>"
  1. ; where value is a set of codes (0:INACTIVE,1:ACTIVE).
  1. ; On error, it returns
  1. ; "^<error message>"
  1. ;
  1. G GETSTAT^XTID1
  1. ;
  1. SETSTAT(TFILE,TFIELD,TIREF,TSTAT,TDATE) ;
  1. ;Function: Assigns (stores) status information (TSTAT and TDATE)
  1. ; to the given term reference, TIREF. TIREF is represented
  1. ; differently based in its context--the combined value of
  1. ; TFILE and TFIELD.
  1. ;
  1. ;Input:
  1. ; TFILE = VistA file # where term is defined.
  1. ; (req)
  1. ; TFIELD = field #, in TFILE where term is defined.
  1. ; (opt) When defined, it must be of type SET OF CODES.
  1. ; When not defined, TFILE represents a "table" of terms
  1. ; TIREF = term reference, as internal reference value.
  1. ; (req) When TFIELD is defined (SET OF CODES), TIREF is the
  1. ; internal value used in the set of codes.
  1. ; When TFIELD is not defined, TIREF is the IEN of the term
  1. ; in TFILE.
  1. ; TSTAT = The status to assign (0 or 1).
  1. ; (req) TSTAT is a set of codes (0:INACTIVE, 1:ACTIVE)
  1. ;
  1. ; TDATE = FileMan date/time, defaults to NOW.
  1. ; (opt)
  1. ;
  1. ;Returns: Returns indication of operation
  1. ; 1:successful or or
  1. ; "0^<error message>" for unsuccessful
  1. ;
  1. ;Modifies: updates entry in file 8985.1 or TFILE file
  1. ;
  1. G SETSTAT^XTID1
  1. ;
  1. GETMASTR(TFILE,TFIELD,TIREF) ;
  1. ;Function: Returns the MASTER VUID flag for a given term
  1. ; reference, TIREF. TIREF is represented differently based
  1. ; in its context--the combined value of TFILE and TFIELD
  1. ;
  1. ;Input:
  1. ; TFILE = VistA file # where term is defined.
  1. ; (req)
  1. ; TFIELD = field #, in TFILE where term is defined.
  1. ; (opt) When defined, it must be of type SET OF CODES.
  1. ; When not defined, TFILE represents a "table" of terms
  1. ; TIREF = term reference, as internal reference value.
  1. ; (req) When TFIELD is defined (SET OF CODES), TIREF is the
  1. ; internal value used in the set of codes.
  1. ; When TFIELD is not defined, TIREF is the IEN of the term
  1. ; in TFILE.
  1. ;
  1. ;Returns: Returns the MASTER VUID value (set of codes: 0,1)
  1. ; On error, it returns
  1. ; "^<error message>"
  1. ;
  1. G GETMASTR^XTID1
  1. ;
  1. SETMASTR(TFILE,TFIELD,TIREF,TMASTER) ;
  1. ;Function: Assigns the MASTER VUID flag to a given term
  1. ; reference, TIREF. TIREF is represented differently based in its
  1. ; context--the combined value of TFILE and TFIELD.
  1. ;
  1. ;Input:
  1. ; TFILE = VistA file # where term is defined.
  1. ; (req)
  1. ; TFIELD = field #, in TFILE where term is defined.
  1. ; (opt) When defined, it must be of type SET OF CODES.
  1. ; When not defined, TFILE represents a "table" of terms
  1. ; TIREF = term reference, as internal reference value.
  1. ; (req) When TFIELD is defined (SET OF CODES), TIREF is the
  1. ; internal value used in the set of codes.
  1. ; When TFIELD is not defined, TIREF is the IEN of the term
  1. ; in TFILE.
  1. ; TMASTER = The MASTER VUID flag value to assign to term reference.
  1. ; (req)
  1. ;
  1. ;Returns: Returns indication of operation as
  1. ; 1 for successful; or
  1. ; "0^<error message>" for unsuccessful
  1. ;
  1. ;Modifies: updates entry in file 8985.1 or TFILE file
  1. ;
  1. G SETMASTR^XTID1
  1. ;
  1. GETIREF(TFILE,TFIELD,TVUID,TARRAY,TMASTER) ;
  1. ;Function: Returns a list of Terms' internal references (IREF) for
  1. ; a given VUID (TVUID). A term's file (TFILE) and field limit
  1. ; the size of the list to those terms found in a given file/field.
  1. ; TIREF is represented differently based in its context--the
  1. ; combined value of TFILE and TFIELD.
  1. ;
  1. ;Input:
  1. ; TFILE = VistA file # where term is defined.
  1. ; (opt)
  1. ; TFIELD = field #, in TFILE where term is defined.
  1. ; (opt) When defined, it must be of type SET OF CODES.
  1. ; When not defined, TFILE represents a "table" of terms
  1. ; TVUID = term's VHA unique id.
  1. ; (req)
  1. ;
  1. ;Output:
  1. ; TARRAY = name of local or global array that will contain the
  1. ; (opt) list of terms as
  1. ;
  1. ; ARRAY(TFILE,TFIELD,TIREF)= status
  1. ; on error it returns
  1. ; ARRAY("ERROR")="<error message>"
  1. ;
  1. G GETIREF^XTID1
  1. ;
  1. SCREEN(TFILE,TFIELD,TIREF,TDATE,TCACHE) ;
  1. ;Function: Returns the screening condition for the given term (TIREF)
  1. ; and date (TDATE). TIREF is represented differently based in its
  1. ; context--the combined value of TFILE and TFIELD.
  1. ;
  1. ;Input:
  1. ; TFILE = VistA file # where term is defined.
  1. ; (req)
  1. ; TFIELD = field #, in TFILE where term is defined.
  1. ; (opt) When defined, it must be of type SET OF CODES.
  1. ; When not defined, TFILE represents a "table" of terms
  1. ; TIREF = term reference, as internal reference value.
  1. ; (req) When TFIELD is defined (SET OF CODES), TIREF is the
  1. ; internal value used in the set of codes.
  1. ; When TFIELD is not defined, TIREF is the IEN of the term
  1. ; in TFILE.
  1. ; TDATE = FileMan date/time, defaults to NOW.
  1. ; (opt)
  1. ; TCACHE = A local variable passed by reference. It must be KILLed
  1. ; (opt) before initiating each search query (e.g. before calling
  1. ; the ^DIC). Using this parameter speeds up the search
  1. ; (especially in big files).
  1. ;
  1. ; Note: This parameter keeps internal values between calls to the
  1. ; screen logic. Do not make any assumptions regarding its
  1. ; value and do not use it in your code!
  1. ;
  1. ;Returns: 0 (i.e. don't screen) if the term is/was active or
  1. ; 1 if the term is/was inactive (i.e. screen).
  1. ;
  1. G SCREEN^XTID1
  1. ;