OOPSUTL1 ;HINES/WAA-Utilities Routines ;3/24/98
;;2.0;ASISTS;**8**;Jun 03, 2002
;;
EMP(IEN,SSN,OPEN) ; DIC filter for Employee enter edit
;This is a screening routine that will filter
; out those entries that the user cannot see.
; Input:
; IEN is the internal entry number for the entry in 2260.
; SSN is the Employee Number in file 200
;=========================================
; VIEW is an indicator telling if the user can enter/edit
; this entry
;
N VIEW
S VIEW=0
S OPEN=$G(OPEN,0)
I $$OPEN(IEN,OPEN) D ;Record
.I $$GET1^DIQ(2260,IEN,5,"I")=SSN D ; Is this record for this employee
..N SIG,INC
..S SIG=$$EDSTA^OOPSUTL1(IEN,"S")
..S INC=$$GET1^DIQ(2260,IEN,52,"I")
..I '$P(SIG,U,INC) S VIEW=1 ; Super has not signed
..I $$GET1^DIQ(2260,IEN,67)'="" S VIEW=0 ; Patch 8, no edit if to DOL
.Q
Q VIEW
WS ; The following 4 subroutines are added with Patch 8 - DOL project
; Sets the "W" xref. A routine call is used to prevent the inadvertent
; re-indexing of xref. Xref is used for determining which records
; should be included in transmission of claims to DOL. When the record
; is placed in a Mailman message (WC xref set) this xref is killed.
; Variables
; WOK = set in OOPSWCE, used to prevent inadvertent
; re-indexing of ^OOPS(2260,"AW",X,IEN)
; IEN = uses IEN for DA of file 2260
; X = field 67 (DUZ)
I '$D(WOK) Q
I '$D(IEN) D Q
. S MSG("DIHELP",1)="Required Cross Reference (""AW"") was not set up, call your IRM."
. D MSG^DIALOG("WH","","","","MSG")
S ^OOPS(2260,"AW",X,IEN)=""
Q
WK ; Kills the "AW" xref. See above as reason for manually setting
; WOK = set in OOPSWCE, used to prevent inadvertent reindex
; IEN = uses IEN for DA of file 2260
; X = field 67, file 2260 = DUZ
N WCDUZ
I '$D(WOK) Q
I '$D(IEN) D Q
. S MSG("DIHELP",1)="Required Cross Reference (""AW"") was not properly destroyed, call your IRM."
. D MSG^DIALOG("WH","","","","MSG")
; V2.0 temp fix to keep duplicate entries out of x-ref
S WCDUZ=""
F S WCDUZ=$O(^OOPS(2260,"AW",WCDUZ)) Q:WCDUZ="" D
. I $D(^OOPS(2260,"AW",WCDUZ,IEN)) K ^OOPS(2260,"AW",WCDUZ,IEN)
Q
WCS ; Sets the "AWC" xref. A routine call is used to prevent inadvertent
; re-indexing of the xref. Xref is used for determining which records
; were included in Mailman messages that transmitted claims to DOL
; Variables
; WOK = set in OOPSWCE, used to prevent inadvertent
; re-indexing of ^OOPS(2260,"AW",DUZ,IEN)
; IEN = record ID file 2260
; X = field 66 - Date Transmitted to DOL
N WCDUZ
I '$D(WOK) Q
I '$D(IEN) D Q
. S MSG("DIHELP",1)="Required Cross Reference (""AWC"") was not set up, call your IRM."
. D MSG^DIALOG("WH","","","","MSG")
S ^OOPS(2260,"AWC",X,IEN)=""
; V2.0 temp fix to keep duplicate entries out of x-ref
S WCDUZ=""
F S WCDUZ=$O(^OOPS(2260,"AW",WCDUZ)) Q:WCDUZ="" D
. I $D(^OOPS(2260,"AW",WCDUZ,IEN)) K ^OOPS(2260,"AW",WCDUZ,IEN)
Q
WCK ; Kills the "AWC" xref. See above as reason for manually setting
; WOK = set in OOPSWCE, used to prevent inadvertent reindex
; IEN = uses IEN for DA of file 2260
; X = field 66 - Date Transmitted to DOL
I '$D(WOK) Q
I '$D(IEN) D Q
. S MSG("DIHELP",1)="Required Cross Reference (""AWC"") was not properly destroyed, call your IRM."
. D MSG^DIALOG("WH","","","","MSG")
K ^OOPS(2260,"AWC",X,IEN)
Q
OPEN(IEN,OPEN) ; Determine if record is open
N VIEW
S OPEN=$G(OPEN,0)
S VIEW=0
I $G(^OOPS(2260,IEN,0))="" Q VIEW
I 'OPEN,'$P(^OOPS(2260,IEN,0),U,6) S VIEW=1
I OPEN,$P(^OOPS(2260,IEN,0),U,6)'=2 S VIEW=1
Q VIEW
EDSTA(IEN,CALLER) ; Gives the status of form to allows the user to
;Inputs:
; IEN is the internal entry number for the entry in 2260.
; CALLER is the type of user who is calling the routine.
; "E" = EMPLOYEE
; "S" = SUPERVISOR
; "O" = SAFETY
; "V" = VOLUNTEER
;
; ======================================
;Outputs
; If the Caller is Employee:
; SELECT=1^1 Both FORMS have been signed
; 0^0 Neither form has been signed
; 1^0 CA1 has been signed
; 0^1 CA2 has been signed
; If caller is Supervisor:
; SELECT=1^1^1 all FORMS have been signed
; 0^0^0 no form has been signed
; 1^0^0 CA1 has been signed
; 0^1^0 CA2 has been signed
; 0^0^1 2162 has been signed
; If caller is Safety Officer
; SELECT=1 File has been signed
; 0 File has not been signed
; If caller is Volunteer Supervisor
; SELECT=1 File has been signed
; 0 File has not been signed
N SELECT,CA1,CA2,ACCD
S SELECT=""
I CALLER="S" D
.N LINE
.S LINE=""
.F I=170,266,45 D
..S LINE=LINE_$S($$GET1^DIQ(2260,IEN,I,"I")'="":1,1:0)_U
..Q
.S SELECT=$P(LINE,U,1,3)
.Q
I CALLER="E" S SELECT=$S($$GET1^DIQ(2260,IEN,120,"I")'="":1,1:0)_U_$S($$GET1^DIQ(2260,IEN,222,"I")'="":1,1:0)
I CALLER="O" S SELECT=$S($$GET1^DIQ(2260,IEN,49,"I")'="":1,1:0)_U
Q SELECT
;
EDSEL(IEN,CALLER) ; Allow you to select the form part to edit
;
;
; IEN is the internal entry number for the entry in 2260.
; CALLER is the type of user who is calling the routine.
; "E" = EMPLOYEE
; "S" = SUPERVISOR
; "O" = SAFETY OFFICER
;
;
N SELECT,EEFORM,CNT,Y,SEC
S CNT=0
S SELECT="",SEC="0^0",FORM=""
S EEFORM=$$EDSTA(IEN,CALLER)
I CALLER="E" S SEC=$$EDSTA^OOPSUTL1(IEN,"S")
W @IOF,!!,?10,"Select Forms: "
I CALLER="S" S CNT=CNT+1 W !,?20,CNT,") Form 2162" S FORM=FORM_"2162^"
I '$P(SEC,U,1) S CNT=CNT+1 W !,?20,CNT,") ",$S($P(EEFORM,U)=1:"Edit",1:"Enter")," form CA1 (Injury)" S FORM=FORM_"CA1^"
I '$P(SEC,U,2) S CNT=CNT+1 W !,?20,CNT,") ",$S($P(EEFORM,U,2)=1:"Edit",1:"Enter")," form CA2 (Illness)" S FORM=FORM_"CA2^"
I CNT=1 S Y="1,"
E D
.W !!!
.N DIR
.S DIR("A")=" Select Forms"
.S DIR(0)="L^1:"_CNT
.D ^DIR
I +Y F I=1:1 Q:$P(Y,",",I)<1 S SELECT=SELECT_$P(FORM,U,$P(Y,",",I))_"^"
Q SELECT
CLRES(IEN,CALLER,FORM) ; Clean out electronic SIG
;Input
; IEN = Internal Entry Number from file 2260
; CALLER is the type of user who is calling the routine.
; "E" = EMPLOYEE
; "S" = SUPERVISOR
; "O" = SAFETY OFFICER
; "W" = WORKER'S COMP OFFICIAL
; FORM Is the form to clear out ES
; Safety Officer = 2162
; Supervisor = CA1,CA2 and 2162
; Employee = CA1 and CA2, DUAL ;patch 5 added DUAL
; Workers Comp = CA1 and CA2, DUAL
;
; DOL = 1 if call from ^OOPSUTL6 to suppress printing cleared msg.
;
N SIG,NODE,FIELD,FLG,CALL
Q:FORM=""
S FLG=""
; patch 5 llh - added D block logic and new form DUAL
I CALLER="W" D
. S SIG="WCES;1,3"
. I FORM="DUAL" S SIG="DUAL;10,12"
I CALLER="O" S SIG=$S(FORM="2162":"2162ES;4,6",1:"")
S:CALLER="S" SIG=$S(FORM="CA1":"CA1ES;4,6",FORM="CA2":"CA2ES;4,6",FORM="2162":"2162ES;1,3",1:"")
; patch 5 llh - added logic for DUAL
S:CALLER="E" SIG=$S(FORM="CA1":"CA1ES;1,3",FORM="CA2":"CA2ES;1,3",FORM="DUAL":"DUAL;7,9",1:"")
Q:SIG=""
S NODE=$P(SIG,";") Q:NODE=""
S FIELD=$P(SIG,";",2)
S CALL=$S(CALLER="W":2,CALLER="O":1,CALLER="S":1,CALLER="E":2,1:"")
I 'CALL Q
I '$D(^OOPS(2260,IEN,NODE)) Q
I CALL=1,$P(^OOPS(2260,IEN,NODE),U,5)'="" S FLG=1
I CALL=2,$P(^OOPS(2260,IEN,NODE),U,2)'="" S FLG=1
; patch 5 llh - added reset flag if form = DUAL
I FORM="DUAL" S FLG=""
F I=$P(FIELD,","):1:$P(FIELD,",",2) S $P(^OOPS(2260,IEN,NODE),U,I)=""
I FLG&('$G(DOL)) D
. ; Added '$$BROKER^XWBLIB to line below ASISTS V2.0 11/09/01 LLH
. I '$$BROKER^XWBLIB W !!,"Your ES has been cleared. You will need to resign.",!
. ;PATCH 11 CLEAR DATE SENT TO NDB IF SAFETY SIGNATURE REMOVED
. I CALLER="O" S $P(^OOPS(2260,IEN,0),U,11)=""
; Security on ES - late in patch 8
; clears checksums set when emp portion of claim signed by emp
; patch 5 llh - added form DUAL
I CALLER="E"&('$G(DOL)),(FORM'="DUAL") D
. N RECORD
. S RECORD=$G(^OOPS(2260,IEN,"CA"))
. S $P(RECORD,U,7)="",$P(RECORD,U,9)="",^OOPS(2260,IEN,"CA")=RECORD
Q
PAID(IEN,FLD) ; Get the data value from the PAID file (#450), if employee
; Input - IEN internal entry number of case in file 2260
; - FLD the PAID field number to retrieve
; - NAME Name of Person Involved, used to get PAID IEN
; - VAL Data value from the PAID #450, field #FLD
; Output - DESC Description from Paid, if there
;
N DESC,IEN450,NAME,LP
S DESC="",LP=0
S NAME=$$GET1^DIQ(2260,IEN,1)
D FIND^DIC(450,,"@;8","MPS",NAME,100)
I $G(DIERR) D CLEAN^DILF Q
F S LP=$O(^TMP("DILIST",$J,LP)) Q:LP="" D
. I $$GET1^DIQ(2260,IEN,5)=$P(^TMP("DILIST",$J,LP,0),U,2) D
.. S IEN450=$P(^TMP("DILIST",$J,LP,0),U)
.. S DESC=$$GET1^DIQ(450,IEN450,FLD)
Q DESC
;
PAYP(PAY) ; Map PAID Pay Plan to higher category for DOL project
;
; Input - PLAN This is the PAID Pay Plan Description
; from file 454, not the PAID Code
; Output - PPLAN Pay Plan that PAID Code maps to
;
N PPLAN
S PPLAN=$S($E(PAY)="G":"GS",$E(PAY)="W":"WG",$E(PAY)="N":"WG",$E(PAY)="V":PAY,PAY="AD":PAY,$E(PAY)="E":PAY,$E(PAY)="S":PAY,1:"OT")
Q PPLAN
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOOPSUTL1 9323 printed Oct 16, 2024@17:40:36 Page 2
OOPSUTL1 ;HINES/WAA-Utilities Routines ;3/24/98
+1 ;;2.0;ASISTS;**8**;Jun 03, 2002
+2 ;;
EMP(IEN,SSN,OPEN) ; DIC filter for Employee enter edit
+1 ;This is a screening routine that will filter
+2 ; out those entries that the user cannot see.
+3 ; Input:
+4 ; IEN is the internal entry number for the entry in 2260.
+5 ; SSN is the Employee Number in file 200
+6 ;=========================================
+7 ; VIEW is an indicator telling if the user can enter/edit
+8 ; this entry
+9 ;
+10 NEW VIEW
+11 SET VIEW=0
+12 SET OPEN=$GET(OPEN,0)
+13 ;Record
IF $$OPEN(IEN,OPEN)
Begin DoDot:1
+14 ; Is this record for this employee
IF $$GET1^DIQ(2260,IEN,5,"I")=SSN
Begin DoDot:2
+15 NEW SIG,INC
+16 SET SIG=$$EDSTA^OOPSUTL1(IEN,"S")
+17 SET INC=$$GET1^DIQ(2260,IEN,52,"I")
+18 ; Super has not signed
IF '$PIECE(SIG,U,INC)
SET VIEW=1
+19 ; Patch 8, no edit if to DOL
IF $$GET1^DIQ(2260,IEN,67)'=""
SET VIEW=0
End DoDot:2
+20 QUIT
End DoDot:1
+21 QUIT VIEW
WS ; The following 4 subroutines are added with Patch 8 - DOL project
+1 ; Sets the "W" xref. A routine call is used to prevent the inadvertent
+2 ; re-indexing of xref. Xref is used for determining which records
+3 ; should be included in transmission of claims to DOL. When the record
+4 ; is placed in a Mailman message (WC xref set) this xref is killed.
+5 ; Variables
+6 ; WOK = set in OOPSWCE, used to prevent inadvertent
+7 ; re-indexing of ^OOPS(2260,"AW",X,IEN)
+8 ; IEN = uses IEN for DA of file 2260
+9 ; X = field 67 (DUZ)
+10 IF '$DATA(WOK)
QUIT
+11 IF '$DATA(IEN)
Begin DoDot:1
+12 SET MSG("DIHELP",1)="Required Cross Reference (""AW"") was not set up, call your IRM."
+13 DO MSG^DIALOG("WH","","","","MSG")
End DoDot:1
QUIT
+14 SET ^OOPS(2260,"AW",X,IEN)=""
+15 QUIT
WK ; Kills the "AW" xref. See above as reason for manually setting
+1 ; WOK = set in OOPSWCE, used to prevent inadvertent reindex
+2 ; IEN = uses IEN for DA of file 2260
+3 ; X = field 67, file 2260 = DUZ
+4 NEW WCDUZ
+5 IF '$DATA(WOK)
QUIT
+6 IF '$DATA(IEN)
Begin DoDot:1
+7 SET MSG("DIHELP",1)="Required Cross Reference (""AW"") was not properly destroyed, call your IRM."
+8 DO MSG^DIALOG("WH","","","","MSG")
End DoDot:1
QUIT
+9 ; V2.0 temp fix to keep duplicate entries out of x-ref
+10 SET WCDUZ=""
+11 FOR
SET WCDUZ=$ORDER(^OOPS(2260,"AW",WCDUZ))
if WCDUZ=""
QUIT
Begin DoDot:1
+12 IF $DATA(^OOPS(2260,"AW",WCDUZ,IEN))
KILL ^OOPS(2260,"AW",WCDUZ,IEN)
End DoDot:1
+13 QUIT
WCS ; Sets the "AWC" xref. A routine call is used to prevent inadvertent
+1 ; re-indexing of the xref. Xref is used for determining which records
+2 ; were included in Mailman messages that transmitted claims to DOL
+3 ; Variables
+4 ; WOK = set in OOPSWCE, used to prevent inadvertent
+5 ; re-indexing of ^OOPS(2260,"AW",DUZ,IEN)
+6 ; IEN = record ID file 2260
+7 ; X = field 66 - Date Transmitted to DOL
+8 NEW WCDUZ
+9 IF '$DATA(WOK)
QUIT
+10 IF '$DATA(IEN)
Begin DoDot:1
+11 SET MSG("DIHELP",1)="Required Cross Reference (""AWC"") was not set up, call your IRM."
+12 DO MSG^DIALOG("WH","","","","MSG")
End DoDot:1
QUIT
+13 SET ^OOPS(2260,"AWC",X,IEN)=""
+14 ; V2.0 temp fix to keep duplicate entries out of x-ref
+15 SET WCDUZ=""
+16 FOR
SET WCDUZ=$ORDER(^OOPS(2260,"AW",WCDUZ))
if WCDUZ=""
QUIT
Begin DoDot:1
+17 IF $DATA(^OOPS(2260,"AW",WCDUZ,IEN))
KILL ^OOPS(2260,"AW",WCDUZ,IEN)
End DoDot:1
+18 QUIT
WCK ; Kills the "AWC" xref. See above as reason for manually setting
+1 ; WOK = set in OOPSWCE, used to prevent inadvertent reindex
+2 ; IEN = uses IEN for DA of file 2260
+3 ; X = field 66 - Date Transmitted to DOL
+4 IF '$DATA(WOK)
QUIT
+5 IF '$DATA(IEN)
Begin DoDot:1
+6 SET MSG("DIHELP",1)="Required Cross Reference (""AWC"") was not properly destroyed, call your IRM."
+7 DO MSG^DIALOG("WH","","","","MSG")
End DoDot:1
QUIT
+8 KILL ^OOPS(2260,"AWC",X,IEN)
+9 QUIT
OPEN(IEN,OPEN) ; Determine if record is open
+1 NEW VIEW
+2 SET OPEN=$GET(OPEN,0)
+3 SET VIEW=0
+4 IF $GET(^OOPS(2260,IEN,0))=""
QUIT VIEW
+5 IF 'OPEN
IF '$PIECE(^OOPS(2260,IEN,0),U,6)
SET VIEW=1
+6 IF OPEN
IF $PIECE(^OOPS(2260,IEN,0),U,6)'=2
SET VIEW=1
+7 QUIT VIEW
EDSTA(IEN,CALLER) ; Gives the status of form to allows the user to
+1 ;Inputs:
+2 ; IEN is the internal entry number for the entry in 2260.
+3 ; CALLER is the type of user who is calling the routine.
+4 ; "E" = EMPLOYEE
+5 ; "S" = SUPERVISOR
+6 ; "O" = SAFETY
+7 ; "V" = VOLUNTEER
+8 ;
+9 ; ======================================
+10 ;Outputs
+11 ; If the Caller is Employee:
+12 ; SELECT=1^1 Both FORMS have been signed
+13 ; 0^0 Neither form has been signed
+14 ; 1^0 CA1 has been signed
+15 ; 0^1 CA2 has been signed
+16 ; If caller is Supervisor:
+17 ; SELECT=1^1^1 all FORMS have been signed
+18 ; 0^0^0 no form has been signed
+19 ; 1^0^0 CA1 has been signed
+20 ; 0^1^0 CA2 has been signed
+21 ; 0^0^1 2162 has been signed
+22 ; If caller is Safety Officer
+23 ; SELECT=1 File has been signed
+24 ; 0 File has not been signed
+25 ; If caller is Volunteer Supervisor
+26 ; SELECT=1 File has been signed
+27 ; 0 File has not been signed
+28 NEW SELECT,CA1,CA2,ACCD
+29 SET SELECT=""
+30 IF CALLER="S"
Begin DoDot:1
+31 NEW LINE
+32 SET LINE=""
+33 FOR I=170,266,45
Begin DoDot:2
+34 SET LINE=LINE_$SELECT($$GET1^DIQ(2260,IEN,I,"I")'="":1,1:0)_U
+35 QUIT
End DoDot:2
+36 SET SELECT=$PIECE(LINE,U,1,3)
+37 QUIT
End DoDot:1
+38 IF CALLER="E"
SET SELECT=$SELECT($$GET1^DIQ(2260,IEN,120,"I")'="":1,1:0)_U_$SELECT($$GET1^DIQ(2260,IEN,222,"I")'="":1,1:0)
+39 IF CALLER="O"
SET SELECT=$SELECT($$GET1^DIQ(2260,IEN,49,"I")'="":1,1:0)_U
+40 QUIT SELECT
+41 ;
EDSEL(IEN,CALLER) ; Allow you to select the form part to edit
+1 ;
+2 ;
+3 ; IEN is the internal entry number for the entry in 2260.
+4 ; CALLER is the type of user who is calling the routine.
+5 ; "E" = EMPLOYEE
+6 ; "S" = SUPERVISOR
+7 ; "O" = SAFETY OFFICER
+8 ;
+9 ;
+10 NEW SELECT,EEFORM,CNT,Y,SEC
+11 SET CNT=0
+12 SET SELECT=""
SET SEC="0^0"
SET FORM=""
+13 SET EEFORM=$$EDSTA(IEN,CALLER)
+14 IF CALLER="E"
SET SEC=$$EDSTA^OOPSUTL1(IEN,"S")
+15 WRITE @IOF,!!,?10,"Select Forms: "
+16 IF CALLER="S"
SET CNT=CNT+1
WRITE !,?20,CNT,") Form 2162"
SET FORM=FORM_"2162^"
+17 IF '$PIECE(SEC,U,1)
SET CNT=CNT+1
WRITE !,?20,CNT,") ",$SELECT($PIECE(EEFORM,U)=1:"Edit",1:"Enter")," form CA1 (Injury)"
SET FORM=FORM_"CA1^"
+18 IF '$PIECE(SEC,U,2)
SET CNT=CNT+1
WRITE !,?20,CNT,") ",$SELECT($PIECE(EEFORM,U,2)=1:"Edit",1:"Enter")," form CA2 (Illness)"
SET FORM=FORM_"CA2^"
+19 IF CNT=1
SET Y="1,"
+20 IF '$TEST
Begin DoDot:1
+21 WRITE !!!
+22 NEW DIR
+23 SET DIR("A")=" Select Forms"
+24 SET DIR(0)="L^1:"_CNT
+25 DO ^DIR
End DoDot:1
+26 IF +Y
FOR I=1:1
if $PIECE(Y,",",I)<1
QUIT
SET SELECT=SELECT_$PIECE(FORM,U,$PIECE(Y,",",I))_"^"
+27 QUIT SELECT
CLRES(IEN,CALLER,FORM) ; Clean out electronic SIG
+1 ;Input
+2 ; IEN = Internal Entry Number from file 2260
+3 ; CALLER is the type of user who is calling the routine.
+4 ; "E" = EMPLOYEE
+5 ; "S" = SUPERVISOR
+6 ; "O" = SAFETY OFFICER
+7 ; "W" = WORKER'S COMP OFFICIAL
+8 ; FORM Is the form to clear out ES
+9 ; Safety Officer = 2162
+10 ; Supervisor = CA1,CA2 and 2162
+11 ; Employee = CA1 and CA2, DUAL ;patch 5 added DUAL
+12 ; Workers Comp = CA1 and CA2, DUAL
+13 ;
+14 ; DOL = 1 if call from ^OOPSUTL6 to suppress printing cleared msg.
+15 ;
+16 NEW SIG,NODE,FIELD,FLG,CALL
+17 if FORM=""
QUIT
+18 SET FLG=""
+19 ; patch 5 llh - added D block logic and new form DUAL
+20 IF CALLER="W"
Begin DoDot:1
+21 SET SIG="WCES;1,3"
+22 IF FORM="DUAL"
SET SIG="DUAL;10,12"
End DoDot:1
+23 IF CALLER="O"
SET SIG=$SELECT(FORM="2162":"2162ES;4,6",1:"")
+24 if CALLER="S"
SET SIG=$SELECT(FORM="CA1":"CA1ES;4,6",FORM="CA2":"CA2ES;4,6",FORM="2162":"2162ES;1,3",1:"")
+25 ; patch 5 llh - added logic for DUAL
+26 if CALLER="E"
SET SIG=$SELECT(FORM="CA1":"CA1ES;1,3",FORM="CA2":"CA2ES;1,3",FORM="DUAL":"DUAL;7,9",1:"")
+27 if SIG=""
QUIT
+28 SET NODE=$PIECE(SIG,";")
if NODE=""
QUIT
+29 SET FIELD=$PIECE(SIG,";",2)
+30 SET CALL=$SELECT(CALLER="W":2,CALLER="O":1,CALLER="S":1,CALLER="E":2,1:"")
+31 IF 'CALL
QUIT
+32 IF '$DATA(^OOPS(2260,IEN,NODE))
QUIT
+33 IF CALL=1
IF $PIECE(^OOPS(2260,IEN,NODE),U,5)'=""
SET FLG=1
+34 IF CALL=2
IF $PIECE(^OOPS(2260,IEN,NODE),U,2)'=""
SET FLG=1
+35 ; patch 5 llh - added reset flag if form = DUAL
+36 IF FORM="DUAL"
SET FLG=""
+37 FOR I=$PIECE(FIELD,","):1:$PIECE(FIELD,",",2)
SET $PIECE(^OOPS(2260,IEN,NODE),U,I)=""
+38 IF FLG&('$GET(DOL))
Begin DoDot:1
+39 ; Added '$$BROKER^XWBLIB to line below ASISTS V2.0 11/09/01 LLH
+40 IF '$$BROKER^XWBLIB
WRITE !!,"Your ES has been cleared. You will need to resign.",!
+41 ;PATCH 11 CLEAR DATE SENT TO NDB IF SAFETY SIGNATURE REMOVED
+42 IF CALLER="O"
SET $PIECE(^OOPS(2260,IEN,0),U,11)=""
End DoDot:1
+43 ; Security on ES - late in patch 8
+44 ; clears checksums set when emp portion of claim signed by emp
+45 ; patch 5 llh - added form DUAL
+46 IF CALLER="E"&('$GET(DOL))
IF (FORM'="DUAL")
Begin DoDot:1
+47 NEW RECORD
+48 SET RECORD=$GET(^OOPS(2260,IEN,"CA"))
+49 SET $PIECE(RECORD,U,7)=""
SET $PIECE(RECORD,U,9)=""
SET ^OOPS(2260,IEN,"CA")=RECORD
End DoDot:1
+50 QUIT
PAID(IEN,FLD) ; Get the data value from the PAID file (#450), if employee
+1 ; Input - IEN internal entry number of case in file 2260
+2 ; - FLD the PAID field number to retrieve
+3 ; - NAME Name of Person Involved, used to get PAID IEN
+4 ; - VAL Data value from the PAID #450, field #FLD
+5 ; Output - DESC Description from Paid, if there
+6 ;
+7 NEW DESC,IEN450,NAME,LP
+8 SET DESC=""
SET LP=0
+9 SET NAME=$$GET1^DIQ(2260,IEN,1)
+10 DO FIND^DIC(450,,"@;8","MPS",NAME,100)
+11 IF $GET(DIERR)
DO CLEAN^DILF
QUIT
+12 FOR
SET LP=$ORDER(^TMP("DILIST",$JOB,LP))
if LP=""
QUIT
Begin DoDot:1
+13 IF $$GET1^DIQ(2260,IEN,5)=$PIECE(^TMP("DILIST",$JOB,LP,0),U,2)
Begin DoDot:2
+14 SET IEN450=$PIECE(^TMP("DILIST",$JOB,LP,0),U)
+15 SET DESC=$$GET1^DIQ(450,IEN450,FLD)
End DoDot:2
End DoDot:1
+16 QUIT DESC
+17 ;
PAYP(PAY) ; Map PAID Pay Plan to higher category for DOL project
+1 ;
+2 ; Input - PLAN This is the PAID Pay Plan Description
+3 ; from file 454, not the PAID Code
+4 ; Output - PPLAN Pay Plan that PAID Code maps to
+5 ;
+6 NEW PPLAN
+7 SET PPLAN=$SELECT($EXTRACT(PAY)="G":"GS",$EXTRACT(PAY)="W":"WG",$EXTRACT(PAY)="N":"WG",$EXTRACT(PAY)="V":PAY,PAY="AD":PAY,$EXTRACT(PAY)="E":PAY,$EXTRACT(PAY)="S":PAY,1:"OT")
+8 QUIT PPLAN