OOPSSOF1 ;HINES/WAA-SOF/E Safety officer Edit Routine ;3/30/98
;;2.0;ASISTS;;Jun 03, 2002
;;
; The call to $$SAFETY^OOPSUTL2 filters cases that have not been
; signed by the Supervisor. Only signed cases can be selected.
EN1 ; Main Entry Point
N SSN,IEN,FORM,SIGN
S IEN=0
Q:DUZ<1
Q:$G(^VA(200,DUZ,1))=""
S SSN=$P(^VA(200,DUZ,1),U,9)
D Q:IEN<1
.N DIC,X
.S DIC="^OOPS(2260,",DIC("S")="I '$$GET1^DIQ(2260,Y,51,""I""),$$SAFETY^OOPSUTL2(Y)"
.S DIC(0)="AEMNZ",DIC("A")="Select Case: "
.D ^DIC
.Q:Y<1
.Q:$D(DTOUT)!($D(DUOUT))
.S IEN=$P(Y,U)
.Q
D FORM I $D(Y) G EXIT
D SIGN(FORM)
I $P(SIGN,U) D CLOSE
EXIT K DIC,SUP
Q
CLOSE ; Close
N DR,DIE
S DR="",DA=IEN,DIE="^OOPS(2260,"
S DR="51 CASE STATUS..................//C"
D ^DIE
Q
FORM ; Form
S FORM="2162"
N DR,DIE
D ^OOPSDIS
; Patch 8 - changed call from local subroutine
D CLRES^OOPSUTL1(IEN,"O",FORM)
S DR="",DIE="^OOPS(2260,",DA=IEN
; Patch 5 - changed order of the following 2 prompts
S DR(1,2260,1)="47 CORRECTIVE ACTION TAKEN......"
S DR(1,2260,5)="55 SAFETY OFF. COMMENTS........."
D ^DIE
Q
SIGN(FORM) ; Sign/validate Document
N INC,VALID,SSIGN,ESIGN,CLOSE,MSG,Y
S CLOSE=1,VALID=0,SIGN=""
W ! ; Added linefeed for readablitiy - P8
D VALIDATE^OOPSUTL4(IEN,FORM,"O",.VALID) W !
I 'VALID Q
S INC=$$GET1^DIQ(2260,IEN,52,"I")
S SSIGN=$$EDSTA^OOPSUTL1(IEN,"S")
S ESIGN=$$EDSTA^OOPSUTL1(IEN,"E")
; Patch 8 - determine if emp & super have signed CA, if not, give
; safety option of signing. Else, sign without asking
I '$P(ESIGN,U,INC) D
. W !,"The Employee portion of the CA",$S(INC=1:1,INC=2:2,1:0)," has not been signed."
. S CLOSE=0
. Q
I '$P(SSIGN,U,INC) D
. W !,"The Supervisor portion of the CA",$S(INC=1:1,INC=2:2,1:0)," has not been signed."
. S CLOSE=0
. Q
I 'CLOSE D
. S MSG("DIHELP",1)=""
. S MSG("DIHELP",2)="The Employee or Supervisor has not signed their"
. S MSG("DIHELP",3)="part of the CA Claim form."
. S MSG("DIHELP",4)="Signing the form now closes the case and removes"
. S MSG("DIHELP",5)="it from everyone's selection list for editing."
. D MSG^DIALOG("WH","","","","MSG")
. K DIR S DIR(0)="S^1:Yes;0:No"
. S DIR("A")="Do you want to sign the Case"
. D ^DIR K DIR
. S CLOSE=$S(Y=1:1,Y=0:0,1:0)
. Q
I 'CLOSE Q
S SIGN=$$SIG^OOPSESIG(DUZ,IEN)
; file electronic signature
I $P(SIGN,U) D
. S $P(^OOPS(2260,IEN,"2162ES"),U,4,6)=SIGN
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOOPSSOF1 2447 printed Nov 22, 2024@16:49:51 Page 2
OOPSSOF1 ;HINES/WAA-SOF/E Safety officer Edit Routine ;3/30/98
+1 ;;2.0;ASISTS;;Jun 03, 2002
+2 ;;
+3 ; The call to $$SAFETY^OOPSUTL2 filters cases that have not been
+4 ; signed by the Supervisor. Only signed cases can be selected.
EN1 ; Main Entry Point
+1 NEW SSN,IEN,FORM,SIGN
+2 SET IEN=0
+3 if DUZ<1
QUIT
+4 if $GET(^VA(200,DUZ,1))=""
QUIT
+5 SET SSN=$PIECE(^VA(200,DUZ,1),U,9)
+6 Begin DoDot:1
+7 NEW DIC,X
+8 SET DIC="^OOPS(2260,"
SET DIC("S")="I '$$GET1^DIQ(2260,Y,51,""I""),$$SAFETY^OOPSUTL2(Y)"
+9 SET DIC(0)="AEMNZ"
SET DIC("A")="Select Case: "
+10 DO ^DIC
+11 if Y<1
QUIT
+12 if $DATA(DTOUT)!($DATA(DUOUT))
QUIT
+13 SET IEN=$PIECE(Y,U)
+14 QUIT
End DoDot:1
if IEN<1
QUIT
+15 DO FORM
IF $DATA(Y)
GOTO EXIT
+16 DO SIGN(FORM)
+17 IF $PIECE(SIGN,U)
DO CLOSE
EXIT KILL DIC,SUP
+1 QUIT
CLOSE ; Close
+1 NEW DR,DIE
+2 SET DR=""
SET DA=IEN
SET DIE="^OOPS(2260,"
+3 SET DR="51 CASE STATUS..................//C"
+4 DO ^DIE
+5 QUIT
FORM ; Form
+1 SET FORM="2162"
+2 NEW DR,DIE
+3 DO ^OOPSDIS
+4 ; Patch 8 - changed call from local subroutine
+5 DO CLRES^OOPSUTL1(IEN,"O",FORM)
+6 SET DR=""
SET DIE="^OOPS(2260,"
SET DA=IEN
+7 ; Patch 5 - changed order of the following 2 prompts
+8 SET DR(1,2260,1)="47 CORRECTIVE ACTION TAKEN......"
+9 SET DR(1,2260,5)="55 SAFETY OFF. COMMENTS........."
+10 DO ^DIE
+11 QUIT
SIGN(FORM) ; Sign/validate Document
+1 NEW INC,VALID,SSIGN,ESIGN,CLOSE,MSG,Y
+2 SET CLOSE=1
SET VALID=0
SET SIGN=""
+3 ; Added linefeed for readablitiy - P8
WRITE !
+4 DO VALIDATE^OOPSUTL4(IEN,FORM,"O",.VALID)
WRITE !
+5 IF 'VALID
QUIT
+6 SET INC=$$GET1^DIQ(2260,IEN,52,"I")
+7 SET SSIGN=$$EDSTA^OOPSUTL1(IEN,"S")
+8 SET ESIGN=$$EDSTA^OOPSUTL1(IEN,"E")
+9 ; Patch 8 - determine if emp & super have signed CA, if not, give
+10 ; safety option of signing. Else, sign without asking
+11 IF '$PIECE(ESIGN,U,INC)
Begin DoDot:1
+12 WRITE !,"The Employee portion of the CA",$SELECT(INC=1:1,INC=2:2,1:0)," has not been signed."
+13 SET CLOSE=0
+14 QUIT
End DoDot:1
+15 IF '$PIECE(SSIGN,U,INC)
Begin DoDot:1
+16 WRITE !,"The Supervisor portion of the CA",$SELECT(INC=1:1,INC=2:2,1:0)," has not been signed."
+17 SET CLOSE=0
+18 QUIT
End DoDot:1
+19 IF 'CLOSE
Begin DoDot:1
+20 SET MSG("DIHELP",1)=""
+21 SET MSG("DIHELP",2)="The Employee or Supervisor has not signed their"
+22 SET MSG("DIHELP",3)="part of the CA Claim form."
+23 SET MSG("DIHELP",4)="Signing the form now closes the case and removes"
+24 SET MSG("DIHELP",5)="it from everyone's selection list for editing."
+25 DO MSG^DIALOG("WH","","","","MSG")
+26 KILL DIR
SET DIR(0)="S^1:Yes;0:No"
+27 SET DIR("A")="Do you want to sign the Case"
+28 DO ^DIR
KILL DIR
+29 SET CLOSE=$SELECT(Y=1:1,Y=0:0,1:0)
+30 QUIT
End DoDot:1
+31 IF 'CLOSE
QUIT
+32 SET SIGN=$$SIG^OOPSESIG(DUZ,IEN)
+33 ; file electronic signature
+34 IF $PIECE(SIGN,U)
Begin DoDot:1
+35 SET $PIECE(^OOPS(2260,IEN,"2162ES"),U,4,6)=SIGN
End DoDot:1
+36 QUIT