ORWGTEST ; SLC/STAFF - Graph Test Cache ;5/2/07 09:22
;;3.0;ORDER ENTRY/RESULTS REPORTING;**243**;Dec 17, 1997;Build 242
;
TEST ;
N DFN,TASKED
;D CLEAN^ORWGTASK
;D INIT^ORWGTASK(1)
S ^XTMP("ORGDATA","TU",DUZ)=$$NOW^ORWGAPIX
S DFN=40
D UPDATE^ORWGTASK(.TASKED,DFN,DUZ,0)
Q
;
TESTING(DATA) ; from ORWGAPI
N CNT,DFN,LINE,SUB,TMP,USER
K ^TMP("ORWGRPC",$J)
D RETURN^ORWGAPIW(.TMP,.DATA)
S CNT=0
S SUB=""
F S SUB=$O(^XTMP("ORGDATA","Q",SUB)) Q:SUB="" D
. S LINE=^XTMP("ORGDATA","Q",SUB)
. D SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
S USER=""
F S USER=$O(^XTMP("ORGDATA","U",USER)) Q:USER="" D
. S LINE="u^"_USER
. S LINE=LINE_U_+$G(^XTMP("ORGDATA","U",USER,"C"))
. S LINE=LINE_U_+$G(^XTMP("ORGDATA","U",USER,"CG"))
. D SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
. S DFN=""
. F S DFN=$O(^XTMP("ORGDATA","U",USER,"C-P",DFN)) Q:DFN="" D
.. S LINE="u^"_USER_"^p^"_DFN
.. S LINE=LINE_U_+$G(^XTMP("ORGDATA","U",USER,"C-P",DFN))
.. S LINE=LINE_U_+$G(^XTMP("ORGDATA","U",USER,"CG-P",DFN))
.. D SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
S DFN=""
F S DFN=$O(^XTMP("ORGDATA","P",DFN)) Q:DFN="" D
. S LINE="p^"_DFN
. S LINE=LINE_U_+$G(^XTMP("ORGDATA","P",DFN,"C"))
. S LINE=LINE_U_+$G(^XTMP("ORGDATA","P",DFN,"CG"))
. D SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
. S USER=""
. F S USER=$O(^XTMP("ORGDATA","P",DFN,"C-P",USER)) Q:USER="" D
.. S LINE="p^"_DFN_"^u^"_USER
.. S LINE=LINE_U_+$G(^XTMP("ORGDATA","P",DFN,"C-P",USER))
.. S LINE=LINE_U_+$G(^XTMP("ORGDATA","P",DFN,"CG-P",USER))
.. D SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
S DFN=""
F S DFN=$O(^XTMP("ORGRAPH","LAST BUILD",DFN)) Q:DFN="" D
. S LINE="b^"_DFN_U_+$G(^XTMP("ORGRAPH","LAST BUILD",DFN))
. D SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
S DFN=""
F S DFN=$O(^XTMP("ORGRAPH","OLD DATA",DFN)) Q:DFN="" D
. S SUB=""
. F S SUB=$O(^XTMP("ORGRAPH","OLD DATA",DFN,SUB)) Q:SUB="" D
.. S LINE="d^"_DFN_U_SUB
.. ;S LINE=LINE_U_$G(^XTMP("ORGRAPH","OLD DATA",DFN,SUB))
.. S LINE=LINE_U_($L(LINE)+$L($G(^XTMP("ORGRAPH","OLD DATA",DFN,SUB))))
.. D SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
S DFN=""
F S DFN=$O(^XTMP("ORGRAPH","OLD LABS",DFN)) Q:DFN="" D
. S SUB=""
. F S SUB=$O(^XTMP("ORGRAPH","OLD LABS",DFN,SUB)) Q:SUB="" D
.. S LINE="l^"_DFN_U_SUB
.. ;S LINE=LINE_U_$G(^XTMP("ORGRAPH","OLD LABS",DFN,SUB))
.. S LINE=LINE_U_($L(LINE)+$L($G(^XTMP("ORGRAPH","OLD LABS",DFN,SUB))))
.. D SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
Q
ORWGTEST ; SLC/STAFF - Graph Test Cache ;5/2/07 09:22
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**243**;Dec 17, 1997;Build 242
+2 ;
TEST ;
+1 NEW DFN,TASKED
+2 ;D CLEAN^ORWGTASK
+3 ;D INIT^ORWGTASK(1)
+4 SET ^XTMP("ORGDATA","TU",DUZ)=$$NOW^ORWGAPIX
+5 SET DFN=40
+6 DO UPDATE^ORWGTASK(.TASKED,DFN,DUZ,0)
+7 QUIT
+8 ;
TESTING(DATA) ; from ORWGAPI
+1 NEW CNT,DFN,LINE,SUB,TMP,USER
+2 KILL ^TMP("ORWGRPC",$JOB)
+3 DO RETURN^ORWGAPIW(.TMP,.DATA)
+4 SET CNT=0
+5 SET SUB=""
+6 FOR
SET SUB=$ORDER(^XTMP("ORGDATA","Q",SUB))
IF SUB=""
QUIT
Begin DoDot:1
+7 SET LINE=^XTMP("ORGDATA","Q",SUB)
+8 DO SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
End DoDot:1
+9 SET USER=""
+10 FOR
SET USER=$ORDER(^XTMP("ORGDATA","U",USER))
IF USER=""
QUIT
Begin DoDot:1
+11 SET LINE="u^"_USER
+12 SET LINE=LINE_U_+$GET(^XTMP("ORGDATA","U",USER,"C"))
+13 SET LINE=LINE_U_+$GET(^XTMP("ORGDATA","U",USER,"CG"))
+14 DO SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
+15 SET DFN=""
+16 FOR
SET DFN=$ORDER(^XTMP("ORGDATA","U",USER,"C-P",DFN))
IF DFN=""
QUIT
Begin DoDot:2
+17 SET LINE="u^"_USER_"^p^"_DFN
+18 SET LINE=LINE_U_+$GET(^XTMP("ORGDATA","U",USER,"C-P",DFN))
+19 SET LINE=LINE_U_+$GET(^XTMP("ORGDATA","U",USER,"CG-P",DFN))
+20 DO SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
End DoDot:2
End DoDot:1
+21 SET DFN=""
+22 FOR
SET DFN=$ORDER(^XTMP("ORGDATA","P",DFN))
IF DFN=""
QUIT
Begin DoDot:1
+23 SET LINE="p^"_DFN
+24 SET LINE=LINE_U_+$GET(^XTMP("ORGDATA","P",DFN,"C"))
+25 SET LINE=LINE_U_+$GET(^XTMP("ORGDATA","P",DFN,"CG"))
+26 DO SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
+27 SET USER=""
+28 FOR
SET USER=$ORDER(^XTMP("ORGDATA","P",DFN,"C-P",USER))
IF USER=""
QUIT
Begin DoDot:2
+29 SET LINE="p^"_DFN_"^u^"_USER
+30 SET LINE=LINE_U_+$GET(^XTMP("ORGDATA","P",DFN,"C-P",USER))
+31 SET LINE=LINE_U_+$GET(^XTMP("ORGDATA","P",DFN,"CG-P",USER))
+32 DO SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
End DoDot:2
End DoDot:1
+33 SET DFN=""
+34 FOR
SET DFN=$ORDER(^XTMP("ORGRAPH","LAST BUILD",DFN))
IF DFN=""
QUIT
Begin DoDot:1
+35 SET LINE="b^"_DFN_U_+$GET(^XTMP("ORGRAPH","LAST BUILD",DFN))
+36 DO SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
End DoDot:1
+37 SET DFN=""
+38 FOR
SET DFN=$ORDER(^XTMP("ORGRAPH","OLD DATA",DFN))
IF DFN=""
QUIT
Begin DoDot:1
+39 SET SUB=""
+40 FOR
SET SUB=$ORDER(^XTMP("ORGRAPH","OLD DATA",DFN,SUB))
IF SUB=""
QUIT
Begin DoDot:2
+41 SET LINE="d^"_DFN_U_SUB
+42 ;S LINE=LINE_U_$G(^XTMP("ORGRAPH","OLD DATA",DFN,SUB))
+43 SET LINE=LINE_U_($LENGTH(LINE)+$LENGTH($GET(^XTMP("ORGRAPH","OLD DATA",DFN,SUB))))
+44 DO SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
End DoDot:2
End DoDot:1
+45 SET DFN=""
+46 FOR
SET DFN=$ORDER(^XTMP("ORGRAPH","OLD LABS",DFN))
IF DFN=""
QUIT
Begin DoDot:1
+47 SET SUB=""
+48 FOR
SET SUB=$ORDER(^XTMP("ORGRAPH","OLD LABS",DFN,SUB))
IF SUB=""
QUIT
Begin DoDot:2
+49 SET LINE="l^"_DFN_U_SUB
+50 ;S LINE=LINE_U_$G(^XTMP("ORGRAPH","OLD LABS",DFN,SUB))
+51 SET LINE=LINE_U_($LENGTH(LINE)+$LENGTH($GET(^XTMP("ORGRAPH","OLD LABS",DFN,SUB))))
+52 DO SETUP^ORWGAPIW(.DATA,LINE,TMP,.CNT)
End DoDot:2
End DoDot:1
+53 QUIT