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

LRUWLF.m

Go to the documentation of this file.
LRUWLF ; IHS/DIR/AAB - FILE #68 UTILITY 3/28/96 06:32 ; [ 07/22/2002  1:56 PM ]
 ;;5.2;LR;**1002,1013**;JUL 15, 2002
 ;;5.2;LAB SERVICE;**72**;Sep 27, 1994
 S:'$D(LRCS) LRCS=""
STF S:'$D(LRSIT) LRSIT=LRU S:'$D(LRSVC) LRSVC=""
 S ^LRO(68,LRAA,1,LRAD,1,LRAN,0)=LRDFN_"^"_+LRDPF_"^"_LRRC_"^^^^"_LRLLOC_"^"_LRMD(1)_"^"_LRSVC_"^"_DUZ_"^"_LRCAPLOC,^(3)=LRSD_"^^"_LRRC_"^^"_LRI_"^"_LRC(5),^(.2)=LRABV_" "_LRWHN_" "_LRAN,^(.4)=DUZ(2)
 K LRSD S ^LRO(68,LRAA,1,"AC",DUZ(2),LRAD,LRAN)=""
 S ^LRO(68,LRAA,1,LRAD,1,"E",LRRC,LRAN)=""
 I LRSS="CY" S ^LRO(69.2,LRAA,1,LRAN,0)=LRDFN_"^"_LRI_"^"_LRH(0) L +^LRO(69.2,LRAA,1) S X=^LRO(69.2,LRAA,1,0),^(0)=$P(X,"^",1,2)_"^"_LRAN_"^"_($P(X,"^",4)+1) L -^LRO(69.2,LRAA,1)
 Q
EN1 ;add more tests ;used by LRUTAD
 S:'$D(^LRO(68,LRAA,1,LRAD,1,LRAN,4,0)) ^LRO(68,LRAA,1,LRAD,1,LRAN,4,0)="^68.04PA^^"
 W !
TST K LRTEST
 S DIC=60,DIC("A")="   Add Test/Procedure: ",DIC(0)="AEMOQZ",DIC("S")="I $P(^(0),U,4)=LRAA(2),$A($P(^(0),U,3))<78" D ^DIC K DIC I Y<1 S LRSIT="" Q
 S (LRTEST,Y)=+Y,LRTNAM=$P(Y,U,2)
 S N=0 F A=0:0 S N=$O(^LAB(60,LRTEST,1,N)) Q:'N  S LRTEST(1)=$S($D(^LAB(60,LRTEST,1,N,0)):+^LAB(60,LRTEST,1,N,0),1:"") Q:LRTEST(1)=LRSIT
 I LRSS="CH",N<1 W $C(7),!!,"CANNOT ORDER ",LRTNAM," FOR ",$P(^LAB(61,LRSIT,0),U) G TST
 D SUM K LRRP G TST
SUM ;
 S N=0 F X=0:1 S N=$O(^LRO(68,LRAA,1,LRAD,1,LRAN,4,N)) Q:'N  S:Y=N LRRP=1
 Q:$D(LRRP)  S ^LRO(68,LRAA,1,LRAD,1,LRAN,4,Y,0)=LRTEST_"^^" I $P(^LRO(68,LRAA,1,LRAD,1,LRAN,4,0),"^",4)<1 S ^(0)="^68.04PA^"_Y_"^"_1 Q
 S ^LRO(68,LRAA,1,LRAD,1,LRAN,4,0)="^68.04PA^"_Y_"^"_($P(^LRO(68,LRAA,1,LRAD,1,LRAN,4,0),"^",4)+1) Q
 Q