DGBT18PT ;ALB/RAM - POST-INSTALL DGBT*1.0*18 ; 9/10/10 9:22Am
;;1.0;Beneficiary Travel;**18**;September 25, 2001;Build 15
;;Check for updated X-REFS (Fields: 21,22,25,26) used in Input Templates
;;
Q
POST ;Post init
N DGBTFLD,DGBTMFLD,DGBTOUT,DGBTF
D TEMPL
Q
;
TEMPL ;Determine templates on the FILE file to be compiled.
N DGBTG,DGBTFIELD,DGBTNF,DGBTFILE,DGBTCNT
D BMES^XPDUTL("Beginning to compile templates on the BENEFICIARY TRAVEL CLAIM (#392) file.")
;
S DGBTNF="21,22,25,26",DGBTFILE=392,DGBTFIELD="",DGBTCNT=1
F S DGBTFIELD=$P(DGBTNF,",",DGBTCNT) Q:DGBTFIELD="" D LOOP(DGBTFIELD,DGBTFILE) S DGBTCNT=DGBTCNT+1
W !!
S (DGBTX,DGBTY)=""
D BMES^XPDUTL("The following routine namespace compiled:")
F S DGBTX=$O(DGBTCF(DGBTX)) Q:DGBTX="" S DGBTY=$G(DGBTY)+1 S PRINT(DGBTY)=" "_DGBTX_"*"
;
D MES^XPDUTL(.PRINT)
K DGBTX,DGBTY,PRINT,DGBTCF
Q
LOOP(DGBTFIELD,DGBTFILE) ;Compile templates.
N DGBTG,DGBTTEMP,DGBTTEMPN,DGBTX,DGBTY,DGBTDM,DGBTTYPE
F DGBTG="^DIE","^DIPT" D
. S DGBTTYPE="Input" S:DGBTG="^DIPT" TYPE="Print"
. I $D(@DGBTG@("AF",DGBTFILE,DGBTFIELD)) D
.. S DGBTTEMP=0
.. F S DGBTTEMP=$O(@DGBTG@("AF",DGBTFILE,DGBTFIELD,DGBTTEMP)) Q:'DGBTTEMP DO
... S DGBTTEMPN=$P($G(@DGBTG@(DGBTTEMP,0)),"^",1)
... I DGBTTEMPN="" D BMES^XPDUTL("Could not compile template "_DGBTTEMPN_$C(13,10)_"Please review!") Q
... S DGBTX=$P($G(@DGBTG@(DGBTTEMP,"ROUOLD")),"^")
... I DGBTX=""&($D(@DGBTG@(DGBTTEMP,"ROU"))'=0) D BMES^XPDUTL("Could not find routine for template "_DGBTTEMPN_$C(13,10)_"Please review!") Q
... I DGBTX=""&($D(@DGBTG@(DGBTTEMP,"ROU"))=0) Q
... W !,"Field: "_DGBTFIELD,!
... W !,DGBTTYPE," Template "_DGBTTEMPN_" needs to be compiled.",!
... I $D(DGBTCF(DGBTX)) Q ;already compiled
... S DGBTCF(DGBTX)="" ; remember the template was compiled
... S DGBTY=DGBTTEMP ; set up the call for FileMan
... S DGBTDM=$$ROUSIZE^DILF
... I DGBTG="^DIE" D BMES^XPDUTL(" "),BMES^XPDUTL(" Compiling Input Templates") D EN^DIEZ Q
... I DGBTG="^DIPT" D BMES^XPDUTL(" "),BMES^XPDUTL(" Compiling Print Templates") D EN^DIPZ Q
Q
;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGBT18PT 2118 printed Nov 22, 2024@16:50:22 Page 2
DGBT18PT ;ALB/RAM - POST-INSTALL DGBT*1.0*18 ; 9/10/10 9:22Am
+1 ;;1.0;Beneficiary Travel;**18**;September 25, 2001;Build 15
+2 ;;Check for updated X-REFS (Fields: 21,22,25,26) used in Input Templates
+3 ;;
+4 QUIT
POST ;Post init
+1 NEW DGBTFLD,DGBTMFLD,DGBTOUT,DGBTF
+2 DO TEMPL
+3 QUIT
+4 ;
TEMPL ;Determine templates on the FILE file to be compiled.
+1 NEW DGBTG,DGBTFIELD,DGBTNF,DGBTFILE,DGBTCNT
+2 DO BMES^XPDUTL("Beginning to compile templates on the BENEFICIARY TRAVEL CLAIM (#392) file.")
+3 ;
+4 SET DGBTNF="21,22,25,26"
SET DGBTFILE=392
SET DGBTFIELD=""
SET DGBTCNT=1
+5 FOR
SET DGBTFIELD=$PIECE(DGBTNF,",",DGBTCNT)
if DGBTFIELD=""
QUIT
DO LOOP(DGBTFIELD,DGBTFILE)
SET DGBTCNT=DGBTCNT+1
+6 WRITE !!
+7 SET (DGBTX,DGBTY)=""
+8 DO BMES^XPDUTL("The following routine namespace compiled:")
+9 FOR
SET DGBTX=$ORDER(DGBTCF(DGBTX))
if DGBTX=""
QUIT
SET DGBTY=$GET(DGBTY)+1
SET PRINT(DGBTY)=" "_DGBTX_"*"
+10 ;
+11 DO MES^XPDUTL(.PRINT)
+12 KILL DGBTX,DGBTY,PRINT,DGBTCF
+13 QUIT
LOOP(DGBTFIELD,DGBTFILE) ;Compile templates.
+1 NEW DGBTG,DGBTTEMP,DGBTTEMPN,DGBTX,DGBTY,DGBTDM,DGBTTYPE
+2 FOR DGBTG="^DIE","^DIPT"
Begin DoDot:1
+3 SET DGBTTYPE="Input"
if DGBTG="^DIPT"
SET TYPE="Print"
+4 IF $DATA(@DGBTG@("AF",DGBTFILE,DGBTFIELD))
Begin DoDot:2
+5 SET DGBTTEMP=0
+6 FOR
SET DGBTTEMP=$ORDER(@DGBTG@("AF",DGBTFILE,DGBTFIELD,DGBTTEMP))
if 'DGBTTEMP
QUIT
Begin DoDot:3
+7 SET DGBTTEMPN=$PIECE($GET(@DGBTG@(DGBTTEMP,0)),"^",1)
+8 IF DGBTTEMPN=""
DO BMES^XPDUTL("Could not compile template "_DGBTTEMPN_$CHAR(13,10)_"Please review!")
QUIT
+9 SET DGBTX=$PIECE($GET(@DGBTG@(DGBTTEMP,"ROUOLD")),"^")
+10 IF DGBTX=""&($DATA(@DGBTG@(DGBTTEMP,"ROU"))'=0)
DO BMES^XPDUTL("Could not find routine for template "_DGBTTEMPN_$CHAR(13,10)_"Please review!")
QUIT
+11 IF DGBTX=""&($DATA(@DGBTG@(DGBTTEMP,"ROU"))=0)
QUIT
+12 WRITE !,"Field: "_DGBTFIELD,!
+13 WRITE !,DGBTTYPE," Template "_DGBTTEMPN_" needs to be compiled.",!
+14 ;already compiled
IF $DATA(DGBTCF(DGBTX))
QUIT
+15 ; remember the template was compiled
SET DGBTCF(DGBTX)=""
+16 ; set up the call for FileMan
SET DGBTY=DGBTTEMP
+17 SET DGBTDM=$$ROUSIZE^DILF
+18 IF DGBTG="^DIE"
DO BMES^XPDUTL(" ")
DO BMES^XPDUTL(" Compiling Input Templates")
DO EN^DIEZ
QUIT
+19 IF DGBTG="^DIPT"
DO BMES^XPDUTL(" ")
DO BMES^XPDUTL(" Compiling Print Templates")
DO EN^DIPZ
QUIT
End DoDot:3
End DoDot:2
End DoDot:1
+20 QUIT
+21 ;
+22 ;