source: FOIAVistA/trunk/r/NOIS-FSC/FSCLMPE1.m@ 1327

Last change on this file since 1327 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 4.0 KB
Line 
1FSCLMPE1 ;SLC/STAFF-NOIS List Manager Protocol Edit Cont. 1 ;9/6/98 20:59
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4BASIC ; from FSCLMPE
5 N ABBREV,CALLNUM,DA,DIE,DR,NEWV,OK,OLDV K NEWV,OLDV
6 S (CALLNUM,DA)=$$CALL(FSCCNT)
7 D CHECK(CALLNUM,.OK) I 'OK Q
8 F ABBREV="MOD","SPEC","PRI" S OLDV(ABBREV)=""
9 D GET^FSCGET("CUSTOM",CALLNUM,.OLDV)
10 S DIE="^FSCD(""CALL"",",DR="3Module;6T;5T"
11 L +^FSCD("CALL",CALLNUM):1 I '$T D SOMEONE Q
12 D ^DIE
13 L -^FSCD("CALL",CALLNUM)
14 D PICKUP^FSCES(CALLNUM)
15 M NEWV=OLDV D GET^FSCGET("CUSTOM",CALLNUM,.NEWV)
16 D AUDIT^FSCAUDIT(CALLNUM,.OLDV,.NEWV)
17 D MRE^FSCMR(DUZ,CALLNUM)
18 D WKLD^FSCEWKLD(CALLNUM,1)
19 D UPDATE^FSCEU(CALLNUM)
20 Q
21 ;
22DESC ; from FSCLMPE
23 N CALLNUM,DA,DIC,DWLW,DWPK,NEWV,OK,OLDV K NEWV,OLDV
24 S (CALLNUM,DA)=$$CALL(FSCCNT)
25 D CHECK(CALLNUM,.OK) I 'OK Q
26 S OLDV("DESC")=$$CHKSUM("^FSCD(""CALL"","_DA_",30)")
27 S DIC="^FSCD(""CALL"","_DA_",30,",DWLW=80,DWPK=1
28 L +^FSCD("CALL",CALLNUM):1 I '$T D SOMEONE Q
29 D EN^DIWE
30 L -^FSCD("CALL",CALLNUM)
31 S NEWV("DESC")=$$CHKSUM("^FSCD(""CALL"","_DA_",30)")
32 D DESC^FSCAUDIT(CALLNUM,.OLDV,.NEWV)
33 D MRE^FSCMR(DUZ,CALLNUM)
34 D WKLD^FSCEWKLD(CALLNUM,1)
35 D UPDATE^FSCEU(CALLNUM)
36 Q
37 ;
38PFIELDS ; from FSCLMPE
39 N CALLNUM,DA,DIE,DIK,DR,OK
40 S CALLNUM=$$CALL(FSCCNT)
41 D CHECK(CALLNUM,.OK) I 'OK Q
42 S DA=+$G(^FSCD("CALL USER","AUC",DUZ,CALLNUM))
43 I 'DA S OK=1 D I 'OK Q
44 .L +^FSCD("CALL USER",0):5 I '$T S OK=0 Q
45 .S DA=1+$P(^FSCD("CALL USER",0),U,3)
46 .F Q:'$D(^FSCD("CALL USER",DA,0)) S DA=DA+1
47 .S $P(^FSCD("CALL USER",0),U,3)=DA,$P(^(0),U,4)=$P(^(0),U,4)+1
48 .S ^FSCD("CALL USER",DA,0)=CALLNUM_U_DUZ
49 .L -^FSCD("CALL USER",0)
50 .S DIK="^FSCD(""CALL USER"","
51 .D IX1^DIK
52 S DIE="^FSCD(""CALL USER"",",DR="2:5"
53 L +^FSCD("CALL USER",DA):1 I '$T D SOMEONE Q
54 D ^DIE
55 L -^FSCD("CALL USER",DA)
56 S OK=1 D
57 .Q:$L($P(^FSCD("CALL USER",DA,0),U,3)) Q:$L($P(^(0),U,4)) Q:$L($G(^(1))) Q:$O(^(2,0))
58 .S OK=0
59 I 'OK D DEL^FSCUCD("^FSCD(""CALL USER"",",DA)
60 D MRE^FSCMR(DUZ,CALLNUM)
61 Q
62 ;
63WKLD ; from FSCLMPE
64 N CALLNUM
65 S CALLNUM=$$CALL(FSCCNT)
66 I +$$STATCALL^FSCESU(CALLNUM)=99 W !,"This call has been cancelled.",$C(7) H 2 Q
67 D WKLD^FSCEWKLD(CALLNUM,0)
68 D BUILD^FSCEU(CALLNUM)
69 Q
70 ;
71RES ; from FSCLMP, FSCLMPES
72 N CALLNUM,FROM,OK
73 S CALLNUM=$$CALL(FSCCNT)
74 D CHECK(CALLNUM,.OK) I 'OK Q
75 S FROM=+$$STATCALL^FSCESU(CALLNUM)
76 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
77 D CLOSE^FSCEC(CALLNUM,.OK) I 'OK Q
78 D STATUS^FSCES(CALLNUM,FROM,2)
79 D WKLD^FSCEWKLD(CALLNUM,1)
80 D UPDATE^FSCTASK(CALLNUM)
81 D BUILD^FSCEU(CALLNUM)
82 Q
83 ;
84ALL ; from FSCLMPE
85 N ABBREV,CALLNUM,DA,DIE,DR,NEWV,OK,OLDV,WNEWV,WOLDV K NEWV,OLDV,WNEWV,WOLDV
86 S (CALLNUM,DA)=$$CALL(FSCCNT)
87 D CHECK(CALLNUM,.OK) I 'OK Q
88 F ABBREV="SUBJECT","IRM","PHONE","MOD","SPEC","SPECD","PRI","PATCH","DEVSUB","KEYWORDS" S OLDV(ABBREV)=""
89 D GET^FSCGET("CUSTOM",CALLNUM,.OLDV)
90 S WOLDV("DESC")=$$CHKSUM("^FSCD(""CALL"","_DA_",30)")
91 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;"
92 L +^FSCD("CALL",CALLNUM):1 I '$T D SOMEONE Q
93 D ^DIE
94 L -^FSCD("CALL",CALLNUM)
95 D PICKUP^FSCES(CALLNUM)
96 M NEWV=OLDV D GET^FSCGET("CUSTOM",CALLNUM,.NEWV)
97 S WNEWV("DESC")=$$CHKSUM("^FSCD(""CALL"","_DA_",30)")
98 D AUDIT^FSCAUDIT(CALLNUM,.OLDV,.NEWV)
99 D DESC^FSCAUDIT(CALLNUM,.WOLDV,.WNEWV)
100 D MRE^FSCMR(DUZ,CALLNUM)
101 D WKLD^FSCEWKLD(CALLNUM,1)
102 D UPDATE^FSCEU(CALLNUM)
103 Q
104 ;
105CHKSUM(ROOT) ; $$ (root array) -> checksum
106 N SUM,IX,IX2,XU1,Y
107 Q:$D(@ROOT)=0 0
108 S (SUM,IX)=0,XU1=ROOT,ROOT=$E(ROOT,1,$L(ROOT)-1)
109 F S Y=$G(@XU1) D S XU1=$Q(@XU1) Q:XU1'[ROOT
110 .F IX2=1:1:$L(Y) S IX=IX+1,SUM=($A(Y,IX2)-31*IX)+SUM
111 Q SUM_"A"
112 ;
113CHECK(CALLNUM,OK) ; from FSCEB, FSCEN
114 N STAT S OK=1
115 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
116 Q
117 ;
118SOMEONE ; from FSCED, FSCEDC, FSCELS, FSCELSNS, FSCEU
119 W !,"Someone else is editing this call.",$C(7) H 2
120 Q
121 ;
122CALL(FSCCNT) ; $$(count from list) -> call#
123 N CALLLINE
124 S CALLLINE=+$O(^TMP("FSC LIST CALLS",$J,"IDX",FSCCNT,0))
125 Q +$O(^TMP("FSC LIST CALLS",$J,"ICX",CALLLINE,0))
Note: See TracBrowser for help on using the repository browser.