47 lines
2.7 KiB
Mathematica
47 lines
2.7 KiB
Mathematica
LROW2A ;SLC/FHS/JAH - CONTINUING TEST & SAMPLE VERIFICATION ;8/10/04
|
|
;;5.2;LAB SERVICE;**20,40,100,107,121,291**;Sep 27, 1994
|
|
; Modified slc/jer to include set/kill for "D" cross-reference
|
|
;from LROW2
|
|
DUP L +^LRO(69,LRODT,1) S LRSN=1+$S($D(^LRO(69,LRODT,1,0)):$P(^(0),"^",3),1:0)
|
|
I '$D(LR2ORD) F LRSN=LRSN:1 Q:'$D(^LRO(69,LRODT,1,LRSN,0))
|
|
E S LRSAME=-1 D ADD I LRSAME=-1 L -^LRO(69,LRODT,1) Q
|
|
S ^LRO(69,LRODT,1,0)="^69.01PA^"_LRSN_U_LRSN,LRSN(LRSN)=""
|
|
S LRTN=$S($D(LR2ORD)&$D(^LRO(69,LRODT,1,LRSN,2,0)):$P(^(0),U,3),1:0)
|
|
S LRSAMP=LRSSP S:LRSAMP=0 LRSAMP=""
|
|
S ^LRO(69,LRODT,1,LRSN,0)=$P(LRSNO,U,1,2)_U_LRSAMP_U_$P(LRSNO,U,4,8),$P(^(0),U,9)=LROLLOC,^(.1)=LRORD,^LRO(69,"C",+LRORD,LRODT,LRSN)=""
|
|
L -^LRO(69,LRODT,1)
|
|
S ^LRO(69,LRODT,1,"AA",LRDFN,LRSN)="",^LRO(69,"D",LRDFN,LRODT,LRSN)="" S:$L(LRLLOC) ^LRO(69,LRODT,1,"AC",LRLLOC,LRSN)=""
|
|
S LRI=0
|
|
F S LRI=$O(LRXS(LRSSP,LRSPEC,LRI)) Q:LRI<1 D
|
|
. D SET
|
|
. D OR^LROW2 ;OE/RR 2.5
|
|
. S ^LRO(69,LRODT,1,LRSN,2,LRTN,0)=LRTEST(LRI),^LRO(69,LRODT,1,LRSN,2,"B",+LRTEST(LRI),LRTN)="",^LRO(69,"AT",LRDFN,+LRTEST(LRI),LRSPEC,LRODT)="",^(-LRODT)=""
|
|
. S $P(^LRO(69,LRODT,1,LRSN,2,LRTN,0),"^",9,10)="IP^L" D:$O(LRTCOM(+LRTEST(LRI),0)) TCOM(+LRTEST(LRI))
|
|
. D:+LRDPF=2&($G(LRSS)'="BB")&('$$CHKINP^LRBEBA4(LRDFN,LRODT)) AQ2^LRBEBA3 ; CIDC
|
|
S ^LRO(69,LRODT,1,LRSN,2,0)="^69.03PA^"_LRTN_U_LRTN
|
|
S ^LRO(69,LRODT,1,LRSN,4,0)="^69.02PA^1^1",^(1,0)=LRSPEC
|
|
I $D(LRCOM(LRSSP,LRSPEC)),LRCOM(LRSSP,LRSPEC) S X=LRCOM(LRSSP,LRSPEC),^LRO(69,LRODT,1,LRSN,6,0)="^69.04^"_X_U_X F J=1:1:X S ^LRO(69,LRODT,1,LRSN,6,J,0)=LRCOM(LRSSP,LRSPEC,J)
|
|
N TSTZ S TSTZ=0 F S TSTZ=$O(LRTEST(TSTZ)) Q:TSTZ<1 S TSTZ(+LRTEST(TSTZ))=""
|
|
D NEW^LR7OB1(LRODT,LRSN,"SN",$G(LRNATURE),.TSTZ)
|
|
I $D(LRLWC),LRLWC="LC" S ION=$P($G(^LAB(69.9,1,3.5,+DUZ(2),0)),U,2) S:ION="" ION=$P(^LAB(69.9,1,3),U,4) I ION]"" D ^LROW2P
|
|
I $D(LRLWC),LRLWC="I" S ION=$P(^LAB(69.9,1,7,DUZ(2),0),U,3) I ION]"" D ^LROW2P
|
|
WCP Q:$D(LRNCWL) Q:'$D(LRORDER) S ION=LRORDER
|
|
I $G(LRPIX)'=LRORD D PAUSE S LRPIX=LRORD
|
|
I IO(0)=$G(IO) S IOP=LRORDER,%ZIS="Q" D ^%ZIS Q:POP I '$D(IO("Q")) U IO D ENT2^LROW2P Q
|
|
I $G(IO)'=IO(0)!($D(IO("Q"))) D ^LROW2P Q
|
|
Q
|
|
ADD S LRSN1="" F ZZ=0:0 S LRSN1=$O(^LRO(69,LRODT,1,"AA",LRDFN,LRSN1)) Q:LRSN1="" I ^LRO(69,LRODT,1,LRSN1,.1)=LRORD S LROLLOC=$P(^LRO(69,LRODT,1,LRSN1,0),U,9),LRSAME=$S(LRSSP=$P(^(0),U,3)&(LRSPEC=^(4,1,0)):1,1:0) I LRSAME=1 S LRSN=LRSN1 Q
|
|
I LRSAME=0 F LRSN=LRSN:1 Q:'$D(^LRO(69,LRODT,1,LRSN,0))
|
|
Q
|
|
PAUSE ;
|
|
R !!,"Press RETURN to continue...",X:DTIME
|
|
Q
|
|
SET ;
|
|
S LRTN=LRTN+1 I $D(^LRO(69,LRODT,1,LRSN,2,LRTN)) G SET
|
|
Q
|
|
TCOM(TEST) ;Insert test comments
|
|
N J
|
|
S ^LRO(69,LRODT,1,LRSN,2,LRTN,1,0)="^^"_LRTCOM(TEST)_"^"_DT_"^"
|
|
S J=0 F S J=$O(LRTCOM(TEST,J)) Q:J<1 S ^LRO(69,LRODT,1,LRSN,2,LRTN,1,J,0)=LRTCOM(TEST,J)
|
|
Q
|