DG531006 ;WILM/BDB - DG*5.3*1006 PRE INSTALL TO UPDATE HBP NAMES;10/28/19 9:18pm
;;5.3;Registration;**1006**;Aug 13, 1993;Build 6
;;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 Plans has completed. ")
;
L -^DGHBP(25.11,0)
Q
;
UPDATE ;Change Name field of certain Health Benefit Plans
;
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)) Q:+DGIEN=0 D Q:DGFND=1
..S DGHBPN=$P(^DGHBP(25.11,DGIEN,0),U,1) Q:DGHBPN'=DGOLD
..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(" *** An Error occurred during the updating of ")
D MES^XPDUTL(" the NAME field for the Health Benefit Plans for this Plan:")
D MES^XPDUTL(" "_DGOLD)
D MES^XPDUTL(" The Plan was not located on file.")
D MES^XPDUTL(" Please log YOUR IT Services ticket. ***")
Q
NAMES ;format: ;;oldname;newname
;;Veteran - Full Medical Benefits Treatment & Rx Copay Exempt;Veteran Full Med Benefits Tx and Rx Copay Exmt
;;Veteran - Full Medical Benefits Treatment & Rx Copay Exempt (X);Veteran Full Med Benefits Tx and Rx Copay Exmt 6
;;Veteran - Full Medical Benefits Treatment Copay Exempt & Rx Copay Required;Veteran Full Med Benefits Tx Copay Exmt and Rx Copay Req
;;Veteran - Full Medical Benefits Treatment Copay Exempt & Rx Copay Required (Y);Veteran Full Med Benefits Tx Copay Exmt and Rx Copay Req 6
;;Veteran - Full Medical Benefits Treatment Copay Required & Rx Copay Exempt (A);Veteran Full Med Benefits Tx Copay Req and Rx Copay Exmt 6
;;Veteran - Full Medical Benefits Treatment Copay Required & Rx Copay Exempt (B);Veteran Full Med Benefits Tx Copay Req and Rx Copay Exmt 7
;;Veteran - Full Medical Benefits Treatment Copay Required & Rx Copay Exempt (C);Veteran Full Med Benefits Tx Copay Req and Rx Copay Exmt 8
;;Veteran - Full Medical Benefits Treatment & Rx Copay Required (A);Veteran Full Med Benefits Tx and Rx Copay Req 6
;;Veteran - Full Medical Benefits Treatment & Rx Copay Required (B);Veteran Full Med Benefits Tx and Rx Copay Req 8
;;Veteran - Full Medical Benefits Treatment GMT Copay Required & Rx Copay Exempt;Veteran Full Med Benefits Tx GMT Copay Req and Rx Copay Exmt
;;Veteran - Full Medical Benefits Treatment GMT Copay Required & Rx Copay Exempt (A);Veteran Full Med Benefits Tx GMT Copay Req and Copay Exmt 6
;;Veteran - Full Medical Benefits Treatment GMT Copay Required & Rx Copay Required;Veteran Full Med Benefits Tx GMT Copay Req and Rx Copay Req
;;Veteran - Full Medical Benefits Treatment GMT Copay Required & Rx Copay Required (A);Veteran Full Med Benefits Tx GMT and Rx Copay Req 6
;;Veteran - Restricted Medical Benefits;Veteran Restricted Med Benefits
;;Non-Veteran - Other Restricted Medical Benefits;Non Veteran Other Restricted Med Benefits
;;Active Duty & Sharing Agreements;Active Duty and Sharing Agreements
;;VETERAN BENEFICIARY PLAN - NEWBORN;BENEFICIARY NEWBORN
;;VETERAN BENEFICIARY PLAN - SPINA BIFIDA (SB);BENEFICIARY SPINA BIFIDA
;;VETERAN BENEFICIARY PLAN - CHILDREN OF WOMEN VIETNAM VETERANS (CWVV);BENEFICIARY CHILDREN OF WOMEN OF VIETNAM VETERANS
;;VETERAN PLAN - FOREIGN MEDICAL PROGRAM;VETERAN FOREIGN MEDICAL PROGRAM
;;VETERAN PLAN FOREIGN MEDICAL CARE;VETERAN FOREIGN MEDICAL PROGRAM
;;VETERAN BENEFICIARY PLAN - CAREGIVER (PRIMARY FAMILY CAREGIVER);CAREGIVER PRIMARY FAMILY
;;VETERAN BENEFICIARY PLAN - CAREGIVER (SECONDARY FAMILY CAREGIVER);CAREGIVER SECONDARY FAMILY
;;VETERAN BENEFICIARY PLAN - CAREGIVERS (GENERAL CAREGIVER);CAREGIVER GENERAL
;;VETERAN BENEFICIARY PLAN - CHAMPVA;BENEFICIARY CHAMPVA
;;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG531006 4653 printed Dec 13, 2024@02:35:34 Page 2
DG531006 ;WILM/BDB - DG*5.3*1006 PRE INSTALL TO UPDATE HBP NAMES;10/28/19 9:18pm
+1 ;;5.3;Registration;**1006**;Aug 13, 1993;Build 6
+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 Plans has completed. ")
+8 ;
+9 LOCK -^DGHBP(25.11,0)
+10 QUIT
+11 ;
UPDATE ;Change Name field of certain Health Benefit Plans
+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
QUIT
Begin DoDot:2
+7 SET DGHBPN=$PIECE(^DGHBP(25.11,DGIEN,0),U,1)
if DGHBPN'=DGOLD
QUIT
+8 SET DGFND=1
+9 SET DR=".01///"_DGNEW
SET DIE="^DGHBP(25.11,"
SET DA=DGIEN
DO ^DIE
KILL DIE,DR,DA
+10 DO BMES^XPDUTL("PLAN NAME:")
+11 DO MES^XPDUTL(DGOLD)
+12 DO MES^XPDUTL("RENAMED TO:")
+13 DO MES^XPDUTL(DGNEW)
End DoDot:2
if DGFND=1
QUIT
End DoDot:1
+14 QUIT
DGERR ;
+1 DO BMES^XPDUTL(" *** An Error occurred during the updating of ")
+2 DO MES^XPDUTL(" the NAME field for the Health Benefit Plans for this Plan:")
+3 DO MES^XPDUTL(" "_DGOLD)
+4 DO MES^XPDUTL(" The Plan was not located on file.")
+5 DO MES^XPDUTL(" Please log YOUR IT Services ticket. ***")
+6 QUIT
NAMES ;format: ;;oldname;newname
+1 ;;Veteran - Full Medical Benefits Treatment & Rx Copay Exempt;Veteran Full Med Benefits Tx and Rx Copay Exmt
+2 ;;Veteran - Full Medical Benefits Treatment & Rx Copay Exempt (X);Veteran Full Med Benefits Tx and Rx Copay Exmt 6
+3 ;;Veteran - Full Medical Benefits Treatment Copay Exempt & Rx Copay Required;Veteran Full Med Benefits Tx Copay Exmt and Rx Copay Req
+4 ;;Veteran - Full Medical Benefits Treatment Copay Exempt & Rx Copay Required (Y);Veteran Full Med Benefits Tx Copay Exmt and Rx Copay Req 6
+5 ;;Veteran - Full Medical Benefits Treatment Copay Required & Rx Copay Exempt (A);Veteran Full Med Benefits Tx Copay Req and Rx Copay Exmt 6
+6 ;;Veteran - Full Medical Benefits Treatment Copay Required & Rx Copay Exempt (B);Veteran Full Med Benefits Tx Copay Req and Rx Copay Exmt 7
+7 ;;Veteran - Full Medical Benefits Treatment Copay Required & Rx Copay Exempt (C);Veteran Full Med Benefits Tx Copay Req and Rx Copay Exmt 8
+8 ;;Veteran - Full Medical Benefits Treatment & Rx Copay Required (A);Veteran Full Med Benefits Tx and Rx Copay Req 6
+9 ;;Veteran - Full Medical Benefits Treatment & Rx Copay Required (B);Veteran Full Med Benefits Tx and Rx Copay Req 8
+10 ;;Veteran - Full Medical Benefits Treatment GMT Copay Required & Rx Copay Exempt;Veteran Full Med Benefits Tx GMT Copay Req and Rx Copay Exmt
+11 ;;Veteran - Full Medical Benefits Treatment GMT Copay Required & Rx Copay Exempt (A);Veteran Full Med Benefits Tx GMT Copay Req and Copay Exmt 6
+12 ;;Veteran - Full Medical Benefits Treatment GMT Copay Required & Rx Copay Required;Veteran Full Med Benefits Tx GMT Copay Req and Rx Copay Req
+13 ;;Veteran - Full Medical Benefits Treatment GMT Copay Required & Rx Copay Required (A);Veteran Full Med Benefits Tx GMT and Rx Copay Req 6
+14 ;;Veteran - Restricted Medical Benefits;Veteran Restricted Med Benefits
+15 ;;Non-Veteran - Other Restricted Medical Benefits;Non Veteran Other Restricted Med Benefits
+16 ;;Active Duty & Sharing Agreements;Active Duty and Sharing Agreements
+17 ;;VETERAN BENEFICIARY PLAN - NEWBORN;BENEFICIARY NEWBORN
+18 ;;VETERAN BENEFICIARY PLAN - SPINA BIFIDA (SB);BENEFICIARY SPINA BIFIDA
+19 ;;VETERAN BENEFICIARY PLAN - CHILDREN OF WOMEN VIETNAM VETERANS (CWVV);BENEFICIARY CHILDREN OF WOMEN OF VIETNAM VETERANS
+20 ;;VETERAN PLAN - FOREIGN MEDICAL PROGRAM;VETERAN FOREIGN MEDICAL PROGRAM
+21 ;;VETERAN PLAN FOREIGN MEDICAL CARE;VETERAN FOREIGN MEDICAL PROGRAM
+22 ;;VETERAN BENEFICIARY PLAN - CAREGIVER (PRIMARY FAMILY CAREGIVER);CAREGIVER PRIMARY FAMILY
+23 ;;VETERAN BENEFICIARY PLAN - CAREGIVER (SECONDARY FAMILY CAREGIVER);CAREGIVER SECONDARY FAMILY
+24 ;;VETERAN BENEFICIARY PLAN - CAREGIVERS (GENERAL CAREGIVER);CAREGIVER GENERAL
+25 ;;VETERAN BENEFICIARY PLAN - CHAMPVA;BENEFICIARY CHAMPVA
+26 ;;