source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRBLPIT.m@ 861

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1LRBLPIT ;AVAMC/REG - PROLONGED TRANSFUSION TIMES ;2/18/93 09:45 ;
2 ;;5.2;LAB SERVICE;**247,267**;Sep 27, 1994
3 ;Per VHA Directive 97-033 this routine should not be modified. Medical Device # BK970021
4 D END W !?20,"Prolonged transfusion times"
5 D B^LRU G:Y<0 END S LRSDT=LRSDT-.0001,LRLDT=LRLDT+.99
6 S ZTRTN="QUE^LRBLPIT" D BEG^LRUTL G:POP!($D(ZTSK)) END
7QUE U IO K ^TMP($J) D L^LRU,S^LRU,H S LR("F")=1
8 F LRD=LRSDT:0 S LRD=$O(^LRD(65,"AB",LRD)) Q:'LRD!(LRD>LRLDT) F LRI=0:0 S LRI=$O(^LRD(65,"AB",LRD,LRI)) Q:'LRI I $D(^LRD(65,LRI,6)),$P(^(6),"^") S W(6)=^(6),W(4)=^(4),T=$P(W(4),"^",2),W(0)=^(0),C=$P(W(0),"^",4) D CK
9 S L=0 F A=0:0 S L=$O(^TMP($J,L)) Q:L=""!(LR("Q")) D:$Y>(IOSL-6) H Q:LR("Q") W !!!,"LOCATION: ",L F P=0:0 S P=$O(^TMP($J,L,P)) Q:'P D W
10 D END,END^LRUTL Q
11W D:$Y>(IOSL-6) H1 Q:LR("Q") S X=^LR(P,0),LRDPF=$P(X,U,2),Y=$P(X,"^",3),X=^DIC(LRDPF,0,"GL"),Y=@(X_Y_",0)"),LRP=$P(Y,"^"),SSN=$P(Y,"^",9) D SSN^LRU
12 W !!,"Patient: ",LRP,?41,"SSN: ",SSN F C=0:0 S C=$O(^TMP($J,L,P,C)) Q:'C!(LR("Q")) S C(1)=$E($P(^LAB(66,C,0),"^"),1,30) F LRI=0:0 S LRI=$O(^TMP($J,L,P,C,LRI)) Q:'LRI!(LR("Q")) S W=^(LRI) D P
13 Q
14P D:$Y>(IOSL-6) H2 Q:LR("Q") W !,$P(W,"^"),?15,C(1),?46,$P(W,"^",2),?58,$P(W,"^",3),?70,$P(W,"^",5),?74,$J($P(W,"^",4),5) Q
15CK S M=$P(^LAB(66,C,0),"^",24) Q:'M S R=$O(^LRD(65,LRI,3,0)) Q:'R S W(3)=^(R,0),R=+W(3),Z=LRD D H^LRUT S J=%H,J(0)=Z(3),Z=R D H^LRUT S X=J-%H*1440,Y=J(0)-Z(3),J=X+Y
16 Q:J'>M S L=$S($P(W(3),"^",4)]"":$P(W(3),"^",4),1:"??"),Y=+W(3) D D S Y(1)=Y,Y=LRD D D S Y(2)=Y,Y=$P(W(4),"^",3) I Y,$D(^VA(200,Y,0)) S Y=$P(^(0),"^",2)
17 S ^TMP($J,L,+W(6),C,LRI)=$P(W(0),"^")_"^"_Y(1)_"^"_Y(2)_"^"_J_"^"_Y Q
18 ;
19H I $D(LR("F")),IOST?1"C".E D M^LRU Q:LR("Q")
20 D F^LRU W !,"LABORATORY SERVICE",!?9,"PROLONGED TRANSFUSION TIMES FROM ",LRSTR," TO ",LRLST
21 W !,"Unit ID",?15,"Blood Component",?45,"Relocated",?57,"Transfused",?68,"DspBy",?74,"Minutes"
22 W !,LR("%") Q
23H1 D H Q:LR("Q") W !!!,"LOCATION: ",L Q
24H2 D H1 Q:LR("Q") W !!,"Patient: ",LRP,?41,"SSN: ",SSN Q
25 ;
26D S Y=Y_"000",Y=$E(Y,4,5)_"/"_$E(Y,6,7)_$S(Y[".":" "_$E(Y,9,10)_":"_$E(Y,11,12),1:"") Q
27END D V^LRU Q
Note: See TracBrowser for help on using the repository browser.