source: FOIAVistA/trunk/r/EEO_COMPLAINT_TRACKING-EEO/EEO211.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 4.8 KB
Line 
1EEO211 ;HISC/JWR - GATHERS INFORMATION FOR FORM 0210 (COUNS. INTAKE FORM) ;Apr 20, 1995
2 ;;2.0;EEO Complaint Tracking;**1,2**;Apr 27, 1995
3GATHER ;Gathers complaint information for the Complaint Intake Form (0210)
4 S EEOFIL=785,EEOSJ=$J K ^TMP("EEOJ",EEOSJ)
5 K EEO1 F NO=0,1,5,6 S EEO1(NO)=$G(^EEO(EEOFIL,DA,NO))
6 S EEONA=$P(EEO1(0),U),EEOSE=$P(EEO1(0),U,4),EEOPO=$P(EEO1(0),U,5)
7 S EEORE=$P(EEO1(0),U,7),EEOPH=$P(EEO1(0),U,8),EEOSTR=$P(EEO1(0),U,9)
8 S EEOCI=$P(EEO1(0),U,10),EEOST=$P(EEO1(0),U,11),EEOZI=$P(EEO1(0),U,12)
9 S EEOIN=$P(EEO1(1),U,12),EEOFI=$P(EEO1(1),U,2),EEOCO=$P(EEO1(1),U)
10 S EEOUN=$P(EEO1(6),U),EEOMS=$P(EEO1(6),U,2),EEOJO=$P(EEO1(5),U,19)
11 I EEOST>0 I '$D(^DIC(5,EEOST)) S EEOST=" "
12 E S:EEOST>0 EEOST=$P(^DIC(5,EEOST,0),U,2)
13 I EEOSE>0 I '$D(^ECC(730,EEOSE)) S EEOSE=" "
14 E S:EEOSE>0 EEOSE=$P(^ECC(730,EEOSE,0),U)
15 S:EEOCI'="" EEOCI=EEOCI_"," S EEOVA=""
16 S:+$G(^EEO(785,DA,1))>0 EEOVA=$G(^VA(200,+$P(^(1),U),20))
17 S EEONAME=$P(EEOVA,U,2),EEOTITL=$E($P(EEOVA,U,3),1,40),EEOCAS=$P(EEO1(5),U,6)
18 S Y=EEOIN D DT S EEOIN=Y,Y=EEOFI D DT S EEOFI=Y D NOW^%DTC S EEOCT=%H,Y=DT D DT S EEODT=Y S EEOCT=($E(EEOCT,11)_$E(EEOCT,5)_$E(EEOCT,7,10))
19MULT ;Makes an array of the information in the multiple field
20 S EEOFIL=$S($D(^EEO(785.5,DA)):785.5,1:785)
21 F CNT=8,9,10 S CN=0,EEO1(CNT)="^" F S CN=$O(^EEO(EEOFIL,DA,CNT,CN)) Q:CN=""!(+CN'=CN) S EEO1(CNT)=EEO1(CNT)_^(CN,0)_"^"
22WP S EEOFIL=$S($D(^EEO(785.5,DA)):785.5,1:785)
23 S CNT=7,CN=0 F S CN=$O(^EEO(EEOFIL,DA,CNT,CN)) Q:CN=""!(+CN'=CN) D
24 .S ^TMP("EEOJ",EEOSJ,CNT,CN)=$G(^EEO(EEOFIL,DA,CNT,CN,0))
25 Q
26BOX ;Fills boxes for Issue Codes on Form 0210
27 S EN="",EOC=0,EEO2J=EEO1J F ECN=1:1:60 S CX=$P(EEO1(10),U,ECN) I CX<50&(CX>0) I $D(^EEO(786,CX)) S EOE2=" ",EN=$P(^EEO(786,CX,0),U),CN=$E(EN,1,21) D
28 .S Y=$P($P(EEO1(10),U,ECN+1),U) D DD^%DT S EOE2=Y,BOX="[X]",EOC=EOC+1
29 .I $P(EEO1(10),U,ECN+1)'>2000000 S EOE2=""
30 .I BOX="[X]" I EOC#2=1 W !,OE,BOX,CN,$J(OE,80-$L(CN)-58),EOE2,$J(" ||",15-$L(EOE2)) S EEO1J=EEO1J+1
31 .I BOX="[X]" I EOC#2=0 W BOX,CN,$J(OE,22-$L(CN)),EOE2,$J(OE,14-$L(EOE2))
32 .X EEOIOF Q:EEOQUIT=1 K EOE2
33 I EOC#2=1 W $J(OE,25),$J(OE,14)
34 I EEO1J=EEO2J W !,OE,$J(OE,25),$J("||",15),$J(OE,25),$J(OE,14) S EEO1J=EEO1J+1
35 Q
36DT D DD^%DT Q
37BOXB ;Fills basis boxes on Form 0210
38 S EEO1J=0,CN="",EOC=0 F S CN=$O(^EEO(785.1,"B",CN)) Q:CN="" S BOX="[ ]" D
39 .S CX=$O(^EEO(785.1,"B",CN,"")) I EEO1(9)[("^"_CX_"^") S BOX="[X]",EOC=EOC+1
40 .I BOX="[X]" I EOC#2=1 W !,OE,BOX," ",CN,$J(OE,36-$L(CN)) S EEO1J=EEO1J+1
41 .I BOX="[X]" I EOC#2=0 W BOX," ",CN,$J(OE,35-$L(CN))
42 .X EEOIOF Q:EEOQUIT=1
43 I EOC#2=1 W $J(OE,39)
44 I EEO1J=0 W !,OE,$J(OE,40),$J(OE,39) S EEO1J=1
45 Q
46BOXC ;
47BOXC1 ;Fills boxes for Corrective actions on Form 0210
48 S EEO2J=EEO1J F CN=2:1 Q:$P(EEO1(8),U,CN)'>0 D
49 .Q:'$D(^EEO(785.2,$P(EEO1(8),U,CN)))
50 .S EOE=$P(^EEO(785.2,$P(EEO1(8),U,CN),0),U) W !,OE," ",EOE,$J(OE,78-$L(EOE)) S EEO1J=EEO1J+1 X EEOIOF Q:EEOQUIT=1
51 .I EEO1J=EEO2J W !,OE,$J(OE,79),!,OE,$J(OE,79) S EEO1J=EEO1J+2
52 Q
53WPB ;Checks legnth of word processing fields
54 Q:EEOQUIT=1
55 S EEOH=15-EEO1J,CN=1 S:IOSL>60 EEOH=EEOH+IOSL-60 W !,OE,$J(OE,79)
56WPB2 ;Enter here if WP field requires more than one page
57 S EEOD=0 F CN=CN:1 Q:'$D(^TMP("EEOJ",EEOSJ,7,CN)) D:$L(^(CN))>78 TEST X EEOIOF Q:EEOQUIT=1 Q:EEOH-2'>EEOD I $L(^(CN))'>78 W !,OE,^(CN),$J(OE,79-$L(^(CN))) S EEOD=EEOD+1 I EEOH-2'>EEOD I $D(^(CN+1)) Q
58 S EEO("WP")="" D:$D(^TMP("EEOJ",EEOSJ,7,CN+1)) WPB3
59 I '$D(^TMP("EEOJ",EEOSJ,7,CN+1)) D FILL
60 Q
61LEND ;If information for Form 0210 is more than one page this makes second page
62 Q:EEO("WP")'=1 S EEO1J=0,EEOH=44
63 S:IOSL>60 EEOH=EEOH+IOSL-60 W:IOS'=EEOII @IOF W:$D(IO("S")) ! D HEAD^EEO0210 Q:EEOQUIT=1
64 W " 17. Case number",$J(OE,29),!,OE," ",EEONA,$J(OE,40-$L(EEONA)-11)," ",EEOCAS,$J(OE,45-$L(EEOCAS)-5),!,OE,EO,OE
65 W !,OE,"10.Recommended Information Gathering (list names, documents, and records) |",!,OE,$J(OE,79) S CN=CN+1 D WPB2 Q:EEOQUIT=1
66 D FOOT^EEO0210 I $D(^TMP("EEOJ",EEOSJ,7,CN)) G LEND
67EX1 K EEONAME,EEOTITL,EEOVA,^TMP("EEOJ",EEOSJ),EEOSJ
68 Q
69TEST ;Test legnth of word processing fields
70 Q:'$D(^TMP("EEOJ",EEOSJ,7,CN)) Q:$L(^TMP("EEOJ",EEOSJ,7,CN))<79 F CT=1:1 Q:CT-1*78>$L(^TMP("EEOJ",EEOSJ,7,CN)) S EEO=78*(CT-1) D
71 .S EEOD=EEOD+1
72 .S ^TMP("EEOJ",EEOSJ,7,CN,CT)=$E(^TMP("EEOJ",EEOSJ,7,CN),EEO+1,EEO+78)
73 .X EEOIOF Q:EEOQUIT=1
74 .W !,OE,^TMP("EEOJ",EEOSJ,7,CN,CT),$J(OE,79-$L(^TMP("EEOJ",EEOSJ,7,CN,CT)))
75 Q
76WPB3 ;If more than one page is required for Form 0210
77 X EEOIOF Q:EEOQUIT=1
78 W !,OE,$J(OE,79),!,OE,$J(OE,79),!,OE,$J("(Recommended Info. Gathering Displayed on Following Page)",67),$J(OE,12) S EEO("WP")=1
79 Q
80FILL ;Fills in blank lines
81 F CN2=EEOD:1:EEOH X EEOIOF Q:EEOQUIT=1 W !,OE,$J(OE,79)
82 S EEOD=0 Q
83TERMIOF ;
84 I $Y'>(IOSL-6) Q
85 I IOS=EEOII I $G(EEOQ)'>0 I '$D(IO("S")) D
86 .W ! S DIR(0)="FAO^0:1^",DIR("A")=" Hit return to continue or ""^"" to exit "
87 .D ^DIR S:X="^" EEOQUIT=1
88 .W @IOF Q
Note: See TracBrowser for help on using the repository browser.