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

BLRMSKEY.m

Go to the documentation of this file.
BLRMSKEY ;IHS/MSC/MKK - Laboratory Menus and Security KEYs Report ; 17-Oct-2014 09:22 ; MKK
 ;;5.2;IHS LABORATORY;**1034**;NOV 01, 1997;Build 88
 ;
PEP ; EP
EP ; EP
 NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,XPARSYS,XQXFLG)
 ;
 Q:$$INITVARS()="Q"
 ;
 ; Compile
 F SEED="BLR","LR"  D
 . S NAME=SEED,SEEDLEN=$L(SEED)
 . F  S NAME=$O(^DIC(19,"B",NAME))  Q:NAME=""!(QFLG="Q")!($E(NAME,1,SEEDLEN)'=SEED)  D
 .. S IEN=$O(^DIC(19,"B",NAME,0))
 .. S LOCK=$$GET1^DIQ(19,IEN,"LOCK")
 .. Q:$L(LOCK)<1     ; Skip if no Security Key
 .. ;
 .. S:$L(LOCK)>MAXLOCKL MAXLOCKL=$L(LOCK)_"^"_LOCK
 .. S:$L(NAME)>MAXNAME MAXNAME=$L(NAME)_"^"_NAME
 .. S MENUTEXT=$$GET1^DIQ(19,IEN,"MENU TEXT")
 .. S:$L(MENUTEXT)>MAXMENU MAXMENU=$L(MENUTEXT)_"^"_MENUTEXT
 .. S ^TMP(BLRVERN,$J,MENUTEXT)=LOCK_"~"_NAME
 ;
 S MENUTEXT=""
 F  S MENUTEXT=$O(^TMP(BLRVERN,$J,MENUTEXT))  Q:MENUTEXT=""!(QFLG="Q")  D	
 . I LINES>MAXLINES D HEADERPG^BLRGMENU(.PG,.QFLG,HDRONE)  Q:QFLG="Q"
 . ;
 . S STR=$G(^TMP(BLRVERN,$J,MENUTEXT))
 . S LOCK=$P(STR,"~")
 . S NAME=$P(STR,"~",2)
 . W LOCK
 . W ?14,$E(MENUTEXT,1,38)
 . I $L(NAME)<25  W ?54,NAME
 . E  D LINEWRAP^BLRGMENU(54,NAME,25)
 . W !
 . S LINES=LINES+1
 ;
 D ^%ZISC
 ;
 W !!,?4,"Longest Security KEY=",MAXLOCKL,!
 W ?9,"Longest Option Name=",MAXNAME,!
 W ?9,"Longest MENU TEXT=",MAXMENU
 D PRESSKEY^BLRGMENU(4)
 K ^TMP(BLRVERN,$J)
 Q
 ;
INITVARS() ; EP - Initialization
 S BLRVERN=$TR($P($T(+1),";")," ")
 ;
 S HEADER(1)="Option (#19) File"
 S HEADER(2)="RPMS Lab Security Keys Report"
 D HEADERDT^BLRGMENU
 D HEADONE^BLRGMENU(.HDRONE)
 ;
 S HEADER(3)=" "
 S HEADER(4)="Security Key"
 S $E(HEADER(4),15)="Menu Text"
 S $E(HEADER(4),55)="Option Name"
 ;
 D ^%ZIS
 U IO
 ;
 S MAXLINES=IOSL-4,LINES=MAXLINES+10
 S (CNT,MAXLOCKL,MAXMENU,MAXNAME,PG)=0
 S QFLG="NO"
 ;
 K ^TMP(BLRVERN,$J)
 Q "OK"