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

FSCLMPE1.m

Go to the documentation of this file.
FSCLMPE1 ;SLC/STAFF-NOIS List Manager Protocol Edit Cont. 1 ;9/6/98  20:59
 ;;1.1;NOIS;;Sep 06, 1998
 ;
BASIC ; from FSCLMPE
 N ABBREV,CALLNUM,DA,DIE,DR,NEWV,OK,OLDV K NEWV,OLDV
 S (CALLNUM,DA)=$$CALL(FSCCNT)
 D CHECK(CALLNUM,.OK) I 'OK Q
 F ABBREV="MOD","SPEC","PRI" S OLDV(ABBREV)=""
 D GET^FSCGET("CUSTOM",CALLNUM,.OLDV)
 S DIE="^FSCD(""CALL"",",DR="3Module;6T;5T"
 L +^FSCD("CALL",CALLNUM):1 I '$T D SOMEONE Q
 D ^DIE
 L -^FSCD("CALL",CALLNUM)
 D PICKUP^FSCES(CALLNUM)
 M NEWV=OLDV D GET^FSCGET("CUSTOM",CALLNUM,.NEWV)
 D AUDIT^FSCAUDIT(CALLNUM,.OLDV,.NEWV)
 D MRE^FSCMR(DUZ,CALLNUM)
 D WKLD^FSCEWKLD(CALLNUM,1)
 D UPDATE^FSCEU(CALLNUM)
 Q
 ;
DESC ; from FSCLMPE
 N CALLNUM,DA,DIC,DWLW,DWPK,NEWV,OK,OLDV K NEWV,OLDV
 S (CALLNUM,DA)=$$CALL(FSCCNT)
 D CHECK(CALLNUM,.OK) I 'OK Q
 S OLDV("DESC")=$$CHKSUM("^FSCD(""CALL"","_DA_",30)")
 S DIC="^FSCD(""CALL"","_DA_",30,",DWLW=80,DWPK=1
 L +^FSCD("CALL",CALLNUM):1 I '$T D SOMEONE Q
 D EN^DIWE
 L -^FSCD("CALL",CALLNUM)
 S NEWV("DESC")=$$CHKSUM("^FSCD(""CALL"","_DA_",30)")
 D DESC^FSCAUDIT(CALLNUM,.OLDV,.NEWV)
 D MRE^FSCMR(DUZ,CALLNUM)
 D WKLD^FSCEWKLD(CALLNUM,1)
 D UPDATE^FSCEU(CALLNUM)
 Q
 ;
PFIELDS ; from FSCLMPE
 N CALLNUM,DA,DIE,DIK,DR,OK
 S CALLNUM=$$CALL(FSCCNT)
 D CHECK(CALLNUM,.OK) I 'OK Q
 S DA=+$G(^FSCD("CALL USER","AUC",DUZ,CALLNUM))
 I 'DA S OK=1 D  I 'OK Q
 .L +^FSCD("CALL USER",0):5 I '$T S OK=0 Q
 .S DA=1+$P(^FSCD("CALL USER",0),U,3)
 .F  Q:'$D(^FSCD("CALL USER",DA,0))  S DA=DA+1
 .S $P(^FSCD("CALL USER",0),U,3)=DA,$P(^(0),U,4)=$P(^(0),U,4)+1
 .S ^FSCD("CALL USER",DA,0)=CALLNUM_U_DUZ
 .L -^FSCD("CALL USER",0)
 .S DIK="^FSCD(""CALL USER"","
 .D IX1^DIK
 S DIE="^FSCD(""CALL USER"",",DR="2:5"
 L +^FSCD("CALL USER",DA):1 I '$T D SOMEONE Q
 D ^DIE
 L -^FSCD("CALL USER",DA)
 S OK=1 D
 .Q:$L($P(^FSCD("CALL USER",DA,0),U,3))  Q:$L($P(^(0),U,4))  Q:$L($G(^(1)))  Q:$O(^(2,0))
 .S OK=0
 I 'OK D DEL^FSCUCD("^FSCD(""CALL USER"",",DA)
 D MRE^FSCMR(DUZ,CALLNUM)
 Q
 ;
