Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: QANBENE3

QANBENE3.m

Go to the documentation of this file.
QANBENE3 ;HISC/GJC-Special incidents invol. a beneficiary ;3/3/92
 ;;2.0;Incident Reporting;**1,26**;08/07/1992
 ;
EN1 ;Format of the print for our Beneficiary Report.
 S QANLBL="ASSAULT PAT/STAFF"
 D:$Y>(IOSL-4) HDH^QANBENE2 Q:QANQUIT
 W !!?QANTAB(1),"(10)",?QANTAB(2),"Patient on Staff",!?QANTAB(2),"Assault" D STNDRD^QANBENE2 Q:QANQUIT
 S QANLBL="OTHER"
 D:$Y>(IOSL-4) HDH^QANBENE2 Q:QANQUIT
 W !!?QANTAB(1),"(11)",?QANTAB(2),"Patient Injury",!?QANTAB(2),"(not otherwise listed)" D STNDRD^QANBENE2 Q:QANQUIT
 S QANLBL="FIRE"
 D:$Y>(IOSL-4) HDH^QANBENE2 Q:QANQUIT
 W !!?QANTAB(1),"(12)",?QANTAB(2),"Patient Involved",!?QANTAB(2),"in Fire" D STNDRD^QANBENE2 Q:QANQUIT
 S QANLBL="SEX"
 D:$Y>(IOSL-4) HDH^QANBENE2 Q:QANQUIT
 W !!?QANTAB(1),"(13)",?QANTAB(2),"Sexual Assault" D RGLAR^QANBENE2 Q:QANQUIT
 S QANLBL="SUI ATT"
 D:$Y>(IOSL-4) HDH^QANBENE2 Q:QANQUIT
 W !!?QANTAB(1),"(14)",?QANTAB(2),"Suicide Attempt" D SPECIAL Q:QANQUIT
 S QANLBL="SUICIDE"
 D:$Y>(IOSL-4) HDH^QANBENE2 Q:QANQUIT
 W !!?QANTAB(1),"(15)",?QANTAB(2),"Suicide" D RGLAR2^QANBENE2 Q:QANQUIT
 S QANLBL="TRANS ERR"
 D:$Y>(IOSL-4) HDH^QANBENE2 Q:QANQUIT
 W !!?QANTAB(1),"(16)",?QANTAB(2),"Transfusion Error" D STNDRD^QANBENE2 Q:QANQUIT
 I PAGE,($E(IOST)'="C") D PRINT
 Q
HDH ;End of report interface.
 I $E(IOST)="C" K DIR S DIR(0)="E" D ^DIR K DIR S:+Y=0 QANQUIT=1
 Q
PRINT ;Print out labels.
 I '$D(^TMP("QANBEN")) D HDH^QANBENE2 W !!!,"No Incidents to report.",!!!
 W !,"VA Form 10-0139"_$S(QANFLG("WARD")="D":"E",QANFLG("WARD")="N":"D",QANFLG("WARD")="O":"C",QANFLG("WARD")="I":"B",QANFLG("WARD")="C":"BCDE",1:"")
 Q
SPECIAL ;Special output "Proven Patient Abuse" and "Suicide Attempt"
 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^QANBENE2 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^QANBENE2 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^QANBENE2 Q:QANQUIT
 Q