MMRSIPC4 ;MIA/LMT - Print MRSA Report Cont. (Contains functions to print report) ;10-20-06
;;1.0;MRSA PROGRAM TOOLS;**1**;Mar 22, 2009;Build 3
;
PRINT ;Prints report data
N PG,MMRSNOW,NUMLOCS,LOCNAME,LN,PREVLOC,INDATE,DFN,OUTDATE,DATA
S PG=1
S MMRSNOW=$$NOW^XLFDT()
S NUMLOCS=0
S LOCNAME="" F S LOCNAME=$O(^TMP($J,"MMRSIPC","D",LOCNAME)) Q:LOCNAME="" S NUMLOCS=NUMLOCS+1
I PRTSUM D Q
.S LOCNAME="" F S LOCNAME=$O(^TMP($J,"MMRSIPC","D",LOCNAME)) Q:LOCNAME="" D
..D:BYADM PRTSUMA(LOCNAME) D:'BYADM PRTSUMD(LOCNAME)
.I NUMLOCS>1 D:BYADM PRTSUMA() D:'BYADM PRTSUMD()
I BYADM S $P(LN,"-",120)=""
I 'BYADM S $P(LN,"-",171)=""
S PREVLOC=""
S LOCNAME="" F S LOCNAME=$O(^TMP($J,"MMRSIPC","D",LOCNAME)) Q:LOCNAME="" D
.I PREVLOC'="" D:BYADM PRTSUMA(PREVLOC) D:'BYADM PRTSUMD(PREVLOC)
.S PREVLOC=LOCNAME
.I BYADM D PRTHDRA
.I 'BYADM D PRTHDRD
.S INDATE="" F S INDATE=$O(^TMP($J,"MMRSIPC","D",LOCNAME,INDATE)) Q:INDATE="" D
..S DFN="" F S DFN=$O(^TMP($J,"MMRSIPC","D",LOCNAME,INDATE,DFN)) Q:DFN="" D
...S OUTDATE="" F S OUTDATE=$O(^TMP($J,"MMRSIPC","D",LOCNAME,INDATE,DFN,OUTDATE)) Q:OUTDATE="" D
....S DATA=$G(^TMP($J,"MMRSIPC","D",LOCNAME,INDATE,DFN,OUTDATE))
....I BYADM D PRINTADM(DATA)
....I 'BYADM D PRINTDIS(DATA)
I BYADM D PRTSUMA(PREVLOC) I NUMLOCS>1 D PRTSUMA()
I 'BYADM D PRTSUMD(PREVLOC) I NUMLOCS>1 D PRTSUMD()
Q
PRINTADM(DATA) ; Print cont.
N PATIENT,LAST4,INDATEE,INTT,ADT,MOVTYPE,NARES24,NARES48,CULT48,MRSA365,VADM,VAIP,WARD,IND
D KVA^VADPT
D DEM^VADPT
S PATIENT=VADM(1)
S LAST4=$E($P(VADM(2),U),6,9)
D KVA^VADPT
S INDATEE=$$FMTE^XLFDT(INDATE,"2M")
S INTT=$P(DATA,U,5)
S ADT=$S(INTT=1:"A",INTT=2:"T",1:"")
D KVA^VADPT S VAIP("E")=$P(DATA,U,4) D IN5^VADPT
S MOVTYPE=$E($P(VAIP(4),U,2),1,13)
S WARD=$E($P(VAIP(5),U,2),1,13)
D KVA^VADPT
S NARES24=$P(DATA,U,9)
S NARES48=$P($P(DATA,U,10),";")
S CULT48=$P($P(DATA,U,11),";")
S MRSA365=$P($P(DATA,U,12),";")
;MIA/LMT - Add a '*' if patient was indicated for a swab ;3/16/10
S IND=$P(DATA,U,13)
;W !,WARD,?15,$E(PATIENT,1,20),?38,LAST4,?45,INDATEE,?61,ADT,?66,MOVTYPE,?81,NARES24,?90,NARES48,?99,CULT48,?108,MRSA365
W !,WARD,?15,$S(IND=1:"*",1:" ")_$E(PATIENT,1,20),?38,LAST4,?45,INDATEE,?61,ADT,?66,MOVTYPE,?81,NARES24,?90,NARES48,?99,CULT48,?108,MRSA365
I $Y+1>IOSL D PRTHDRA
Q
PRINTDIS(DATA) ; Print cont.
N PATIENT,LAST4,INDATEE,INTT,ADTA,MOVTYPEA,NARES24A,NARES48A,MRSA365,OUTIFN,OUTDATEE
N OUTTT,ADTD,MOVTYPED,NARES24D,NARES48D,MRSACPRD,TRANS,VADM,VAIP,WARD,IND
D KVA^VADPT
D DEM^VADPT
S PATIENT=VADM(1)
S LAST4=$E($P(VADM(2),U),6,9)
D KVA^VADPT
S INDATEE=$$FMTE^XLFDT(INDATE,"2M")
S INTT=$P(DATA,U,5)
S ADTA=$S(INTT=1:"A",INTT=2:"T",1:"")
D KVA^VADPT S VAIP("E")=$P(DATA,U,4) D IN5^VADPT
S MOVTYPEA=$E($P(VAIP(4),U,2),1,13)
S WARD=$E($P(VAIP(5),U,2),1,6)
D KVA^VADPT
S NARES24A=$P(DATA,U,9)
S NARES48A=$P($P(DATA,U,10),";")
S MRSA365=$P($P(DATA,U,11),";")
S (OUTDATEE,OUTTT,ADTD,MOVTYPED,NARES24D,NARES48D)=""
S OUTIFN=$P(DATA,U,7)
I OUTIFN D
.S OUTDATEE=$$FMTE^XLFDT(OUTDATE,"2M")
.S OUTTT=$P(DATA,U,8)
.S ADTD=$S(OUTTT=2:"T",OUTTT=3:"D",1:"")
.D KVA^VADPT S VAIP("E")=OUTIFN D IN5^VADPT S MOVTYPED=$E($P(VAIP(4),U,2),1,13) D KVA^VADPT
.S NARES24D=$P(DATA,U,12)
.S NARES48D=$P($P(DATA,U,13),";")
S MRSACPRD=$P($P(DATA,U,14),";")
S TRANS=$P(DATA,U,15)
;MIA/LMT - Add a '*' if patient was indicated for a swab ;3/16/10
S IND=$P(DATA,U,16)
W !,WARD,?8,$S(IND=1:"*",1:" ")_$E(PATIENT,1,20),?31,LAST4,?38,INDATEE,?54,ADTA,?59,MOVTYPEA,?74,NARES24A,?83,NARES48A,?92,MRSA365
W ?101,OUTDATEE,?117,ADTD,?122,MOVTYPED,?137,NARES24D,?146,NARES48D,?155,MRSACPRD,?165,TRANS
I $Y+1>IOSL D PRTHDRD
Q
PRTHDRA ;
W @IOF
W ?13,"MRSA IPEC ADMISSION REPORT"
W !,?13,"Geographical Location: ",LOCNAME
W !,?13,"Report period: ",$$FMTE^XLFDT(STRTDT)," to ",$$FMTE^XLFDT(ENDDT)
W !,?13,"Report printed on: ",$$FMTE^XLFDT(MMRSNOW),?70,"PAGE: ",PG
W !!,?81,"NARES",?90,"NARES",?99,"CULTURE"
W !,"VISTA",?45,"DATE",?66,"MAS MOVE",?81,"SCREEN",?90,"RESULT",?99,"RESULT",?108,"MRSA IN"
W !,"WARD",?15,"PATIENT",?38,"SSN",?45,"ENTERED WARD",?61,"ADT",?66,"TYPE",?81,"24H",?90,"48H",?99,"48H",?108,"PAST YEAR"
W !,LN
S PG=PG+1
Q
PRTHDRD ;
W @IOF
W ?13,"MRSA IPEC DISCHARGE/TRANSMISSION REPORT"
W !,?13,"Geographical Location: ",LOCNAME
W !,?13,"Report period: ",$$FMTE^XLFDT(STRTDT)," to ",$$FMTE^XLFDT(ENDDT)
W !,?13,"Report printed on: ",$$FMTE^XLFDT(MMRSNOW),?70,"PAGE: ",PG
W !!,?59,"ADM",?74,"NARES",?83,"NARES",?122,"DIS",?137,"NARES",?146,"NARES",?155,"MRSA"
W !,"VISTA",?38,"DATE",?54,"ADM",?59,"MAS MOVE",?74,"SCREEN",?83,"RESULT",?92,"MRSA IN"
W ?101,"DATE",?117,"DIS",?122,"MAS MOVE",?137,"SCREEN",?146,"RESULT",?155,"IN CURR"
W !,"WARD",?8,"PATIENT",?31,"SSN",?38,"ENTERED WARD",?54,"ADT",?59,"TYPE",?74,"24H",?83,"48H",?92,"PAST YR"
W ?101,"LEFT WARD",?117,"ADT",?122,"TYPE",?137,"24H",?146,"48H",?155,"PRD",?165,"TRANS"
W !,LN
S PG=PG+1
Q
PRTSUMA(LOC) ;
N II,L,DATA
W @IOF
W ?13,"MRSA IPEC ADMISSION SUMMARY REPORT"
I $G(LOC)'="" W !,?13,"Geographical Location: ",LOC
I $G(LOC)="" W !,?13,"Geographical Locations: " D
.S II=1 S L="" F S L=$O(^TMP($J,"MMRSIPC","DSUM",L)) Q:L="" W:II>1&($X>37) ", " W L S II=II+1 I $X>110 W !,?37
W !,?13,"Report period: ",$$FMTE^XLFDT(STRTDT)," to ",$$FMTE^XLFDT(ENDDT)
W !,?13,"Report printed on: ",$$FMTE^XLFDT(MMRSNOW),?70,"PAGE: ",PG
I $G(LOC)'="" S DATA=$G(^TMP($J,"MMRSIPC","DSUM",LOC))
I $G(LOC)="" S DATA=$G(^TMP($J,"MMRSIPC","DSUM"))
W !!,"Prevalence Measures (Facility Wide)"
W !,?3,"1. Number of admissions to the facility: ",$P(DATA,U,1)
W !,?3,"2. Number of (1) who received MRSA nasal screening upon admission to facility: ",$P(DATA,U,2)
W !,?3,"3. Number of (1) positive for MRSA based on nasal screening upon admission to facility: ",$P(DATA,U,3)
W !,?3,"4. Number of those in (1) positive for MRSA based on clinical cultures upon admission to facility: ",$P(DATA,U,4)
W !!,"Prevalence Measures (Unit Specific)"
W !,?3,"1. Number of admissions (admissions + transfers in) to the unit for the month: ",$P(DATA,U,5)
W !,?3,"2. Number of (1) for whom nasal screening was indicated: ",$P(DATA,U,6)
W !,?3,"3. Number of (2) who received MRSA nasal screening upon admission to unit (within 24 hours): ",$P(DATA,U,7)
W !,?3,"4. Number of (1) positive for MRSA based on nasal screening upon admission to unit: ",$P(DATA,U,8)
W !,?3,"5. Number of (1) positive for MRSA based on clinical cultures upon admission to unit: ",$P(DATA,U,9)
S PG=PG+1
Q
PRTSUMD(LOC) ;
N II,L,DATA
W @IOF
W ?13,"MRSA IPEC DISCHARGE/TRANSMISSION SUMMARY REPORT"
I $G(LOC)'="" W !,?13,"Geographical Location: ",LOC
I $G(LOC)="" W !,?13,"Geographical Locations: " D
.S II=1 S L="" F S L=$O(^TMP($J,"MMRSIPC","DSUM",L)) Q:L="" W:II>1&($X>37) ", " W L S II=II+1 I $X>110 W !,?37
W !,?13,"Report period: ",$$FMTE^XLFDT(STRTDT)," to ",$$FMTE^XLFDT(ENDDT)
W !,?13,"Report printed on: ",$$FMTE^XLFDT(MMRSNOW),?70,"PAGE: ",PG
I $G(LOC)'="" S DATA=$G(^TMP($J,"MMRSIPC","DSUM",LOC))
I $G(LOC)="" S DATA=$G(^TMP($J,"MMRSIPC","DSUM"))
W !!,"Transmission Measures (Unit Specific)"
W !,?3,"10. Number of bed days of care for the unit: ",$P(DATA,U,1)
W !,?3,"11. Number of exits (discharges + deaths + transfers out) from the unit: ",$P(DATA,U,2)
W !,?3,"12. Number of (11) from whom a discharge/transfer swab was indicated: ",$P(DATA,U,3)
W !,?3,"13. Number of (12) who received MRSA nasal screening upon exit from unit: ",$P(DATA,U,4)
W !,?3,"14. Number of MRSA transmissions on unit based on MRSA nasal screenings or clinical cultures: ",$P(DATA,U,5)
S PG=PG+1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMMRSIPC4 7728 printed Oct 16, 2024@18:16 Page 2
MMRSIPC4 ;MIA/LMT - Print MRSA Report Cont. (Contains functions to print report) ;10-20-06
+1 ;;1.0;MRSA PROGRAM TOOLS;**1**;Mar 22, 2009;Build 3
+2 ;
PRINT ;Prints report data
+1 NEW PG,MMRSNOW,NUMLOCS,LOCNAME,LN,PREVLOC,INDATE,DFN,OUTDATE,DATA
+2 SET PG=1
+3 SET MMRSNOW=$$NOW^XLFDT()
+4 SET NUMLOCS=0
+5 SET LOCNAME=""
FOR
SET LOCNAME=$ORDER(^TMP($JOB,"MMRSIPC","D",LOCNAME))
if LOCNAME=""
QUIT
SET NUMLOCS=NUMLOCS+1
+6 IF PRTSUM
Begin DoDot:1
+7 SET LOCNAME=""
FOR
SET LOCNAME=$ORDER(^TMP($JOB,"MMRSIPC","D",LOCNAME))
if LOCNAME=""
QUIT
Begin DoDot:2
+8 if BYADM
DO PRTSUMA(LOCNAME)
if 'BYADM
DO PRTSUMD(LOCNAME)
End DoDot:2
+9 IF NUMLOCS>1
if BYADM
DO PRTSUMA()
if 'BYADM
DO PRTSUMD()
End DoDot:1
QUIT
+10 IF BYADM
SET $PIECE(LN,"-",120)=""
+11 IF 'BYADM
SET $PIECE(LN,"-",171)=""
+12 SET PREVLOC=""
+13 SET LOCNAME=""
FOR
SET LOCNAME=$ORDER(^TMP($JOB,"MMRSIPC","D",LOCNAME))
if LOCNAME=""
QUIT
Begin DoDot:1
+14 IF PREVLOC'=""
if BYADM
DO PRTSUMA(PREVLOC)
if 'BYADM
DO PRTSUMD(PREVLOC)
+15 SET PREVLOC=LOCNAME
+16 IF BYADM
DO PRTHDRA
+17 IF 'BYADM
DO PRTHDRD
+18 SET INDATE=""
FOR
SET INDATE=$ORDER(^TMP($JOB,"MMRSIPC","D",LOCNAME,INDATE))
if INDATE=""
QUIT
Begin DoDot:2
+19 SET DFN=""
FOR
SET DFN=$ORDER(^TMP($JOB,"MMRSIPC","D",LOCNAME,INDATE,DFN))
if DFN=""
QUIT
Begin DoDot:3
+20 SET OUTDATE=""
FOR
SET OUTDATE=$ORDER(^TMP($JOB,"MMRSIPC","D",LOCNAME,INDATE,DFN,OUTDATE))
if OUTDATE=""
QUIT
Begin DoDot:4
+21 SET DATA=$GET(^TMP($JOB,"MMRSIPC","D",LOCNAME,INDATE,DFN,OUTDATE))
+22 IF BYADM
DO PRINTADM(DATA)
+23 IF 'BYADM
DO PRINTDIS(DATA)
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+24 IF BYADM
DO PRTSUMA(PREVLOC)
IF NUMLOCS>1
DO PRTSUMA()
+25 IF 'BYADM
DO PRTSUMD(PREVLOC)
IF NUMLOCS>1
DO PRTSUMD()
+26 QUIT
PRINTADM(DATA) ; Print cont.
+1 NEW PATIENT,LAST4,INDATEE,INTT,ADT,MOVTYPE,NARES24,NARES48,CULT48,MRSA365,VADM,VAIP,WARD,IND
+2 DO KVA^VADPT
+3 DO DEM^VADPT
+4 SET PATIENT=VADM(1)
+5 SET LAST4=$EXTRACT($PIECE(VADM(2),U),6,9)
+6 DO KVA^VADPT
+7 SET INDATEE=$$FMTE^XLFDT(INDATE,"2M")
+8 SET INTT=$PIECE(DATA,U,5)
+9 SET ADT=$SELECT(INTT=1:"A",INTT=2:"T",1:"")
+10 DO KVA^VADPT
SET VAIP("E")=$PIECE(DATA,U,4)
DO IN5^VADPT
+11 SET MOVTYPE=$EXTRACT($PIECE(VAIP(4),U,2),1,13)
+12 SET WARD=$EXTRACT($PIECE(VAIP(5),U,2),1,13)
+13 DO KVA^VADPT
+14 SET NARES24=$PIECE(DATA,U,9)
+15 SET NARES48=$PIECE($PIECE(DATA,U,10),";")
+16 SET CULT48=$PIECE($PIECE(DATA,U,11),";")
+17 SET MRSA365=$PIECE($PIECE(DATA,U,12),";")
+18 ;MIA/LMT - Add a '*' if patient was indicated for a swab ;3/16/10
+19 SET IND=$PIECE(DATA,U,13)
+20 ;W !,WARD,?15,$E(PATIENT,1,20),?38,LAST4,?45,INDATEE,?61,ADT,?66,MOVTYPE,?81,NARES24,?90,NARES48,?99,CULT48,?108,MRSA365
+21 WRITE !,WARD,?15,$SELECT(IND=1:"*",1:" ")_$EXTRACT(PATIENT,1,20),?38,LAST4,?45,INDATEE,?61,ADT,?66,MOVTYPE,?81,NARES24,?90,NARES48,?99,CULT48,?108,MRSA365
+22 IF $Y+1>IOSL
DO PRTHDRA
+23 QUIT
PRINTDIS(DATA) ; Print cont.
+1 NEW PATIENT,LAST4,INDATEE,INTT,ADTA,MOVTYPEA,NARES24A,NARES48A,MRSA365,OUTIFN,OUTDATEE
+2 NEW OUTTT,ADTD,MOVTYPED,NARES24D,NARES48D,MRSACPRD,TRANS,VADM,VAIP,WARD,IND
+3 DO KVA^VADPT
+4 DO DEM^VADPT
+5 SET PATIENT=VADM(1)
+6 SET LAST4=$EXTRACT($PIECE(VADM(2),U),6,9)
+7 DO KVA^VADPT
+8 SET INDATEE=$$FMTE^XLFDT(INDATE,"2M")
+9 SET INTT=$PIECE(DATA,U,5)
+10 SET ADTA=$SELECT(INTT=1:"A",INTT=2:"T",1:"")
+11 DO KVA^VADPT
SET VAIP("E")=$PIECE(DATA,U,4)
DO IN5^VADPT
+12 SET MOVTYPEA=$EXTRACT($PIECE(VAIP(4),U,2),1,13)
+13 SET WARD=$EXTRACT($PIECE(VAIP(5),U,2),1,6)
+14 DO KVA^VADPT
+15 SET NARES24A=$PIECE(DATA,U,9)
+16 SET NARES48A=$PIECE($PIECE(DATA,U,10),";")
+17 SET MRSA365=$PIECE($PIECE(DATA,U,11),";")
+18 SET (OUTDATEE,OUTTT,ADTD,MOVTYPED,NARES24D,NARES48D)=""
+19 SET OUTIFN=$PIECE(DATA,U,7)
+20 IF OUTIFN
Begin DoDot:1
+21 SET OUTDATEE=$$FMTE^XLFDT(OUTDATE,"2M")
+22 SET OUTTT=$PIECE(DATA,U,8)
+23 SET ADTD=$SELECT(OUTTT=2:"T",OUTTT=3:"D",1:"")
+24 DO KVA^VADPT
SET VAIP("E")=OUTIFN
DO IN5^VADPT
SET MOVTYPED=$EXTRACT($PIECE(VAIP(4),U,2),1,13)
DO KVA^VADPT
+25 SET NARES24D=$PIECE(DATA,U,12)
+26 SET NARES48D=$PIECE($PIECE(DATA,U,13),";")
End DoDot:1
+27 SET MRSACPRD=$PIECE($PIECE(DATA,U,14),";")
+28 SET TRANS=$PIECE(DATA,U,15)
+29 ;MIA/LMT - Add a '*' if patient was indicated for a swab ;3/16/10
+30 SET IND=$PIECE(DATA,U,16)
+31 WRITE !,WARD,?8,$SELECT(IND=1:"*",1:" ")_$EXTRACT(PATIENT,1,20),?31,LAST4,?38,INDATEE,?54,ADTA,?59,MOVTYPEA,?74,NARES24A,?83,NARES48A,?92,MRSA365
+32 WRITE ?101,OUTDATEE,?117,ADTD,?122,MOVTYPED,?137,NARES24D,?146,NARES48D,?155,MRSACPRD,?165,TRANS
+33 IF $Y+1>IOSL
DO PRTHDRD
+34 QUIT
PRTHDRA ;
+1 WRITE @IOF
+2 WRITE ?13,"MRSA IPEC ADMISSION REPORT"
+3 WRITE !,?13,"Geographical Location: ",LOCNAME
+4 WRITE !,?13,"Report period: ",$$FMTE^XLFDT(STRTDT)," to ",$$FMTE^XLFDT(ENDDT)
+5 WRITE !,?13,"Report printed on: ",$$FMTE^XLFDT(MMRSNOW),?70,"PAGE: ",PG
+6 WRITE !!,?81,"NARES",?90,"NARES",?99,"CULTURE"
+7 WRITE !,"VISTA",?45,"DATE",?66,"MAS MOVE",?81,"SCREEN",?90,"RESULT",?99,"RESULT",?108,"MRSA IN"
+8 WRITE !,"WARD",?15,"PATIENT",?38,"SSN",?45,"ENTERED WARD",?61,"ADT",?66,"TYPE",?81,"24H",?90,"48H",?99,"48H",?108,"PAST YEAR"
+9 WRITE !,LN
+10 SET PG=PG+1
+11 QUIT
PRTHDRD ;
+1 WRITE @IOF
+2 WRITE ?13,"MRSA IPEC DISCHARGE/TRANSMISSION REPORT"
+3 WRITE !,?13,"Geographical Location: ",LOCNAME
+4 WRITE !,?13,"Report period: ",$$FMTE^XLFDT(STRTDT)," to ",$$FMTE^XLFDT(ENDDT)
+5 WRITE !,?13,"Report printed on: ",$$FMTE^XLFDT(MMRSNOW),?70,"PAGE: ",PG
+6 WRITE !!,?59,"ADM",?74,"NARES",?83,"NARES",?122,"DIS",?137,"NARES",?146,"NARES",?155,"MRSA"
+7 WRITE !,"VISTA",?38,"DATE",?54,"ADM",?59,"MAS MOVE",?74,"SCREEN",?83,"RESULT",?92,"MRSA IN"
+8 WRITE ?101,"DATE",?117,"DIS",?122,"MAS MOVE",?137,"SCREEN",?146,"RESULT",?155,"IN CURR"
+9 WRITE !,"WARD",?8,"PATIENT",?31,"SSN",?38,"ENTERED WARD",?54,"ADT",?59,"TYPE",?74,"24H",?83,"48H",?92,"PAST YR"
+10 WRITE ?101,"LEFT WARD",?117,"ADT",?122,"TYPE",?137,"24H",?146,"48H",?155,"PRD",?165,"TRANS"
+11 WRITE !,LN
+12 SET PG=PG+1
+13 QUIT
PRTSUMA(LOC) ;
+1 NEW II,L,DATA
+2 WRITE @IOF
+3 WRITE ?13,"MRSA IPEC ADMISSION SUMMARY REPORT"
+4 IF $GET(LOC)'=""
WRITE !,?13,"Geographical Location: ",LOC
+5 IF $GET(LOC)=""
WRITE !,?13,"Geographical Locations: "
Begin DoDot:1
+6 SET II=1
SET L=""
FOR
SET L=$ORDER(^TMP($JOB,"MMRSIPC","DSUM",L))
if L=""
QUIT
if II>1&($X>37)
WRITE ", "
WRITE L
SET II=II+1
IF $X>110
WRITE !,?37
End DoDot:1
+7 WRITE !,?13,"Report period: ",$$FMTE^XLFDT(STRTDT)," to ",$$FMTE^XLFDT(ENDDT)
+8 WRITE !,?13,"Report printed on: ",$$FMTE^XLFDT(MMRSNOW),?70,"PAGE: ",PG
+9 IF $GET(LOC)'=""
SET DATA=$GET(^TMP($JOB,"MMRSIPC","DSUM",LOC))
+10 IF $GET(LOC)=""
SET DATA=$GET(^TMP($JOB,"MMRSIPC","DSUM"))
+11 WRITE !!,"Prevalence Measures (Facility Wide)"
+12 WRITE !,?3,"1. Number of admissions to the facility: ",$PIECE(DATA,U,1)
+13 WRITE !,?3,"2. Number of (1) who received MRSA nasal screening upon admission to facility: ",$PIECE(DATA,U,2)
+14 WRITE !,?3,"3. Number of (1) positive for MRSA based on nasal screening upon admission to facility: ",$PIECE(DATA,U,3)
+15 WRITE !,?3,"4. Number of those in (1) positive for MRSA based on clinical cultures upon admission to facility: ",$PIECE(DATA,U,4)
+16 WRITE !!,"Prevalence Measures (Unit Specific)"
+17 WRITE !,?3,"1. Number of admissions (admissions + transfers in) to the unit for the month: ",$PIECE(DATA,U,5)
+18 WRITE !,?3,"2. Number of (1) for whom nasal screening was indicated: ",$PIECE(DATA,U,6)
+19 WRITE !,?3,"3. Number of (2) who received MRSA nasal screening upon admission to unit (within 24 hours): ",$PIECE(DATA,U,7)
+20 WRITE !,?3,"4. Number of (1) positive for MRSA based on nasal screening upon admission to unit: ",$PIECE(DATA,U,8)
+21 WRITE !,?3,"5. Number of (1) positive for MRSA based on clinical cultures upon admission to unit: ",$PIECE(DATA,U,9)
+22 SET PG=PG+1
+23 QUIT
PRTSUMD(LOC) ;
+1 NEW II,L,DATA
+2 WRITE @IOF
+3 WRITE ?13,"MRSA IPEC DISCHARGE/TRANSMISSION SUMMARY REPORT"
+4 IF $GET(LOC)'=""
WRITE !,?13,"Geographical Location: ",LOC
+5 IF $GET(LOC)=""
WRITE !,?13,"Geographical Locations: "
Begin DoDot:1
+6 SET II=1
SET L=""
FOR
SET L=$ORDER(^TMP($JOB,"MMRSIPC","DSUM",L))
if L=""
QUIT
if II>1&($X>37)
WRITE ", "
WRITE L
SET II=II+1
IF $X>110
WRITE !,?37
End DoDot:1
+7 WRITE !,?13,"Report period: ",$$FMTE^XLFDT(STRTDT)," to ",$$FMTE^XLFDT(ENDDT)
+8 WRITE !,?13,"Report printed on: ",$$FMTE^XLFDT(MMRSNOW),?70,"PAGE: ",PG
+9 IF $GET(LOC)'=""
SET DATA=$GET(^TMP($JOB,"MMRSIPC","DSUM",LOC))
+10 IF $GET(LOC)=""
SET DATA=$GET(^TMP($JOB,"MMRSIPC","DSUM"))
+11 WRITE !!,"Transmission Measures (Unit Specific)"
+12 WRITE !,?3,"10. Number of bed days of care for the unit: ",$PIECE(DATA,U,1)
+13 WRITE !,?3,"11. Number of exits (discharges + deaths + transfers out) from the unit: ",$PIECE(DATA,U,2)
+14 WRITE !,?3,"12. Number of (11) from whom a discharge/transfer swab was indicated: ",$PIECE(DATA,U,3)
+15 WRITE !,?3,"13. Number of (12) who received MRSA nasal screening upon exit from unit: ",$PIECE(DATA,U,4)
+16 WRITE !,?3,"14. Number of MRSA transmissions on unit based on MRSA nasal screenings or clinical cultures: ",$PIECE(DATA,U,5)
+17 SET PG=PG+1
+18 QUIT