DGBT1P21 ;ALB/DBE - BENEFICIARY TRAVEL DEFAULT MILEAGE DELETION ; 6/5/13 11:47am
;;1.0;Beneficiary Travel;**21**;September 25, 2001;Build 7
;
;this routine is used as a post-init to remove all entries in the
;BENEFICIARY TRAVEL DISTANCE (#392.1) file
;
; ICR# SUPPORTED
; ----- -----------
; 2055 PRD^DILFD
; 2056 $$GET1^DIQ
; 10013 ^DIK
; 10103 ^XLFDT
; 10141 BMES^XPDUTL
;
Q
;
START ;* entry point for post install
;
I $$GET1^DID(392.1,"","","PACKAGE REVISION DATA")["DGBT*1.0*21" D Q
.D BMES^XPDUTL("Entries in the BENEFICIARY TRAVEL DISTANCE (#392.1) file have already been removed.")
D BACKUP
D MILEDEL
D PRD^DILFD(392.1,"DGBT*1.0*21")
Q
;
BACKUP ;* backup ^DGBT(392.1) global data to an XTMP array
;
D BMES^XPDUTL("Backing up BENEFICIARY TRAVEL DISTANCE (#392.1) file to ^XTMP(""DGBT1P21"")...")
S ^XTMP("DGBT1P21",0)=$$FMADD^XLFDT($$DT^XLFDT,90)_"^"_$$DT^XLFDT_"^"_"Backup of BENEFICIARY TRAVEL DISTANCE (#392.1) file"
M ^XTMP("DGBT1P21","DATA")=^DGBT(392.1)
D BMES^XPDUTL(" ...backup complete.")
;
Q
;
MILEDEL ;* delete all entries from the BENEFICIARY TRAVEL DISTANCE (#392.1) file
;
N DA,DIK
D BMES^XPDUTL("Deleting entries in the BENEFICIARY TRAVEL DISTANCE (#392.1) file...")
S DA=0,DIK="^DGBT(392.1," F S DA=$O(^DGBT(392.1,DA)) Q:'DA D ^DIK
D BMES^XPDUTL(" ..entries deleted.")
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGBT1P21 1403 printed Dec 13, 2024@01:40:14 Page 2
DGBT1P21 ;ALB/DBE - BENEFICIARY TRAVEL DEFAULT MILEAGE DELETION ; 6/5/13 11:47am
+1 ;;1.0;Beneficiary Travel;**21**;September 25, 2001;Build 7
+2 ;
+3 ;this routine is used as a post-init to remove all entries in the
+4 ;BENEFICIARY TRAVEL DISTANCE (#392.1) file
+5 ;
+6 ; ICR# SUPPORTED
+7 ; ----- -----------
+8 ; 2055 PRD^DILFD
+9 ; 2056 $$GET1^DIQ
+10 ; 10013 ^DIK
+11 ; 10103 ^XLFDT
+12 ; 10141 BMES^XPDUTL
+13 ;
+14 QUIT
+15 ;
START ;* entry point for post install
+1 ;
+2 IF $$GET1^DID(392.1,"","","PACKAGE REVISION DATA")["DGBT*1.0*21"
Begin DoDot:1
+3 DO BMES^XPDUTL("Entries in the BENEFICIARY TRAVEL DISTANCE (#392.1) file have already been removed.")
End DoDot:1
QUIT
+4 DO BACKUP
+5 DO MILEDEL
+6 DO PRD^DILFD(392.1,"DGBT*1.0*21")
+7 QUIT
+8 ;
BACKUP ;* backup ^DGBT(392.1) global data to an XTMP array
+1 ;
+2 DO BMES^XPDUTL("Backing up BENEFICIARY TRAVEL DISTANCE (#392.1) file to ^XTMP(""DGBT1P21"")...")
+3 SET ^XTMP("DGBT1P21",0)=$$FMADD^XLFDT($$DT^XLFDT,90)_"^"_$$DT^XLFDT_"^"_"Backup of BENEFICIARY TRAVEL DISTANCE (#392.1) file"
+4 MERGE ^XTMP("DGBT1P21","DATA")=^DGBT(392.1)
+5 DO BMES^XPDUTL(" ...backup complete.")
+6 ;
+7 QUIT
+8 ;
MILEDEL ;* delete all entries from the BENEFICIARY TRAVEL DISTANCE (#392.1) file
+1 ;
+2 NEW DA,DIK
+3 DO BMES^XPDUTL("Deleting entries in the BENEFICIARY TRAVEL DISTANCE (#392.1) file...")
+4 SET DA=0
SET DIK="^DGBT(392.1,"
FOR
SET DA=$ORDER(^DGBT(392.1,DA))
if 'DA
QUIT
DO ^DIK
+5 DO BMES^XPDUTL(" ..entries deleted.")
+6 ;
+7 QUIT