SROMOR ;B'HAM ISC/MAM - MORTALITY REPORT ; [ 09/22/98 11:33 AM ]
;;3.0;Surgery;**38,77,50,175**;24 Jun 93;Build 6
EN ; entry point
N SRINSTP,SRBOTH,SRBOTH1
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,SRBOTH1="B"
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:"")
I SRBOTH="C" W @IOF,!,"Print Report for:",! D I SRBOTH1="" G END
.W !,"1. Intraoperative Occurrences",!,"2. Postoperative Occurrences",!,"3. Intraoperative and Postoperative Occurrences",!!
.K DIR S DIR(0)="NO^1:3",DIR("A")="Select Number",DIR("?")="Enter '1' to print the Intraoperative Occurrences Report, '2' to print the Postoperative Occurrences Report, or '3' to print Intraoperative and Postoperative Occurrences Report"
.D ^DIR S SRBOTH1=$S(+Y=1:"I",+Y=2:"P",+Y=3:"B",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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROMOR 2075 printed Dec 13, 2024@02:44:09 Page 2
SROMOR ;B'HAM ISC/MAM - MORTALITY REPORT ; [ 09/22/98 11:33 AM ]
+1 ;;3.0;Surgery;**38,77,50,175**;24 Jun 93;Build 6
EN ; entry point
+1 NEW SRINSTP,SRBOTH,SRBOTH1
+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
SET SRBOTH1="B"
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
+2 IF SRBOTH="C"
WRITE @IOF,!,"Print Report for:",!
Begin DoDot:1
+3 WRITE !,"1. Intraoperative Occurrences",!,"2. Postoperative Occurrences",!,"3. Intraoperative and Postoperative Occurrences",!!
+4 KILL DIR
SET DIR(0)="NO^1:3"
SET DIR("A")="Select Number"
SET DIR("?")="Enter '1' to print the Intraoperative Occurrences Report, '2' to print the Postoperative Occurrences Report, or '3' to print Intraoperative and Postoperative Occurrences Report"
+5 DO ^DIR
SET SRBOTH1=$SELECT(+Y=1:"I",+Y=2:"P",+Y=3:"B",1:"")
End DoDot:1
IF SRBOTH1=""
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