FSCEC ;SLC/STAFF-NOIS List Edit Close ;12/15/96 17:17
;;1.1;NOIS;;Sep 06, 1998
;
CLOSE(CALL,OK) ; from FSCEL, FSCLMPE1
N CDATE,FUNC,OPER,TASK S OK=1
D DATA(CALL,"SUMMARY",.CDATE,.FUNC,.TASK,.OPER)
I OPER'="ACCEPT" S OK=0 W !,"Call has NOT been closed.",$C(7) H 2 Q
D CLOSE^FSCEF(CALL,"SUMMARY",CDATE,FUNC,TASK)
Q
;
DATA(CALL,TYPE,CDATE,FUNC,TASK,OPER) ; from FSCEB
N OK
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))
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)))
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)))
S OPER="QUIT"
D WP^FSCEU(TYPE,"Enter a resolution summary:")
Q:'$G(^TMP("FSC TEXT",$J,TYPE)) Q:$D(DTOUT)
D
.I 'CDATE D CDATE^FSCECD(CALL,.CDATE,.OK) I 'OK Q
.I 'FUNC D FUNC^FSCECD(.FUNC,.OK) I 'OK Q
.I 'TASK D TASK^FSCECD(.TASK,.OK) I 'OK Q
Q:$D(DTOUT)
D COMPLETE(CALL,TYPE,.CDATE,.FUNC,.TASK,.OPER)
Q
;
COMPLETE(CALL,TYPE,CDATE,FUNC,TASK,OPER) ; from FSCEDC
N DONE,OK
S DONE=0 F D Q:DONE
.D
..I $G(^TMP("FSC TEXT",$J,TYPE)),CDATE,FUNC,TASK D ACCEPT(.OPER) Q
..D EDIT(.OPER)
.I OPER'="EDIT" S DONE=1 Q
.D EDITWP^FSCEU("^TMP(""FSC TEXT"","_$J_","""_TYPE_""")","Edit Resolution Summary:")
.I '$G(^TMP("FSC TEXT",$J,TYPE)) Q
.D CDATE^FSCECD(CALL,.CDATE,.OK) I 'OK Q
.D FUNC^FSCECD(.FUNC,.OK) I 'OK Q
.D TASK^FSCECD(.TASK,.OK)
Q
;
EDIT(OPER) ;
N DIR,X,Y K DIR
S DIR(0)="YAO",DIR("A")="Incomplete information. Do you want to edit the data? ",DIR("B")="YES"
S DIR("?",1)="In order to close a call, you must enter all closing information."
S DIR("?",2)="Enter YES to reedit this information."
S DIR("?",3)="Enter NO or '^' to exit, '??' for more help."
S DIR("?")="^D HELP^FSCU(.DIR)"
S DIR("??")="FSC U1 NOIS"
D ^DIR K DIR
I Y=1 S OPER="EDIT" Q
S OPER="QUIT"
Q
;
ACCEPT(OPER) ;
N DIR,X,Y K DIR
S DIR(0)="SAMO^ACCEPT:ACCEPT;EDIT:EDIT",DIR("A")="(E)dit or (A)ccept to close call: ",DIR("B")="ACCEPT"
S DIR("?",1)="Enter ACCEPT to close this call."
S DIR("?",2)="Enter EDIT to reedit the closing information."
S DIR("?",3)="Enter '^' to exit without closing the call or '??' for more help."
S DIR("?")="^D HELP^FSCU(.DIR)"
S DIR("??")="FSC U1 NOIS"
D ^DIR K DIR
I Y="EDIT" S OPER="EDIT" Q
I Y="ACCEPT" S OPER="ACCEPT" Q
S OPER="QUIT"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCEC 2451 printed Oct 16, 2024@18:18:05 Page 2
FSCEC ;SLC/STAFF-NOIS List Edit Close ;12/15/96 17:17
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
CLOSE(CALL,OK) ; from FSCEL, FSCLMPE1
+1 NEW CDATE,FUNC,OPER,TASK
SET OK=1
+2 DO DATA(CALL,"SUMMARY",.CDATE,.FUNC,.TASK,.OPER)
+3 IF OPER'="ACCEPT"
SET OK=0
WRITE !,"Call has NOT been closed.",$CHAR(7)
HANG 2
QUIT
+4 DO CLOSE^FSCEF(CALL,"SUMMARY",CDATE,FUNC,TASK)
+5 QUIT
+6 ;
DATA(CALL,TYPE,CDATE,FUNC,TASK,OPER) ; from FSCEB
+1 NEW OK
+2 SET CDATE=$$CDATE^FSCEUD(DUZ)
if $PIECE(CDATE,U)="P"
SET CDATE=$PIECE(CDATE,U,2)
IF $PIECE(CDATE,U)="S"
SET CDATE=$$DATE^FSCU($PIECE(CDATE,U,2))
+3 SET FUNC=$$FUNC^FSCEUD(DUZ)
SET FUNC=$SELECT($PIECE(FUNC,U)="P":$PIECE(FUNC,U,2),1:+$ORDER(^FSC("FUNC","B",$PIECE(FUNC,U,2),0)))
+4 SET TASK=$$TASK^FSCEUD(DUZ)
SET TASK=$SELECT($PIECE(TASK,U)="P":$PIECE(TASK,U,2),1:+$ORDER(^FSC("TASK","B",$PIECE(TASK,U,2),0)))
+5 SET OPER="QUIT"
+6 DO WP^FSCEU(TYPE,"Enter a resolution summary:")
+7 if '$GET(^TMP("FSC TEXT",$JOB,TYPE))
QUIT
if $DATA(DTOUT)
QUIT
+8 Begin DoDot:1
+9 IF 'CDATE
DO CDATE^FSCECD(CALL,.CDATE,.OK)
IF 'OK
QUIT
+10 IF 'FUNC
DO FUNC^FSCECD(.FUNC,.OK)
IF 'OK
QUIT
+11 IF 'TASK
DO TASK^FSCECD(.TASK,.OK)
IF 'OK
QUIT
End DoDot:1
+12 if $DATA(DTOUT)
QUIT
+13 DO COMPLETE(CALL,TYPE,.CDATE,.FUNC,.TASK,.OPER)
+14 QUIT
+15 ;
COMPLETE(CALL,TYPE,CDATE,FUNC,TASK,OPER) ; from FSCEDC
+1 NEW DONE,OK
+2 SET DONE=0
FOR
Begin DoDot:1
+3 Begin DoDot:2
+4 IF $GET(^TMP("FSC TEXT",$JOB,TYPE))
IF CDATE
IF FUNC
IF TASK
DO ACCEPT(.OPER)
QUIT
+5 DO EDIT(.OPER)
End DoDot:2
+6 IF OPER'="EDIT"
SET DONE=1
QUIT
+7 DO EDITWP^FSCEU("^TMP(""FSC TEXT"","_$JOB_","""_TYPE_""")","Edit Resolution Summary:")
+8 IF '$GET(^TMP("FSC TEXT",$JOB,TYPE))
QUIT
+9 DO CDATE^FSCECD(CALL,.CDATE,.OK)
IF 'OK
QUIT
+10 DO FUNC^FSCECD(.FUNC,.OK)
IF 'OK
QUIT
+11 DO TASK^FSCECD(.TASK,.OK)
End DoDot:1
if DONE
QUIT
+12 QUIT
+13 ;
EDIT(OPER) ;
+1 NEW DIR,X,Y
KILL DIR
+2 SET DIR(0)="YAO"
SET DIR("A")="Incomplete information. Do you want to edit the data? "
SET DIR("B")="YES"
+3 SET DIR("?",1)="In order to close a call, you must enter all closing information."
+4 SET DIR("?",2)="Enter YES to reedit this information."
+5 SET DIR("?",3)="Enter NO or '^' to exit, '??' for more help."
+6 SET DIR("?")="^D HELP^FSCU(.DIR)"
+7 SET DIR("??")="FSC U1 NOIS"
+8 DO ^DIR
KILL DIR
+9 IF Y=1
SET OPER="EDIT"
QUIT
+10 SET OPER="QUIT"
+11 QUIT
+12 ;
ACCEPT(OPER) ;
+1 NEW DIR,X,Y
KILL DIR
+2 SET DIR(0)="SAMO^ACCEPT:ACCEPT;EDIT:EDIT"
SET DIR("A")="(E)dit or (A)ccept to close call: "
SET DIR("B")="ACCEPT"
+3 SET DIR("?",1)="Enter ACCEPT to close this call."
+4 SET DIR("?",2)="Enter EDIT to reedit the closing information."
+5 SET DIR("?",3)="Enter '^' to exit without closing the call or '??' for more help."
+6 SET DIR("?")="^D HELP^FSCU(.DIR)"
+7 SET DIR("??")="FSC U1 NOIS"
+8 DO ^DIR
KILL DIR
+9 IF Y="EDIT"
SET OPER="EDIT"
QUIT
+10 IF Y="ACCEPT"
SET OPER="ACCEPT"
QUIT
+11 SET OPER="QUIT"
+12 QUIT