source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LR7OSBR.m@ 1002

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1LR7OSBR ;slc/dcm - Silent BB report ;8/11/97
2 ;;5.2;LAB SERVICE;**121,230**;Sep 27, 1994
3EN ;
4 I '$D(^LR(LRDFN,"BB"))&($O(^LR(LRDFN,.99))>3!($O(^LR(LRDFN,.99))<1)) Q
5 S (LRN(2),LRSAV,LR("S"))=1,LRSS="BB"
6 K ^TMP("LRBL",$J)
7 F X=2.91,8,10.3,11.3 S LRN(X)=$P(^DD(63.01,X,0),"^")
8 D SET
9 N LRDFN
10 S G=0
11 F S G=$O(^TMP("LRBL",$J,G)) Q:G="" S N=0 F S N=$O(^TMP("LRBL",$J,G,N)) Q:N="" S LRDFN=0 F S LRDFN=$O(^TMP("LRBL",$J,G,N,LRDFN)) Q:'LRDFN S LR=^(LRDFN) D ^LR7OSBR1
12 K ^TMP("LRBL",$J)
13 Q
14 ;
15SET ;
16 S W=^LR(LRDFN,0),Y=$P(W,"^",3),(LRDPF,P)=$P(W,"^",2),X=^DIC(P,0,"GL"),X=@(X_Y_",0)"),Z=+$G(^(.104)),Z(1)="^"_$P($G(^DD(P,.104,0)),"^",3),SSN=$P(X,"^",9)
17 D SSN^LRU
18 S LRMD=""
19 I Z,$D(@(Z(1)_Z_",0)")) S LRMD=$P(^(0),"^")
20 I 'Z S Z=$S($D(^LR(LRDFN,.2)):+^(.2),1:"") I Z,$D(^VA(200,Z,0)) S LRMD=$P(^(0),"^")
21 S ^TMP("LRBL",$J,LRLLOC,$P(X,"^"),LRDFN)=$P(X,"^",3)_"^"_SSN_"^"_$P(W,"^",5)_"^"_$P(W,"^",6)_"^"_LRMD
22 Q
23 ;
24C ;
25 S X=$P(^LRO(69.2,LRAA,3,0),U,4)
26 W !?30,"(",X," patient",$S(X>1:"s",1:""),")"
27 Q
28 ;
29A ;
30 S X="BLOOD BANK",DIC=68,DIC(0)="MOXZ"
31 D ^DIC Q:Y<1
32 S LRAA=+Y,LRAA(1)=$P(Y,"^",2),LRAA(2)=$P(Y(0),"^",2),LRABV=$P(Y(0),"^",11),LRSS=$P(Y(0),"^",2)
33 Q
34 ;
35EN1(DFN) ;Process formatted Blood Bank Report
36 ;Return formated report in ^TMP("LRC",$J)
37 Q:'$D(^TMP("LRRR",$J,+$G(DFN),"BB"))
38 N LBL,LCNT,LRAA,LRACC,LRAD,LRAN,LRCMNT,LRDFN,LRDPF,LRIDT,LRJ02,LRLLT,LRPG,LRSB
39 N LRONESPC,LREND,LRONETST,LRLLOC,GCNT,GIOM,LREND,CCNT,CT1,COUNT,LRIN,SEX,SSN,CT1
40 K ^TMP("LRC",$J)
41 S (LRONETST,LRONESPC)="",CCNT=1,COUNT=99,(LREND,LRIN,CT1,GCNT)=0,GIOSL=999999,GIOM=80,LROUT=9999999
42 Q:'$G(DFN)
43 S LRDFN=$$LRDFN^LR7OR1(DFN)
44 Q:'LRDFN
45 S LRDPF="2^DPT(",LRLLOC=$S($L($G(ORL(0))):ORL(0),1:"unknown")
46 S SEX=$P($G(@("^"_$P(LRDPF,"^",2)_+DFN_",0)")),"^",2),SSN=$P(^(0),"^",9)
47 S LRIDT=0 F S LRIDT=$O(^TMP("LRRR",$J,DFN,"BB",LRIDT)) Q:LRIDT<1 D
48 . N DFN
49 . D EN
50 Q
Note: See TracBrowser for help on using the repository browser.