source: FOIAVistA/trunk/r/ENGINEERING-EN/ENFSA1.m@ 1688

Last change on this file since 1688 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1ENFSA1 ;(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
4P10 ;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
8P11 S BY=25,FR="",TO="",DHD="ALL "_ENAR_"S BY"_ENHD G PS4
9 ;
10P20 ;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),!
15P21 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
17P22 S BY=32,FR="",TO="",DHD=ENAR_" BY"_ENHD G PS4
18 ;
19P30 ;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
23P31 S BY=30,FR="",TO="",DHD="ALL "_ENAR_"S BY"_ENHD G PS4
24 ;
25P40 ;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
28P41 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
31P42 S BY=7.5,FR="",TO="",DHD=ENAR_" BY"_ENHD G PS4
32 ;SET UP COMMON PRINT VARIABLES FOR FM
33PS1 D DAT S FR=ENFR1_","_ENFR,TO=ENTO1_","_ENTO,DHD=ENAR_" SUMMARY: "_ENFR1_ENH_" FROM: "_ENFH_" TO: "_ENTH G PS4
34PS2 S FR=ENFR1_","_"",TO=ENTO1_","_"",DHD=ENAR_" SUMMARY: "_ENFR1_ENH G PS4
35PS3 D DAT S FR=""_","_ENFR,TO=""_","_ENTO,DHD=ENAR_" SUMMARY BY: "_ENH_" FROM: "_ENFH_" TO: "_ENTH
36PS4 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
39EXIT 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
41DAT S Y=ENFR X ^DD("DD") S ENFH=Y,Y=ENTO X ^DD("DD") S ENTH=Y K Y Q
42 ;
Note: See TracBrowser for help on using the repository browser.