ORDEBUG2 ;SLC/JMH - DEBUG REPORT ;07/13/17 12:53
;;3.0;ORDER ENTRY/RESULTS REPORTING;**350,443**;Dec 17, 1997;Build 5
;
;
;
DL ;
N ORLST,ORI,ORCNT,ORREP
W !!,"#",?5,"USER",?35,"DATE/TIME"
W !,"============================================================================"
S ORI=0,ORCNT=0 F S ORI=$O(^XTMP("CPRS DEBUG LOG",ORI)) Q:ORI="" D
.S ORCNT=ORCNT+1
.S ORLST(ORCNT)=ORI
.W !,ORCNT,") ",?5,$P($G(^VA(200,+ORI,0)),U),?35,$P(ORI,U,2)
S ORREP=$$TDIR("Debug Report #")
I ORREP=0 Q
I '$D(ORLST(ORREP)) W !,"Not a valid selection" Q
D REP(ORLST(ORREP))
D DL
Q
REP(ORINST) ;
;ZW ^XTMP("CPRS DEBUG LOG",ORINST)
W !!,"Viewing report generated by "_$P($G(^VA(200,+ORINST,0)),U)_" on "_$P(ORINST,U,2)
W !!,"DESCRIPTION",!,"==========="
N ORJ S ORJ="" F S ORJ=$O(^XTMP("CPRS DEBUG LOG",ORINST,"DESCRIPTION",ORJ)) Q:'$L(ORJ) D
.W !,^XTMP("CPRS DEBUG LOG",ORINST,"DESCRIPTION",ORJ)
N ORLST,ORI,ORCNT
W !!,"#",?5,"RPC"
W !,"============================================================================"
S ORI=0,ORCNT=0 F S ORI=$O(^XTMP("CPRS DEBUG LOG",ORINST,"RPCS",ORI)) Q:'$L(ORI) D
.S ORCNT=ORCNT+1
.S ORLST(ORCNT)=ORI
.W !,ORCNT,") ",?5,$G(^XTMP("CPRS DEBUG LOG",ORINST,"RPCS",ORI,0))
N ORRPC
F S ORRPC=$$TDIR("RPC #") Q:ORRPC=0 D
.I '$D(ORLST(ORRPC)) W !,"Not a valid selection" Q
.W !!,"============","BEGINNING OF RPC INFO","============"
.N ORK S ORK="" F S ORK=$O(^XTMP("CPRS DEBUG LOG",ORINST,"RPCS",ORLST(ORRPC),ORK)) Q:'$L(ORK) D
..W !,">>",^XTMP("CPRS DEBUG LOG",ORINST,"RPCS",ORLST(ORRPC),ORK)
.W !!,"============","END OF RPC INFO","============"
Q
TDIR(ORTXT) ;
N X,Y,DIR
S DIR(0)="NO"
S DIR("A")=ORTXT,DIR("B")="^"
S DIR("?")=""
W !,"Choose a number to view"
D ^DIR S:$D(DUOUT)!$D(DTOUT) Y="0"
Q Y
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORDEBUG2 1807 printed Oct 16, 2024@18:30:36 Page 2
ORDEBUG2 ;SLC/JMH - DEBUG REPORT ;07/13/17 12:53
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**350,443**;Dec 17, 1997;Build 5
+2 ;
+3 ;
+4 ;
DL ;
+1 NEW ORLST,ORI,ORCNT,ORREP
+2 WRITE !!,"#",?5,"USER",?35,"DATE/TIME"
+3 WRITE !,"============================================================================"
+4 SET ORI=0
SET ORCNT=0
FOR
SET ORI=$ORDER(^XTMP("CPRS DEBUG LOG",ORI))
if ORI=""
QUIT
Begin DoDot:1
+5 SET ORCNT=ORCNT+1
+6 SET ORLST(ORCNT)=ORI
+7 WRITE !,ORCNT,") ",?5,$PIECE($GET(^VA(200,+ORI,0)),U),?35,$PIECE(ORI,U,2)
End DoDot:1
+8 SET ORREP=$$TDIR("Debug Report #")
+9 IF ORREP=0
QUIT
+10 IF '$DATA(ORLST(ORREP))
WRITE !,"Not a valid selection"
QUIT
+11 DO REP(ORLST(ORREP))
+12 DO DL
+13 QUIT
REP(ORINST) ;
+1 ;ZW ^XTMP("CPRS DEBUG LOG",ORINST)
+2 WRITE !!,"Viewing report generated by "_$PIECE($GET(^VA(200,+ORINST,0)),U)_" on "_$PIECE(ORINST,U,2)
+3 WRITE !!,"DESCRIPTION",!,"==========="
+4 NEW ORJ
SET ORJ=""
FOR
SET ORJ=$ORDER(^XTMP("CPRS DEBUG LOG",ORINST,"DESCRIPTION",ORJ))
if '$LENGTH(ORJ)
QUIT
Begin DoDot:1
+5 WRITE !,^XTMP("CPRS DEBUG LOG",ORINST,"DESCRIPTION",ORJ)
End DoDot:1
+6 NEW ORLST,ORI,ORCNT
+7 WRITE !!,"#",?5,"RPC"
+8 WRITE !,"============================================================================"
+9 SET ORI=0
SET ORCNT=0
FOR
SET ORI=$ORDER(^XTMP("CPRS DEBUG LOG",ORINST,"RPCS",ORI))
if '$LENGTH(ORI)
QUIT
Begin DoDot:1
+10 SET ORCNT=ORCNT+1
+11 SET ORLST(ORCNT)=ORI
+12 WRITE !,ORCNT,") ",?5,$GET(^XTMP("CPRS DEBUG LOG",ORINST,"RPCS",ORI,0))
End DoDot:1
+13 NEW ORRPC
+14 FOR
SET ORRPC=$$TDIR("RPC #")
if ORRPC=0
QUIT
Begin DoDot:1
+15 IF '$DATA(ORLST(ORRPC))
WRITE !,"Not a valid selection"
QUIT
+16 WRITE !!,"============","BEGINNING OF RPC INFO","============"
+17 NEW ORK
SET ORK=""
FOR
SET ORK=$ORDER(^XTMP("CPRS DEBUG LOG",ORINST,"RPCS",ORLST(ORRPC),ORK))
if '$LENGTH(ORK)
QUIT
Begin DoDot:2
+18 WRITE !,">>",^XTMP("CPRS DEBUG LOG",ORINST,"RPCS",ORLST(ORRPC),ORK)
End DoDot:2
+19 WRITE !!,"============","END OF RPC INFO","============"
End DoDot:1
+20 QUIT
TDIR(ORTXT) ;
+1 NEW X,Y,DIR
+2 SET DIR(0)="NO"
+3 SET DIR("A")=ORTXT
SET DIR("B")="^"
+4 SET DIR("?")=""
+5 WRITE !,"Choose a number to view"
+6 DO ^DIR
if $DATA(DUOUT)!$DATA(DTOUT)
SET Y="0"
+7 QUIT Y