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