LAMIAUT1 ;SLC/FHS - CONTINUE MICRO AUTO INSTRUMENT PROGRAN VITEK ;7/23/90 11:06 ;
;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
EN ; From LAMIAUT0
Q:'$D(^LRO(68,LRAA,1,LRAD,1,LRAN,0)) W @IOF S Y(0)=^(0),LRDFN=+Y(0),LRDPF=$P(Y(0),U,2),LRLLOC=$P(Y(0),U,7),LRPHY=$P(Y(0),U,8),LRACCN=^(.2)
S LRODT=$P(Y(0),U,4),LRSN=$P(Y(0),U,5),(LRSPEC,LRSAMP)=0
S Y(3)=^(3),LRCDT=$P(Y(3),U),LRDTR=$P(Y(3),U,3),LRIDT=$P(Y(3),U,5),LREAL=$P(Y(3),U,2),LRI=$O(^(5,0)) I $D(^(LRI,0)) S LRSPEC=+^(0),LRSAMP=+$P(^(0),U,2)
S DFN=$P(^LR(LRDFN,0),U,3),LRPHYN=$S($D(^VA(200,+LRPHY,0)):$P(^(0),U),1:"Unknown")
PAT ;
D PT^LRX W !,"ACC # (",LRAN,") " W $$DTF^LRAFUNC1(LRCDT),!!?10,PNM," SSN: ",SSN," LOC: ",LRLLOC
W !?5,"Specimen: ",$S($D(^LAB(61,+LRSPEC,0)):$P(^(0),U),1:"Unknown")," Sample: ",$S($D(^LAB(62,+LRSAMP,0)):$P(^(0),U),1:"Unknown"),!
I $D(^LRO(69,LRODT,1,LRSN,6,+$O(^LRO(69,LRODT,1,LRSN,6,0)),0)) W !," Comment on Specimem " S I=0 F A=0:0 S I=$O(^LRO(69,LRODT,1,LRSN,6,I)) Q:I="" W ?30,^(I,0),!
I $D(^LR(LRDFN,"MI",LRIDT,2,+$O(^LR(LRDFN,"MI",LRIDT,2,0)),0)) W !,"GRAM STAIN " S I=0 F A=0:0 S I=$O(^LR(LRDFN,"MI",LRIDT,2,I)) Q:I="" W ?15,^(I,0),!
I $D(^LR(LRDFN,"MI",LRIDT,99)) W !,"Comment on Specimen : ",^(99)
RD S %=1,LREND=0 W !!?10,"Is this the correct patient/specimen " D YN^DICN I %'=1 Q
D EXP^LAMIAUT4 Q:LREND S LRCAPOK=1 G:'$D(^LR(LRDFN,"MI",0))!('$D(^LR(LRDFN,"MI",LRIDT,0))) BB
RD1 ;
G:'$P(^LR(LRDFN,"MI",LRIDT,0),U,3) RD2 W !,"Final report has been verified by microbiology supervisor.",$C(7),!,"If you proceed in editing, this report will need to be reverified."
F I=0:0 W !,?20,"OK" S %=1 D YN^DICN Q:% W !,"Enter 'Y' or 'N':"
I %=2!(%<0) S LRCAPOK=0 Q
RD2 I $P(^LR(LRDFN,"MI",LRIDT,0),U,3)!$P(^LR(LRDFN,"MI",LRIDT,0),U,9) S LRUNDO=1
BB I '$D(^LR(LRDFN,"MI",0)) S ^LR(LRDFN,"MI",0)="^63.05DA^"_LRIDT_U_0
S ^LR(LRDFN,"MI",0)=$P(^LR(LRDFN,"MI",0),U,1,2)_U_LRIDT_U_(1+$P(^(0),U,4))
S:'$D(^LR(LRDFN,"MI",LRIDT,3,0)) ^(0)="^63.3PA^^"
I '$D(^LR(LRDFN,"MI",LRIDT,0)) S ^(0)=LRCDT_U_LREAL_"^^^"_LRSPEC_U_LRACCN_U_LRPHY_U_LRLLOC_"^^"_LRDTR_U_LRSAMP
L +(^LR(LRDFN,"MI",LRIDT),^LRO(68,LRAA,1,LRAD,1,LRAN)):0 I '$T W !!?7,$C(7),"Another User is Editing this Patient",!! Q
K LRBDUP F I=0:0 S I=$O(^LR(LRDFN,"MI",LRIDT,3,I)) Q:I<1 I $D(^(I,0)) S BB=+^(0) I BB S:'$D(LRBDUP(BB))#2 LRBDUP(BB)=0 S LRBDUP(BB)=LRBDUP(BB)+1,LRBDUP(BB,I)="" K BB
S LRIFN=+$O(^LAH(LRLL,1,"C",LRAN,0)) G:'LRIFN CLEAR I '$D(^LAH(LRLL,1,LRIFN,3)) W !,$C(7),?10,"No Organism for this Accession" G CLEAR
F II=0:0 S II=+$O(^LAH(LRLL,1,LRIFN,3,II)) Q:II<1 D ORG^LAMIAUT2 Q:LREND
DR ;
D ^LAMIAUT2 Q:LREND I '+$O(^LR(LRDFN,"MI",LRIDT,3,0)) W !?10,"NO ORGANISM TO DISPLAY " Q
K DR,DIC,DIE,DA S DA(1)=LRDFN,DA=LRIDT,Y(0)=^LR(LRDFN,"MI",LRIDT,0),DIE="^LR("_LRDFN_",""MI"","
S DR="11.55////^S X=DUZ;.99;11.5;11.6;13" D ^DIE
S LREND=0 D ^LAMIAUT3 Q:LREND D ^LAMIAUT4
L -(^LR(LRDFN,"MI",LRIDT),^LRO(68,LRAA,1,LRAD,1,LRAN))
Q
CLEAR ;
S (LRUNDO,LACAPOK)=0 LOCK Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLAMIAUT1 2993 printed Nov 22, 2024@16:53:17 Page 2
LAMIAUT1 ;SLC/FHS - CONTINUE MICRO AUTO INSTRUMENT PROGRAN VITEK ;7/23/90 11:06 ;
+1 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
EN ; From LAMIAUT0
+1 if '$DATA(^LRO(68,LRAA,1,LRAD,1,LRAN,0))
QUIT
WRITE @IOF
SET Y(0)=^(0)
SET LRDFN=+Y(0)
SET LRDPF=$PIECE(Y(0),U,2)
SET LRLLOC=$PIECE(Y(0),U,7)
SET LRPHY=$PIECE(Y(0),U,8)
SET LRACCN=^(.2)
+2 SET LRODT=$PIECE(Y(0),U,4)
SET LRSN=$PIECE(Y(0),U,5)
SET (LRSPEC,LRSAMP)=0
+3 SET Y(3)=^(3)
SET LRCDT=$PIECE(Y(3),U)
SET LRDTR=$PIECE(Y(3),U,3)
SET LRIDT=$PIECE(Y(3),U,5)
SET LREAL=$PIECE(Y(3),U,2)
SET LRI=$ORDER(^(5,0))
IF $DATA(^(LRI,0))
SET LRSPEC=+^(0)
SET LRSAMP=+$PIECE(^(0),U,2)
+4 SET DFN=$PIECE(^LR(LRDFN,0),U,3)
SET LRPHYN=$SELECT($DATA(^VA(200,+LRPHY,0)):$PIECE(^(0),U),1:"Unknown")
PAT ;
+1 DO PT^LRX
WRITE !,"ACC # (",LRAN,") "
WRITE $$DTF^LRAFUNC1(LRCDT),!!?10,PNM," SSN: ",SSN," LOC: ",LRLLOC
+2 WRITE !?5,"Specimen: ",$SELECT($DATA(^LAB(61,+LRSPEC,0)):$PIECE(^(0),U),1:"Unknown")," Sample: ",$SELECT($DATA(^LAB(62,+LRSAMP,0)):$PIECE(^(0),U),1:"Unknown"),!
+3 IF $DATA(^LRO(69,LRODT,1,LRSN,6,+$ORDER(^LRO(69,LRODT,1,LRSN,6,0)),0))
WRITE !," Comment on Specimem "
SET I=0
FOR A=0:0
SET I=$ORDER(^LRO(69,LRODT,1,LRSN,6,I))
if I=""
QUIT
WRITE ?30,^(I,0),!
+4 IF $DATA(^LR(LRDFN,"MI",LRIDT,2,+$ORDER(^LR(LRDFN,"MI",LRIDT,2,0)),0))
WRITE !,"GRAM STAIN "
SET I=0
FOR A=0:0
SET I=$ORDER(^LR(LRDFN,"MI",LRIDT,2,I))
if I=""
QUIT
WRITE ?15,^(I,0),!
+5 IF $DATA(^LR(LRDFN,"MI",LRIDT,99))
WRITE !,"Comment on Specimen : ",^(99)
RD SET %=1
SET LREND=0
WRITE !!?10,"Is this the correct patient/specimen "
DO YN^DICN
IF %'=1
QUIT
+1 DO EXP^LAMIAUT4
if LREND
QUIT
SET LRCAPOK=1
if '$DATA(^LR(LRDFN,"MI",0))!('$DATA(^LR(LRDFN,"MI",LRIDT,0)))
GOTO BB
RD1 ;
+1 if '$PIECE(^LR(LRDFN,"MI",LRIDT,0),U,3)
GOTO RD2
WRITE !,"Final report has been verified by microbiology supervisor.",$CHAR(7),!,"If you proceed in editing, this report will need to be reverified."
+2 FOR I=0:0
WRITE !,?20,"OK"
SET %=1
DO YN^DICN
if %
QUIT
WRITE !,"Enter 'Y' or 'N':"
+3 IF %=2!(%<0)
SET LRCAPOK=0
QUIT
RD2 IF $PIECE(^LR(LRDFN,"MI",LRIDT,0),U,3)!$PIECE(^LR(LRDFN,"MI",LRIDT,0),U,9)
SET LRUNDO=1
BB IF '$DATA(^LR(LRDFN,"MI",0))
SET ^LR(LRDFN,"MI",0)="^63.05DA^"_LRIDT_U_0
+1 SET ^LR(LRDFN,"MI",0)=$PIECE(^LR(LRDFN,"MI",0),U,1,2)_U_LRIDT_U_(1+$PIECE(^(0),U,4))
+2 if '$DATA(^LR(LRDFN,"MI",LRIDT,3,0))
SET ^(0)="^63.3PA^^"
+3 IF '$DATA(^LR(LRDFN,"MI",LRIDT,0))
SET ^(0)=LRCDT_U_LREAL_"^^^"_LRSPEC_U_LRACCN_U_LRPHY_U_LRLLOC_"^^"_LRDTR_U_LRSAMP
+4 LOCK +(^LR(LRDFN,"MI",LRIDT),^LRO(68,LRAA,1,LRAD,1,LRAN)):0
IF '$TEST
WRITE !!?7,$CHAR(7),"Another User is Editing this Patient",!!
QUIT
+5 KILL LRBDUP
FOR I=0:0
SET I=$ORDER(^LR(LRDFN,"MI",LRIDT,3,I))
if I<1
QUIT
IF $DATA(^(I,0))
SET BB=+^(0)
IF BB
if '$DATA(LRBDUP(BB))#2
SET LRBDUP(BB)=0
SET LRBDUP(BB)=LRBDUP(BB)+1
SET LRBDUP(BB,I)=""
KILL BB
+6 SET LRIFN=+$ORDER(^LAH(LRLL,1,"C",LRAN,0))
if 'LRIFN
GOTO CLEAR
IF '$DATA(^LAH(LRLL,1,LRIFN,3))
WRITE !,$CHAR(7),?10,"No Organism for this Accession"
GOTO CLEAR
+7 FOR II=0:0
SET II=+$ORDER(^LAH(LRLL,1,LRIFN,3,II))
if II<1
QUIT
DO ORG^LAMIAUT2
if LREND
QUIT
DR ;
+1 DO ^LAMIAUT2
if LREND
QUIT
IF '+$ORDER(^LR(LRDFN,"MI",LRIDT,3,0))
WRITE !?10,"NO ORGANISM TO DISPLAY "
QUIT
+2 KILL DR,DIC,DIE,DA
SET DA(1)=LRDFN
SET DA=LRIDT
SET Y(0)=^LR(LRDFN,"MI",LRIDT,0)
SET DIE="^LR("_LRDFN_",""MI"","
+3 SET DR="11.55////^S X=DUZ;.99;11.5;11.6;13"
DO ^DIE
+4 SET LREND=0
DO ^LAMIAUT3
if LREND
QUIT
DO ^LAMIAUT4
+5 LOCK -(^LR(LRDFN,"MI",LRIDT),^LRO(68,LRAA,1,LRAD,1,LRAN))
+6 QUIT
CLEAR ;
+1 SET (LRUNDO,LACAPOK)=0
LOCK
QUIT