source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRBLJC.m@ 894

Last change on this file since 894 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1LRBLJC ;AVAMC/REG - COMPONENT DISPOSITION LIST ;2/18/93 09:10
2 ;;5.2;LAB SERVICE;**247**;Sep 27, 1994
3 ;Per VHA Directive 97-033 this routine should not be modified. Medical Device # BK970021
4 D END W !!?20,"COMPONENT DISPOSITION BY DATE UNIT RECEIVED"
5 W ! S DIC=66,DIC(0)="AEQM",DIC("A")="Select BLOOD COMPONENT: " D ^DIC K DIC G:Y<1 END S LRM=+Y,LRM(1)=$P(Y,U,2)
6ABO R !,"Select ABO Group: ",X:DTIME G:X=""!(X[U) END I X'="A",X'="B",X'="AB",X'="O" W $C(7)," Enter A, B, AB or O" G ABO
7 S LRABO=X
8ASK W !!,"Select (T)ransfusions or (A)ll other dispositions: " R X:DTIME G:X=""!(X[U) END S X=$A(X) S:X>97 X=X-32 I X'=65,X'=84 D HLP^LRBLJB G ASK
9 S LRW=$C(X) D B^LRU G:Y<0 END S ZTRTN="QUE^LRBLJC" D BEG^LRUTL G:POP!($D(ZTSK)) END
10QUE U IO K ^TMP($J) S:LRW="A" LRS=$P(^DD(65,4.1,0),U,3) S LRSDT=LRSDT-.01,LRLDT=LRLDT+.99 D L^LRU,S^LRU,H
11 F LRA=LRSDT:0 S LRA=$O(^LRD(65,"A",LRA)) Q:'LRA!(LRA>LRLDT) F LRI=0:0 S LRI=$O(^LRD(65,"A",LRA,LRI)) Q:'LRI D B
12 G:LRW="A" D
13 F A=0:0 S A=$O(^TMP($J,A)) Q:'A S X=^LR(A,0),Y=$P(X,"^",3),X=$P(X,"^",2),X=^DIC(X,0,"GL"),X=@(X_Y_",0)") S ^TMP($J,"B",$P(X,"^"),A)=$P(X,"^",9)
14 S LRP=0 F LRA=0:0 S LRP=$O(^TMP($J,"B",LRP)) Q:LRP="" F LRDFN=0:0 S LRDFN=$O(^TMP($J,"B",LRP,LRDFN)) Q:'LRDFN S SSN=^(LRDFN),LRDPF=$P(^LR(LRDFN,0),U,2) D SSN^LRU,W
15OUT D END^LRUTL,END Q
16D S LRE=0 F LRF=0:0 S LRE=$O(^TMP($J,LRE)) Q:LRE="" S X=LRE_":",LRD=$P($P(LRS,X,2),";") D:$Y>(IOSL-6) H W !?11,LRD D F
17 G OUT
18F S LRC=0 F LRA=0:0 S LRC=$O(^TMP($J,LRE,LRC)) Q:LRC="" F LRI=0:0 S LRI=$O(^TMP($J,LRE,LRC,LRI)) Q:'LRI D:$Y>(IOSL-6) H2 W !?45,LRC S X1=$P(^LRD(65,LRI,4),"^",2),X2=$P(^(0),"^",5) D ^%DTC S:X=0 X="<1" W ?65,$J(X,5)
19 Q
20W D:$Y>(IOSL-6) H W !!,LRP," ",SSN
21 S LRE=0 F LRF=0:0 S LRE=$O(^TMP($J,LRDFN,LRE)) Q:LRE="" S LRI=$O(^TMP($J,LRDFN,LRE,0)) D Y
22 Q
23Y D:$Y>(IOSL-6) H1 S X1=$P(^LRD(65,LRI,4),"^",2),X2=$P(^(0),"^",5) D ^%DTC S:X=0 X="<1" I LRW="A" S LRX=$P(^LRD(65,LRI,4),"^")_":",LRX=$P($P(LRS,LRX,2),";")
24 W !?11,$S(LRW="T":$P(^LRD(65,LRI,6),"^",3),1:LRX),?45,LRE,?65,$J(X,5) Q
25 ;
26B I '$D(^LRD(65,LRI,0)) K ^LRD(65,"A",LRA,LRI) Q
27 S X=^LRD(65,LRI,0) I $D(^(4)),$P(X,"^",4)=LRM,$P(X,"^",7)=LRABO S LRY=$P(^(4),"^") D @(LRW)
28 Q
29T Q:'$D(^LRD(65,LRI,6)) S X=+^(6) Q:'X
30S S Z=^LRD(65,LRI,0),^TMP($J,X,$P(Z,"^"),LRI)="" Q
31A Q:LRY="T"!(LRY="") S X=LRY G S
32 Q
33 ;
34H S LRQ=LRQ+1,X="N",%DT="T" D ^%DT,D^LRU W @IOF,Y," ",LRQ(1),?(IOM-10),"Pg: ",LRQ,!,LRM(1),?45,"ABO Group: ",LRABO
35 W !,$S(LRW="T":"Transfusions",1:"")," (Units received from ",LRSTR," to ",LRLST,")",!?11,$S(LRW="T":"Treating Specialty",1:"Disposition"),?45,"Unit ID",?60,"Days in inventory",!,LR("%") Q
36H1 D H W !,LRP," ",SSN Q
37H2 D H W !,LRE Q
38 ;
39END D V^LRU Q
Note: See TracBrowser for help on using the repository browser.