QANBENE2 ;HISC/GJC-Special incidents invol. a beneficiary ;3/3/92
;;2.0;Incident Reporting;**1,26,28**;08/07/1992
;
EN1 ;sort through divisions, if integrated
I $G(QANDVFLG)=1 D Q
. S QANCC=""
. F S QANCC=$O(^TMP("QANBEN",$J,"BEN",QANCC)) Q:QANCC']"" D
. . D INST^QANRPT1(QANCC,.QANDV)
. . S QANHEAD(4)="REPORT FOR DIVISION: "_QANDV
. . D HDH Q:QANQUIT
. . D EN2 Q:QANQUIT
I $G(QANQUIT)=1 Q
I $G(QANDVFLG)'=1 S (QANCC,QANDIV)=0,QANDV="Unknown"
EN2 ;Format of the print for our Beneficiary Report.
S QANLBL="PATIENT ABUSE/ALLEGED"
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !!?QANTAB(1),"(1)",?QANTAB(2),"Alleged Patient Abuse" D STNDRD Q:QANQUIT
S QANLBL="PATIENT ABUSE/PROVEN"
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !!?QANTAB(1),"(2)",?QANTAB(2),"Proven Patient Abuse" D SPECIAL^QANBENE3 Q:QANQUIT
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !!?QANTAB(1),"(3)",?QANTAB(2),"Deaths" D DEATH Q:QANQUIT
S QANLBL="INFORMED"
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !!?QANTAB(1),"(4)",?QANTAB(2),"Failure to Obtain",!?QANTAB(2),"Informed Consent" D RGLAR Q:QANQUIT
S QANLBL="FALLS"
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !!?QANTAB(1),"(5)",?QANTAB(2),"Falls" D STNDRD Q:QANQUIT
D:$Y>(IOSL-4) HDH Q:QANQUIT
S QANLBL="HOMICIDE"
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !!?QANTAB(1),"(6)",?QANTAB(2),"Homicide" D RGLAR2 Q:QANQUIT
D:$Y>(IOSL-4) HDH Q:QANQUIT
S QANLBL="MED ERR"
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !!?QANTAB(1),"(7)",?QANTAB(2),"Medication Errors" D STNDRD Q:QANQUIT
I PAGE,($E(IOST)'="C") D PRINT^QANBENE3
D:$Y>(IOSL-8) HDH Q:QANQUIT
S QANLBL="MISSING PAT"
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !!?QANTAB(1),"(8)",?QANTAB(2),"Missing Patient" D STNDRD Q:QANQUIT
D:$Y>(IOSL-4) HDH Q:QANQUIT
S QANLBL="ASSAULT PAT/PAT"
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !!?QANTAB(1),"(9)",?QANTAB(2),"Patient on Patient",!?QANTAB(2),"Assault" D STNDRD Q:QANQUIT
D:$Y>(IOSL-4) HDH Q:QANQUIT
D EN1^QANBENE3 Q:QANQUIT
Q
DEATH ;Prints for deaths.
S QANLBL="DEATH-OR"
W !?QANTAB(3),"In Operating Room",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,3),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
S QANLBL="DEATH-RR"
W !?QANTAB(3),"In Recovery Room",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,3),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
S QANLBL="DEATH-ANESTH" W !?QANTAB(3),"During induction"
W !?QANTAB(3)," of anesthesia",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,3),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
S QANLBL="DEATH-48" W !?QANTAB(3),"Within 48 hrs. of"
W !?QANTAB(3)," surgery",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,3),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
S QANLBL="DEATH-CON" W !?QANTAB(3),"In conjunction with"
W !?QANTAB(3)," a procedure",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,3),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
S QANLBL="DEATH-EQ" W !?QANTAB(3),"Equipment mal-"
W !?QANTAB(3)," function",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,3),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
S QANLBL="DEATH-FAIL" W !?QANTAB(3),"Due to failure to"
W !?QANTAB(3)," diagnose or treat",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,3),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
S QANLBL="DEATH-M.E." W !?QANTAB(3),"Cases accepted by",!?QANTAB(3)," Medical Examiner"
W ?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,3),0)
S QANLBL="DEATH-MED CEN" W !?QANTAB(3),"On medical center",!?QANTAB(3)," grounds while not"
W !?QANTAB(3)," being treated",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,3),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
Q
RGLAR ;Regular w/o Severity Levels.
W ?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,2),0),?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,2),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
Q
RGLAR2 ;Regular w/o severity levels - (homicide & suicide)
W ?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,3),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
Q
STNDRD ;Printing 'Severity Level'
W !?QANTAB(3),"Severity Level 0",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,0),0)
W ?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,0),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !?QANTAB(3),"Severity Level 1",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,1),0)
W ?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,1),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !?QANTAB(3),"Severity Level 2",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,2),0)
W ?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,2),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
W !?QANTAB(3),"Severity Level 3",?QANTAB(5),$G(QANCOUNT("SLEV",QANCC,QANLBL,3),0)
W ?QANTAB(6),$G(QANCOUNT("INV",QANCC,QANLBL,3),0)
D:$Y>(IOSL-4) HDH Q:QANQUIT
Q
HDH ;End of screen interface.
Q:QANQUIT
I $E(IOST)="C" K DIR S DIR(0)="E" D ^DIR K DIR S:+Y=0 QANQUIT=1
Q:QANQUIT
D HDR^QANBENE0
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HQANBENE2 5050 printed Dec 13, 2024@01:59:34 Page 2
QANBENE2 ;HISC/GJC-Special incidents invol. a beneficiary ;3/3/92
+1 ;;2.0;Incident Reporting;**1,26,28**;08/07/1992
+2 ;
EN1 ;sort through divisions, if integrated
+1 IF $GET(QANDVFLG)=1
Begin DoDot:1
+2 SET QANCC=""
+3 FOR
SET QANCC=$ORDER(^TMP("QANBEN",$JOB,"BEN",QANCC))
if QANCC']""
QUIT
Begin DoDot:2
+4 DO INST^QANRPT1(QANCC,.QANDV)
+5 SET QANHEAD(4)="REPORT FOR DIVISION: "_QANDV
+6 DO HDH
if QANQUIT
QUIT
+7 DO EN2
if QANQUIT
QUIT
End DoDot:2
End DoDot:1
QUIT
+8 IF $GET(QANQUIT)=1
QUIT
+9 IF $GET(QANDVFLG)'=1
SET (QANCC,QANDIV)=0
SET QANDV="Unknown"
EN2 ;Format of the print for our Beneficiary Report.
+1 SET QANLBL="PATIENT ABUSE/ALLEGED"
+2 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+3 WRITE !!?QANTAB(1),"(1)",?QANTAB(2),"Alleged Patient Abuse"
DO STNDRD
if QANQUIT
QUIT
+4 SET QANLBL="PATIENT ABUSE/PROVEN"
+5 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+6 WRITE !!?QANTAB(1),"(2)",?QANTAB(2),"Proven Patient Abuse"
DO SPECIAL^QANBENE3
if QANQUIT
QUIT
+7 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+8 WRITE !!?QANTAB(1),"(3)",?QANTAB(2),"Deaths"
DO DEATH
if QANQUIT
QUIT
+9 SET QANLBL="INFORMED"
+10 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+11 WRITE !!?QANTAB(1),"(4)",?QANTAB(2),"Failure to Obtain",!?QANTAB(2),"Informed Consent"
DO RGLAR
if QANQUIT
QUIT
+12 SET QANLBL="FALLS"
+13 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+14 WRITE !!?QANTAB(1),"(5)",?QANTAB(2),"Falls"
DO STNDRD
if QANQUIT
QUIT
+15 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+16 SET QANLBL="HOMICIDE"
+17 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+18 WRITE !!?QANTAB(1),"(6)",?QANTAB(2),"Homicide"
DO RGLAR2
if QANQUIT
QUIT
+19 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+20 SET QANLBL="MED ERR"
+21 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+22 WRITE !!?QANTAB(1),"(7)",?QANTAB(2),"Medication Errors"
DO STNDRD
if QANQUIT
QUIT
+23 IF PAGE
IF ($EXTRACT(IOST)'="C")
DO PRINT^QANBENE3
+24 if $Y>(IOSL-8)
DO HDH
if QANQUIT
QUIT
+25 SET QANLBL="MISSING PAT"
+26 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+27 WRITE !!?QANTAB(1),"(8)",?QANTAB(2),"Missing Patient"
DO STNDRD
if QANQUIT
QUIT
+28 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+29 SET QANLBL="ASSAULT PAT/PAT"
+30 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+31 WRITE !!?QANTAB(1),"(9)",?QANTAB(2),"Patient on Patient",!?QANTAB(2),"Assault"
DO STNDRD
if QANQUIT
QUIT
+32 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+33 DO EN1^QANBENE3
if QANQUIT
QUIT
+34 QUIT
DEATH ;Prints for deaths.
+1 SET QANLBL="DEATH-OR"
+2 WRITE !?QANTAB(3),"In Operating Room",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,3),0)
+3 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+4 SET QANLBL="DEATH-RR"
+5 WRITE !?QANTAB(3),"In Recovery Room",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,3),0)
+6 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+7 SET QANLBL="DEATH-ANESTH"
WRITE !?QANTAB(3),"During induction"
+8 WRITE !?QANTAB(3)," of anesthesia",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,3),0)
+9 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+10 SET QANLBL="DEATH-48"
WRITE !?QANTAB(3),"Within 48 hrs. of"
+11 WRITE !?QANTAB(3)," surgery",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,3),0)
+12 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+13 SET QANLBL="DEATH-CON"
WRITE !?QANTAB(3),"In conjunction with"
+14 WRITE !?QANTAB(3)," a procedure",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,3),0)
+15 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+16 SET QANLBL="DEATH-EQ"
WRITE !?QANTAB(3),"Equipment mal-"
+17 WRITE !?QANTAB(3)," function",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,3),0)
+18 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+19 SET QANLBL="DEATH-FAIL"
WRITE !?QANTAB(3),"Due to failure to"
+20 WRITE !?QANTAB(3)," diagnose or treat",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,3),0)
+21 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+22 SET QANLBL="DEATH-M.E."
WRITE !?QANTAB(3),"Cases accepted by",!?QANTAB(3)," Medical Examiner"
+23 WRITE ?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,3),0)
+24 SET QANLBL="DEATH-MED CEN"
WRITE !?QANTAB(3),"On medical center",!?QANTAB(3)," grounds while not"
+25 WRITE !?QANTAB(3)," being treated",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,3),0)
+26 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+27 QUIT
RGLAR ;Regular w/o Severity Levels.
+1 WRITE ?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,2),0),?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,2),0)
+2 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+3 QUIT
RGLAR2 ;Regular w/o severity levels - (homicide & suicide)
+1 WRITE ?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,3),0),?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,3),0)
+2 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+3 QUIT
STNDRD ;Printing 'Severity Level'
+1 WRITE !?QANTAB(3),"Severity Level 0",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,0),0)
+2 WRITE ?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,0),0)
+3 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+4 WRITE !?QANTAB(3),"Severity Level 1",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,1),0)
+5 WRITE ?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,1),0)
+6 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+7 WRITE !?QANTAB(3),"Severity Level 2",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,2),0)
+8 WRITE ?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,2),0)
+9 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+10 WRITE !?QANTAB(3),"Severity Level 3",?QANTAB(5),$GET(QANCOUNT("SLEV",QANCC,QANLBL,3),0)
+11 WRITE ?QANTAB(6),$GET(QANCOUNT("INV",QANCC,QANLBL,3),0)
+12 if $Y>(IOSL-4)
DO HDH
if QANQUIT
QUIT
+13 QUIT
HDH ;End of screen interface.
+1 if QANQUIT
QUIT
+2 IF $EXTRACT(IOST)="C"
KILL DIR
SET DIR(0)="E"
DO ^DIR
KILL DIR
if +Y=0
SET QANQUIT=1
+3 if QANQUIT
QUIT
+4 DO HDR^QANBENE0
+5 QUIT