; Check if this combination is in the AA cross-
; reference of File 120.52
; Input:
; GMVTI - File 120.51 ien
; GMVQUALI - File 120.52 ien
; GMVCATI - File 120.53 ien
QMAIL
; Queue mail message
EN(ERROR)
; Clean up existing file connections and gui templates
GET(GMVFILE,GMVIEN,GMVREF)
; Calls the $$GETVUID^XTID API to get the VUID number
; GMVFILE - File number
; GMVIEN - field #
; GMVREF - value
CAT
; Loop through the Category entries in FILE 120.53:
; 1) If the CATEGORY is not active, get rid of all VITAL TYPE (#1)
; associations,
; 2) If the CATEGORY is active and a VITAL TYPE is not active, get rid
; of that VITAL TYPE association,
; 3) If the CATEGORY and VITAL TYPE are active, but the DEFAULT
; QUALIFIER (#.07) is not, null out the DEFAULT QUALIFIER field.
TEMPS
; Clean up GUI templates definitions.
; If a qualifier is inactive, remove it and its category.
QUAL
; Loop through the Qualifier entries in FILE 120.52:
; 1) If the QUALIFIER is not active, get rid of all VITAL TYPE (#1)
; associations,
; 2) If the QUALIFIER is active and a VITAL TYPE is not active, get rid
; of that VITAL TYPE association,
; 3) If the QUALIFIER and VITAL TYPE are active, but the CATEGORY
; (#.02 in subfile 120.521) is not, get rid of that subfile entry.
QUAL1(GMVX,GMVY)
; Delete a multiple entry (#1) in FILE 120.52
MAIL
; Send mail message to installer that an error occurred
ACTIVE(GMVFILE,GMVFLD,GMVIEN,GMVDATE)
; Calls the $$SCREEN^XTID API to get VUID status
; Input: GMVFILE - File number
; GMVFLD - Field number
; GMVIEN - IEN
; GMVDATE - Date
; Output: 0 - Active
; 1 - Inactive