Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BLRAGUT2

BLRAGUT2.m

Go to the documentation of this file.
BLRAGUT2 ; IHS/MSC/SAT - LABORATORY ACCESSION GUI RPC UTILITIES 2;
 ;;5.2;IHS LABORATORY;**1031**;NOV 01, 1997;Build 185
 ;
STCKRPTS ; EP - Show $STACK data in BLRENTRY global after an error
 NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,X,XPARSYS,XQXFLG)
 ;
 S BLRVERN=$$TRIM^XLFSTR($P($T(+1),";"),"R"," ")
 ;
 D ADDTMENU^BLRGMENU("SHOSTACK^BLRAGUT2","$STACK Report")
 ;
 ; Main Menu driver
 D MENUDRVR^BLRGMENU("^BLRENTRY Routines",$$CJ^XLFSTR("$STACK Reports",IOM))
 Q
 ;
SHOSTACK ; EP - SHOw $STACK report
 NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,X,XPARSYS,XQXFLG)
 ;
 Q:$$SHOSTCKI()="Q"
 ;
 D SHOSTCKP
 ;	
 K ^TMP("BLRAGUT2")
 Q
 ;
SHOSTCKI() ; EP - Initialization
 K ^TMP("BLRAGUT2")
 S BLRVERN=$$TRIM^XLFSTR($P($T(+1),";"),"R"," ")
 ;
 S HEADER(1)="^BLRENTRY $STACK Routines Report"
 S HEADER(2)=" "
 ;
 D HEADERDT^BLRGMENU
 ;
 S X=$$GETDATE(.STACKDT)
 Q:X<1 "Q"
 ;
 S HEADER(2)="Compilation of Data"
 D HEADERDT^BLRGMENU
 ;
 D SHOSTCKC     ; Compile Data
 ;
 W !,?4,"Compilation complete."
 D PRESSKEY^BLRGMENU(9)
 ;
 K HEADER(2)
 S HEADER(2)="Reverse Entry Number Order"
 S HEADER(3)=" "
 S HEADER(4)="STACKRTN"
 S $E(HEADER(4),10)="USER"
 S $E(HEADER(4),20)="DATE/TIME"
 S $E(HEADER(4),35)="ENTRY #"
 S $E(HEADER(4),45)="LABEL"
 ;
 S QFLG="NO"
 S MAXLINES=22,LINES=MAXLINES+10
 S PG=0
 ;
 Q "OK"
 ;
SHOSTCKC ; EP - SHOw $STaCK -- Compilation of data
 S (CURDATE,USER,ENTRY,LABEL)=""
 W !,?4
 F  S USER=$O(^BLRENTRY(USER))  Q:USER<1  D
 . S CURDATE=STACKDT
 . F  S CURDATE=$O(^BLRENTRY(USER,CURDATE))  Q:CURDATE=""!($P(CURDATE,".")'=STACKDT)  D
 .. F  S ENTRY=$O(^BLRENTRY(USER,CURDATE,ENTRY))  Q:ENTRY=""  D
 ... F  S LABEL=$O(^BLRENTRY(USER,CURDATE,ENTRY,LABEL)) Q:LABEL=""  D
 .... W "."
 .... W:$X>75 !,?4
 .... S STACK=0
 .... F  S STACK=$O(^BLRENTRY(USER,CURDATE,ENTRY,LABEL,"$STACK",STACK))  Q:STACK<1  D
 ..... S CURPLACE=$G(^BLRENTRY(USER,CURDATE,ENTRY,LABEL,"$STACK",STACK,3,"CURRENT PLACE"))
 ..... S STACKNUM=1+$G(STACK(-1))
 ..... S STACK(-1)=STACKNUM
 ..... S STACK(STACKNUM)=CURPLACE
 ..... S STACKRTN=$P($P(CURPLACE,"^",2)," ")
 ..... S:$L(STACKRTN) ^TMP("BLRAGUT2",$J,ENTRY)=STACKRTN_"^"_USER_"^"_CURDATE_"^"_LABEL
 ;
 W !
 ;
 Q
 ;
SHOSTCKP ; EP - Print the report
 S ENTRY="A"
 F  S ENTRY=$O(^TMP("BLRAGUT2",$J,ENTRY),-1)  Q:ENTRY<1!(QFLG="Q")  D
 . I LINES>MAXLINES D HEADERPG^BLRGMENU(.PG,.QFLG,"NO")  Q:QFLG="Q"
 . S STR=$G(^TMP("BLRAGUT2",$J,ENTRY))
 . W $P(STR,"^")
 . W ?9,$P(STR,"^",2)
 . W ?19,$P(STR,"^",3)
 . W ?34,ENTRY
 . W ?44,$E($P(STR,"^",4,99),1,36),!
 . S LINES=LINES+1
 ;
 D:QFLG'="Q" PRESSKEY^BLRGMENU(9)
 Q
 ;
GETDATE(DATER) ; EP -- Get Specific Date; Default entry is TODAY
 D ^XBFMK
 S DIR(0)="DO"
 S DIR("A")="Specific Date"
 S DIR("B")=$$HTE^XLFDT($H,"5DZ")
 D ^DIR
 I +$G(DUOUT)>0 D  Q 0
 . W !,?5,"FileMan Quit Entered. Routine Ends.",!
 . D PRESSKEY^BLRGMENU(10)
 ;
 S:+$G(Y)<1 DATER=$$DT^XLFDT
 S:+$G(Y)>0 DATER=+$G(Y)
 ;
 Q DATER