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

FSCEL.m

Go to the documentation of this file.
  1. FSCEL ;SLC/STAFF-NOIS Edit Log ;3/16/98 19:24
  1. ;;1.1;NOIS;;Sep 06, 1998
  1. ;
  1. NEW ; from FSCLMP, FSCOPT
  1. N ACTION,CALLID,CALLNUM,OK,RDATE,SITE
  1. D ID^FSCELID(.SITE,.RDATE,.CALLID,.CALLNUM,.OK)
  1. I 'OK Q
  1. W !?5,"Call ID: ",CALLID
  1. I '$$ACCESS^FSCU(DUZ,"SPEC") D NEW^FSCELSNS(CALLID,CALLNUM) Q
  1. D NEW^FSCELS(SITE,CALLNUM)
  1. N CONALERT,CONTACT,CONTNAME
  1. S CONALERT=$$CONALERT^FSCUP
  1. S CONTACT=+$P(^FSCD("CALL",CALLNUM,0),U,6),CONTNAME=""
  1. I CONTACT S CONTNAME=$$VALUE^FSCGET(CONTACT,7100,2.1)
  1. I CONALERT="F" D
  1. .I 'CONTACT W !,"Contact person not filled in.",$C(7) H 2 D RECON^FSCELS(SITE,CALLNUM) Q
  1. .D ALERT(CONTACT,CALLNUM)
  1. I CONALERT="P" D
  1. .I 'CONTACT W !,"Contact person not filled in.",$C(7) H 2 D RECON^FSCELS(SITE,CALLNUM) Q
  1. .N DIR,X,Y K DIR
  1. .S DIR(0)="YAO",DIR("A")="Would "_CONTNAME_" like to automatically be alerted to edits? ",DIR("B")="NO"
  1. .S DIR("?",1)="Enter YES to have this contact person alerted whenever this call is edited."
  1. .S DIR("?",2)="Enter NO to not schedule this person for automatic alerts."
  1. .S DIR("?")="^D HELP^FSCU(.DIR)"
  1. .S DIR("??")="FSC U1 NOIS"
  1. .D ^DIR K DIR
  1. .I Y'=1 D ALERT(CONTACT,CALLNUM)
  1. I $D(DTOUT) D OPEN(CALLID,CALLNUM) Q
  1. N DIR,X,Y K DIR
  1. S DIR(0)="SAMO^MAKE A NOTE:MAKE A NOTE;REFER:REFER;CLOSE:CLOSE;OPEN:OPEN",DIR("A")="Further action - (M)ake a Note, (R)efer, (C)lose, (O)pen: " S DIR("B")=$S($$CLOSE(DUZ):"CLOSE",1:"OPEN")
  1. S DIR("?",1)="Enter M to make a note. The call will remain open."
  1. S DIR("?",2)="Enter R to change the status to Referred."
  1. S DIR("?",3)="Enter C to close this call."
  1. S DIR("?",4)="Enter O or '^' to leave this call open without making a note."
  1. S DIR("?",5)="Enter '??' for additional help."
  1. S DIR("?")="^D HELP^FSCU(.DIR)"
  1. S DIR("??")="FSC U1 NOIS"
  1. D ^DIR K DIR
  1. S ACTION=Y
  1. I ACTION="OPEN"!$D(DIRUT) D OPEN(CALLID,CALLNUM)
  1. I ACTION="CLOSE" D
  1. .;D STATUS^FSCES(CALLNUM,"",1)
  1. .D NOTES("Make a Note (in addition to resolution summary)? ")
  1. .D UPDATE^FSCTASK(CALLNUM)
  1. .D CLOSE^FSCEC(CALLNUM,.OK) I 'OK Q
  1. .D STATUS^FSCES(CALLNUM,1,2)
  1. .D UPDATE^FSCTASK(CALLNUM)
  1. I ACTION="REFER" D
  1. .;D STATUS^FSCES(CALLNUM,"",1)
  1. .D UPDATE^FSCTASK(CALLNUM)
  1. .D STATUS^FSCES(CALLNUM,1,3)
  1. .D NOTES("Include a note with this status change? ")
  1. .D UPDATE^FSCTASK(CALLNUM)
  1. I ACTION="MAKE A NOTE" D
  1. .D NOTES("")
  1. .D OPEN(CALLID,CALLNUM)
  1. D WKLD^FSCEWKLD(CALLNUM,1)
  1. D LIST^FSCELL(CALLNUM)
  1. Q
  1. ;
  1. CLOSE(USER) ; $$(user) -> 1 or 0 for default of prompt to close call
  1. I $P(^FSC("SPEC",USER,0),U,13) Q 1
  1. Q 0
  1. ;
  1. NOTES(ASK) ; get notes
  1. N DIR,OK,OPER,X,Y K DIR
  1. I $L($G(ASK)) S OK=1 D Q:'OK
  1. .S DIR(0)="YAO",DIR("A")=ASK,DIR("B")="NO"
  1. .S DIR("?",1)="Enter YES to make a note on this call."
  1. .S DIR("?",2)="Enter NO change the status without making a note."
  1. .S DIR("?")="^D HELP^FSCU(.DIR)"
  1. .S DIR("??")="FSC U1 NOIS"
  1. .D ^DIR K DIR
  1. .I Y'=1 S OK=0 Q
  1. D DATA^FSCEN("ACTION",.OPER)
  1. I OPER="ACCEPT" D NOTE^FSCEF(CALLNUM,"ACTION")
  1. Q
  1. ;
  1. ALERT(USER,CALL) ; schedule user for alert on call
  1. D SETUP^FSCNOT(CALL,,,USER_U_1,"ALERT","EDITED")
  1. Q
  1. ;
  1. OPEN(CALLID,CALLNUM) ; from FSCELSNS
  1. ; msg if call is not closed or referred, status updated to open
  1. W !,"This call ("_CALLID_") will remain open."
  1. ;D STATUS^FSCES(CALLNUM,"",1)
  1. D UPDATE^FSCTASK(CALLNUM)
  1. H 1
  1. Q