LRMISEZ ;DALOI/REG/SLC/BA - MICROBIOLOGY INFECTION CONTROL DATA ;11/18/11 16:08
;;5.2;LAB SERVICE;**350,445**;Sep 27, 1994;Build 6
;
;from option LRMISEZ
BEGIN ;
S U="^",LRLOS=0 S:'$D(DTIME) DTIME=999 K ^TMP($J)
S IOP="HOME" D ^%ZIS,SURVEY
W !
D ^%ZISC
;
END ;
K ^TMP($J)
K %,%DT,A1,B,DFN,DIC,DTOUT,DUOUT,I,J,K,LAST,LRAA,LRAAN,LRAC,LRAD,LRADMD,LRADMS,LRAP,LRAO,LRASK,LRBG,LRBN,LRBO,LRBUG,LRDAT,LRDCHD,LRDFN
K LRDOC,LRDPF,LRDRUG,LREND,LRESULT,LRIDT,LRLLOC,LRLOS,LRLST,LRM,LRMY,LRNAME,LRND,LRNLOC,LROK,LROR,LRPAT,LRPF,LRPG,LRPNM,LRPPT,LRPROMPT,LRQUANT,LRSGL,LRSIT,LRST,LRSTAR,LRSUM,LRTK
K LRYA,LRYRL,M,O,PNM,POP,R,S,SSN,X,Y,Z,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTSK,LRZ,LRLIN
Q
;
;
SURVEY ;
W @IOF,?19,"INFECTION CONTROL SURVEY DATA",!!
D LRAA^LRMIUT Q:LRAA<1
S LRAAN=$P(^LRO(68,LRAA,0),U,11)
;
F I=0:0 S %=1 W !!,"Use default reports" D YN^DICN Q:%'=0 D INFO
Q:%<0
S (LRM("L","S"),LRM("O","S"),LRM("D","S"),LRM("P","S"))="Unknown"
S LRSIT(1)=$S($D(^LAB(69.9,1,"MIS","B","C")):"C",1:"S")
F I="L","P","D","O" S LRM(I)=$S($D(^LAB(69.9,1,"MIS","B",I)):"A",1:"N")
I %=2 S LREND=0 D ^LRMISEZA Q:LREND
I LRM("L")="N",LRM("O")="N",LRM("D")="N",LRM("P")="N" W !,"No reports were selected!" Q
S %DT="AEQ",%DT("A")="Start Date: " D ^%DT K %DT Q:Y<0 S LRSTAR=Y D D^LRU S LRST=Y I $E(LRSTAR,6,7)="00" S LRSTAR=$S($E(LRSTAR,4,7)="0000":LRSTAR+10000,$E(LRSTAR,4,5)="12":LRSTAR+10100,1:LRSTAR+100)
S %DT="AEQ",%DT("A")="End Date: " D ^%DT K %DT Q:Y<0 S LAST=Y D D^LRU S LRLST=Y Q:Y<0 I LRSTAR>LAST S X=LRSTAR,LRSTAR=LAST,LAST=X,X=LRST,LRST=LRLST,LRLST=X
S Y=LRSTAR D D^LRU S LRST=Y,Y=LAST D D^LRU S LRLST=Y,LRAD=$E(LRSTAR,1,3)-1_"0000",LRYRL=$E(LAST,1,3)_"0000",LAST=LAST\1+.99
;
DEVICE ;
S %ZIS="MQ",%ZIS("B")=""
W ! D ^%ZIS K %ZIS Q:POP
;S %DT="AET",%DT("A")="TIME TO RUN: T+1@1AM//" D ^%DT S:Y>0 ZTDTH=Y I Y'>0 S %DT="T",X="T+1@1AM" D ^%DT S ZTDTH=Y
I '$D(IO("Q")) D DQ^LRMISEZ1 Q
S ZTRTN="DQ^LRMISEZ1",ZTSAVE("L*")="" D ^%ZTLOAD K IO("Q"),ZTSK,ZTRTN,ZTIO,ZTSAVE
Q
;
;
INFO ;
W !,"Default reports are setup in the Laboratory Site file, 69.9."
W !,"If you answer 'NO', you can select individual surveys grouped by:"
W !,"organism, location, patient, and/or physician. You can select all items"
W !,"or a single item for each group. You can also select to have all groups"
W !,"contain a survey of a single organism. Surveys can be reported by"
W !,"Site/Specimen or Collection sample."
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRMISEZ 2470 printed Nov 22, 2024@17:27:23 Page 2
LRMISEZ ;DALOI/REG/SLC/BA - MICROBIOLOGY INFECTION CONTROL DATA ;11/18/11 16:08
+1 ;;5.2;LAB SERVICE;**350,445**;Sep 27, 1994;Build 6
+2 ;
+3 ;from option LRMISEZ
BEGIN ;
+1 SET U="^"
SET LRLOS=0
if '$DATA(DTIME)
SET DTIME=999
KILL ^TMP($JOB)
+2 SET IOP="HOME"
DO ^%ZIS
DO SURVEY
+3 WRITE !
+4 DO ^%ZISC
+5 ;
END ;
+1 KILL ^TMP($JOB)
+2 KILL %,%DT,A1,B,DFN,DIC,DTOUT,DUOUT,I,J,K,LAST,LRAA,LRAAN,LRAC,LRAD,LRADMD,LRADMS,LRAP,LRAO,LRASK,LRBG,LRBN,LRBO,LRBUG,LRDAT,LRDCHD,LRDFN
+3 KILL LRDOC,LRDPF,LRDRUG,LREND,LRESULT,LRIDT,LRLLOC,LRLOS,LRLST,LRM,LRMY,LRNAME,LRND,LRNLOC,LROK,LROR,LRPAT,LRPF,LRPG,LRPNM,LRPPT,LRPROMPT,LRQUANT,LRSGL,LRSIT,LRST,LRSTAR,LRSUM,LRTK
+4 KILL LRYA,LRYRL,M,O,PNM,POP,R,S,SSN,X,Y,Z,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTSK,LRZ,LRLIN
+5 QUIT
+6 ;
+7 ;
SURVEY ;
+1 WRITE @IOF,?19,"INFECTION CONTROL SURVEY DATA",!!
+2 DO LRAA^LRMIUT
if LRAA<1
QUIT
+3 SET LRAAN=$PIECE(^LRO(68,LRAA,0),U,11)
+4 ;
+5 FOR I=0:0
SET %=1
WRITE !!,"Use default reports"
DO YN^DICN
if %'=0
QUIT
DO INFO
+6 if %<0
QUIT
+7 SET (LRM("L","S"),LRM("O","S"),LRM("D","S"),LRM("P","S"))="Unknown"
+8 SET LRSIT(1)=$SELECT($DATA(^LAB(69.9,1,"MIS","B","C")):"C",1:"S")
+9 FOR I="L","P","D","O"
SET LRM(I)=$SELECT($DATA(^LAB(69.9,1,"MIS","B",I)):"A",1:"N")
+10 IF %=2
SET LREND=0
DO ^LRMISEZA
if LREND
QUIT
+11 IF LRM("L")="N"
IF LRM("O")="N"
IF LRM("D")="N"
IF LRM("P")="N"
WRITE !,"No reports were selected!"
QUIT
+12 SET %DT="AEQ"
SET %DT("A")="Start Date: "
DO ^%DT
KILL %DT
if Y<0
QUIT
SET LRSTAR=Y
DO D^LRU
SET LRST=Y
IF $EXTRACT(LRSTAR,6,7)="00"
SET LRSTAR=$SELECT($EXTRACT(LRSTAR,4,7)="0000":LRSTAR+10000,$EXTRACT(LRSTAR,4,5)="12":LRSTAR+10100,1:LRSTAR+100)
+13 SET %DT="AEQ"
SET %DT("A")="End Date: "
DO ^%DT
KILL %DT
if Y<0
QUIT
SET LAST=Y
DO D^LRU
SET LRLST=Y
if Y<0
QUIT
IF LRSTAR>LAST
SET X=LRSTAR
SET LRSTAR=LAST
SET LAST=X
SET X=LRST
SET LRST=LRLST
SET LRLST=X
+14 SET Y=LRSTAR
DO D^LRU
SET LRST=Y
SET Y=LAST
DO D^LRU
SET LRLST=Y
SET LRAD=$EXTRACT(LRSTAR,1,3)-1_"0000"
SET LRYRL=$EXTRACT(LAST,1,3)_"0000"
SET LAST=LAST\1+.99
+15 ;
DEVICE ;
+1 SET %ZIS="MQ"
SET %ZIS("B")=""
+2 WRITE !
DO ^%ZIS
KILL %ZIS
if POP
QUIT
+3 ;S %DT="AET",%DT("A")="TIME TO RUN: T+1@1AM//" D ^%DT S:Y>0 ZTDTH=Y I Y'>0 S %DT="T",X="T+1@1AM" D ^%DT S ZTDTH=Y
+4 IF '$DATA(IO("Q"))
DO DQ^LRMISEZ1
QUIT
+5 SET ZTRTN="DQ^LRMISEZ1"
SET ZTSAVE("L*")=""
DO ^%ZTLOAD
KILL IO("Q"),ZTSK,ZTRTN,ZTIO,ZTSAVE
+6 QUIT
+7 ;
+8 ;
INFO ;
+1 WRITE !,"Default reports are setup in the Laboratory Site file, 69.9."
+2 WRITE !,"If you answer 'NO', you can select individual surveys grouped by:"
+3 WRITE !,"organism, location, patient, and/or physician. You can select all items"
+4 WRITE !,"or a single item for each group. You can also select to have all groups"
+5 WRITE !,"contain a survey of a single organism. Surveys can be reported by"
+6 WRITE !,"Site/Specimen or Collection sample."
+7 QUIT