source: WorldVistAEHR/trunk/r/HEALTH_SUMMARY-GMTS/GMTSXQ02.m@ 861

Last change on this file since 861 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.7 KB
RevLine 
[613]1GMTSXQ02 ; SLC/JER - XQOR1 for Export w/Health Summary ;1/10/92 14:55
2 ;;2.5;Health Summary;;Dec 16, 1992
3XQOR1 ; SLC/KCM - Main Unwinding Loop ;3/13/90 11:34 ;
4 ;;6.52;Copyright 1990, DVA;
5LOOP ;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
11REDO 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
13STAK 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
17NXT K XQORQUIT I '$D(XQORPOP),'$D(DIROUT),'$D(DTOUT) G STAK
18EXST 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
21EXAT 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
23EXCT I $D(^UTILITY("XQORS",$J,XQORS,"CTX","AD")) D EXIT^XQORO
24 G EX^XQOR
25EACH 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
Note: See TracBrowser for help on using the repository browser.