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

FSCED.m

Go to the documentation of this file.
FSCED ;SLC/STAFF-NOIS List Edit Duplicate ;8/30/97  17:02
 ;;1.1;NOIS;;Sep 06, 1998
 ;
DUP ; from FSCLMP
 N ABBREV,ASK,CALLID,CALLNUM,DA,DIE,DR,OK,OLDCALL,OLDV,SITE,SITE0,STATUS,STUFF,RDATE K OLDV
 D ID^FSCELID(.SITE,.RDATE,.CALLID,.CALLNUM,.OK)
 I 'OK Q
 W !?5,"Call ID: ",CALLID
 S SITE0=^FSC("SITE",SITE,0)
 S OLDCALL=$$CALL^FSCLMPE1(FSCCNT)
 F ABBREV="DESC","DEVSTAT","DEVSUB","FUNC","HRS","KEYWORDS","MOD","PRI","STATUS","SUBJECT","SUM","TASK" S OLDV(ABBREV)=""
 D GET^FSCGET("CUSTOM",OLDCALL,.OLDV)
 S DA=CALLNUM,DIE="^FSCD(""CALL"",",DR="2///`"_SITE_";10///"_RDATE_";120///NOW",(ASK,STUFF)=""
 D
 .I OLDV("MOD") S STUFF=STUFF_";3///`"_+OLDV("MOD") Q
 .S ASK=ASK_";3T"
 D STRING^FSCELS($$SPEC^FSCELS(DUZ),.STUFF,.ASK)
 D
 .I $L(OLDV("SUBJECT")) S STUFF=STUFF_";1///"_OLDV("SUBJECT") Q
 .S ASK=ASK_";1T"
 I 'OLDV("DESC") S ASK=ASK_";30Problem Description"
 D STRING^FSCELS($$CONTACT^FSCELS(SITE0,DUZ),.STUFF,.ASK)
 ;D STRING^FSCELS($$PHONE^FSCEUD(SITE0,DUZ),.STUFF,.ASK)
 D
 .I OLDV("PRI") S STUFF=STUFF_";6///`"_+OLDV("PRI") Q
 .S ASK=ASK_";6T"
 I OLDV("DEVSUB") S STUFF=STUFF_";3.2///`"_+OLDV("DEVSUB")
 I $L($P(OLDV("KEYWORDS"),U)) S STUFF=STUFF_";1.5///"_$P(OLDV("KEYWORDS"),U)
 S DR=DR_STUFF_ASK
 L +^FSCD("CALL",CALLNUM):30 I '$T D SOMEONE^FSCLMPE1 Q
 I OLDV("DESC") M ^FSCD("CALL",CALLNUM,30)=^FSCD("CALL",OLDCALL,30)
 D ^DIE
 L -^FSCD("CALL",CALLNUM)
 D PICKUP^FSCES(CALLNUM)
 S STATUS=+$$STAT^FSCESU($P(OLDV("STATUS"),U),$P(OLDV("DEVSTAT"),U))
 I STATUS=2 D
 .D CLOSE^FSCEDC(CALLNUM,OLDCALL,.OLDV,.STATUS)
 .I STATUS'=2 W !,"This duplicate call is NOT closed.",$C(7) H 2
 D STATUS^FSCES(CALLNUM,"",STATUS)
 D UPDATE^FSCTASK(CALLNUM)
 D LIST^FSCELL(CALLNUM)
 Q