VALMWB ;MJK/ALB;08:48 PM 17 Jan 1993;List Template Edit
;;1;List Manager;;Aug 13, 1993
;
EN ; -- main entry point for edit tool
K VALMEVL,XQORS,^TMP("XQORS",$J)
D EN^VALM("VALM WORKBENCH")
ENQ Q
;
HDR ; -- no header
S VALMHDR(1)="Template: "_$P($G(^SD(409.61,VALMIFN,0)),U)
Q
;
INIT ; -- entry code
I '$D(VALMIFN) W @IOF,!,IOINHI,?40," Welcome ",!,?36," to the ",!,?28," List Manager WorkBench ",IOINORM,!
N DIC,Y
S DIC=409.61,DIC(0)="AELMQ" D ^DIC K DIC
I Y<0 S VALMQUIT=1 G INITQ
S VALMIFN=+Y
I $P(Y,U,3) D EN^VALMW4(VALMIFN)
D BLD,HDR
INITQ Q
;
BLD ; -- list builder
N I,DR,DIC,DIQ,VALME
D CLEAN^VALM10,KILL^VALM10()
F I=1:1:30 D BLANK(.I)
S DA=VALMIFN,DR=".01:107",DIQ(0)="E",DIC="^SD(409.61,",DIQ="VALME"
D EN^DIQ1
D DEMOS,REGION,PRTCL,MISC,CODE,CAP
S:VALMCNT<30 VALMCNT=30
Q
;
FNL ; -- exit code
K VALMIFN,VALMUMPS
D CLEAN^VALM10
Q
;
DEMOS ; -- demographics
N OFFSET,START
S OFFSET=2,START=1
D SET(START,OFFSET," Demographics ",IORVON,IORVOFF)
D SET(START+1,OFFSET,"Template Name: "_VALME(409.61,VALMIFN,.01,"E"))
D SET(START+2,OFFSET," Entity Name: "_VALME(409.61,VALMIFN,.09,"E"))
D SET(START+3,OFFSET," Screen Title: "_VALME(409.61,VALMIFN,.11,"E"))
Q
;
REGION ; -- list region
N OFFSET,START
S OFFSET=52,START=1
D SET(START,OFFSET," List Region ",IORVON,IORVOFF)
D SET(START+1,OFFSET," Top Margin: "_$J(VALME(409.61,VALMIFN,.05,"E"),3))
D SET(START+2,OFFSET,"Bottom "" : "_$J(VALME(409.61,VALMIFN,.06,"E"),3))
D SET(START+3,OFFSET," Right "" : "_$J(VALME(409.61,VALMIFN,.04,"E"),3))
Q
;
PRTCL ; -- protocol info
N OFFSET,START
S OFFSET=2,START=7
D SET(START,OFFSET," Protocol Information ",IORVON,IORVOFF)
D SET(START+1,OFFSET," Type of List: "_VALME(409.61,VALMIFN,.02,"E"))
D SET(START+2,OFFSET," Protocol Menu: "_VALME(409.61,VALMIFN,.1,"E"))
D SET(START+3,OFFSET,"Print Protocol: "_VALME(409.61,VALMIFN,1.01,"E"))
D SET(START+4,OFFSET," Hidden Menu: "_VALME(409.61,VALMIFN,1.02,"E"))
Q
;
CODE ; -- mumps code display
N OFFSET,START
S OFFSET=2,START=16
D SET(START,OFFSET," MUMPS Code Related ",IORVON,IORVOFF)
D SET(START+1,OFFSET,"Header: "_VALME(409.61,VALMIFN,100,"E"))
D SET(START+2,OFFSET," Entry: "_VALME(409.61,VALMIFN,106,"E"))
D SET(START+3,OFFSET," Exit: "_VALME(409.61,VALMIFN,105,"E"))
D SET(START+4,OFFSET,"Expand: "_VALME(409.61,VALMIFN,102,"E"))
D SET(START+5,OFFSET," Help: "_VALME(409.61,VALMIFN,103,"E"))
D SET(START+6,OFFSET," Array: "_VALME(409.61,VALMIFN,107,"E"))
Q
;
CAP ; -- caption display
N OFFSET,START
S OFFSET=2,START=24
D SET(START,OFFSET," Caption Line Information ",IORVON,IORVOFF)
D SET(START+1,OFFSET,"Name",IOUON,IOUOFF)
D SET(START+1,OFFSET+10,"Column",IOUON,IOUOFF)
D SET(START+1,OFFSET+20,"Width",IOUON,IOUOFF)
D SET(START+1,OFFSET+30,"Display Text",IOUON,IOUOFF)
D SET(START+1,OFFSET+60,"Video",IOUON,IOUOFF)
D SET(START+1,OFFSET+67,"Scroll Lock",IOUON,IOUOFF)
S CNT=1,I=0
F S I=$O(^SD(409.61,VALMIFN,"COL",I)) Q:'I S X=^(I,0) D
.S CNT=CNT+1
.D SET(START+CNT,OFFSET,$P(X,U))
.D SET(START+CNT,OFFSET+10,$J($P(X,U,2),3))
.D SET(START+CNT,OFFSET+20,$J($P(X,U,3),3))
.D SET(START+CNT,OFFSET+30,$E($P(X,U,4),1,30))
.D SET(START+CNT,OFFSET+60,$P(X,U,5))
.D SET(START+CNT,OFFSET+67,$S($P(X,U,6):"YES",1:"NO"))
S VALMCNT=START+CNT
Q
;
MISC ; -- other fields
N OFFSET,START
S OFFSET=45,START=7
D SET(START,OFFSET+7," Other Fields ",IORVON,IORVOFF)
D SET(START+1,OFFSET," OK to Transport?: "_VALME(409.61,VALMIFN,.07,"E"))
D SET(START+2,OFFSET," Use Cursor Control: "_VALME(409.61,VALMIFN,.08,"E"))
D SET(START+3,OFFSET,"Allowable Number of Actions: "_VALME(409.61,VALMIFN,.12,"E"))
D SET(START+4,OFFSET," Date Range Limit: "_VALME(409.61,VALMIFN,.13,"E"))
D SET(START+5,OFFSET," Automatic Defaults: "_VALME(409.61,VALMIFN,.14,"E"))
Q
;
SET(LINE,COL,TEXT,ON,OFF) ; -- set display info in array
D:'$D(@VALMAR@(LINE,0)) BLANK(.LINE)
D SET^VALM10(.LINE,$$SETSTR^VALM1(.TEXT,@VALMAR@(LINE,0),.COL,$L(TEXT)))
D:$G(ON)]""!($G(OFF)]"") CNTRL^VALM10(.LINE,.COL,$L(TEXT),$G(ON),$G(OFF))
W:'(LINE#5) "."
Q
;
BLANK(LINE) ; -- build blank line
D SET^VALM10(.LINE,$J("",80))
Q
VALMWB ;MJK/ALB;08:48 PM 17 Jan 1993;List Template Edit
+1 ;;1;List Manager;;Aug 13, 1993
+2 ;
EN ; -- main entry point for edit tool
+1 KILL VALMEVL,XQORS,^TMP("XQORS",$JOB)
+2 DO EN^VALM("VALM WORKBENCH")
ENQ QUIT
+1 ;
HDR ; -- no header
+1 SET VALMHDR(1)="Template: "_$PIECE($GET(^SD(409.61,VALMIFN,0)),U)
+2 QUIT
+3 ;
INIT ; -- entry code
+1 IF '$DATA(VALMIFN)
WRITE @IOF,!,IOINHI,?40," Welcome ",!,?36," to the ",!,?28," List Manager WorkBench ",IOINORM,!
+2 NEW DIC,Y
+3 SET DIC=409.61
SET DIC(0)="AELMQ"
DO ^DIC
KILL DIC
+4 IF Y<0
SET VALMQUIT=1
GOTO INITQ
+5 SET VALMIFN=+Y
+6 IF $PIECE(Y,U,3)
DO EN^VALMW4(VALMIFN)
+7 DO BLD
DO HDR
INITQ QUIT
+1 ;
BLD ; -- list builder
+1 NEW I,DR,DIC,DIQ,VALME
+2 DO CLEAN^VALM10
DO KILL^VALM10()
+3 FOR I=1:1:30
DO BLANK(.I)
+4 SET DA=VALMIFN
SET DR=".01:107"
SET DIQ(0)="E"
SET DIC="^SD(409.61,"
SET DIQ="VALME"
+5 DO EN^DIQ1
+6 DO DEMOS
DO REGION
DO PRTCL
DO MISC
DO CODE
DO CAP
+7 IF VALMCNT<30
SET VALMCNT=30
+8 QUIT
+9 ;
FNL ; -- exit code
+1 KILL VALMIFN,VALMUMPS
+2 DO CLEAN^VALM10
+3 QUIT
+4 ;
DEMOS ; -- demographics
+1 NEW OFFSET,START
+2 SET OFFSET=2
SET START=1
+3 DO SET(START,OFFSET," Demographics ",IORVON,IORVOFF)
+4 DO SET(START+1,OFFSET,"Template Name: "_VALME(409.61,VALMIFN,.01,"E"))
+5 DO SET(START+2,OFFSET," Entity Name: "_VALME(409.61,VALMIFN,.09,"E"))
+6 DO SET(START+3,OFFSET," Screen Title: "_VALME(409.61,VALMIFN,.11,"E"))
+7 QUIT
+8 ;
REGION ; -- list region
+1 NEW OFFSET,START
+2 SET OFFSET=52
SET START=1
+3 DO SET(START,OFFSET," List Region ",IORVON,IORVOFF)
+4 DO SET(START+1,OFFSET," Top Margin: "_$JUSTIFY(VALME(409.61,VALMIFN,.05,"E"),3))
+5 DO SET(START+2,OFFSET,"Bottom "" : "_$JUSTIFY(VALME(409.61,VALMIFN,.06,"E"),3))
+6 DO SET(START+3,OFFSET," Right "" : "_$JUSTIFY(VALME(409.61,VALMIFN,.04,"E"),3))
+7 QUIT
+8 ;
PRTCL ; -- protocol info
+1 NEW OFFSET,START
+2 SET OFFSET=2
SET START=7
+3 DO SET(START,OFFSET," Protocol Information ",IORVON,IORVOFF)
+4 DO SET(START+1,OFFSET," Type of List: "_VALME(409.61,VALMIFN,.02,"E"))
+5 DO SET(START+2,OFFSET," Protocol Menu: "_VALME(409.61,VALMIFN,.1,"E"))
+6 DO SET(START+3,OFFSET,"Print Protocol: "_VALME(409.61,VALMIFN,1.01,"E"))
+7 DO SET(START+4,OFFSET," Hidden Menu: "_VALME(409.61,VALMIFN,1.02,"E"))
+8 QUIT
+9 ;
CODE ; -- mumps code display
+1 NEW OFFSET,START
+2 SET OFFSET=2
SET START=16
+3 DO SET(START,OFFSET," MUMPS Code Related ",IORVON,IORVOFF)
+4 DO SET(START+1,OFFSET,"Header: "_VALME(409.61,VALMIFN,100,"E"))
+5 DO SET(START+2,OFFSET," Entry: "_VALME(409.61,VALMIFN,106,"E"))
+6 DO SET(START+3,OFFSET," Exit: "_VALME(409.61,VALMIFN,105,"E"))
+7 DO SET(START+4,OFFSET,"Expand: "_VALME(409.61,VALMIFN,102,"E"))
+8 DO SET(START+5,OFFSET," Help: "_VALME(409.61,VALMIFN,103,"E"))
+9 DO SET(START+6,OFFSET," Array: "_VALME(409.61,VALMIFN,107,"E"))
+10 QUIT
+11 ;
CAP ; -- caption display
+1 NEW OFFSET,START
+2 SET OFFSET=2
SET START=24
+3 DO SET(START,OFFSET," Caption Line Information ",IORVON,IORVOFF)
+4 DO SET(START+1,OFFSET,"Name",IOUON,IOUOFF)
+5 DO SET(START+1,OFFSET+10,"Column",IOUON,IOUOFF)
+6 DO SET(START+1,OFFSET+20,"Width",IOUON,IOUOFF)
+7 DO SET(START+1,OFFSET+30,"Display Text",IOUON,IOUOFF)
+8 DO SET(START+1,OFFSET+60,"Video",IOUON,IOUOFF)
+9 DO SET(START+1,OFFSET+67,"Scroll Lock",IOUON,IOUOFF)
+10 SET CNT=1
SET I=0
+11 FOR
SET I=$ORDER(^SD(409.61,VALMIFN,"COL",I))
IF 'I
QUIT
SET X=^(I,0)
Begin DoDot:1
+12 SET CNT=CNT+1
+13 DO SET(START+CNT,OFFSET,$PIECE(X,U))
+14 DO SET(START+CNT,OFFSET+10,$JUSTIFY($PIECE(X,U,2),3))
+15 DO SET(START+CNT,OFFSET+20,$JUSTIFY($PIECE(X,U,3),3))
+16 DO SET(START+CNT,OFFSET+30,$EXTRACT($PIECE(X,U,4),1,30))
+17 DO SET(START+CNT,OFFSET+60,$PIECE(X,U,5))
+18 DO SET(START+CNT,OFFSET+67,$SELECT($PIECE(X,U,6):"YES",1:"NO"))
End DoDot:1
+19 SET VALMCNT=START+CNT
+20 QUIT
+21 ;
MISC ; -- other fields
+1 NEW OFFSET,START
+2 SET OFFSET=45
SET START=7
+3 DO SET(START,OFFSET+7," Other Fields ",IORVON,IORVOFF)
+4 DO SET(START+1,OFFSET," OK to Transport?: "_VALME(409.61,VALMIFN,.07,"E"))
+5 DO SET(START+2,OFFSET," Use Cursor Control: "_VALME(409.61,VALMIFN,.08,"E"))
+6 DO SET(START+3,OFFSET,"Allowable Number of Actions: "_VALME(409.61,VALMIFN,.12,"E"))
+7 DO SET(START+4,OFFSET," Date Range Limit: "_VALME(409.61,VALMIFN,.13,"E"))
+8 DO SET(START+5,OFFSET," Automatic Defaults: "_VALME(409.61,VALMIFN,.14,"E"))
+9 QUIT
+10 ;
SET(LINE,COL,TEXT,ON,OFF) ; -- set display info in array
+1 IF '$DATA(@VALMAR@(LINE,0))
DO BLANK(.LINE)
+2 DO SET^VALM10(.LINE,$$SETSTR^VALM1(.TEXT,@VALMAR@(LINE,0),.COL,$LENGTH(TEXT)))
+3 IF $GET(ON)]""!($GET(OFF)]"")
DO CNTRL^VALM10(.LINE,.COL,$LENGTH(TEXT),$GET(ON),$GET(OFF))
+4 IF '(LINE#5)
WRITE "."
+5 QUIT
+6 ;
BLANK(LINE) ; -- build blank line
+1 DO SET^VALM10(.LINE,$JUSTIFY("",80))
+2 QUIT