Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: OOPSSOF1

OOPSSOF1.m

Go to the documentation of this file.
  1. OOPSSOF1 ;HINES/WAA-SOF/E Safety officer Edit Routine ;3/30/98
  1. ;;2.0;ASISTS;;Jun 03, 2002
  1. ;;
  1. ; The call to $$SAFETY^OOPSUTL2 filters cases that have not been
  1. ; signed by the Supervisor. Only signed cases can be selected.
  1. EN1 ; Main Entry Point
  1. N SSN,IEN,FORM,SIGN
  1. S IEN=0
  1. Q:DUZ<1
  1. Q:$G(^VA(200,DUZ,1))=""
  1. S SSN=$P(^VA(200,DUZ,1),U,9)
  1. D Q:IEN<1
  1. .N DIC,X
  1. .S DIC="^OOPS(2260,",DIC("S")="I '$$GET1^DIQ(2260,Y,51,""I""),$$SAFETY^OOPSUTL2(Y)"
  1. .S DIC(0)="AEMNZ",DIC("A")="Select Case: "
  1. .D ^DIC
  1. .Q:Y<1
  1. .Q:$D(DTOUT)!($D(DUOUT))
  1. .S IEN=$P(Y,U)
  1. .Q
  1. D FORM I $D(Y) G EXIT
  1. D SIGN(FORM)
  1. I $P(SIGN,U) D CLOSE
  1. EXIT K DIC,SUP
  1. Q
  1. CLOSE ; Close
  1. N DR,DIE
  1. S DR="",DA=IEN,DIE="^OOPS(2260,"
  1. S DR="51 CASE STATUS..................//C"
  1. D ^DIE
  1. Q
  1. FORM ; Form
  1. S FORM="2162"
  1. N DR,DIE
  1. D ^OOPSDIS
  1. ; Patch 8 - changed call from local subroutine
  1. D CLRES^OOPSUTL1(IEN,"O",FORM)
  1. S DR="",DIE="^OOPS(2260,",DA=IEN
  1. ; Patch 5 - changed order of the following 2 prompts
  1. S DR(1,2260,1)="47 CORRECTIVE ACTION TAKEN......"
  1. S DR(1,2260,5)="55 SAFETY OFF. COMMENTS........."
  1. D ^DIE
  1. Q
  1. SIGN(FORM) ; Sign/validate Document
  1. N INC,VALID,SSIGN,ESIGN,CLOSE,MSG,Y
  1. S CLOSE=1,VALID=0,SIGN=""
  1. W ! ; Added linefeed for readablitiy - P8
  1. D VALIDATE^OOPSUTL4(IEN,FORM,"O",.VALID) W !
  1. I 'VALID Q
  1. S INC=$$GET1^DIQ(2260,IEN,52,"I")
  1. S SSIGN=$$EDSTA^OOPSUTL1(IEN,"S")
  1. S ESIGN=$$EDSTA^OOPSUTL1(IEN,"E")
  1. ; Patch 8 - determine if emp & super have signed CA, if not, give
  1. ; safety option of signing. Else, sign without asking
  1. I '$P(ESIGN,U,INC) D
  1. . W !,"The Employee portion of the CA",$S(INC=1:1,INC=2:2,1:0)," has not been signed."
  1. . S CLOSE=0
  1. . Q
  1. I '$P(SSIGN,U,INC) D
  1. . W !,"The Supervisor portion of the CA",$S(INC=1:1,INC=2:2,1:0)," has not been signed."
  1. . S CLOSE=0
  1. . Q
  1. I 'CLOSE D
  1. . S MSG("DIHELP",1)=""
  1. . S MSG("DIHELP",2)="The Employee or Supervisor has not signed their"
  1. . S MSG("DIHELP",3)="part of the CA Claim form."
  1. . S MSG("DIHELP",4)="Signing the form now closes the case and removes"
  1. . S MSG("DIHELP",5)="it from everyone's selection list for editing."
  1. . D MSG^DIALOG("WH","","","","MSG")
  1. . K DIR S DIR(0)="S^1:Yes;0:No"
  1. . S DIR("A")="Do you want to sign the Case"
  1. . D ^DIR K DIR
  1. . S CLOSE=$S(Y=1:1,Y=0:0,1:0)
  1. . Q
  1. I 'CLOSE Q
  1. S SIGN=$$SIG^OOPSESIG(DUZ,IEN)
  1. ; file electronic signature
  1. I $P(SIGN,U) D
  1. . S $P(^OOPS(2260,IEN,"2162ES"),U,4,6)=SIGN
  1. Q