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

LRAD2ORD.m

Go to the documentation of this file.
LRAD2ORD ;SLC/CJS - ADD TESTS TO AN EXISTING ORDER ;8/11/97 [ 04/08/2003  6:44 AM ]
 ;;5.2T9;LR;**1003,1004,1018**;Nov 17, 2004
 ;;5.2;LAB SERVICE;**100,121,153**;Sep 27, 1994
 K LRNATURE
 ;----- BEGIN IHS MODOFICATIONS - LR*5.2*1018
 ;S LR2ORD=1,LRADDTST="",LRNOP=0 D ^LRCE I LRNOP W !,"Tests have been accessioned, call the lab to add tests to the same order." G END
 S LR2ORD=1,LRADDTST="",LRNOP=0 S:$G(BLROPT)=""!($G(BLROPT(0))'=$P(XQY0,U)) BLROPT="ADDORD",BLROPT(0)=$P(XQY0,U) D ^LRCE I LRNOP W !,"Tests have been accessioned, call the lab to add tests to the same order." G END  ;IHS/OIRM TUC/AAB2/1/97
 ;----- END IHS MODIFICATIONS - LR*5.2*1018
 I 'LRNOP&LRADDTST S LRODT=$O(^LRO(69,"C",LRADDTST,0)),LRSN=$O(^(LRODT,0)),LRPRAC=$P(^LRO(69,LRODT,1,LRSN,0),U,6),LRORDTIM=$P($P(^(0),U,8),".",2) D A
END K X3,T,LRADDTST,LRNOP,LRFLOG,LRIOZERO,LRGCOM,LRM,LRNCWL,LRORDER,LRORDTIM,LRORIFN,LRSSX,LRSTIK,LRSVSN,LRTSTNM,LRTXD,LRTXP,LRWPC,LRBED,LRCCOM,LRCDT,LRCOM,LRCS,LRCSN,LRCSP,LRCSS,LRCSX,LRDFN,LRDPF,LRDTO,LREND,LREXP,LRI,LRIO,LRLLOC,LRLWC
 ;----- BEGIN IHS MODIFICATIONS - LR*5.2*1018
 ;K LRTCOM,LR2ORD,LRMAX,LRMOR,LRNN,LRODT,LRORD,LRPR,LRPRAC,LRSAMP,LRTSTN,LRSN,LRSNO,LRSPEC,LRSSP,LRTEST,LRTIME,LRTN,LRTP,LRTSN,LRTY,LRUR,LRUSI,LRUSNM,LRXS,LRXST,LRY,PNM,SEX,SSN,J,K,S,X,Y,LRSN1,LRSAME,ZTSK
 K LRTCOM,LR2ORD,LRMAX,LRMOR,LRNN,LRODT,LRORD,LRPR,LRPRAC,LRSAMP,LRTSTN,LRSN,LRSNO,LRSPEC,LRSSP,LRTEST,LRTIME,LRTN,LRTP,LRTSN,LRTY,LRUR,LRUSI,LRUSNM,LRXS,LRXST,LRY,PNM,SEX,SSN,HRCN,J,K,S,X,Y,LRSN1,LRSAME,ZTSK
 ;----- END IHS MODIFICATIONS - LR*5.2*1018
 K LRSN1,LRNOP
 K LRMAX1,LRMAX2,LRODTSV,LROLLOC,LROT,LRRB,LRRSTAT,LRSNSV,LRTREA,LRUNQ,TT
 Q
A S LRSN=0 F  S LRSN=$O(^LRO(69,"C",LRADDTST,LRODT,LRSN)) Q:LRSN<1  S X=^LRO(69,LRODT,1,LRSN,0),LRSAMP=$P(X,U,3),LRSPEC=$S($D(^(4,1,0)):+^(0),1:0) I LRSPEC,LRSAMP D B
 K T S DA=0 F  S DA=$O(^LRO(69,LRODT,1,"AA",LRDFN,DA)) Q:DA<1  I $S($D(^LRO(69,LRODT,1,DA,1)):$P(^(1),U,4)'="U",1:1) S S=$S($D(^LRO(69,LRODT,1,DA,4,1,0)):+^(0),1:0) S I=0 F  S I=$O(^LRO(69,LRODT,1,DA,2,I)) Q:I<1  S T(+^(I,0),DA)=S
 D ADD^LROW
 Q
B S I=0 F  S I=$O(^LRO(69,LRODT,1,LRSN,2,I)) Q:I<1  S X3(+^(I,0),LRSAMP,LRSPEC)=""
 Q