source: WorldVistAEHR/trunk/r/ASISTS-OOPS/OOPSSOF1.m@ 1476

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1OOPSSOF1 ;HINES/WAA-SOF/E Safety officer Edit Routine ;3/30/98
2 ;;2.0;ASISTS;;Jun 03, 2002
3 ;;
4 ; The call to $$SAFETY^OOPSUTL2 filters cases that have not been
5 ; signed by the Supervisor. Only signed cases can be selected.
6EN1 ; Main Entry Point
7 N SSN,IEN,FORM,SIGN
8 S IEN=0
9 Q:DUZ<1
10 Q:$G(^VA(200,DUZ,1))=""
11 S SSN=$P(^VA(200,DUZ,1),U,9)
12 D Q:IEN<1
13 .N DIC,X
14 .S DIC="^OOPS(2260,",DIC("S")="I '$$GET1^DIQ(2260,Y,51,""I""),$$SAFETY^OOPSUTL2(Y)"
15 .S DIC(0)="AEMNZ",DIC("A")="Select Case: "
16 .D ^DIC
17 .Q:Y<1
18 .Q:$D(DTOUT)!($D(DUOUT))
19 .S IEN=$P(Y,U)
20 .Q
21 D FORM I $D(Y) G EXIT
22 D SIGN(FORM)
23 I $P(SIGN,U) D CLOSE
24EXIT K DIC,SUP
25 Q
26CLOSE ; Close
27 N DR,DIE
28 S DR="",DA=IEN,DIE="^OOPS(2260,"
29 S DR="51 CASE STATUS..................//C"
30 D ^DIE
31 Q
32FORM ; Form
33 S FORM="2162"
34 N DR,DIE
35 D ^OOPSDIS
36 ; Patch 8 - changed call from local subroutine
37 D CLRES^OOPSUTL1(IEN,"O",FORM)
38 S DR="",DIE="^OOPS(2260,",DA=IEN
39 ; Patch 5 - changed order of the following 2 prompts
40 S DR(1,2260,1)="47 CORRECTIVE ACTION TAKEN......"
41 S DR(1,2260,5)="55 SAFETY OFF. COMMENTS........."
42 D ^DIE
43 Q
44SIGN(FORM) ; Sign/validate Document
45 N INC,VALID,SSIGN,ESIGN,CLOSE,MSG,Y
46 S CLOSE=1,VALID=0,SIGN=""
47 W ! ; Added linefeed for readablitiy - P8
48 D VALIDATE^OOPSUTL4(IEN,FORM,"O",.VALID) W !
49 I 'VALID Q
50 S INC=$$GET1^DIQ(2260,IEN,52,"I")
51 S SSIGN=$$EDSTA^OOPSUTL1(IEN,"S")
52 S ESIGN=$$EDSTA^OOPSUTL1(IEN,"E")
53 ; Patch 8 - determine if emp & super have signed CA, if not, give
54 ; safety option of signing. Else, sign without asking
55 I '$P(ESIGN,U,INC) D
56 . W !,"The Employee portion of the CA",$S(INC=1:1,INC=2:2,1:0)," has not been signed."
57 . S CLOSE=0
58 . Q
59 I '$P(SSIGN,U,INC) D
60 . W !,"The Supervisor portion of the CA",$S(INC=1:1,INC=2:2,1:0)," has not been signed."
61 . S CLOSE=0
62 . Q
63 I 'CLOSE D
64 . S MSG("DIHELP",1)=""
65 . S MSG("DIHELP",2)="The Employee or Supervisor has not signed their"
66 . S MSG("DIHELP",3)="part of the CA Claim form."
67 . S MSG("DIHELP",4)="Signing the form now closes the case and removes"
68 . S MSG("DIHELP",5)="it from everyone's selection list for editing."
69 . D MSG^DIALOG("WH","","","","MSG")
70 . K DIR S DIR(0)="S^1:Yes;0:No"
71 . S DIR("A")="Do you want to sign the Case"
72 . D ^DIR K DIR
73 . S CLOSE=$S(Y=1:1,Y=0:0,1:0)
74 . Q
75 I 'CLOSE Q
76 S SIGN=$$SIG^OOPSESIG(DUZ,IEN)
77 ; file electronic signature
78 I $P(SIGN,U) D
79 . S $P(^OOPS(2260,IEN,"2162ES"),U,4,6)=SIGN
80 Q
Note: See TracBrowser for help on using the repository browser.