updates to EWD utilities for vistacom
This commit is contained in:
parent
61c274f76a
commit
85565eb1d6
|
@ -0,0 +1,63 @@
|
|||
C0CEWD ; CCDCCR/GPL - CCR EWD utilities; 1/6/11
|
||||
;;0.1;CCDCCR;nopatch;noreleasedate
|
||||
;Copyright 2011 George Lilly. Licensed under the terms of the GNU
|
||||
;General Public License See attached copy of the License.
|
||||
;
|
||||
;This program is free software; you can redistribute it and/or modify
|
||||
;it under the terms of the GNU General Public License as published by
|
||||
;the Free Software Foundation; either version 2 of the License, or
|
||||
;(at your option) any later version.
|
||||
;
|
||||
;This program is distributed in the hope that it will be useful,
|
||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;GNU General Public License for more details.
|
||||
;
|
||||
;You should have received a copy of the GNU General Public License along
|
||||
;with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
;
|
||||
Q
|
||||
;
|
||||
TOKEN() ; EXTRINSIC WHICH RETURNS A NEW RANDOM TOKEN
|
||||
Q $$UUID^C0CUTIL ; USE THE UUID FUNCTION IN THE CCR PACKAGE
|
||||
;
|
||||
STORE(ZARY) ; STORE AN ARRAY OF VALUES INDEXED BY A NEW TOKEN
|
||||
; IN ^TMP("C0E","TOKEN") FOR LATER RETRIEVAL FROM INSIDE AN EWD SESSION
|
||||
; RETURNS THE TOKEN. ZARY IS PASSED BY NAME
|
||||
N ZT
|
||||
S ZT=$$TOKEN ; GET A NEW TOKEN
|
||||
M ^TMP("C0E","TOKEN",ZT)=@ZARY ;
|
||||
Q ZT
|
||||
;
|
||||
GET(ZRTN,ZTOKEN,NOKILL) ; RETRIEVE A STORED ARRAY INDEXED BY ZTOKEN
|
||||
; KILL THE ARRAY AFTER RETRIEVAL UNLESS NOKILL=1
|
||||
; ZRTN IS PASSED BY NAME
|
||||
I '$D(^TMP("C0E","TOKEN",ZTOKEN)) D Q ; DOESN'T EXIST
|
||||
. S @ZRTN="" ; PASS BACK NULL
|
||||
M @ZRTN=^TMP("C0E","TOKEN",ZTOKEN) ; RETRIEVE
|
||||
I $G(NOKILL)'=1 K ^TMP("C0E","TOKEN",ZTOKEN) ; DELETE
|
||||
Q
|
||||
;
|
||||
cbTestMethod(prefix,seedValue,lastSeedValue,optionNo,options)
|
||||
;
|
||||
n maxNo,noFound
|
||||
;
|
||||
s maxNo=50
|
||||
s noFound=0
|
||||
f s seedValue=$o(^DPT("B",seedValue)) q:seedValue="" q:noFound=maxNo d
|
||||
. s lastSeedValue=seedValue
|
||||
. i prefix'="",$e(seedValue,1,$l(prefix))'=prefix q
|
||||
. s optionNo=optionNo+1
|
||||
. s noFound=noFound+1
|
||||
. s options(optionNo)=seedValue
|
||||
QUIT
|
||||
;
|
||||
set1 ;
|
||||
s ^zewd("comboPlus","methodMap","test")="cbTestMethod^C0PEREW"
|
||||
q
|
||||
;
|
||||
test1(sessid) ;
|
||||
d setSessionValue^%zewdAPI("testing","ZZ",sessid)
|
||||
q 0
|
||||
;
|
|
@ -56,3 +56,12 @@ Q(ZQ,ZD) ; SEND QUERY ZQ TO DOM ZD AND DIPLAY NODES RETURNED
|
|||
d displayNodes^%zewdXPath(.nodes)
|
||||
q
|
||||
;
|
||||
GET1URL0(URL) ;
|
||||
s ok=$$httpGET^%zewdGTM(URL,.gpl)
|
||||
D INDEX^C0CXPATH("gpl","gpl2")
|
||||
W !,"S URL=""",URL,"""",!
|
||||
S G=""
|
||||
F S G=$O(gpl2(G)) Q:G="" D ;
|
||||
. W " S VDX(""",G,""")=""",gpl2(G),"""",!
|
||||
W !
|
||||
Q
|
||||
|
|
Loading…
Reference in New Issue