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