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

LREXPD.m

Go to the documentation of this file.
LREXPD ;SLC/RWF-EXPLODE A LRTEST LIST ;DEC 09, 2008 8:30 AM
 ;;5.2;LAB SERVICE;**1018,1025**;NOV 01, 1997
 ;;5.2;LAB SERVICE;**153,201,221**;Sep 27, 1994
 ;LRTEST IS LIST OF TEST's, LREXPD IS EXECUTE CODE TO SET OTHER VAR.
 S S1=0,J=0 S:'$D(LRTSTS)#2 LRTSTS=0
 F I=1:1 S X=$P(LRTEST,U,I) Q:X<1  D TREE
 K LREXPD,S1,J1 Q
TREE I '$D(^LAB(60,X,0)) Q  ;BAD LRTEST NUMBER
 ; I $P(^LAB(60,X,0),U,5)]"" Q:$D(^TMP("LR",$J,"T",X))  S LRTSTS=LRTSTS+1,LRORD(LRTSTS)=X,^TMP("LR",$J,"T",X)=^LAB(60,X,0) X:$D(LREXPD) LREXPD Q  ;ADD TO LIST
 ; ----- BEGIN IHS/OIT/MKK LR*5.2*1025 MODIFICATION -- LRTSTS Variable can be null
 I $P(^LAB(60,X,0),U,5)]"" Q:$D(^TMP("LR",$J,"T",X))  S LRTSTS=1+$G(LRTSTS),LRORD(LRTSTS)=X,^TMP("LR",$J,"T",X)=^LAB(60,X,0) X:$D(LREXPD) LREXPD Q  ;ADD TO LIST
 ; ----- END IHS/OIT/MKK LR*5.2*1025
 Q:'$D(^LAB(60,X,2,0))  Q:$O(^(0))<1  Q:$D(S1("A",X))  ;NOT A PANEL
 S S1=S1+1,S1(S1)=X,J1(S1)=J,S1("A",X)=""
 S J=0 F  S J=$O(^LAB(60,S1(S1),2,J)) Q:J<1  S X=+^(J,0) D TREE
 S J=J1(S1),X=S1(S1),S1=S1-1
 Q
EXP ;Get the list of tests for this ACC. from LRGVG1
 N I,N,IX
 K LRTEST,LRNAME,LRSM60 S LRALERT=$S($G(LROUTINE):LROUTINE,1:9),N=0,I=0,IX=+$G(^LRO(68,LRAA,1,LRAD,1,LRAN,5,1,0))
 F  S I=$O(^LRO(68,LRAA,1,LRAD,1,LRAN,4,I)) Q:I<.5  I $G(^(I,0)) S X=^(0) D
 . S N=N+1,LRTEST(N)=I,LRTEST(N,"P")=$P(X,U,9)_U_$$NLT^LRVER1(I)_"!"
 . S LRAL=$P($G(^(0)),U,2) I LRAL,LRAL<LRALERT S LRALERT=LRAL
 K LRAL S LRNTN=N F I=1:1:N S:$D(^LAB(60,+LRTEST(I),0)) LRTEST(I)=LRTEST(I)_U_^(0),LRNAME(I)=$P(LRTEST(I),U,2),LRNAME(I,+LRTEST(I))="" S:$G(^(1,IX,3)) LRSM60(+$P(LRTEST(I),";",2))=^(3)
 K IX N X1,X S X=$P($H,","),X(1)=$P($H,",",2),I=0 F  S I=$O(LRSM60(I)) Q:'I  S X1=X-LRSM60(I)_","_X(1),LRSM60(I)=9999999-$$HTFM^XLFDT(X1)
 Q
EX1 ;;Expand the list of tests to edit.
 Q:'$D(LRTEST(T1))  S X=LRTEST(T1),^TMP("LR",$J,"VTO",+X)=$P($P(X,U,6),";",2)
 S ^TMP("LR",$J,"VTO",+X,"P")=$G(LRTEST(T1,"P")),S1=0,J=0 D EX2 K S1,J
 Q
EX2 ;from LRDIST
 S LRSUB=$P(X,U,6) I $D(^LAB(60,+X,4)),$P(^(4),"^",2) S LRCFL=LRCFL_$P(^(4),"^",2)_U
 I $L(LRSUB) S S2=$P(LRSUB,";",2) D:'$D(^TMP("LR",$J,"TMP",S2)) ORD Q
 S S1=S1+1,S1(S1)=X,S1(S1,1)=J
 S J=0 F  S J=$O(^LAB(60,+S1(S1),2,J)) Q:J<1  S Y=+^(J,0),X=Y_U_^LAB(60,Y,0) D EX2
 S X=S1(S1),J=S1(S1,1),S1=S1-1
 Q
ORD S LRNX=LRNX+1,LRORD(LRNX)=S2,^TMP("LR",$J,"TMP",S2)=+X
 S ^TMP("LR",$J,"TMP",S2,"P")=$G(LRTEST(T1))_U_$$RNLT^LRVER1(+X)
 S:$P(X,U,18) LRM(S2)=+X,LRMX(+X)="" Q
 ;LRNX is set by caller
 Q