SROMOR ;B'HAM ISC/MAM - MORTALITY REPORT ; [ 09/22/98 11:33 AM ]
;;3.0; Surgery ;**38,77,50**;24 Jun 93
EN ; entry point
N SRINSTP
W @IOF,!,"The Morbidity and Mortality Reports include the Perioperative Occurrences",!,"Report and the Mortality Report. Each report will provide information",!,"from cases completed within the date range selected."
REPORT ; select report
K DIR W !! S DIR(0)="YO",DIR("A")="Do you want to generate both reports",DIR("B")="YES",DIR("?")="Enter '1' to print the Perioperative Occurrences Report, or '2' to print the Mortality Report" D ^DIR S SRYN=$G(Y(0))
I SRYN="" G END
S:SRYN="YES" SRBOTH=1
SEL I SRYN="NO" W @IOF,!,"1. Perioperative Occurrences Report",!,"2. Mortality Report",!! D I SRBOTH="" G END
.K DIR S DIR(0)="NO^1:2",DIR("A")="Select Number",DIR("?")="Enter '1' to print the Perioperative Occurrences Report, or '2' to print the Mortality Report" D ^DIR S SRBOTH=$S(+Y=1:"C",+Y=2:"M",1:"")
DATE D DATE^SROUTL(.SRSD,.SRED,.SRQ) G:SRQ END
S SRINST=$$INST^SROUTL0() G:SRINST="^" END S SRINSTP=$P(SRINST,U),SRINST=$S(SRINST["ALL DIVISIONS":SRINST,1:$P(SRINST,U,2))
I SRBOTH'="M" D ^SROCMP1 Q
I SRBOTH="M" D ZIS
END W @IOF D ^SRSKILL
Q
ZIS W ! K IOP,%ZIS,IO("Q"),POP S %ZIS="QM",%ZIS("A")="Print the Report on which Device: " W !!,"This report is designed to use a 132 column format.",! D ^%ZIS I POP Q
I $D(IO("Q")) K IO("Q") S ZTDESC="MORTALITY REPORT",ZTRTN="BEG^SROMORT",(ZTSAVE("SRINST"),ZTSAVE("SRINSTP"),ZTSAVE("SRED"),ZTSAVE("SRSD"))="" D ^%ZTLOAD Q
D BEG^SROMORT Q
SROMOR ;B'HAM ISC/MAM - MORTALITY REPORT ; [ 09/22/98 11:33 AM ]
+1 ;;3.0; Surgery ;**38,77,50**;24 Jun 93
EN ; entry point
+1 NEW SRINSTP
+2 WRITE @IOF,!,"The Morbidity and Mortality Reports include the Perioperative Occurrences",!,"Report and the Mortality Report. Each report will provide information",!,"from cases completed within the date range selected."
REPORT ; select report
+1 KILL DIR
WRITE !!
SET DIR(0)="YO"
SET DIR("A")="Do you want to generate both reports"
SET DIR("B")="YES"
SET DIR("?")="Enter '1' to print the Perioperative Occurrences Report, or '2' to print the Mortality Report"
DO ^DIR
SET SRYN=$GET(Y(0))
+2 IF SRYN=""
GOTO END
+3 IF SRYN="YES"
SET SRBOTH=1
SEL IF SRYN="NO"
WRITE @IOF,!,"1. Perioperative Occurrences Report",!,"2. Mortality Report",!!
Begin DoDot:1
+1 KILL DIR
SET DIR(0)="NO^1:2"
SET DIR("A")="Select Number"
SET DIR("?")="Enter '1' to print the Perioperative Occurrences Report, or '2' to print the Mortality Report"
DO ^DIR
SET SRBOTH=$SELECT(+Y=1:"C",+Y=2:"M",1:"")
End DoDot:1
IF SRBOTH=""
GOTO END
DATE DO DATE^SROUTL(.SRSD,.SRED,.SRQ)
IF SRQ
GOTO END
+1 SET SRINST=$$INST^SROUTL0()
IF SRINST="^"
GOTO END
SET SRINSTP=$PIECE(SRINST,U)
SET SRINST=$SELECT(SRINST["ALL DIVISIONS":SRINST,1:$PIECE(SRINST,U,2))
+2 IF SRBOTH'="M"
DO ^SROCMP1
QUIT
+3 IF SRBOTH="M"
DO ZIS
END WRITE @IOF
DO ^SRSKILL
+1 QUIT
ZIS WRITE !
KILL IOP,%ZIS,IO("Q"),POP
SET %ZIS="QM"
SET %ZIS("A")="Print the Report on which Device: "
WRITE !!,"This report is designed to use a 132 column format.",!
DO ^%ZIS
IF POP
QUIT
+1 IF $DATA(IO("Q"))
KILL IO("Q")
SET ZTDESC="MORTALITY REPORT"
SET ZTRTN="BEG^SROMORT"
SET (ZTSAVE("SRINST"),ZTSAVE("SRINSTP"),ZTSAVE("SRED"),ZTSAVE("SRSD"))=""
DO ^%ZTLOAD
QUIT
+2 DO BEG^SROMORT
QUIT