source: WorldVistAEHR/trunk/r/EEO_COMPLAINT_TRACKING-EEO/EEOUTIL1.m@ 1211

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

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1EEOUTIL1 ;HISC/JWR - COMPLAINT STATUS & TYPE COMPUTATIONS ;Apr 20, 1995
2 ;;2.0;EEO Complaint Tracking;;Apr 27, 1995
3STATUS ;COMPUTATON TO DETERMINE COMPLAINT STATUS
4 S (CLO,FAD,INP,ADV,HEA)=""
5 F CN=1,2,3,4,5,12 S EEO1(CN)=$G(^EEO(785,D0,CN))
6 S ACP=$P(EEO1(1),U,3),ACR=$P(EEO1(2),U,2),DTO=$P(EEO1(12),U)
7 S:$P(EEO1(2),U,4)>0!($P(EEO1(2),U,3)>0)!($P(EEO1(2),U,5)>0) INP=1
8 S INV=$P(EEO1(3),U,6) S:$P(EEO1(2),U,6)>0!($P(EEO1(5),U,10)>0) ADV=1
9 S:$P(EEO1(2),U,9)>0!($P(EEO1(2),U,10)>0) HEA=1
10 S:$P(EEO1(2),U,13)>0 FAD=1 S DEL=$P(EEO1(12),U,2)
11 S:$P(EEO1(4),U)>0 CLO=1
12 S X=$S(DEL'="":"DELETED",CLO'="":"CLOSED",FAD'="":"FAD PND",HEA'="":"HEARING PND",ADV'="":"ADVISED/RIGHTS",INV'="":"INVESTIGATION",INP'="":"INV PND",DTO'="":"OGC DISMISSED",ACR'="":"ACC REV @ OGC",ACP'="":"ACC PND FIELD",1:"INFORMAL")
13 I ACP'>0 S X="INFORMAL"
14 Q
15TYPE ;COMPUTATION TO DETERMINE TYPE OF INVESTIGATOR
16 S (EEOTYPE,EEODATE)="" Q:X="" N AEE S EEOTMP=$P($G(^EEO(785,D0,11,DA,0)),U)
17 Q:EEOTMP=""
18 Q:'$D(^EEO(787.5,EEOTMP,1)) S EEOCN=0 F S EEOCN=$O(^EEO(787.5,EEOTMP,1,EEOCN)) Q:EEOCN'=+EEOCN S AEE=$G(^(EEOCN,0)) D
19 .I $P(AEE,U,2)<X&(($P(AEE,U,3)>X)!($P(AEE,U,3)="")) I EEODATE'>$P(AEE,U,2) S EEOTYPE=$P(AEE,U),EEODATE=$P(AEE,U,3)
20 S EEOTYPE=$S(EEOTYPE=1:"ADHOC",EEOTYPE=2:"RETIRED ANNUITANT",EEOTYPE=3:"REGIONAL SPECIALIST",1:"")
21 K EEODATE,EEOCN,EEOTMP Q
22INACT ;DETERMINES IF THE INVESTIGATOR SELECTED IS CURRENTLY ACTIVE
23 Q:$D(XMZ)!($G(X)'>0) I $D(^EEO(787.5,X)) S FLAG=+$G(^(X,3))
24 Q:FLAG'>0
25 S DIR(0)="YAO",DIR("A")=" Are you sure, VACO lists this investigator as inactive ",DIR("B")="NO"
26 S DIR("?")="Inactive status is assigned by VACO to investigators who are not currently investigating EEO Complaints."
27 S EEOX1=X W ! D ^DIR K:Y=0 X S:Y>0 X=EEOX1 K DIR,FLAG Q
28ACCEPT ;Calculates the days acceptance field
29 F CNT1=2,4,5,12 S @("EEOI"_CNT1)=$S($D(^EEO(785,D0)):$G(^(D0,CNT1)),1:"")
30 S EEOBEG=$P(EEOI5,U,9),EEOTOGC=$P(EEOI2,U,2),EEODAS=$P(EEOI2,U,4)
31 S EEODIR=$P(EEOI2,U,5),EEOAO=$S($P(EEOI2,U,3)>0:$P(EEOI2,U,3),1:+EEOI12)
32 S EEOCLO=+EEOI4,EEOFAD=$P(EEOI2,U,13)
33 I EEOBEG'>0 S X="" Q
34 S (EEOX11,X1)=$S(EEODAS:EEODAS,EEODIR:EEODIR,EEOFAD:EEOFAD,EEOCLO:EEOCLO,1:DT)
35 S X2=EEOBEG D ^%DTC S EEOAC1=X
36 S X2=EEOTOGC,(EEOX2,X1)=$S(EEOAO:EEOAO,+EEOI12:+EEOI12,EEODAS:EEODAS,EEODIR:EEODIR,EEOFAD:EEOFAD,EEOCLO:EEOCLO,1:DT) D ^%DTC S EEOAC2=X
37 S X=EEOAC1-EEOAC2 S:EEOAC1'>EEOAC2 X="" S:EEOX11=DT&(X>0)&(EEOX2=DT) X=X_"*"
38 K EEOBEG,EEOCLO,EEODAS,EEODIR,EEOFAD,EEOTOGC,EEOI2,EEOI4,EEOI5,EEOI12,EEOX1,EEOX2,EEOX11,EEOAC1,EEOAC2,EEOAO
Note: See TracBrowser for help on using the repository browser.