A1VSLR ;Albany FO/GTS - VistA Package Sizing Manager; 27-JUN-2016
;;1.0;VistA Package Sizing;;Oct 10, 2016;Build 25
EN ; -- main entry point for A1VS VISTA SIZE RPT
DO EN^VALM("A1VS PKG MGR VISTA SIZE RPT")
QUIT
;
HDR ; -- header code
NEW DEFDIR,SPCPAD,DIRHEAD
SET SPCPAD=""
SET DEFDIR=$$GET^XPAR("SYS","A1VS PACKAGE MGR DEFAULT DIR",1,"I")
SET VALMHDR(1)=" VistA Package Size Analysis Manager - Package Statistics"
SET VALMHDR(2)=" Version: "_$$VERNUM^A1VSLM()_" Build: "_$$BLDNUM^A1VSLM()
SET DIRHEAD="Default Directory: "_DEFDIR
SET $P(SPCPAD," ",(80-$L(DIRHEAD))/2)=""
SET VALMHDR(3)=SPCPAD_DIRHEAD
SET SPCPAD=""
SET DIRHEAD="Parameter file: "_A1VPSPRM
SET $P(SPCPAD," ",(80-$L(DIRHEAD))/2)=""
SET VALMHDR(4)=SPCPAD_DIRHEAD
QUIT
;
INIT ; -- init variables and list array
NEW A1TMPLNN
KILL ^TMP("A1VS PKG MGR RPT",$JOB)
SET A1TMPLNN=0
IF (+$G(FIRSTITM)>0),(+$G(LASTITM)>0) DO
. SET A1TMPLNN=$$SELXTMP^A1VSLAPI(FIRSTITM,LASTITM,5)
. IF A1TMPLNN>0 DO
.. SET A1VPSPRM=$P(^TMP("A1VS PACKAGE MGR",$J,A1TMPLNN,0),A1TMPLNN-5_") ",2)
.. IF A1VPSPRM]"" DO BUILD
.. IF A1VPSPRM']"" DO
... SET A1VPSPRM="NOT SELECTED!"
IF ((+$G(FIRSTITM)'>0)&(+$G(LASTITM)'>0))!(A1TMPLNN'>0) SET VALMQUIT="" ;SET A1VPSPRM="NOT SELECTED!"
QUIT
;
BUILD ; - Build local and global display arrays
SET VALMCNT=0
DO INIT^A1VSRFL(.VALMCNT,A1VPSPRM)
IF VALMCNT'>0 SET VALMQUIT=""
QUIT
;
HELP ; -- help code
S X="?" D DISP^XQORM1 W !!
QUIT
;
EXIT ; -- exit code
D KILL
Q
;
EXPND ; -- expand code
QUIT
;
KILL ; - Cleanup local and global display arrays
DO CLEAN^VALM10 ;Kill data and video control arrays
DO KILL^VALM10() ;Kill Video attributes
KILL ^TMP("A1VS PKG MGR RPT",$JOB)
KILL DIR,X,Y,DTOUT,DIRUT,DUOUT
QUIT
;
; ListMan Report Action APIs
TEXTFILE ; Write report to text file
; -- Protocol: A1VS PKG MGR RPT WRT ACTION
;
DO FULL^VALM1
;
NEW DIR,Y,X,FILENME,STORPATH
SET (FILENME,STORPATH)=""
SET DIR(0)="FAOr^2:60^"
SET DIR("A")="Enter directory to write report file: "_$$GET^XPAR("SYS","A1VS PACKAGE MGR DEFAULT DIR",1,"I")
SET DIR("A",1)=" "
SET DIR("B")=""
SET DIR("?")="Enter '^' to abort Host File creation."
SET DIR("?",1)="Enter a host directory where you have write priveleges"
SET DIR("?",2)=" and at least 10K of space."
SET DIR("?",3)=" "
DO ^DIR
;
IF '$D(DTOUT),'$D(DUOUT),'$D(DIROUT) DO
. SET:X]"" STORPATH=X
. SET:X']"" STORPATH=$$GET^XPAR("SYS","A1VS PACKAGE MGR DEFAULT DIR",1,"I")
. NEW DIR,Y,X
. SET DIR(0)="FAOr^3:30^"
. SET DIR("A")="Enter the name of the Host File "
. SET DIR("A",1)=" "
. SET DIR("B")="VistAPkgSize_"_$P($$NOW^XLFDT,".",1)_$P($$NOW^XLFDT,".",2)_".txt"
. SET DIR("?")="Enter '^' to abort Host File creation."
. SET DIR("?",1)="The file will be written to "_STORPATH
. DO ^DIR
. IF '$D(DTOUT),'$D(DUOUT),'$D(DIROUT) DO
.. SET FILENME=Y
.. DO WRTTXTFL^A1VSLAPI(FILENME,STORPATH)
;
SET VALMBCK="R"
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HA1VSLR 3027 printed Dec 13, 2024@01:38:48 Page 2
A1VSLR ;Albany FO/GTS - VistA Package Sizing Manager; 27-JUN-2016
+1 ;;1.0;VistA Package Sizing;;Oct 10, 2016;Build 25
EN ; -- main entry point for A1VS VISTA SIZE RPT
+1 DO EN^VALM("A1VS PKG MGR VISTA SIZE RPT")
+2 QUIT
+3 ;
HDR ; -- header code
+1 NEW DEFDIR,SPCPAD,DIRHEAD
+2 SET SPCPAD=""
+3 SET DEFDIR=$$GET^XPAR("SYS","A1VS PACKAGE MGR DEFAULT DIR",1,"I")
+4 SET VALMHDR(1)=" VistA Package Size Analysis Manager - Package Statistics"
+5 SET VALMHDR(2)=" Version: "_$$VERNUM^A1VSLM()_" Build: "_$$BLDNUM^A1VSLM()
+6 SET DIRHEAD="Default Directory: "_DEFDIR
+7 SET $PIECE(SPCPAD," ",(80-$LENGTH(DIRHEAD))/2)=""
+8 SET VALMHDR(3)=SPCPAD_DIRHEAD
+9 SET SPCPAD=""
+10 SET DIRHEAD="Parameter file: "_A1VPSPRM
+11 SET $PIECE(SPCPAD," ",(80-$LENGTH(DIRHEAD))/2)=""
+12 SET VALMHDR(4)=SPCPAD_DIRHEAD
+13 QUIT
+14 ;
INIT ; -- init variables and list array
+1 NEW A1TMPLNN
+2 KILL ^TMP("A1VS PKG MGR RPT",$JOB)
+3 SET A1TMPLNN=0
+4 IF (+$GET(FIRSTITM)>0)
IF (+$GET(LASTITM)>0)
Begin DoDot:1
+5 SET A1TMPLNN=$$SELXTMP^A1VSLAPI(FIRSTITM,LASTITM,5)
+6 IF A1TMPLNN>0
Begin DoDot:2
+7 SET A1VPSPRM=$PIECE(^TMP("A1VS PACKAGE MGR",$JOB,A1TMPLNN,0),A1TMPLNN-5_") ",2)
+8 IF A1VPSPRM]""
DO BUILD
+9 IF A1VPSPRM']""
Begin DoDot:3
+10 SET A1VPSPRM="NOT SELECTED!"
End DoDot:3
End DoDot:2
End DoDot:1
+11 ;SET A1VPSPRM="NOT SELECTED!"
IF ((+$GET(FIRSTITM)'>0)&(+$GET(LASTITM)'>0))!(A1TMPLNN'>0)
SET VALMQUIT=""
+12 QUIT
+13 ;
BUILD ; - Build local and global display arrays
+1 SET VALMCNT=0
+2 DO INIT^A1VSRFL(.VALMCNT,A1VPSPRM)
+3 IF VALMCNT'>0
SET VALMQUIT=""
+4 QUIT
+5 ;
HELP ; -- help code
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
+3 ;
EXIT ; -- exit code
+1 DO KILL
+2 QUIT
+3 ;
EXPND ; -- expand code
+1 QUIT
+2 ;
KILL ; - Cleanup local and global display arrays
+1 ;Kill data and video control arrays
DO CLEAN^VALM10
+2 ;Kill Video attributes
DO KILL^VALM10()
+3 KILL ^TMP("A1VS PKG MGR RPT",$JOB)
+4 KILL DIR,X,Y,DTOUT,DIRUT,DUOUT
+5 QUIT
+6 ;
+7 ; ListMan Report Action APIs
TEXTFILE ; Write report to text file
+1 ; -- Protocol: A1VS PKG MGR RPT WRT ACTION
+2 ;
+3 DO FULL^VALM1
+4 ;
+5 NEW DIR,Y,X,FILENME,STORPATH
+6 SET (FILENME,STORPATH)=""
+7 SET DIR(0)="FAOr^2:60^"
+8 SET DIR("A")="Enter directory to write report file: "_$$GET^XPAR("SYS","A1VS PACKAGE MGR DEFAULT DIR",1,"I")
+9 SET DIR("A",1)=" "
+10 SET DIR("B")=""
+11 SET DIR("?")="Enter '^' to abort Host File creation."
+12 SET DIR("?",1)="Enter a host directory where you have write priveleges"
+13 SET DIR("?",2)=" and at least 10K of space."
+14 SET DIR("?",3)=" "
+15 DO ^DIR
+16 ;
+17 IF '$DATA(DTOUT)
IF '$DATA(DUOUT)
IF '$DATA(DIROUT)
Begin DoDot:1
+18 if X]""
SET STORPATH=X
+19 if X']""
SET STORPATH=$$GET^XPAR("SYS","A1VS PACKAGE MGR DEFAULT DIR",1,"I")
+20 NEW DIR,Y,X
+21 SET DIR(0)="FAOr^3:30^"
+22 SET DIR("A")="Enter the name of the Host File "
+23 SET DIR("A",1)=" "
+24 SET DIR("B")="VistAPkgSize_"_$PIECE($$NOW^XLFDT,".",1)_$PIECE($$NOW^XLFDT,".",2)_".txt"
+25 SET DIR("?")="Enter '^' to abort Host File creation."
+26 SET DIR("?",1)="The file will be written to "_STORPATH
+27 DO ^DIR
+28 IF '$DATA(DTOUT)
IF '$DATA(DUOUT)
IF '$DATA(DIROUT)
Begin DoDot:2
+29 SET FILENME=Y
+30 DO WRTTXTFL^A1VSLAPI(FILENME,STORPATH)
End DoDot:2
End DoDot:1
+31 ;
+32 SET VALMBCK="R"
+33 QUIT