DG531008 ;WILM/BDB - DG*5.3*1008 PRE INSTALL VISTA P3 VHAP UPDATES 2 RSD;05/14/20 9:18pm
;;5.3;Registration;**1008**;Aug 13, 1993;Build 17
;;Per VHA Directive 2004-038, this routine should not be modified.
;
; Integration Agreements:
; 10141 : BMES^XPDUTL
; : MES^XPDUTL
; 10104 : UP^XLFSTR
;
Q
; This pre-install routine will be used to perform the following task:
; Update the NAME (#.01) field of the HEALTH BENEFIT PLAN (#25.11) file.
;
PRE ; Entry point for pre-install
;
L +^DGHBP(25.11,0):10 I '$T D BMES^XPDUTL("Health Benefit Plan (#25.11) File is locked by another user. Please log YOUR IT Services ticket.") Q
;
; Update NAME (#.01) field of the HEALTH BENEFIT PLAN (#25.11) file.
D BMES^XPDUTL("Updating the NAME (#.01) field of the Health Benefit Plan (#25.11) File ")
D UPDATE
D BMES^XPDUTL("Update of the NAME field of the Health Benefit Plan (#25.11) File has completed. ")
;
L -^DGHBP(25.11,0)
Q
;
UPDATE ;Change Name field of certain Health Benefit Plan (#25.11) File entries
;
N DGN,DGTEXT,DGOLD,DGNEW,DGIEN,DGFND,DGHBPN
F DGN=1:1 S DGTEXT=$P($T(NAMES+DGN),";;",2) Q:DGTEXT="" D
.S DGOLD=$P(DGTEXT,";",1),DGNEW=$P(DGTEXT,";",2)
.S DGOLD=$$UP^XLFSTR(DGOLD),DGNEW=$$UP^XLFSTR(DGNEW)
.S DGIEN=0,DGFND=0 F S DGIEN=$O(^DGHBP(25.11,DGIEN)) D:+DGIEN=0 DGERR Q:+DGIEN=0 D Q:DGFND=1
..;S DGHBPN=$P(^DGHBP(25.11,DGIEN,0),U,1) Q:DGHBPN'=DGOLD
..S DGHBPN=$$GET1^DIQ(25.11,DGIEN,.01) Q:DGHBPN'=DGOLD ;bdb 06162020 add fm api
..S DGFND=1
..S DR=".01///"_DGNEW,DIE="^DGHBP(25.11,",DA=DGIEN D ^DIE K DIE,DR,DA
..D BMES^XPDUTL("PLAN NAME:")
..D MES^XPDUTL(DGOLD)
..D MES^XPDUTL("RENAMED TO:")
..D MES^XPDUTL(DGNEW)
Q
DGERR ;
D BMES^XPDUTL(" *** The NAME field for the Health Benefit Plan(#25.11) file")
D MES^XPDUTL(" for this Plan:"_DGNEW)
D MES^XPDUTL(" did not need to be updated.")
D MES^XPDUTL(" The patch was previously installed. ***")
Q
NAMES ;format: ;;oldname;newname
;;ACTIVE DUTY AND SHARING AGREEMENTS;ACTIVE DUTY AND TRICARE SHARING AGREEMENT
;;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG531008 2104 printed Nov 22, 2024@17:45:35 Page 2
DG531008 ;WILM/BDB - DG*5.3*1008 PRE INSTALL VISTA P3 VHAP UPDATES 2 RSD;05/14/20 9:18pm
+1 ;;5.3;Registration;**1008**;Aug 13, 1993;Build 17
+2 ;;Per VHA Directive 2004-038, this routine should not be modified.
+3 ;
+4 ; Integration Agreements:
+5 ; 10141 : BMES^XPDUTL
+6 ; : MES^XPDUTL
+7 ; 10104 : UP^XLFSTR
+8 ;
+9 QUIT
+10 ; This pre-install routine will be used to perform the following task:
+11 ; Update the NAME (#.01) field of the HEALTH BENEFIT PLAN (#25.11) file.
+12 ;
PRE ; Entry point for pre-install
+1 ;
+2 LOCK +^DGHBP(25.11,0):10
IF '$TEST
DO BMES^XPDUTL("Health Benefit Plan (#25.11) File is locked by another user. Please log YOUR IT Services ticket.")
QUIT
+3 ;
+4 ; Update NAME (#.01) field of the HEALTH BENEFIT PLAN (#25.11) file.
+5 DO BMES^XPDUTL("Updating the NAME (#.01) field of the Health Benefit Plan (#25.11) File ")
+6 DO UPDATE
+7 DO BMES^XPDUTL("Update of the NAME field of the Health Benefit Plan (#25.11) File has completed. ")
+8 ;
+9 LOCK -^DGHBP(25.11,0)
+10 QUIT
+11 ;
UPDATE ;Change Name field of certain Health Benefit Plan (#25.11) File entries
+1 ;
+2 NEW DGN,DGTEXT,DGOLD,DGNEW,DGIEN,DGFND,DGHBPN
+3 FOR DGN=1:1
SET DGTEXT=$PIECE($TEXT(NAMES+DGN),";;",2)
if DGTEXT=""
QUIT
Begin DoDot:1
+4 SET DGOLD=$PIECE(DGTEXT,";",1)
SET DGNEW=$PIECE(DGTEXT,";",2)
+5 SET DGOLD=$$UP^XLFSTR(DGOLD)
SET DGNEW=$$UP^XLFSTR(DGNEW)
+6 SET DGIEN=0
SET DGFND=0
FOR
SET DGIEN=$ORDER(^DGHBP(25.11,DGIEN))
if +DGIEN=0
DO DGERR
if +DGIEN=0
QUIT
Begin DoDot:2
+7 ;S DGHBPN=$P(^DGHBP(25.11,DGIEN,0),U,1) Q:DGHBPN'=DGOLD
+8 ;bdb 06162020 add fm api
SET DGHBPN=$$GET1^DIQ(25.11,DGIEN,.01)
if DGHBPN'=DGOLD
QUIT
+9 SET DGFND=1
+10 SET DR=".01///"_DGNEW
SET DIE="^DGHBP(25.11,"
SET DA=DGIEN
DO ^DIE
KILL DIE,DR,DA
+11 DO BMES^XPDUTL("PLAN NAME:")
+12 DO MES^XPDUTL(DGOLD)
+13 DO MES^XPDUTL("RENAMED TO:")
+14 DO MES^XPDUTL(DGNEW)
End DoDot:2
if DGFND=1
QUIT
End DoDot:1
+15 QUIT
DGERR ;
+1 DO BMES^XPDUTL(" *** The NAME field for the Health Benefit Plan(#25.11) file")
+2 DO MES^XPDUTL(" for this Plan:"_DGNEW)
+3 DO MES^XPDUTL(" did not need to be updated.")
+4 DO MES^XPDUTL(" The patch was previously installed. ***")
+5 QUIT
NAMES ;format: ;;oldname;newname
+1 ;;ACTIVE DUTY AND SHARING AGREEMENTS;ACTIVE DUTY AND TRICARE SHARING AGREEMENT
+2 ;;