[613] | 1 | OREOR0 ; slc/dcm - Check things ;7/23/97 12:49
|
---|
| 2 | ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
|
---|
| 3 | EN ;Check for mutliple keys
|
---|
| 4 | W !,"This utility identifies users that have more than one OR key assigned."
|
---|
| 5 | W !,"Users with more than one key can encounter problems when adding orders."
|
---|
| 6 | W !,"Any users listed will need to have their Keys edited and correctly assigned.",!
|
---|
| 7 | W !,"Ok to continue" S %=1 D YN^DICN G:%=0 EN Q:%'=1
|
---|
| 8 | N IFN,X,KEY1,KEY2,KEY3,USER
|
---|
| 9 | S IFN=0 F S IFN=$O(^VA(200,IFN)) Q:IFN<.1 S USER=$P(^(IFN,0),"^"),(KEY1,KEY2,KEY3)=0 D
|
---|
| 10 | . I $D(^XUSEC("ORES",IFN)) S KEY1=1
|
---|
| 11 | . I $D(^XUSEC("ORELSE",IFN)) S KEY2=1
|
---|
| 12 | . I $D(^XUSEC("OREMAS",IFN)) S KEY3=1
|
---|
| 13 | . S X=KEY1+KEY2+KEY3 I X>1 W !,USER_" ("_IFN_") has more than 1 OR key: ",?60 W:KEY1 "ORES " W:KEY2 "ORELSE " W:KEY3 "OREMAS"
|
---|
| 14 | Q
|
---|
| 15 | ER ;Error check utility
|
---|
| 16 | N VAR,VAL,ERDT,ERTXT,IFN,VI,FIRST,EVAL,LISTVAR
|
---|
| 17 | W !!,"This utility will look for errors that happened with a certain variable set."
|
---|
| 18 | W !,"You can even specify a specific value to look for.",!
|
---|
| 19 | W !,"Variable: " R X:DTIME Q:'$L(X) S VAR=X
|
---|
| 20 | W !,"Value (optional- enter 'NULL' to look for """"): " R X:DTIME I $L(X) S:X="NULL" X="" S VAL=X
|
---|
| 21 | W !,"List variables: " S %=2 D YN^DICN S LISTVAR=$S(%=1:1,1:0)
|
---|
| 22 | DATE ;
|
---|
| 23 | W ! S %DT="AEX",%DT("A")="ERROR DATE: " D ^%DT Q:$D(DTOUT) Q:X["^" G:Y<1 ER
|
---|
| 24 | S X=Y D H^%DTC S ERDT=%H
|
---|
| 25 | I '$D(^%ZTER(1,+ERDT)) W !,"No errors on that date",! G DATE
|
---|
| 26 | S IFN=0 F S IFN=$O(^%ZTER(1,+ERDT,1,IFN)) Q:IFN<1 S ERTXT=$E($G(^(IFN,"ZE")),1,70),FIRST=1 D
|
---|
| 27 | . S VI=0 F S VI=$O(^%ZTER(1,+ERDT,1,IFN,"ZV",VI)) Q:VI<1 S X=^(VI,0),EVAL=$G(^("D")) I $E(X,1,$L(VAR))[VAR D
|
---|
| 28 | .. I $G(VAL) Q:VAL'=$P(EVAL,"^")
|
---|
| 29 | .. I FIRST S FIRST=0 W !!,IFN_". "_ERTXT
|
---|
| 30 | .. I LISTVAR W !?3,X,?15,EVAL
|
---|
| 31 | G DATE
|
---|
| 32 | Q
|
---|
| 33 | ORYX ;Find things in the OE/RR Error file
|
---|
| 34 | N OREND
|
---|
| 35 | W !!?10,"ORYX('ORERR' file search"
|
---|
| 36 | I '$O(^ORYX("ORERR",0)) W !!,"No errors in the file." Q
|
---|
| 37 | F D YX Q:OREND
|
---|
| 38 | Q
|
---|
| 39 | YX ;
|
---|
| 40 | N ORSSTRT,ORSSTOP,I,X,Y,Z,GOT,YES
|
---|
| 41 | D RANGE^ORPRS01()
|
---|
| 42 | Q:OREND
|
---|
| 43 | W !!,"Enter text to search for (case sensitive & optional): "
|
---|
| 44 | R X:DTIME Q:'$T
|
---|
| 45 | S GOT=0,YES=0,%=1
|
---|
| 46 | I X'="" W !,"Show details" D YN^DICN Q:%=-1 S:%'=2 YES=1
|
---|
| 47 | S I=0 W " searching..."
|
---|
| 48 | F S I=$O(^ORYX("ORERR",I)) Q:I<1 S Y=^(I,0),GOT=0 D
|
---|
| 49 | . I +Y<ORSSTRT!(+Y>ORSSTOP) Q
|
---|
| 50 | . I X="" W !,I_"=>"_Y Q
|
---|
| 51 | . I Y[X S GOT=1
|
---|
| 52 | . I 'GOT S J=0 F S J=$O(^ORYX("ORERR",I,1,J)) Q:J<1 S Z=^(J,0) I Z[X S GOT=1 Q
|
---|
| 53 | . I GOT D VIEW(I,YES) ;W !,I_"=>"_Y Q:'YES S J=0 F S J=$O(^ORYX("ORERR",I,1,J)) Q:J<1 W !?12,^(J,0)
|
---|
| 54 | V1 I 'YES W !!,"View #: " R X:DTIME I X,$D(^ORYX("ORERR",X)) D VIEW(X,1) G V1
|
---|
| 55 | Q
|
---|
| 56 | VIEW(I,DETAIL) ;View log
|
---|
| 57 | N J,Y
|
---|
| 58 | Q:'$D(^ORYX("ORERR",+$G(I),0)) S Y=^(0)
|
---|
| 59 | W !,I_"=>"_Y Q:'$G(DETAIL) S J=0 F S J=$O(^ORYX("ORERR",I,1,J)) Q:J<1 W !?12,^(J,0)
|
---|
| 60 | Q
|
---|