source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LAMIAUT3.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1LAMIAUT3 ;DLG/SLC - MICRO DISPLAY ANTIBIOTICS FOR VERIFY ;7/20/90 09:32 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3BACT ;from LRMIV1
4 S LR2ORMOR=1,LREND=0 Q:+$O(^LR(LRDFN,"MI",LRIDT,3,0))<1
5 D BUGHDR ;W @IOF,!?5,PNM," SSN: ",SSN,!,LRACCN," ",$P(^LAB(62,LRSAMP,0),U)," ",$P(^LAB(61,LRSPEC,0),U),!
6 K LRRES,LRINT
7 S LRBUG=0 F A=1:1 S LRBUG=+$O(^LR(LRDFN,"MI",LRIDT,3,LRBUG)) Q:LRBUG<1 S:+$O(^(LRBUG,2))'["2." A=A-1 I +$O(^(2))["2." D CHECK
8 S LRABCNT=0 F LRBN=0:0 S LRBN=+$O(LRRES(LRBN)) Q:LRBN<1 S LRABCNT=LRABCNT+1
9 I 'LRABCNT W !!?10,"There are NO antibiotics in the patients file",!! Q
10 Q:LREND
11 S LRCOMTAB=$S(LRFMT="B":A*13+17,1:A*5+17)
12 S (LREND,LRACNT)=0 F LRAO=0:0 S LRAO=$O(^LAB(62.06,"AO",LRAO)) Q:LRAO<.001 S B=$O(^LAB(62.06,"AO",LRAO,0)) I B>0,$D(^LAB(62.06,B,0)) D AB I $Y>(IOSL-3) D WAIT Q:LREND
13 W ! K LR1PASS,LRRES,LRINT,LRBN
14 Q
15CHECK S LRFLAG=0 K LR1PASS F LRBN=2:0 S LRBN=+$O(^LR(LRDFN,"MI",LRIDT,3,LRBUG,LRBN)) Q:$E(LRBN,1,2)'="2." S B=^(LRBN),B1=$P(B,U),B2=$P(B,U,2),B3=$P(B,U,3) I $L(B1),$D(^LAB(62.06,"AI",LRBN,B1)) D FIRST
16 S LRBN=2 F I=0:0 S LRBN=+$O(LR1PASS(LRBN)) Q:LRBN<1 S B=LR1PASS(LRBN),B1=$P(B,U),B2=$P(B,U,2),B3=$P(B,U,3) D LAB
17 K LRBN,LR1PASS,LRFLAG,B,B1,B2,B3
18 Q
19FIRST S B2=$S(B2]"":B2,1:^(B1)) S:$E(B2)'="R"&("A"[B3) LRFLAG=1 S LR1PASS(LRBN)=B1_U_B2_U_B3,^LR(LRDFN,"MI",LRIDT,3,LRBUG,LRBN)=LR1PASS(LRBN)
20 Q
21LAB I $D(LRLABKY),'$D(LRWRDVEW) S $P(LRRES(LRBN),U,A)=$S(B3="N"!(B3="R"&LRFLAG):B1_"*",1:B1),$P(LRINT(LRBN),U,A)=$S(B3="N"!(B3="R"&LRFLAG):B2_"*",1:B2) Q
22 I B3=""!(B3="A")!(B3="R"&'LRFLAG) S $P(LRRES(LRBN),U,A)=B1,$P(LRINT(LRBN),U,A)=B2
23 Q
24AB S J=$P(^LAB(62.06,B,0),U,2) I $D(LRINT(J)),LRINT(J)'?."^" W !,$E($P(^(0),U),1,14) S LRDCOM=$P(^(0),U,3),LRACNT=LRACNT+1 D SIR
25 Q
26BUGHDR W @IOF W !?5,PNM," SSN: ",SSN,!,LRACCN," ",$P(^LAB(62,LRSAMP,0),U)," ",$P(^LAB(61,LRSPEC,0),U),!
27 S LRBUG=0 F A=0:1 S LRBUG=+$O(^LR(LRDFN,"MI",LRIDT,3,LRBUG)) Q:LRBUG<1 I $D(^(LRBUG,0)) I ^(0) S LRORG=$P(^(0),U),LRORGCOM=$P(^(0),U,2),LRORG=$P(^LAB(61.2,LRORG,0),U) S:+$O(^LR(LRDFN,"MI",LRIDT,3,LRBUG,2))'["2." A=A-1 I +$O(^(2))["2." D ORG
28 I LRFMT="B" W ! F J=1:1:A W ?J-1*13+15,":"
29 W ! F J=1:1:A W:LRFMT'="B" ?(J*5+10),":" I LRFMT="B" W ?J-1*13+15,"SUSC INTP"
30 Q
31ORG W ! I A>0 F J=1:1:A W ?($S(LRFMT="B":J-1*13+15,1:J*5+10)),":"
32 W ?($S(LRFMT="B":A*13+15,1:A*5+15)),$S(LR2ORMOR:LRBUG_". ",1:""),LRORG,$S($L(LRORGCOM):" ("_LRORGCOM_")",1:"")
33 Q
34SIR F II=1:1:10 D:$P(LRINT(J),U,II,10)="" DCOM Q:$P(LRINT(J),U,II,10)="" W:LRFMT'="B" ?(II*5+10),$S(LRFMT="I":$P(LRINT(J),U,II),1:$P(LRRES(J),U,II)) I LRFMT="B" D SIR1
35 Q
36DCOM W ?LRCOMTAB,LRDCOM I $D(LRDCOM(J)) S K=0 F A=0:0 S A=+$O(LRDCOM(J,A)) Q:A<1 W:'('K&(LRDCOM="")) ! W ?LRCOMTAB,LRDCOM(J,A) S K=1
37 Q
38SIR1 W ?(II-1*13+15),$S($D(LRRES(J)):$P(LRRES(J),U,II),1:""),?(II-1*13+21),$P(LRINT(J),U,II)," "
39 Q
40WAIT W !?10,"PRESS RETURN FOR MORE " R X:DTIME S:$E(X)="^" LREND=1 Q:LREND W @IOF D BUGHDR
Note: See TracBrowser for help on using the repository browser.