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

LR7OV5.m

Go to the documentation of this file.
  1. LR7OV5 ;DALOI/JMC - Lab XPAR Parameter Utility;02/28/12 20:44
  1. ;;5.2;LAB SERVICE;**350**;Sep 27, 1994;Build 230
  1. ;
  1. ;
  1. LISTPAR ; List user-level values for a parameter
  1. ;
  1. N DIR,DIRUT,DDTOUT,UOUT,LN,LRENTITY,LRERR,LROUT,LRPAR,LRREF,LRXPAR,LRXPARLIST
  1. ;
  1. ; Select a parameter to display
  1. F D Q:LRXPAR<0!(LRXPAR>0)
  1. . K LRXPAR
  1. . D GETPAR^XPAREDIT(.LRXPAR)
  1. . I $E($P(LRXPAR,"^",2),1,2)?1(1"LR",1"LA") Q
  1. . I LRXPAR>0 W !!,"*** Please select a PARAMETER within the Laboratory Namespace (LA/LR) ***" S LRXPAR=0
  1. . E S LRXPAR=-1
  1. I LRXPAR<1 Q
  1. ;
  1. ; Return all parameter instances
  1. D ENVAL^XPAR(.LRXPARLIST,+LRXPAR,"",.LRERR)
  1. I LRERR W !,"Error encountered: "_LRERR Q
  1. ;
  1. ; Build list of entities allowed for this parameter
  1. D BLDLST^XPAREDIT(.LRPAR,+LRXPAR)
  1. ;
  1. W !!,"Values for "_$P(LRXPAR,"^",2),!
  1. D HEADER
  1. ;
  1. S LRREF="",LN=1
  1. F S LRREF=$O(LRXPARLIST(LRREF)) Q:LRREF="" D Q:$D(DIRUT)
  1. . I $P(LRREF,";",2)'="VA(200," Q
  1. . D ENTITY
  1. . K LROUT
  1. . D GETLST^XPAR(.LROUT,LRREF,+LRXPAR,"N",.LRERR)
  1. . S LROUT=""
  1. . F S LROUT=$O(LROUT(LROUT)) Q:LROUT="" D Q:$D(DIRUT)
  1. . . D WAIT Q:$D(DIRUT)
  1. . . W !,$E(LRENTITY,1,30)
  1. . . W ?31,$E(LROUT,1,20),?52,$E($P(LROUT(LROUT),"^",2),1,28)
  1. ;
  1. I '$D(DIRUT) S DIR("A")="Enter RETURN to continue",DIR(0)="E" D ^DIR
  1. ;
  1. Q
  1. ;
  1. ;
  1. ;
  1. ENTITY ; Resolve entity
  1. ;
  1. S LRENTITY=""
  1. I $P(LRREF,";",2)="VA(200," S LRENTITY="USR: "_$$NAME^XUSER(+LRREF,"F") Q
  1. I $P(LRREF,";",2)="DIC(9.4," S LRENTITY="PKG: "_$$GET1^DIQ(9.4,+LRREF_",",.01) Q
  1. I $P(LRREF,";",2)="DIC(4," S LRENTITY="DIV: "_$P($$NS^XUAF4(+LRREF),"^") Q
  1. ;
  1. I $P(LRREF,";",2)="DIC(4.2," D Q
  1. . N X
  1. . S X=$G(LRPAR("P","SYS"))
  1. . I X,$P(LRPAR(X),"^",6)'="" S LRENTITY="SYS: "_$P(LRPAR(X),"^",6) Q
  1. . S LRENTITY="SYS: "_LRREF Q
  1. ;
  1. I $P(LRREF,";",2)="DIC(49," S LRENTITY="SRV: "_$$GET1^DIQ(49,+LRREF_",",.01) Q
  1. I $P(LRREF,";",2)="SC(" S LRENTITY="LOC: "_$$GET1^DIQ(44,+LRREF_",",.01) Q
  1. ;
  1. I $P(LRREF,";",2)="SCTM(404.51," S LRENTITY="TEA: "_LRREF Q
  1. I $P(LRREF,";",2)="USR(8930," S LRENTITY="CLS: "_LRREF Q
  1. I $P(LRREF,";",2)="DG(405.4," S LRENTITY="BED: "_LRREF Q
  1. I $P(LRREF,";",2)="OR(100.21," S LRENTITY="OTL: "_LRREF Q
  1. ;
  1. ; Default value if not handled.
  1. S LRENTITY=LRREF
  1. Q
  1. ;
  1. ;
  1. WAIT ; pause display
  1. ;
  1. ;
  1. S LN=LN+1
  1. I LN>(IOSL-4) S DIR(0)="E" D ^DIR W !! D:'$D(DIRUT) HEADER S LN=0
  1. Q
  1. ;
  1. ;
  1. W !,"Parameter",?31,"Instance",?52,"Value",!
  1. W $$REPEAT^XLFSTR("-",IOM-4),!
  1. Q