[613] | 1 | EEOEOE1 ;HISC/CFB/CJM - CLOSE/DELETE;8/20/96
|
---|
| 2 | ;;2.0;EEO Complaint Tracking;**10**;AUG-20-96
|
---|
| 3 | ;
|
---|
| 4 | CLOSE ;Close a case
|
---|
| 5 | S (DIC("A"),EEOYQ)="Close case."
|
---|
| 6 | S (DIC,DIE)="^EEO(785,",DIC(0)="AEQMZ"
|
---|
| 7 | S (EEOYSCR,DIC("S"))="I $$SCREEN^EEOEOSE(Y) I $P($G(^EEO(785,Y,1)),U,3)>0!(+$G(^EEO(785,Y,""SEC""))'>0)"
|
---|
| 8 | S (EEOYDICA,DIC("A"))="Select Complainant: "
|
---|
| 9 | S DR="48;49" D CALL("CLOSE") G:$G(DA)>0 CLOSE
|
---|
| 10 | Q
|
---|
| 11 | ;
|
---|
| 12 | UNDELETE K DR
|
---|
| 13 | UND S DIC("S")="I $P($G(^EEO(785,+Y,12)),U,2)'=""""" S DIC="^EEO(785,"
|
---|
| 14 | S DIC(0)="AEMQZ",DIC("A")=" Select Complainant to be Undeleted: "
|
---|
| 15 | S:$G(DR)["48.5" DIC("A")="Another: "
|
---|
| 16 | S DR="48.5///@",DIE=785 D CALL("UNDELETE") I $G(DA)>0 S $P(^XTMP("EEOX",DA,12),U,2)="@" W !!," Undeleted!!",!! G UND
|
---|
| 17 | K Y,DIE,DR,DA,DIC Q
|
---|
| 18 | ;
|
---|
| 19 | DELETE ;Delete a specific EEO case
|
---|
| 20 | W !!,"** Deleting a complaint does not actually cause its deletion, but does",!,"prevent it from being viewed. It can be undeleted later if necessary. **",!
|
---|
| 21 | S (DIC("A"),EEOYQ)="Delete a specific EEO case."
|
---|
| 22 | S (DIC,DIE)="^EEO(785,",DIC(0)="AEQMZ"
|
---|
| 23 | S (EEOYDICA,DIC("A"))="Select Complainant: "
|
---|
| 24 | S (EEOYSCR,DIC("S"))="I $$SCREEN^EEOEOSE(Y) I $P($G(^EEO(785,Y,1)),U,3)>0!(+$G(^EEO(785,Y,""SEC""))'>0)"
|
---|
| 25 | S DR="48.5///D" D CALL("DELETE") I $G(DA)>0 W !!," Deleted!!",!! G DELETE
|
---|
| 26 | Q
|
---|
| 27 | REOP ;
|
---|
| 28 | S EEOYQ="Reopen a previously closed case "
|
---|
| 29 | S (DIC,DIE)="^EEO(785,",DIC(0)="AEQMZ"
|
---|
| 30 | S (EEOYSCR,DIC("S"))="I $$SCREEN^EEOEOSE(Y) I $G(^EEO(785,Y,4))'="""" I $G(^(4))'=""^"""
|
---|
| 31 | S (EEODICA,DIC("A"))="Select Complainant: "
|
---|
| 32 | S DR="48///@;49///@" D CALL("REOPEN") I $G(DA)>0 S ^XTMP("EEOX",DA,4)="@^@" G REOP
|
---|
| 33 | Q
|
---|
| 34 | CALL(ACTION) ;
|
---|
| 35 | K DA D ^DIC Q:X="^"!("")!($D(DTOUT))
|
---|
| 36 | S EOY=+Y
|
---|
| 37 | Q:+Y'>0
|
---|
| 38 | I (ACTION'="CLOSE")!($G(^EEO(785,+Y,4))="^")!($G(^EEO(785,+Y,4))="") I '$$RUSURE(ACTION) S DA=0 Q
|
---|
| 39 | S DA=+Y,DR=DR_";62///X"
|
---|
| 40 | D ^DIE
|
---|
| 41 | D CASENO^EEOEOSE
|
---|
| 42 | S ^XTMP("EEOX",0)=DT+5_"^"_DT
|
---|
| 43 | Q
|
---|
| 44 | ;
|
---|
| 45 | RUSURE(ACTION) ;asks user for confirmation if ACTION should be taken, returns 0 or 1
|
---|
| 46 | ;
|
---|
| 47 | N ANS
|
---|
| 48 | ASK W !!,"Are you sure you want to "_ACTION_" this complaint YES/"
|
---|
| 49 | S ANS=""
|
---|
| 50 | R ANS:30
|
---|
| 51 | I '$T Q 0
|
---|
| 52 | I ANS="" Q 1
|
---|
| 53 | I ANS["?" W !!,"Enter YES or NO" G ASK
|
---|
| 54 | I ANS["^" Q 0
|
---|
| 55 | I "Yy"[$E(ANS,1) Q 1
|
---|
| 56 | I "Nn"[$E(ANS,1) Q 0
|
---|
| 57 | Q 0
|
---|