IBY574PR ;ALB/GEF - Pre-Installation for IB patch 574 ; 10/7/16 5:38pm
 ;;2.0;INTEGRATED BILLING;**574**;21-MAR-94;Build 12
 ;;Per VA Directive 6402, this routine should not be modified.
 ;
 ; delete all output formatter (O.F.) data elements included in build
 D DELOF
 Q
 ;
INCLUDE(FILE,Y) ; function to determine if O.F. entry should be included in the build
 ; FILE=5,6,7 indicating file 364.x
 ; Y=ien to file
 NEW OK,LN,TAG,DATA
 S OK=0
 F LN=2:1 S TAG="ENT"_FILE_"+"_LN,DATA=$P($T(@TAG),";;",2) Q:DATA=""  I $F(DATA,U_Y_U) S OK=1 Q
 Q OK
 ;
 ;Delete edited entries to insure clean install of new entries
 ;Delete obsolete entries.
DELOF ; Delete included OF entries
 NEW FILE,DIK,LN,TAG,TAGLN,DATA,PCE,DA,Y
 F FILE=5,6,7 S DIK="^IBA(364."_FILE_"," D
 . F TAG="ENT"_FILE,"DEL"_FILE D
 .. F LN=2:1 S TAGLN=TAG_"+"_LN,DATA=$P($T(@TAGLN),";;",2) Q:DATA=""  D
 ... F PCE=2:1 S DA=$P(DATA,U,PCE) Q:'DA  I $D(^IBA("364."_FILE,DA,0)) D ^DIK
 Q
 ;
 ; Example for ENT5, ENT6, ENT7, DEL5, DEL6, and DEL7:
 ;;^195^254^259^269^324^325^
 ; Note:  Must have beginning and ending up-carat
 ;
 ; 364.5 entries modified:
 ;
ENT5 ; OF entries in file 364.5 to be included
 ;
 ;
 ;-----------------------------------------------------------------------
 ;
ENT6 ; O.F. entries in file 364.6 to be included
 ;
 ;
ENT7 ; O.F. entries in file 364.7 to be included
 ;
 ;;^77^98^1305^
 ;
 ;-----------------------------------------------------------------------
 ; 364.5 entries deleted:
 ;
DEL5 ; remove O.F. entries in file 364.5 (not re-added)
 ;
 ;;
 ;
 ;
DEL6 ; remove O.F. entries in file 364.6 (not re-added)
 ;
 ;
DEL7 ; remove O.F. entries in file 364.7 (not re-added)
 ;
 ;
 ;-----------------------------------------------------------------------
 ;
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBY574PR   1801     printed  Sep 23, 2025@20:10:57                                                                                                                                                                                                    Page 2
IBY574PR  ;ALB/GEF - Pre-Installation for IB patch 574 ; 10/7/16 5:38pm
 +1       ;;2.0;INTEGRATED BILLING;**574**;21-MAR-94;Build 12
 +2       ;;Per VA Directive 6402, this routine should not be modified.
 +3       ;
 +4       ; delete all output formatter (O.F.) data elements included in build
 +5        DO DELOF
 +6        QUIT 
 +7       ;
INCLUDE(FILE,Y) ; function to determine if O.F. entry should be included in the build
 +1       ; FILE=5,6,7 indicating file 364.x
 +2       ; Y=ien to file
 +3        NEW OK,LN,TAG,DATA
 +4        SET OK=0
 +5        FOR LN=2:1
               SET TAG="ENT"_FILE_"+"_LN
               SET DATA=$PIECE($TEXT(@TAG),";;",2)
               if DATA=""
                   QUIT 
               IF $FIND(DATA,U_Y_U)
                   SET OK=1
                   QUIT 
 +6        QUIT OK
 +7       ;
 +8       ;Delete edited entries to insure clean install of new entries
 +9       ;Delete obsolete entries.
DELOF     ; Delete included OF entries
 +1        NEW FILE,DIK,LN,TAG,TAGLN,DATA,PCE,DA,Y
 +2        FOR FILE=5,6,7
               SET DIK="^IBA(364."_FILE_","
               Begin DoDot:1
 +3                FOR TAG="ENT"_FILE,"DEL"_FILE
                       Begin DoDot:2
 +4                        FOR LN=2:1
                               SET TAGLN=TAG_"+"_LN
                               SET DATA=$PIECE($TEXT(@TAGLN),";;",2)
                               if DATA=""
                                   QUIT 
                               Begin DoDot:3
 +5                                FOR PCE=2:1
                                       SET DA=$PIECE(DATA,U,PCE)
                                       if 'DA
                                           QUIT 
                                       IF $DATA(^IBA("364."_FILE,DA,0))
                                           DO ^DIK
                               End DoDot:3
                       End DoDot:2
               End DoDot:1
 +6        QUIT 
 +7       ;
 +8       ; Example for ENT5, ENT6, ENT7, DEL5, DEL6, and DEL7:
 +9       ;;^195^254^259^269^324^325^
 +10      ; Note:  Must have beginning and ending up-carat
 +11      ;
 +12      ; 364.5 entries modified:
 +13      ;
ENT5      ; OF entries in file 364.5 to be included
 +1       ;
 +2       ;
 +3       ;-----------------------------------------------------------------------
 +4       ;
ENT6      ; O.F. entries in file 364.6 to be included
 +1       ;
 +2       ;
ENT7      ; O.F. entries in file 364.7 to be included
 +1       ;
 +2       ;;^77^98^1305^
 +3       ;
 +4       ;-----------------------------------------------------------------------
 +5       ; 364.5 entries deleted:
 +6       ;
DEL5      ; remove O.F. entries in file 364.5 (not re-added)
 +1       ;
 +2       ;;
 +3       ;
 +4       ;
DEL6      ; remove O.F. entries in file 364.6 (not re-added)
 +1       ;
 +2       ;
DEL7      ; remove O.F. entries in file 364.7 (not re-added)
 +1       ;
 +2       ;
 +3       ;-----------------------------------------------------------------------
 +4       ;