WKLD ; from FSCLMPE
 N CALLNUM
 S CALLNUM=$$CALL(FSCCNT)
 I +$$STATCALL^FSCESU(CALLNUM)=99 W !,"This call has been cancelled.",$C(7) H 2 Q
 D WKLD^FSCEWKLD(CALLNUM,0)
 D BUILD^FSCEU(CALLNUM)
 Q
 ;
RES ; from FSCLMP, FSCLMPES
 N CALLNUM,FROM,OK
 S CALLNUM=$$CALL(FSCCNT)
 D CHECK(CALLNUM,.OK) I 'OK Q
 S FROM=+$$STATCALL^FSCESU(CALLNUM)
 I 'FROM D STATUS^FSCES(CALLNUM,"",1) D UPDATE^FSCEU(CALLNUM) W !,"This call did not have a complete status.  The status is now OPEN.",$C(7) H 2 Q
 D CLOSE^FSCEC(CALLNUM,.OK) I 'OK Q
 D STATUS^FSCES(CALLNUM,FROM,2)
 D WKLD^FSCEWKLD(CALLNUM,1)
 D UPDATE^FSCTASK(CALLNUM)
 D BUILD^FSCEU(CALLNUM)
 Q
 ;
ALL ; from FSCLMPE
 N ABBREV,CALLNUM,DA,DIE,DR,NEWV,OK,OLDV,WNEWV,WOLDV K NEWV,OLDV,WNEWV,WOLDV
 S (CALLNUM,DA)=$$CALL(FSCCNT)
 D CHECK(CALLNUM,.OK) I 'OK Q
 F ABBREV="SUBJECT","IRM","PHONE","MOD","SPEC","SPECD","PRI","PATCH","DEVSUB","KEYWORDS" S OLDV(ABBREV)=""
 D GET^FSCGET("CUSTOM",CALLNUM,.OLDV)
 S WOLDV("DESC")=$$CHKSUM("^FSCD(""CALL"","_DA_",30)")
 S DIE="^FSCD(""CALL"",",DR="1R;D CINFO^FSCELS(DA);2.1R;H .1;2.2R//^S X=$$CPHONE^FSCELS(DA);3;S Y=$$SUB^FSCEU(DA);@1;3.2;@2;6R;5;5.1;7;1.5;30;"
 L +^FSCD("CALL",CALLNUM):1 I '$T D SOMEONE Q
 D ^DIE
 L -^FSCD("CALL",CALLNUM)
 D PICKUP^FSCES(CALLNUM)
 M NEWV=OLDV D GET^FSCGET("CUSTOM",CALLNUM,.NEWV)
 S WNEWV("DESC")=$$CHKSUM("^FSCD(""CALL"","_DA_",30)")
 D AUDIT^FSCAUDIT(CALLNUM,.OLDV,.NEWV)
 D DESC^FSCAUDIT(CALLNUM,.WOLDV,.WNEWV)
 D MRE^FSCMR(DUZ,CALLNUM)
 D WKLD^FSCEWKLD(CALLNUM,1)
 D UPDATE^FSCEU(CALLNUM)
 Q
 ;
CHKSUM(ROOT) ; $$ (root array) -> checksum
 N SUM,IX,IX2,XU1,Y
 Q:$D(@ROOT)=0 0
 S (SUM,IX)=0,XU1=ROOT,ROOT=$E(ROOT,1,$L(ROOT)-1)
 F  S Y=$G(@XU1) D  S XU1=$Q(@XU1) Q:XU1'[ROOT
 .F IX2=1:1:$L(Y) S IX=IX+1,SUM=($A(Y,IX2)-31*IX)+SUM
 Q SUM_"A"
 ;
CHECK(CALLNUM,OK) ; from FSCEB, FSCEN
 N STAT S OK=1
 S STAT=$$STATCALL^FSCESU(CALLNUM) I +STAT=2!(+STAT=99) W !,"This call has been ",$P(STAT,U,3),".",$C(7) H 2 S OK=0 Q
 Q
 ;
SOMEONE ; from FSCED, FSCEDC, FSCELS, FSCELSNS, FSCEU
 W !,"Someone else is editing this call.",$C(7) H 2
 Q
 ;
CALL(FSCCNT) ; $$(count from list) -> call#
 N CALLLINE
 S CALLLINE=+$O(^TMP("FSC LIST CALLS",$J,"IDX",FSCCNT,0))
 Q +$O(^TMP("FSC LIST CALLS",$J,"ICX",CALLLINE,0))