A1VSP1PS ;Albany FO/GTS - VistA Package Sizing Manager (Initial release P1 Post-Install; 24-JUN-2016
;;1.0;VistA Package Sizing;;Oct 25, 2016;Build 25
;
ENPOST ; -- main entry point for A1VS*1*1 post-init
NEW A1VSSTAT
SET A1VSSTAT=$$ADDPTPLT()
IF +A1VSSTAT'=2 DO BMES^XPDUTL(" o 'A1VS PKG MGT PARAMETERS' addition to PARAMETER TEMPLATE file (#8989.52) "_$SELECT(+A1VSSTAT:"succeeded.",1:"failed."))
IF +A1VSSTAT<1 DO MES^XPDUTL(" Error: "_$P(A1VSSTAT,"^",2))
IF +A1VSSTAT=2 DO
. DO BMES^XPDUTL(" o "_$P(A1VSSTAT,"^",2))
. DO BMES^XPDUTL(" ...no need to add '"_$$TEMPNAME_"' to file #8989.52.")
QUIT
;
; -- Add A1VS PKG MGT PARAMETERS to file 8989.52
ADDPTPLT() ;* Create Parameter Template entry - ;;GTS - TO DO: If released nationally under non-Kernel namespace, Check for ICRs
NEW RESULT,DA,DIE,DIC,DR,Y,X,ERR,A1VSDA0,A1VSDA1
SET RESULT="1^SUCCESS"
SET DA=$$FIND1^DIC(8989.52,"","BX",$$TEMPNAME,"","","ERR")
IF +DA>0 SET RESULT="2^'"_$$TEMPNAME_"' Parameter Template entry exists."
;
; Add A1VS PKG MGT PARAMETERS Parameter Template
IF +DA'>0 DO
. KILL DO
. SET DIC="^XTV(8989.52,",DIC(0)="LU" ;Do not execute Input Transforms on .01 field
. SET X=$$TEMPNAME()
. DO FILE^DICN
. SET A1VSDA1=+Y
. IF +A1VSDA1'>0 SET RESULT="0^PARAMETER TEMPLATE file entry failure!"
. IF +A1VSDA1>0 DO
. . NEW DA,Y,X
. . SET DA(1)=A1VSDA1
. . SET DIC=DIC_DA(1)_",10,",DIC(0)="L" ;Add entry to Parameters multiple
. . SET X=1
. . DO ^DIC
. . SET A1VSDA0=+Y
. . IF +A1VSDA0'>0 SET RESULT="0^PARAMETER TEMPLATE Parameters Sub-file entry failure!"
. . IF A1VSDA0>0 DO
. . . NEW DA,DR,Y,X,DIE
. . . ; Add values to PARAMETERS Multiple (#10)
. . . SET DA=A1VSDA0
. . . SET DA(1)=A1VSDA1
. . . SET DIE="^XTV(8989.52,"_DA(1)_",10,"
. . . KILL DIC
. . . SET DR=".02///"_$$PARAMVAL()
. . . D ^DIE
. . SET DA=A1VSDA1
. . SET DIE="^XTV(8989.52,"
. . SET DR=".02///"_$$DISPTEXT()_";.03///"_$$USEENTYF()
. . DO ^DIE
;
QUIT RESULT
;
; -- Parameter Template definition APIs
TEMPNAME() ; -- return Parameter Template name (fld #.01)
QUIT "A1VS PKG MGT PARAMETERS"
;
DISPTEXT() ; -- return display text (fld #.02)
QUIT "Package Size Parameter Edit"
;
USEENTYF() ; -- return entity for which parameters are entered (fld #.03)
QUIT "DOMAIN"
;
PARAMVAL() ; -- return Parameter (Parameters multiple fld #.02)
QUIT "A1VS PACKAGE MGR DEFAULT DIR"
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HA1VSP1PS 2441 printed Dec 13, 2024@01:38:49 Page 2
A1VSP1PS ;Albany FO/GTS - VistA Package Sizing Manager (Initial release P1 Post-Install; 24-JUN-2016
+1 ;;1.0;VistA Package Sizing;;Oct 25, 2016;Build 25
+2 ;
ENPOST ; -- main entry point for A1VS*1*1 post-init
+1 NEW A1VSSTAT
+2 SET A1VSSTAT=$$ADDPTPLT()
+3 IF +A1VSSTAT'=2
DO BMES^XPDUTL(" o 'A1VS PKG MGT PARAMETERS' addition to PARAMETER TEMPLATE file (#8989.52) "_$SELECT(+A1VSSTAT:"succeeded.",1:"failed."))
+4 IF +A1VSSTAT<1
DO MES^XPDUTL(" Error: "_$PIECE(A1VSSTAT,"^",2))
+5 IF +A1VSSTAT=2
Begin DoDot:1
+6 DO BMES^XPDUTL(" o "_$PIECE(A1VSSTAT,"^",2))
+7 DO BMES^XPDUTL(" ...no need to add '"_$$TEMPNAME_"' to file #8989.52.")
End DoDot:1
+8 QUIT
+9 ;
+10 ; -- Add A1VS PKG MGT PARAMETERS to file 8989.52
ADDPTPLT() ;* Create Parameter Template entry - ;;GTS - TO DO: If released nationally under non-Kernel namespace, Check for ICRs
+1 NEW RESULT,DA,DIE,DIC,DR,Y,X,ERR,A1VSDA0,A1VSDA1
+2 SET RESULT="1^SUCCESS"
+3 SET DA=$$FIND1^DIC(8989.52,"","BX",$$TEMPNAME,"","","ERR")
+4 IF +DA>0
SET RESULT="2^'"_$$TEMPNAME_"' Parameter Template entry exists."
+5 ;
+6 ; Add A1VS PKG MGT PARAMETERS Parameter Template
+7 IF +DA'>0
Begin DoDot:1
+8 KILL DO
+9 ;Do not execute Input Transforms on .01 field
SET DIC="^XTV(8989.52,"
SET DIC(0)="LU"
+10 SET X=$$TEMPNAME()
+11 DO FILE^DICN
+12 SET A1VSDA1=+Y
+13 IF +A1VSDA1'>0
SET RESULT="0^PARAMETER TEMPLATE file entry failure!"
+14 IF +A1VSDA1>0
Begin DoDot:2
+15 NEW DA,Y,X
+16 SET DA(1)=A1VSDA1
+17 ;Add entry to Parameters multiple
SET DIC=DIC_DA(1)_",10,"
SET DIC(0)="L"
+18 SET X=1
+19 DO ^DIC
+20 SET A1VSDA0=+Y
+21 IF +A1VSDA0'>0
SET RESULT="0^PARAMETER TEMPLATE Parameters Sub-file entry failure!"
+22 IF A1VSDA0>0
Begin DoDot:3
+23 NEW DA,DR,Y,X,DIE
+24 ; Add values to PARAMETERS Multiple (#10)
+25 SET DA=A1VSDA0
+26 SET DA(1)=A1VSDA1
+27 SET DIE="^XTV(8989.52,"_DA(1)_",10,"
+28 KILL DIC
+29 SET DR=".02///"_$$PARAMVAL()
+30 DO ^DIE
End DoDot:3
+31 SET DA=A1VSDA1
+32 SET DIE="^XTV(8989.52,"
+33 SET DR=".02///"_$$DISPTEXT()_";.03///"_$$USEENTYF()
+34 DO ^DIE
End DoDot:2
End DoDot:1
+35 ;
+36 QUIT RESULT
+37 ;
+38 ; -- Parameter Template definition APIs
TEMPNAME() ; -- return Parameter Template name (fld #.01)
+1 QUIT "A1VS PKG MGT PARAMETERS"
+2 ;
DISPTEXT() ; -- return display text (fld #.02)
+1 QUIT "Package Size Parameter Edit"
+2 ;
USEENTYF() ; -- return entity for which parameters are entered (fld #.03)
+1 QUIT "DOMAIN"
+2 ;
PARAMVAL() ; -- return Parameter (Parameters multiple fld #.02)
+1 QUIT "A1VS PACKAGE MGR DEFAULT DIR"