[628] | 1 | ENFSA1 ;(WASH ISC)/JED-Accident Reports ;5-29-93
|
---|
| 2 | ;;7.0;ENGINEERING;;Aug 17, 1993
|
---|
| 3 | ;EXPECTS IOF,U, CALLS ^%ZIS,^DIC,EN1^DIP,ENFSA2,ENLIB CALLED BY ENFSA
|
---|
| 4 | P10 ;Report by SERVICE/DIVISION
|
---|
| 5 | S ENH=" SERVICE",ENHD=" SERVICE/DIVISION" D INT^ENFSA2 G:F=1 EXIT X ENQ G:%=1&(ENFR=0) P11
|
---|
| 6 | S BY="SERVICE/DIVISION #,OCCURRENCE DATE" G:%=1 PS3
|
---|
| 7 | S DIC="^ENG(6924.3,",DIC(0)="AEQM" D ^DIC G:Y<0 EXIT S X=$P(^ENG(6924.3,+Y,0),U,1),(ENFR1,ENTO1)=X G:ENFR=0 PS2 G PS1
|
---|
| 8 | P11 S BY=25,FR="",TO="",DHD="ALL "_ENAR_"S BY"_ENHD G PS4
|
---|
| 9 | ;
|
---|
| 10 | P20 ;Report by INJURY CAUSE
|
---|
| 11 | S ENH=" CAUSE",ENHD=" CAUSE OF INJURY" D INT^ENFSA2 G:F=1 EXIT X ENQ G:%=1&(ENFR=0) P22
|
---|
| 12 | S BY="CAUSE OF INJURY,OCCURRENCE DATE" G:%=1 PS3
|
---|
| 13 | I $D(^DD(6924,32,0)) S ENHDR=$P(^(0),U,1),ENMEN=$P(^(0),U,3)
|
---|
| 14 | W !!?10,ENHDR,!! F I=1:1:12 W ?10,I,?14,$P(ENMEN,";",I),!
|
---|
| 15 | P21 W !!?5,"Select CAUSE NUMBER: " R X:DTIME G:X=""!(X="^") EXIT G:X<1!(X>12) P21
|
---|
| 16 | S X=$P($P(ENMEN,";",X),":",2),(ENFR1,ENTO1)=X G:ENFR=0 PS2 G PS1
|
---|
| 17 | P22 S BY=32,FR="",TO="",DHD=ENAR_" BY"_ENHD G PS4
|
---|
| 18 | ;
|
---|
| 19 | P30 ;Report by ACCIDENT NATURE
|
---|
| 20 | S ENH=" NATURE",ENHD=" INJURY/ILLNESS NATURE" D INT^ENFSA2 G:F=1 EXIT X ENQ G:%=1&(ENFR=0) P31
|
---|
| 21 | S BY=30_","_5 G:%=1 PS3
|
---|
| 22 | S DIC="^ENG(6924.2,",DIC(0)="AEQM" D ^DIC G:Y<0 EXIT S X=^ENG(6924.2,+Y,0),(ENFR1,ENTO1)=X G:ENFR=0 PS2 G PS1
|
---|
| 23 | P31 S BY=30,FR="",TO="",DHD="ALL "_ENAR_"S BY"_ENHD G PS4
|
---|
| 24 | ;
|
---|
| 25 | P40 ;Report by LOCATION
|
---|
| 26 | S ENH=" LOCATION",ENHD=" SPECIFIC LOCATION" D INT^ENFSA2 G:F=1 EXIT X ENQ G:%<0 EXIT G:%=0 P40 G:%=1&(ENFR=0) P42
|
---|
| 27 | S BY="SPECIFIC LOCATION,OCCURRENCE DATE" G:%=1 PS3
|
---|
| 28 | P41 W !!?10,"Enter",ENHD,": " R X:DTIME S:X["??" X="?" I X=""!(X="^") G EXIT
|
---|
| 29 | I $E(X)="?"!($L(X)>25) W *7,!!?5,"UP TO 25 CHARACTERS PLEASE" G P41
|
---|
| 30 | S (ENFR1,ENTO1)=X G:ENFR=0 PS2 G PS1
|
---|
| 31 | P42 S BY=7.5,FR="",TO="",DHD=ENAR_" BY"_ENHD G PS4
|
---|
| 32 | ;SET UP COMMON PRINT VARIABLES FOR FM
|
---|
| 33 | PS1 D DAT S FR=ENFR1_","_ENFR,TO=ENTO1_","_ENTO,DHD=ENAR_" SUMMARY: "_ENFR1_ENH_" FROM: "_ENFH_" TO: "_ENTH G PS4
|
---|
| 34 | PS2 S FR=ENFR1_","_"",TO=ENTO1_","_"",DHD=ENAR_" SUMMARY: "_ENFR1_ENH G PS4
|
---|
| 35 | PS3 D DAT S FR=""_","_ENFR,TO=""_","_ENTO,DHD=ENAR_" SUMMARY BY: "_ENH_" FROM: "_ENFH_" TO: "_ENTH
|
---|
| 36 | PS4 I $D(^ENG(6910.2,3,0)),$P(^(0),U,2)="L",$D(^DIPT("B","ENZFSA1")) S FLDS="[ENZFSA1]"
|
---|
| 37 | E S FLDS="[ENFSA1]"
|
---|
| 38 | S DIC="^ENG(""FSA"",",L=0,DIOEND="I IOST[""C-"" R !!,""Press <RETURN> to continue"",X:DTIME" D EN1^DIP G EXIT
|
---|
| 39 | EXIT K %,%IS,BY,DHD,DIC,FLDS,FR,TO,F,I,J,K,L,R,X,Y
|
---|
| 40 | K ENAR,ENDY,ENFH,ENFR,ENFR1,ENFY,ENH,ENHD,ENHDR,ENMEN,ENMN,ENQ,ENQT,ENTH,ENTO,ENTO1 Q
|
---|
| 41 | DAT S Y=ENFR X ^DD("DD") S ENFH=Y,Y=ENTO X ^DD("DD") S ENTH=Y K Y Q
|
---|
| 42 | ;
|
---|