DG531087P ;ALB/KUM - DG*5.3*1087 POST-INSTALL ;Nov 15, 2022@14:36
;;5.3;Registration;**1087**;Aug 13, 1993;Build 2
;
; This routine will upload the 2023 Means Test Thresholds and
; Maximum Annual Pension Rates into the MAS PARAMETERS file (#43)
; and the PARAMETERS file (#8989.5).
;
;ICRs
; Reference to BMES^XPDUTL,MES^XPDUTL in ICR #10141
; Reference to ^DIK,IX1^DIK in ICR #10013
; Reference to FILE^DICN in ICR #10009
; Reference to FILE^DIE in ICR #2053
; Reference to EN^XPAR in ICR #2263
;
Q
;
EN ; Entry point for post-install
D BMES^XPDUTL(">>> Beginning the DG*5.3*1087 post-install routine...")
D MT
D MAPR
D BMES^XPDUTL(" ")
D BMES^XPDUTL(">>> Patch DG*5.3*1087 Post-install complete.")
Q
;
MT ; Update Means Test Thresholds
N DA,DIK,DIC,DINUM,DGI,X,Y,DGX,DGREC,DGIENS,DGMESS,DGFDA,DGERR
D BMES^XPDUTL(" ")
D BMES^XPDUTL(" Means Test Thresholds for 2023 calendar year (2022 income year) being ")
D MES^XPDUTL(" installed in MAS PARAMETERS (#43) file.")
I $D(^DG(43,1,"MT",3230000)) D
.D BMES^XPDUTL(">>> Entry exists for calendar year 2023, entry being deleted")
.D MES^XPDUTL(" and replaced with nationally released thresholds.")
.S DIK="^DG(43,1,""MT"",",DA=3230000,DA(1)=1
.D ^DIK,IX1^DIK
.K DA,DIK
K DO
S DIC="^DG(43,1,""MT"","
S DIC(0)="L"
S DA(1)=1
S (DINUM,X)=3230000
D FILE^DICN
;
I +Y'=3230000 D Q
. D BMES^XPDUTL(" ...Problem encountered adding 2023 thresholds. ")
. D MES^XPDUTL(" - Submit a YOUR IT Services ticket with the Enterprise Service Desk")
. D MES^XPDUTL(" for assistance.")
;
D MES^XPDUTL("")
S DGREC=1
S DGIENS=+Y_","_DGREC_","
F DGI=1:1 S DGX=$P($T(DATA+DGI),";;",2) Q:DGX="QUIT" D
. S DGFDA(43.03,DGIENS,+DGX)=$P(DGX,"^",2)
. S DGMESS(DGI)=" "_$P(DGX,"^",3)_" set to $"_$FN($P(DGX,"^",2),",")_"."
D FILE^DIE(,"DGFDA","DGERR")
I $D(DGERR) D
. D BMES^XPDUTL(" ...Problem encountered adding 2023 thresholds. ")
. D MES^XPDUTL(" - Submit a YOUR IT Services ticket with the Enterprise Service Desk")
. D MES^XPDUTL(" for assistance.")
I '$D(DGERR) D BMES^XPDUTL(.DGMESS)
Q
;
MAPR ; Update Maximum Annual Pension Rates
;
D BMES^XPDUTL(">>> Setting Maximum Annual Pension Rate Parameters in PARAMETER (#8989.5) file.")
;
;set MAPR rate parameter to 5(%)
D SETPARM("DGMT MAPR GLOBAL RATE",2022,"5")
;
;set MAPR max values
D SETPARM("DGMT MAPR 0 DEPENDENTS",2022,"16037")
D SETPARM("DGMT MAPR 1 DEPENDENTS",2022,"21001")
D SETPARM("DGMT MAPR N DEPENDENTS",2022,"2743")
Q
;
SETPARM(DGPARM,DGINST,DGVALU) ;set PACKAGE entity parameters
;
; Input:
; DGPARM - PARAMETER DEFINITION name
; DGINST - parameter instance
; DGVALU - parameter value
;
; Output:
; None
;
N DGERR
;
D EN^XPAR("PKG",DGPARM,DGINST,DGVALU,.DGERR)
I $G(DGERR) D Q
.D MES^XPDUTL(" "_DGPARM_" parameter, instance "_DGINST_", FAILED! ("_DGVALU_")")
.D MES^XPDUTL(" - Submit a YOUR IT Services ticket with the Enterprise Service Desk")
.D MES^XPDUTL(" for assistance.")
;
I '$G(DGERR) D
.I DGPARM="DGMT MAPR GLOBAL RATE" D
..D MES^XPDUTL(" "_DGPARM_" parameter, instance "_DGINST_", set to "_DGVALU_"%.")
.I DGPARM'="DGMT MAPR GLOBAL RATE" D
..D MES^XPDUTL(" "_DGPARM_" parameter, instance "_DGINST_", set to $"_$FN(DGVALU,",")_".")
Q
;
DATA ; lines to update the MEANS TEST DATA (#43.03) multiple in MAS PARAMETERS (#43) file
;;2^39849^MT COPAY EXEMPT VET INCOME
;;3^7969^MT COPAY EXEMPT 1ST DEP INCOME
;;4^2743^MT COPAY EXEMPT INCOME PER DEP
;;8^80000^THRESHOLD PROPERTY
;;17^13850^CHILD INCOME EXCLUSION
;;QUIT
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG531087P 3679 printed Dec 13, 2024@02:35:52 Page 2
DG531087P ;ALB/KUM - DG*5.3*1087 POST-INSTALL ;Nov 15, 2022@14:36
+1 ;;5.3;Registration;**1087**;Aug 13, 1993;Build 2
+2 ;
+3 ; This routine will upload the 2023 Means Test Thresholds and
+4 ; Maximum Annual Pension Rates into the MAS PARAMETERS file (#43)
+5 ; and the PARAMETERS file (#8989.5).
+6 ;
+7 ;ICRs
+8 ; Reference to BMES^XPDUTL,MES^XPDUTL in ICR #10141
+9 ; Reference to ^DIK,IX1^DIK in ICR #10013
+10 ; Reference to FILE^DICN in ICR #10009
+11 ; Reference to FILE^DIE in ICR #2053
+12 ; Reference to EN^XPAR in ICR #2263
+13 ;
+14 QUIT
+15 ;
EN ; Entry point for post-install
+1 DO BMES^XPDUTL(">>> Beginning the DG*5.3*1087 post-install routine...")
+2 DO MT
+3 DO MAPR
+4 DO BMES^XPDUTL(" ")
+5 DO BMES^XPDUTL(">>> Patch DG*5.3*1087 Post-install complete.")
+6 QUIT
+7 ;
MT ; Update Means Test Thresholds
+1 NEW DA,DIK,DIC,DINUM,DGI,X,Y,DGX,DGREC,DGIENS,DGMESS,DGFDA,DGERR
+2 DO BMES^XPDUTL(" ")
+3 DO BMES^XPDUTL(" Means Test Thresholds for 2023 calendar year (2022 income year) being ")
+4 DO MES^XPDUTL(" installed in MAS PARAMETERS (#43) file.")
+5 IF $DATA(^DG(43,1,"MT",3230000))
Begin DoDot:1
+6 DO BMES^XPDUTL(">>> Entry exists for calendar year 2023, entry being deleted")
+7 DO MES^XPDUTL(" and replaced with nationally released thresholds.")
+8 SET DIK="^DG(43,1,""MT"","
SET DA=3230000
SET DA(1)=1
+9 DO ^DIK
DO IX1^DIK
+10 KILL DA,DIK
End DoDot:1
+11 KILL DO
+12 SET DIC="^DG(43,1,""MT"","
+13 SET DIC(0)="L"
+14 SET DA(1)=1
+15 SET (DINUM,X)=3230000
+16 DO FILE^DICN
+17 ;
+18 IF +Y'=3230000
Begin DoDot:1
+19 DO BMES^XPDUTL(" ...Problem encountered adding 2023 thresholds. ")
+20 DO MES^XPDUTL(" - Submit a YOUR IT Services ticket with the Enterprise Service Desk")
+21 DO MES^XPDUTL(" for assistance.")
End DoDot:1
QUIT
+22 ;
+23 DO MES^XPDUTL("")
+24 SET DGREC=1
+25 SET DGIENS=+Y_","_DGREC_","
+26 FOR DGI=1:1
SET DGX=$PIECE($TEXT(DATA+DGI),";;",2)
if DGX="QUIT"
QUIT
Begin DoDot:1
+27 SET DGFDA(43.03,DGIENS,+DGX)=$PIECE(DGX,"^",2)
+28 SET DGMESS(DGI)=" "_$PIECE(DGX,"^",3)_" set to $"_$FNUMBER($PIECE(DGX,"^",2),",")_"."
End DoDot:1
+29 DO FILE^DIE(,"DGFDA","DGERR")
+30 IF $DATA(DGERR)
Begin DoDot:1
+31 DO BMES^XPDUTL(" ...Problem encountered adding 2023 thresholds. ")
+32 DO MES^XPDUTL(" - Submit a YOUR IT Services ticket with the Enterprise Service Desk")
+33 DO MES^XPDUTL(" for assistance.")
End DoDot:1
+34 IF '$DATA(DGERR)
DO BMES^XPDUTL(.DGMESS)
+35 QUIT
+36 ;
MAPR ; Update Maximum Annual Pension Rates
+1 ;
+2 DO BMES^XPDUTL(">>> Setting Maximum Annual Pension Rate Parameters in PARAMETER (#8989.5) file.")
+3 ;
+4 ;set MAPR rate parameter to 5(%)
+5 DO SETPARM("DGMT MAPR GLOBAL RATE",2022,"5")
+6 ;
+7 ;set MAPR max values
+8 DO SETPARM("DGMT MAPR 0 DEPENDENTS",2022,"16037")
+9 DO SETPARM("DGMT MAPR 1 DEPENDENTS",2022,"21001")
+10 DO SETPARM("DGMT MAPR N DEPENDENTS",2022,"2743")
+11 QUIT
+12 ;
SETPARM(DGPARM,DGINST,DGVALU) ;set PACKAGE entity parameters
+1 ;
+2 ; Input:
+3 ; DGPARM - PARAMETER DEFINITION name
+4 ; DGINST - parameter instance
+5 ; DGVALU - parameter value
+6 ;
+7 ; Output:
+8 ; None
+9 ;
+10 NEW DGERR
+11 ;
+12 DO EN^XPAR("PKG",DGPARM,DGINST,DGVALU,.DGERR)
+13 IF $GET(DGERR)
Begin DoDot:1
+14 DO MES^XPDUTL(" "_DGPARM_" parameter, instance "_DGINST_", FAILED! ("_DGVALU_")")
+15 DO MES^XPDUTL(" - Submit a YOUR IT Services ticket with the Enterprise Service Desk")
+16 DO MES^XPDUTL(" for assistance.")
End DoDot:1
QUIT
+17 ;
+18 IF '$GET(DGERR)
Begin DoDot:1
+19 IF DGPARM="DGMT MAPR GLOBAL RATE"
Begin DoDot:2
+20 DO MES^XPDUTL(" "_DGPARM_" parameter, instance "_DGINST_", set to "_DGVALU_"%.")
End DoDot:2
+21 IF DGPARM'="DGMT MAPR GLOBAL RATE"
Begin DoDot:2
+22 DO MES^XPDUTL(" "_DGPARM_" parameter, instance "_DGINST_", set to $"_$FNUMBER(DGVALU,",")_".")
End DoDot:2
End DoDot:1
+23 QUIT
+24 ;
DATA ; lines to update the MEANS TEST DATA (#43.03) multiple in MAS PARAMETERS (#43) file
+1 ;;2^39849^MT COPAY EXEMPT VET INCOME
+2 ;;3^7969^MT COPAY EXEMPT 1ST DEP INCOME
+3 ;;4^2743^MT COPAY EXEMPT INCOME PER DEP
+4 ;;8^80000^THRESHOLD PROPERTY
+5 ;;17^13850^CHILD INCOME EXCLUSION
+6 ;;QUIT
+7 QUIT
+8 ;