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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCED 1716 printed Dec 13, 2024@02:17:30 Page 2
FSCED ;SLC/STAFF-NOIS List Edit Duplicate ;8/30/97 17:02
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
DUP ; from FSCLMP
+1 NEW ABBREV,ASK,CALLID,CALLNUM,DA,DIE,DR,OK,OLDCALL,OLDV,SITE,SITE0,STATUS,STUFF,RDATE
KILL OLDV
+2 DO ID^FSCELID(.SITE,.RDATE,.CALLID,.CALLNUM,.OK)
+3 IF 'OK
QUIT
+4 WRITE !?5,"Call ID: ",CALLID
+5 SET SITE0=^FSC("SITE",SITE,0)
+6 SET OLDCALL=$$CALL^FSCLMPE1(FSCCNT)
+7 FOR ABBREV="DESC","DEVSTAT","DEVSUB","FUNC","HRS","KEYWORDS","MOD","PRI","STATUS","SUBJECT","SUM","TASK"
SET OLDV(ABBREV)=""
+8 DO GET^FSCGET("CUSTOM",OLDCALL,.OLDV)
+9 SET DA=CALLNUM
SET DIE="^FSCD(""CALL"","
SET DR="2///`"_SITE_";10///"_RDATE_";120///NOW"
SET (ASK,STUFF)=""
+10 Begin DoDot:1
+11 IF OLDV("MOD")
SET STUFF=STUFF_";3///`"_+OLDV("MOD")
QUIT
+12 SET ASK=ASK_";3T"
End DoDot:1
+13 DO STRING^FSCELS($$SPEC^FSCELS(DUZ),.STUFF,.ASK)
+14 Begin DoDot:1
+15 IF $LENGTH(OLDV("SUBJECT"))
SET STUFF=STUFF_";1///"_OLDV("SUBJECT")
QUIT
+16 SET ASK=ASK_";1T"
End DoDot:1
+17 IF 'OLDV("DESC")
SET ASK=ASK_";30Problem Description"
+18 DO STRING^FSCELS($$CONTACT^FSCELS(SITE0,DUZ),.STUFF,.ASK)
+19 ;D STRING^FSCELS($$PHONE^FSCEUD(SITE0,DUZ),.STUFF,.ASK)
+20 Begin DoDot:1
+21 IF OLDV("PRI")
SET STUFF=STUFF_";6///`"_+OLDV("PRI")
QUIT
+22 SET ASK=ASK_";6T"
End DoDot:1
+23 IF OLDV("DEVSUB")
SET STUFF=STUFF_";3.2///`"_+OLDV("DEVSUB")
+24 IF $LENGTH($PIECE(OLDV("KEYWORDS"),U))
SET STUFF=STUFF_";1.5///"_$PIECE(OLDV("KEYWORDS"),U)
+25 SET DR=DR_STUFF_ASK
+26 LOCK +^FSCD("CALL",CALLNUM):30
IF '$TEST
DO SOMEONE^FSCLMPE1
QUIT
+27 IF OLDV("DESC")
MERGE ^FSCD("CALL",CALLNUM,30)=^FSCD("CALL",OLDCALL,30)
+28 DO ^DIE
+29 LOCK -^FSCD("CALL",CALLNUM)
+30 DO PICKUP^FSCES(CALLNUM)
+31 SET STATUS=+$$STAT^FSCESU($PIECE(OLDV("STATUS"),U),$PIECE(OLDV("DEVSTAT"),U))
+32 IF STATUS=2
Begin DoDot:1
+33 DO CLOSE^FSCEDC(CALLNUM,OLDCALL,.OLDV,.STATUS)
+34 IF STATUS'=2
WRITE !,"This duplicate call is NOT closed.",$CHAR(7)
HANG 2
End DoDot:1
+35 DO STATUS^FSCES(CALLNUM,"",STATUS)
+36 DO UPDATE^FSCTASK(CALLNUM)
+37 DO LIST^FSCELL(CALLNUM)
+38 QUIT