1 | FSCEDC ;SLC/STAFF-NOIS List Edit Duplicate Close ;12/15/96 17:00
|
---|
2 | ;;1.1;NOIS;;Sep 06, 1998
|
---|
3 | ;
|
---|
4 | CLOSE(CALLNUM,OLDCALL,OLDV,STATUS) ; from FSCED
|
---|
5 | N CDATE,DA,DIE,DONE,DR,EDIT,FUNC,OK,OPER,TASK,TYPE
|
---|
6 | W !,"This call is copied from a call that was closed."
|
---|
7 | W !,"If you wish to edit or make a note on this call before proceeding"
|
---|
8 | W !,"to close this call, you may do so now."
|
---|
9 | S DONE=0 F D Q:DONE
|
---|
10 | .D EDIT(.EDIT) I EDIT="ACCEPT"!$D(DIRUT) S DONE=1 Q
|
---|
11 | .I EDIT="EDIT" D
|
---|
12 | ..S DA=CALLNUM,DIE="^FSCD(""CALL"",",DR="1R;2.1R;2.2R;3;5R;6R;30;"
|
---|
13 | ..L +^FSCD("CALL",CALLNUM):1 I '$T D SOMEONE^FSCLMPE1 Q
|
---|
14 | ..D ^DIE
|
---|
15 | ..L -^FSCD("CALL",CALLNUM)
|
---|
16 | ..I $D(DTOUT) S DONE=1
|
---|
17 | .I EDIT="NOTE" D
|
---|
18 | ..D DATA^FSCEN("ACTION",.OPER)
|
---|
19 | ..I OPER="TIMEOUT" S DONE=1 Q
|
---|
20 | ..I OPER="QUIT" Q
|
---|
21 | ..I OPER="ACCEPT" D NOTE^FSCEF(CALLNUM,"ACTION")
|
---|
22 | I EDIT'="ACCEPT" S STATUS=1
|
---|
23 | Q:$D(DTOUT) Q:$D(DIRUT)
|
---|
24 | S TYPE="SUMMARY" M ^TMP("FSC TEXT",$J,TYPE)=^FSCD("CALL",OLDCALL,80)
|
---|
25 | S ^TMP("FSC TEXT",$J,TYPE)=+$P(^FSCD("CALL",OLDCALL,80,0),U,3)
|
---|
26 | 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))
|
---|
27 | I 'CDATE D CDATE^FSCECD(CALLNUM,.CDATE,.OK) I 'OK Q
|
---|
28 | S FUNC=+OLDV("FUNC"),TASK=+OLDV("TASK")
|
---|
29 | D COMPLETE^FSCEC(CALLNUM,TYPE,.CDATE,.FUNC,.TASK,.OPER)
|
---|
30 | I OPER'="ACCEPT" S STATUS=1 Q
|
---|
31 | D CLOSE^FSCEF(CALLNUM,TYPE,CDATE,FUNC,TASK)
|
---|
32 | Q
|
---|
33 | ;
|
---|
34 | EDIT(EDIT) ;
|
---|
35 | N DIR,X,Y K DIR
|
---|
36 | S DIR(0)="SAMO^EDIT:EDIT;NOTE:NOTE;ACCEPT:ACCEPT",DIR("A")="(E)dit, make a (N)ote, or (A)ccept: ",DIR("B")="ACCEPT"
|
---|
37 | S DIR("?",1)="Enter EDIT to edit the call (this does not include the close data)."
|
---|
38 | S DIR("?",2)="Enter NOTE to add a note to the call."
|
---|
39 | S DIR("?",3)="Enter ACCEPT to proceed to closing the call."
|
---|
40 | S DIR("?")="^D HELP^FSCU(.DIR)"
|
---|
41 | S DIR("??")="FSC U1 NOIS"
|
---|
42 | D ^DIR K DIR
|
---|
43 | S EDIT=Y
|
---|
44 | Q
|
---|