source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRMIPSZ1.m@ 632

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1LRMIPSZ1 ;AVAMC/REG/SLC/CJS/BA - MICRO PATIENT REPORT ;2/19/91 10:57
2 ;;5.2;LAB SERVICE;**283**;Sep 27, 1994
3DQ ;tasked from LRTASK from IMMEDIATE INTERIM REPORTING thru LRTP
4 I $D(ZTQUEUED) S ZTREQ="@"
5 S LRPATLOC=$S($D(LRLLOC):LRLLOC,1:""),LRIDT=$S($D(LRIDT):LRIDT,1:0),LRSS=$S($D(LRSS):LRSS,1:0)
6 S LRONETST="",LRONESPC="",LREND=0 D ^LRPARAM
7 S LRLLT=^LR(LRDFN,"MI",LRIDT,0),LRACC=$P(LRLLT,U,6),LRAD=$E(LRLLT)_$P(LRACC," ",2)_"0000",X=$P(LRACC," "),DIC=68,DIC(0)="M"
8 Q:'$L(X) D ^DIC S LRAA=+Y,LRAN=+$P(LRACC," ",3),LRCMNT=$S($D(^LR(LRDFN,"MI",LRIDT,99)):^(99),1:""),LRPG=0
9EN ;from LRMINEW2, LRMIPC, LRMIPLOG, LRMIPSZ, LRMIVER1
10 I '$D(LRONESPC) S LRONESPC="",DIC="^LAB(61,",DIC("A")="Select SPECIMEN/SOURCE: ANY//",DIC(0)="AEMOQ" D ^DIC S:Y>0 LRONESPC=+Y K DIC("A")
11 I '$D(LRONETST) S LRONETST="",DIC="^LAB(60,",DIC(0)="AEOQ",DIC("S")="I $P(^(0),U,4)=""MI"")"_$S('$D(LRLABKY):",""BO""[$P(^(0),U,3)",1:""),D="E" D IX^DIC Q:Y<1 I Y>0 S LRONETST=+Y
12 S LRSPEC=$P(LRLLT,U,5) I LRONESPC'="",LRSPEC'=LRONESPC Q
13 D RPT
14 K %,A8,A,AB,B,B1,B2,B3,C,IA,LR1PASS,LR2ORMOR,LRABCNT,LRACNT,LRADM,LRADX,LRAFS,LRAMT,LRAX,LRBN,LRBRR,LRBUG,LRCOMTAB,LRCS,LRDCOM,LRDOC,LRDRTM1,LRDRTM2,LREF,LRFLIP,LRFMT,LRGRM,LRHC,LRIFN,LRINT,LRPATLOC,LRMYC,LRNS,LRNUM
15 K LRORG,LRPAR,LRPC,LRPRE,LRPRINT,LRQU,LRRC,LRRES,LRSBC1,LRSBC2,LRSET,LRSIC1,LRSIC2,LRSPEC,LRSSD,LRST,LRTA,LRTB,LRTBA,LRTBC,LRTBS,LRTK,LRTS,LRTSTS,LRTUS,LRUS,LRWRD,N
16 Q
17RPT S:'$D(LRSB) LRSB=0 S LRPRINT=$S($D(^LRO(68,LRAA,1,LRAD,1,LRAN,4)):"",1:1),LRHC=$S($E(IOST,1,2)'="C-":1,1:0),LRFLIP=$S(LRHC:11,1:6)
18 I $D(DUZ("AG")),$L(DUZ("AG")),"ARMYAFN"[DUZ("AG"),LRDPF=2 S LRFDT=9999999-LRIDT D REG^LRAC9 K LRFDT
19 K DIC D DT^LRX S LRDPF=$P(^LR(LRDFN,0),U,2),DFN=$P(^(0),U,3) D PT^LRX S:$G(VAIN(3)) DOB=$P(VADM(3),U) S LRPATLOC=$P(LRLLT,U,8)
20 S (LRADM,LRADX)="" I +$G(LRDPF)=2,'$G(VAERR) D
21 . S LRADM=$S($L(VAIN(7)):$P(VAIN(7),U,2),1:"")
22 . S LRADX=$S($L(VAIN(9)):VAIN(9),1:"")
23 S LRCS=$S($D(^LAB(62,+$P(LRLLT,U,11),0)):$P(^(0),U),1:"")
24 S LRTK=$P(LRLLT,U),LRRC=$P(LRLLT,U,10),LRST=$S(LRSPEC:$P(^LAB(61,LRSPEC,0),U),1:""),Y=LRTK D D^LRU S LRTK=Y,Y=LRRC D D^LRU S LRRC=Y
25 S X=$P(LRLLT,U,7) D DOC^LRX
26 K ^TMP("LR",$J,"T"),LRTSTS S LRBRR=0 F I=0:0 S LRBRR=+$O(^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRBRR)) Q:LRBRR<1 D EN1
27 I 'LRPRINT,LRONETST Q
28 S LRPG=0 D HDR^LRMIPSU Q:LREND
29 I $D(^TMP("LR",$J,"T")) W !?5,"Test(s) ordered:" S J="" F I=0:0 S J=$O(^TMP("LR",$J,"T",J)) Q:J="" S X=^(J) W ?23,$P(X,U) S Y=$P(X,U,2) D:$L(Y) D^LRU W:$L(Y) ?43," completed: ",Y W !
30 K ^TMP("LR",$J,"T"),LRTSTS W:LRHC !
31 I $D(^LR(LRDFN,"MI",LRIDT,14)) D FH^LRMIPSU Q:LREND D ANTI^LRMIPSZ2
32 I $D(^LR(LRDFN,"MI",LRIDT,1)) D FH^LRMIPSU Q:LREND D BACT^LRMIPSZ2 Q:LREND D REFS^LRMIPSU Q:LREND
33 I $D(^LR(LRDFN,"MI",LRIDT,31)) D FH^LRMIPSU Q:LREND D STER^LRMIPSZ3
34 I $D(^LR(LRDFN,"MI",LRIDT,5)) D FH^LRMIPSU Q:LREND D PARA^LRMIPSZ3,REFS^LRMIPSU Q:LREND
35 I $D(^LR(LRDFN,"MI",LRIDT,16)) D FH^LRMIPSU Q:LREND D VIR^LRMIPSZ3,REFS^LRMIPSU Q:LREND
36 I $D(^LR(LRDFN,"MI",LRIDT,11)) D FH^LRMIPSU Q:LREND D TB^LRMIPSZ4,REFS^LRMIPSU Q:LREND
37 I $D(^LR(LRDFN,"MI",LRIDT,8)) D FH^LRMIPSU Q:LREND D FUNG^LRMIPSZ4,REFS^LRMIPSU Q:LREND
38 D FOOT^LRMIPSU,WAIT^LRMIPSU Q:LREND
39 Q
40EN1 S LRTS=+^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRBRR,0),LRTS(1)=$P(^(0),U,5)
41 Q:'$L($P($G(^LAB(60,LRTS,0)),U,3)) I '$D(LRLABKY),"BO"'[$P($G(^LAB(60,LRTS,0)),U,3) Q
42 S:LRTS=LRONETST LRPRINT=1 S LRTSTS=$S($D(^LAB(60,LRTS,0)):$P(^(0),U),1:"deleted test"),^TMP("LR",$J,"T",$S($D(^LAB(60,LRTS,.1)):$P(^(.1),U,6),1:"")_","_LRBRR)=LRTSTS_U_LRTS(1)
43 Q
Note: See TracBrowser for help on using the repository browser.