[613] | 1 | GMTSXQ02 ; SLC/JER - XQOR1 for Export w/Health Summary ;1/10/92 14:55
|
---|
| 2 | ;;2.5;Health Summary;;Dec 16, 1992
|
---|
| 3 | XQOR1 ; SLC/KCM - Main Unwinding Loop ;3/13/90 11:34 ;
|
---|
| 4 | ;;6.52;Copyright 1990, DVA;
|
---|
| 5 | LOOP ;From: EN^XQOR
|
---|
| 6 | I "QOL"[$P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^"),'$D(^UTILITY("XQORS",$J,0,"CTXT","ADD")) D ENTRY^XQORO G:$D(XQORQUIT)!$D(XQORPOP)!$D(DIROUT)!$D(DTOUT) EXCT
|
---|
| 7 | D EACH G:$D(XQORQUIT)!$D(XQORPOP)!$D(DIROUT)!$D(DTOUT) EXCT
|
---|
| 8 | I $D(@(^UTILITY("XQORS",$J,XQORS,"REF")_"20)"))'[0 S Y=^(20) I $L(Y) K X X Y S:$D(X)'[0 ^UTILITY("XQORS",$J,XQORS,"X")=X
|
---|
| 9 | I $D(XQORQUIT)!$D(XQORPOP)!$D(DIROUT)!$D(DTOUT) G EXAT
|
---|
| 10 | I $D(XQORFLG) S:$D(XQORFLG("PS")) $P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^",2)=+XQORFLG("PS") S:$D(XQORFLG("SH")) $P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^",5)=+XQORFLG("SH") K XQORFLG
|
---|
| 11 | REDO D @$S("QM"[$P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^"):"MENU^XQOR3","OX"[$P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^"):"ACT^XQOR2",1:"NUL^XQOR2")
|
---|
| 12 | G:'^UTILITY("XQORS",$J,XQORS,"ITM") EXAT S ^UTILITY("XQORS",$J,XQORS,"TOT")=^UTILITY("XQORS",$J,XQORS,"ITM"),^UTILITY("XQORS",$J,XQORS,"ITM")=0
|
---|
| 13 | STAK S ^UTILITY("XQORS",$J,XQORS,"ITM")=^UTILITY("XQORS",$J,XQORS,"ITM")+1 G:^UTILITY("XQORS",$J,XQORS,"ITM")>^UTILITY("XQORS",$J,XQORS,"TOT") EXST
|
---|
| 14 | I '^UTILITY("XQORS",$J,XQORS,"ITM",^UTILITY("XQORS",$J,XQORS,"ITM")) S $P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^",4)=1 D DJMP^XQOR4 K XQORPOP,XQORQUIT G NXT
|
---|
| 15 | I $D(^UTILITY("XQORS",$J,XQORS,"ITM",^UTILITY("XQORS",$J,XQORS,"ITM"),"MA")) S X=^UTILITY("XQORS",$J,XQORS,"ITM",^UTILITY("XQORS",$J,XQORS,"ITM"),"MA") D EN^XQOR G:$D(XQORQUIT)!$D(XQORPOP)!$D(DIROUT)!$D(DTOUT) NXT
|
---|
| 16 | S X=^UTILITY("XQORS",$J,XQORS,"ITM",^UTILITY("XQORS",$J,XQORS,"ITM")) D EN^XQOR
|
---|
| 17 | NXT K XQORQUIT I '$D(XQORPOP),'$D(DIROUT),'$D(DTOUT) G STAK
|
---|
| 18 | EXST S ^UTILITY("XQORS",$J,0,"FILE")=";"_$P(^UTILITY("XQORS",$J,XQORS,"VPT"),";",2) S:$D(^UTILITY("XQORS",$J,XQORS,"INP")) $P(^UTILITY("XQORS",$J,XQORS,"INP"),"^",4)="" K XQORPOP
|
---|
| 19 | I $P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^",2)!$P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^",4) S $P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^",4)=""
|
---|
| 20 | I I '$D(DIROUT),'$D(DTOUT) D EACH I '$D(XQORQUIT),'$D(XQORPOP),'$D(DIROUT),'$D(DTOUT) K ^UTILITY("XQORS",$J,XQORS,"ITM") G REDO
|
---|
| 21 | EXAT I $P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^",6) G EX^XQOR
|
---|
| 22 | I $D(@(^UTILITY("XQORS",$J,XQORS,"REF")_"15)"))'[0 S X=^(15) I $L(X) X X
|
---|
| 23 | EXCT I $D(^UTILITY("XQORS",$J,XQORS,"CTX","AD")) D EXIT^XQORO
|
---|
| 24 | G EX^XQOR
|
---|
| 25 | EACH I $P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^",3),"AXLO"[$P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^") D SHDR^XQOR4
|
---|
| 26 | S XQORNOD=^UTILITY("XQORS",$J,XQORS,"VPT"),XQORNOD(0)=^UTILITY("XQORS",$J,XQORS,"INP")
|
---|
| 27 | D:$D(OROLD) RSTR^XQORO ;OE/RR Context
|
---|
| 28 | I "QOL"[$P(^UTILITY("XQORS",$J,XQORS,"FLG"),"^"),$D(^UTILITY("XQORS",$J,0,"CTXT","ADD")) D EVERY^XQORO
|
---|
| 29 | Q
|
---|