A1VSLE ;Albany FO/GTS - VistA Package Sizing Manager ; 24-JUN-2016
;;1.0;VistA Package Sizing;;Oct 10, 2016;Build 25
;
EN ; -- main entry point for A1VS PKG MGR EDIT TOOLS
D EN^VALM("A1VS PKG MGR EDIT TOOLS")
Q
;
HDR ; -- header code
NEW DEFDIR,SPCPAD,DIRHEAD
SET DEFDIR=$$GET^XPAR("SYS","A1VS PACKAGE MGR DEFAULT DIR",1,"I")
SET VALMHDR(1)=" VistA Package Size Analysis Manager - Edit Tools"
SET VALMHDR(2)=" Version: "_$$VERNUM^A1VSLM()_" Build: "_$$BLDNUM^A1VSLM()
SET DIRHEAD="Parameter file default directory: "_$S($G(DEFDIR)]"":DEFDIR,1:"<no default defined>")
SET $P(SPCPAD," ",(80-$L(DIRHEAD))/2)=""
SET VALMHDR(3)=SPCPAD_DIRHEAD
Q
;
INIT ; -- init variables and list array
D BUILD
Q
;
BUILD ; - Build local and global display arrays
NEW DEFDIR,FILENME,HDLINE,RESULT,FILELIST,UNDRLINE,FILELP,LISTNUM
DO KILL ;Kill all processing & data arrays and video attributes & control arrays
SET VALMCNT=0
SET DEFDIR=$$GET^XPAR("SYS","A1VS PACKAGE MGR DEFAULT DIR",1,"I")
IF DEFDIR']"" DO
. DO ADD^A1VSLAPI(.VALMCNT," XTMPSIZE.DAT default directory not specified.",4,48,)
IF DEFDIR]"" DO
. SET FILENME("XTMPSIZE*")=""
. SET RESULT=$$LIST^%ZISH(DEFDIR,"FILENME","FILELIST")
. DO ADD^A1VSLAPI(.VALMCNT," ")
. SET HDLINE=" XTMPSIZE.DAT file list in "_DEFDIR_":"
. SET $P(UNDRLINE,"-",$L(HDLINE)-3)=""
. DO ADD^A1VSLAPI(.VALMCNT,HDLINE)
. DO ADD^A1VSLAPI(.VALMCNT," "_UNDRLINE)
. IF 'RESULT DO ADD^A1VSLAPI(.VALMCNT," No XTMPSIZE* files found in "_DEFDIR_".")
. IF RESULT DO
.. SET FILELP=""
.. FOR SET FILELP=$O(FILELIST(FILELP)) Q:FILELP="" SET LISTNUM=VALMCNT-2 DO ADD^A1VSLAPI(.VALMCNT," "_LISTNUM_") "_FILELP)
;
QUIT
;
HELP ; -- help code
S X="?" D DISP^XQORM1 W !!
Q
;
EXIT ; -- exit code
DO KILL
Q
;
EXPND ; -- expand code
Q
;
;
REFRESH ; -- refresh display
DO BUILD
SET VALMBCK="R"
QUIT
;
MSG(TEXT) ; -- set default message
;SET VALMSG=TEXT
QUIT
;
KILL ; -- Cleanup local and global arrays
DO CLEAN^VALM10 ;Kill data and video control arrays
DO KILL^VALM10() ;Kill Video attributes
KILL ^TMP("A1VS PKG MAN EDIT",$JOB)
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HA1VSLE 2207 printed Oct 16, 2024@17:39:31 Page 2
A1VSLE ;Albany FO/GTS - VistA Package Sizing Manager ; 24-JUN-2016
+1 ;;1.0;VistA Package Sizing;;Oct 10, 2016;Build 25
+2 ;
EN ; -- main entry point for A1VS PKG MGR EDIT TOOLS
+1 DO EN^VALM("A1VS PKG MGR EDIT TOOLS")
+2 QUIT
+3 ;
HDR ; -- header code
+1 NEW DEFDIR,SPCPAD,DIRHEAD
+2 SET DEFDIR=$$GET^XPAR("SYS","A1VS PACKAGE MGR DEFAULT DIR",1,"I")
+3 SET VALMHDR(1)=" VistA Package Size Analysis Manager - Edit Tools"
+4 SET VALMHDR(2)=" Version: "_$$VERNUM^A1VSLM()_" Build: "_$$BLDNUM^A1VSLM()
+5 SET DIRHEAD="Parameter file default directory: "_$SELECT($GET(DEFDIR)]"":DEFDIR,1:"<no default defined>")
+6 SET $PIECE(SPCPAD," ",(80-$LENGTH(DIRHEAD))/2)=""
+7 SET VALMHDR(3)=SPCPAD_DIRHEAD
+8 QUIT
+9 ;
INIT ; -- init variables and list array
+1 DO BUILD
+2 QUIT
+3 ;
BUILD ; - Build local and global display arrays
+1 NEW DEFDIR,FILENME,HDLINE,RESULT,FILELIST,UNDRLINE,FILELP,LISTNUM
+2 ;Kill all processing & data arrays and video attributes & control arrays
DO KILL
+3 SET VALMCNT=0
+4 SET DEFDIR=$$GET^XPAR("SYS","A1VS PACKAGE MGR DEFAULT DIR",1,"I")
+5 IF DEFDIR']""
Begin DoDot:1
+6 DO ADD^A1VSLAPI(.VALMCNT," XTMPSIZE.DAT default directory not specified.",4,48,)
End DoDot:1
+7 IF DEFDIR]""
Begin DoDot:1
+8 SET FILENME("XTMPSIZE*")=""
+9 SET RESULT=$$LIST^%ZISH(DEFDIR,"FILENME","FILELIST")
+10 DO ADD^A1VSLAPI(.VALMCNT," ")
+11 SET HDLINE=" XTMPSIZE.DAT file list in "_DEFDIR_":"
+12 SET $PIECE(UNDRLINE,"-",$LENGTH(HDLINE)-3)=""
+13 DO ADD^A1VSLAPI(.VALMCNT,HDLINE)
+14 DO ADD^A1VSLAPI(.VALMCNT," "_UNDRLINE)
+15 IF 'RESULT
DO ADD^A1VSLAPI(.VALMCNT," No XTMPSIZE* files found in "_DEFDIR_".")
+16 IF RESULT
Begin DoDot:2
+17 SET FILELP=""
+18 FOR
SET FILELP=$ORDER(FILELIST(FILELP))
if FILELP=""
QUIT
SET LISTNUM=VALMCNT-2
DO ADD^A1VSLAPI(.VALMCNT," "_LISTNUM_") "_FILELP)
End DoDot:2
End DoDot:1
+19 ;
+20 QUIT
+21 ;
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 ;
+3 ;
REFRESH ; -- refresh display
+1 DO BUILD
+2 SET VALMBCK="R"
+3 QUIT
+4 ;
MSG(TEXT) ; -- set default message
+1 ;SET VALMSG=TEXT
+2 QUIT
+3 ;
KILL ; -- Cleanup local and global arrays
+1 ;Kill data and video control arrays
DO CLEAN^VALM10
+2 ;Kill Video attributes
DO KILL^VALM10()
+3 KILL ^TMP("A1VS PKG MAN EDIT",$JOB)
+4 QUIT