121 lines
4.1 KiB
Mathematica
121 lines
4.1 KiB
Mathematica
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
|