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

DGPFUT6.m

Go to the documentation of this file.
  1. DGPFUT6 ;SHRPE/SGM - PRF DBRS# MAIN DRIVER ; Jan 19, 2018 16:45
  1. ;;5.3;Registration;**951**;Aug 13, 1993;Build 135
  1. ; Last Edited: SHRPE/sgm - Aug 22, 2018 09:16
  1. ;
  1. ; ICR# TYPE DESCRIPTION
  1. ;----- ---- -----------------------------------------
  1. ; 2051 Sup $$FIND1^DIC
  1. ; 2056 Sup $$GET1^DIQ
  1. ;10112 Sup $$SITE^VASITE
  1. ;
  1. ;=====================================================================
  1. ;*** This routine is the gateway to the other DGPFUT6* routines ***
  1. ;*** DGPFUT6 is the only routine authorized to invoke other ***
  1. ;*** DGPFUT6* routines. ***
  1. ;=====================================================================
  1. ;
  1. Q
  1. ;
  1. ;=====================================================================
  1. AASGN(DGIENS,DGPFA,DGFDA,DGPFUV,DGPFERR) ;
  1. ; set up FILE^DIE or UPDATE^DIE input array for DBRS data
  1. D AASGN^DGPFUT62($G(DGIENS),.DGPFA,.DGFDA,$G(DGPFUV),.DGPFERR)
  1. Q
  1. ;
  1. ;=====================================================================
  1. DBRSEDIT() ; called from AF/EF Listmanager actions
  1. Q $$DBRS^DGPFUT61
  1. ;
  1. ;=====================================================================
  1. DBRSNO(DGN,DGNIEN) ; validate DBRS# unique in VistA
  1. Q $$DBRSVAL^DGPFUT61($G(DGN),$G(DGNIEN))
  1. ;
  1. ;=====================================================================
  1. DEFDIV() ; return a valid PRF division for this user
  1. N X
  1. S X=+$G(DUZ(2)) I X,$$ISDIV^DGPFUT(X) Q X
  1. S X=+$$SITE^VASITE
  1. Q X
  1. ;
  1. ;=====================================================================
  1. DEL(DGXIEN,DGFILE) ; delete DBRS data from FM record
  1. ; DGXIEN - ien to file 26.13 OR 26.14
  1. ; DGFILE - 26.13 or 26.14
  1. D DEL^DGPFUT62(DGXIEN,DGFILE)
  1. Q
  1. ;
  1. EIE(DGPFIN) ; warning message that all DBRS# will be removed
  1. D EIE^DGPFUT61(.DGPFIN)
  1. Q
  1. ;
  1. ;=====================================================================
  1. FLAG(DGPFIN,SCR,TYPE) ;
  1. ; Find one flag matching
  1. ; INPUT PARAMETERS:
  1. ; DGPFIN - required - flag full name or variable-pointer syntax
  1. ; SCR - required - flag name to use as a screen if DGPFIN is
  1. ; var-pointer
  1. ; TYPE - optional - I or II or <null or 0 - for either>
  1. ; EXTRINSIC FUNCTION returns 0 or variable_pointer^flag_name
  1. ;
  1. Q $$FLAG^DGPFUT64($G(DGPFIN),$G(SCR),$G(TYPE))
  1. ;
  1. ;=====================================================================
  1. FLAGCVRT(DGRET,VAL,TYPE) ;
  1. ;Convert flag name to variable pointer / variable pointer to flag name
  1. ;INPUT PARAMETERS:
  1. ; TYPE - optional - I:only return Cat I values
  1. ; II:only return Cat II values
  1. ; null or 0:return either Cat I or Cat II
  1. ; VAL - required - flag full name or variable-pointer syntax
  1. ;
  1. ;EXTRINSIC FUNCTION and RETURN PARAMETER DGRET returns:
  1. ; 0 if no matches or error encountered
  1. ; else variable_pointer ^ name of flag
  1. ; This expects that there are not multiple flags with the same name
  1. ;
  1. D FLAGCVRT^DGPFUT64(.DGRET,$G(VAL),$G(TYPE))
  1. Q:$Q DGRET
  1. Q
  1. ;=====================================================================
  1. GETDBRS(DGRET,DGAIEN) ; Get DBRS data for an Assignment record
  1. D GETDBRS^DGPFUT62(.DGRET,$G(DGAIEN))
  1. Q
  1. ;
  1. ;=====================================================================
  1. GETDBRSH(DGRET,DGHIEN) ; Get DBRS data fOR a History record
  1. D GETDBRSH^DGPFUT62(.DGRET,$G(DGHIEN))
  1. Q
  1. ;
  1. ;=====================================================================
  1. ICR() ;
  1. ; called from ICR entry points
  1. ; to not update the ICR agreements affected, DBRS data will not be
  1. ; returned from a call that is invoking that ICR agreement unless
  1. ; one undertakes the responsibility of upgrading the calling
  1. ; program also.
  1. ; Return 1 if called from external source via ICR
  1. ; 0 if called from DG internal sources
  1. ; 0 if external source will use updated info
  1. N X,Y
  1. S Y=1,X=$G(XQY0)
  1. I $E(X,1,2)="DG" S Y=0
  1. I Y,$E(X,1,2)="OR" S Y=0
  1. Q Y
  1. ;
  1. ;=====================================================================
  1. LOC(DGIN) ; Was History record created locally or at another VAMC
  1. Q $$LOC^DGPFUT63(.DGIN)
  1. ;
  1. ;=====================================================================
  1. SELASGN(DGSCR,FLG) ;
  1. ; select an existing assignment from from 26.13
  1. ;INPUT PARAMETER: DGSCR - optional - ^DIC input parameter DIC("S")
  1. ; FLG - optional, if Z then return zeroth node as
  1. ; second and subsequent "^"-pieces
  1. ;EXTRINSIC FUNCTION: ien or ien[^zeroth node] or 0 or -1
  1. ;
  1. Q $$SELASGN^DGPFUT64($G(DGSCR),$G(FLG))
  1. ;
  1. ;=====================================================================
  1. STOHIST(DGIENS,DGFLD,DGFDA,DGPFERR) ;
  1. ; File DBRS data for History record
  1. D STOHIST^DGPFUT62(DGIENS,.DGFLD,.DGFDA,.DGPFERR)
  1. Q