LRBLU ;AVAMC/REG/CYM - BB UTIL ;1/22/97 15:32 ; ;;5.2;LAB SERVICE;**97,90,247**;Sep 27, 1994 ;Per VHA Directive 97-033 this routine should not be modified. Medical Device # BK970021 ; K:$L(X)<6!($L(X)>11)!(X'?.UN) X ;input trans ^DD(65.54,4, I $D(X),$D(^LRE("C",X)) S W=X(1)+50000 F Y=0:0 Q:'$D(X) S Y=$O(^LRE("C",X,Y)) Q:'Y K:'$D(^LRE(Y,0)) ^LRE("C",X,Y) I $D(^LRE("C",X,Y)) D I Q:'$D(X) I $D(^LRD(65,"B",X))!($D(^LRD(65,"C",X))) W $C(7),!?15,"INVENTORY FILE HAS AN ENTRY WITH SAME ID ! " D O Q I F Z=0:0 S Z=$O(^LRE("C",X,Y,Z)) Q:'Z I ZX) W:B=1 $C(7),!,"Specimen(s) received within past 72 hrs:" S Z=^(A,0),Y=+Z D DT^LRU W !,Y,?18,$P(Z,U,6) Q EN3 ;delete user print list for transfusion & hematology data D OUT S X="BLOOD BANK" D ^LRUTL G:'LRAA OUT I '$D(^LRO(69.2,LRAA,7,0)) W $C(7),!!,"There are no user lists." G OUT S (DIC,DIE)="^LRO(69.2,LRAA,7,",DIC(0)="AEQM" D ^DIC K DIC G:Y<1 OUT S DA=+Y,DA(1)=LRAA,DR=.01 D ^DIE G EN3 D S X=$O(^LAB(69.9,1,8,"B","DONOR",0)) I 'X W $C(7),"Must define blood bank site parameters using option:",!?3,"Edit blood bank site parameters [LRBLSSP] under the Supervisor menu" K X Q S X=^LAB(69.9,1,8,X,0),LRH(2)=$P(X,U,3),LRH(3)=$P(X,U,4) I LRH(2)=""!(LRH(3)="") W $C(7),!!,"Must enter second and third defaults for DONOR using:",!?3,"Edit blood bank site parameters [LRBLSSP] under the Supervisor menu" K X Q S LRH(17)=+$P(X,U,6),LRH(20)=+$P(X,U,7) Q OUT D V^LRU Q O ;enter old donor unit (CAUTION: This unit is in inventory) I '$D(LRD("U")) K X Q W !!,"Do you still want to enter this unit in the donor file " S %=2 D YN^LRU I %=1 W !,"Ok, done." Q K X Q P ;from DD(63.01, input transforms for fields 6.1 to 6.4 Q:'$D(^LR(LRDFN,"BB",LRI,A,X))&('$D(^LR(LRDFN,B,X))) W !!,$P(^LAB(61.3,X,0),U)," antigen cannot be present & absent.",! K ^LR(LRDFN,"BB",LRI,C,X) S X=^LR(LRDFN,"BB",LRI,C,0),X(1)=$O(^(0)),^(0)=$P(X,U,1,2)_U_X(1)_U_$S('X(1):"",1:($P(X,U,4)-1)) K X Q B ; S X="T",%DT="" D ^%DT,D^LRU S LRH=Y S %DT="AETX",%DT(0)="-N",%DT("A")="Start with Date TODAY// " D ^%DT K %DT I X="" S Y=DT W LRH Q:Y<1 S LRSDT=Y S %DT="AETX",%DT("A")="Go to Date TODAY// " D ^%DT K %DT I X="" S Y=DT W LRH Q:Y<1 S LRLDT=Y I LRSDT>LRLDT S X=LRSDT,LRSDT=LRLDT,LRLDT=X S Y=LRSDT D D^LRU S LRSTR=Y,Y=LRLDT D D^LRU S LRLST=Y K LRH Q DT W ! S %DT("A")="Date/time work completed: NOW// ",%DT="AEQTX",%DT(0)="-N" D ^%DT K %DT I X[U!(Y>1&(Y'[".")) W $C(7),!?35,"Not allowed, enter date and time.",!?35,"Future times not allowed." G DT I Y<1 S X="N",%DT="EQTX" D ^%DT K %DT S LRK=Y W ! Q ; END K DIC,DIE,DR,DA Q