source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCEC.m@ 949

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

initial load of WorldVistAEHR

File size: 2.3 KB
RevLine 
[613]1FSCEC ;SLC/STAFF-NOIS List Edit Close ;12/15/96 17:17
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4CLOSE(CALL,OK) ; from FSCEL, FSCLMPE1
5 N CDATE,FUNC,OPER,TASK S OK=1
6 D DATA(CALL,"SUMMARY",.CDATE,.FUNC,.TASK,.OPER)
7 I OPER'="ACCEPT" S OK=0 W !,"Call has NOT been closed.",$C(7) H 2 Q
8 D CLOSE^FSCEF(CALL,"SUMMARY",CDATE,FUNC,TASK)
9 Q
10 ;
11DATA(CALL,TYPE,CDATE,FUNC,TASK,OPER) ; from FSCEB
12 N OK
13 S CDATE=$$CDATE^FSCEUD(DUZ) S:$P(CDATE,U)="P" CDATE=$P(CDATE,U,2) I $P(CDATE,U)="S" S CDATE=$$DATE^FSCU($P(CDATE,U,2))
14 S FUNC=$$FUNC^FSCEUD(DUZ),FUNC=$S($P(FUNC,U)="P":$P(FUNC,U,2),1:+$O(^FSC("FUNC","B",$P(FUNC,U,2),0)))
15 S TASK=$$TASK^FSCEUD(DUZ),TASK=$S($P(TASK,U)="P":$P(TASK,U,2),1:+$O(^FSC("TASK","B",$P(TASK,U,2),0)))
16 S OPER="QUIT"
17 D WP^FSCEU(TYPE,"Enter a resolution summary:")
18 Q:'$G(^TMP("FSC TEXT",$J,TYPE)) Q:$D(DTOUT)
19 D
20 .I 'CDATE D CDATE^FSCECD(CALL,.CDATE,.OK) I 'OK Q
21 .I 'FUNC D FUNC^FSCECD(.FUNC,.OK) I 'OK Q
22 .I 'TASK D TASK^FSCECD(.TASK,.OK) I 'OK Q
23 Q:$D(DTOUT)
24 D COMPLETE(CALL,TYPE,.CDATE,.FUNC,.TASK,.OPER)
25 Q
26 ;
27COMPLETE(CALL,TYPE,CDATE,FUNC,TASK,OPER) ; from FSCEDC
28 N DONE,OK
29 S DONE=0 F D Q:DONE
30 .D
31 ..I $G(^TMP("FSC TEXT",$J,TYPE)),CDATE,FUNC,TASK D ACCEPT(.OPER) Q
32 ..D EDIT(.OPER)
33 .I OPER'="EDIT" S DONE=1 Q
34 .D EDITWP^FSCEU("^TMP(""FSC TEXT"","_$J_","""_TYPE_""")","Edit Resolution Summary:")
35 .I '$G(^TMP("FSC TEXT",$J,TYPE)) Q
36 .D CDATE^FSCECD(CALL,.CDATE,.OK) I 'OK Q
37 .D FUNC^FSCECD(.FUNC,.OK) I 'OK Q
38 .D TASK^FSCECD(.TASK,.OK)
39 Q
40 ;
41EDIT(OPER) ;
42 N DIR,X,Y K DIR
43 S DIR(0)="YAO",DIR("A")="Incomplete information. Do you want to edit the data? ",DIR("B")="YES"
44 S DIR("?",1)="In order to close a call, you must enter all closing information."
45 S DIR("?",2)="Enter YES to reedit this information."
46 S DIR("?",3)="Enter NO or '^' to exit, '??' for more help."
47 S DIR("?")="^D HELP^FSCU(.DIR)"
48 S DIR("??")="FSC U1 NOIS"
49 D ^DIR K DIR
50 I Y=1 S OPER="EDIT" Q
51 S OPER="QUIT"
52 Q
53 ;
54ACCEPT(OPER) ;
55 N DIR,X,Y K DIR
56 S DIR(0)="SAMO^ACCEPT:ACCEPT;EDIT:EDIT",DIR("A")="(E)dit or (A)ccept to close call: ",DIR("B")="ACCEPT"
57 S DIR("?",1)="Enter ACCEPT to close this call."
58 S DIR("?",2)="Enter EDIT to reedit the closing information."
59 S DIR("?",3)="Enter '^' to exit without closing the call or '??' for more help."
60 S DIR("?")="^D HELP^FSCU(.DIR)"
61 S DIR("??")="FSC U1 NOIS"
62 D ^DIR K DIR
63 I Y="EDIT" S OPER="EDIT" Q
64 I Y="ACCEPT" S OPER="ACCEPT" Q
65 S OPER="QUIT"
66 Q
Note: See TracBrowser for help on using the repository browser.