source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRBLPR.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1LRBLPR ;AVAMC/REG - BLOOD BANK PT RECORD ;2/18/93 09:46 ;
2 ;;5.2;LAB SERVICE;**247**;Sep 27, 1994
3 D END S X="BLOOD BANK" D ^LRUTL G:Y=-1 END
4 W !!?20,"PRINT CURRENT PATIENT BLOOD BANK RECORDS",!!,"The dates asked will be from the BLOOD BANK ACCESSION LIST:"
5 D B^LRU G:Y<0 END
6 W !!,"Print only patients with antibodies/special instructions " S %=1,LR(7)=0 D YN^LRU G:%<1 END I %=1 S LR(7)=1
7ASK W !!,"Enter the maximum number of specimens to display",!,"in reverse chronological order for each patient: " R LR(8):DTIME Q:LR(8)[U
8 I LR(8)'?1N.N W $C(7),!,"ENTER A WHOLE NUMBER FROM 0-99" G ASK
9 I $S(+LR(8)<0:1,+LR(8)>99:1,1:0) W $C(7),!,"ENTER A WHOLE NUMBER FROM 0-99" G ASK
10 S LR(8)=+LR(8),ZTRTN="QUE^LRBLPR" D BEG^LRUTL G:POP!($D(ZTSK)) END
11QUE U IO W @IOF K ^TMP("LRBL",$J) D L^LRU,S^LRU S S=LRSDT-1
12 F A=S:0 S A=$O(^LRO(68,LRAA,1,A)) Q:'A!(A>LRLDT) F B=0:0 S B=$O(^LRO(68,LRAA,1,A,1,B)) Q:'B I $D(^(B,0)) S ^TMP("LRBL",$J,+^(0))=""
13 F A=0:0 S A=$O(^TMP("LRBL",$J,A)) Q:'A D S
14 D H S LR("F")=1
15 F LR=0:0 S LR=$O(^TMP("LRBL",$J,"B",LR)) Q:'LR!(LR("Q")) S LRP=0 F LR(1)=0:0 S LRP=$O(^TMP("LRBL",$J,"B",LR,LRP)) Q:LRP=""!(LR("Q")) D B
16OUT K ^TMP("LRBL",$J),^TMP($J) W:IOST'?1"C".E @IOF D END^LRUTL,END Q
17S Q:'$D(^LR(A,0)) S W=^(0),Y=$P(W,"^",3),(LRDPF,P)=$P(W,"^",2),X=^DIC(P,0,"GL"),X=@(X_Y_",0)"),SSN=$P(X,"^",9) D SSN^LRU S ^TMP("LRBL",$J,"B",P,$P(X,"^"),A)=$P(X,"^",3)_"^"_SSN_"^"_$P(W,"^",5)_"^"_$P(W,"^",6) Q
18 ;
19B F LRDFN=0:0 S LRDFN=$O(^TMP("LRBL",$J,"B",LR,LRP,LRDFN)) Q:'LRDFN!(LR("Q")) S LR(4)=^(LRDFN) D W
20 Q
21W I LR(7),'$O(^LR(LRDFN,1.7,0)),'$O(^LR(LRDFN,3,0)) Q
22 D:$Y>(IOSL-6) H Q:LR("Q") S Y=+LR(4) D DT^LRU W !,LRP,?31,$P(LR(4),"^",2),?46,Y,?56,$J($P(LR(4),"^",3),2),?59,$P(LR(4),"^",4) D ^LRBLPR1 Q
23 ;
24H ;from LRBLPR1, LRBLPRA
25 I $D(LR("F")),IOST?1"C".E D M^LRU Q:LR("Q")
26 D F^LRU W !,"BLOOD BANK PATIENTS" I $D(LRSTR),$D(LRLST) W " from ",LRSTR," to ",LRLST
27 W !?10,"Patient",?34,"SSN",?49,"DOB",?55,"ABO",?59,"Rh",!,LR("%") Q
28 ;
29END D V^LRU Q
Note: See TracBrowser for help on using the repository browser.