source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCGET.m@ 642

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

initial load of WorldVistAEHR

File size: 7.5 KB
Line 
1FSCGET ;SLC/STAFF-NOIS Get Call Info ;5/17/98 23:49
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4GET(VALUES,CALLNUM,ARRAY) ; from FSCED, FSCFORMB, FSCFORMC, FSCFORMD, FSCFORMS, FSCLMPE1, FSCLP, FSCRPCEC, FSCRPCF, FSCRPCWR, FSCRX
5 ; (call number,array) returns array by reference with call info - except for word processing fields
6 N ALL,KEY,STAMP,VALUE,WEB,ZERO
7 S ALL=$S(VALUES="CUSTOM":0,1:1)
8 S ZERO=$G(^FSCD("CALL",+CALLNUM,0)),STAMP=$G(^(120)),KEY=$G(^(1.5)),WEB=$G(^(1.7))
9 I ALL!$D(ARRAY("SUBJECT")) S ARRAY("SUBJECT")=$G(^FSCD("CALL",+CALLNUM,1))
10 I ALL!$D(ARRAY("DESC")) S ARRAY("DESC")=$S($D(^FSCD("CALL",+CALLNUM,30)):1,1:"")
11 I ALL!$D(ARRAY("ACTIONS")) S ARRAY("ACTIONS")=$S($D(^FSCD("CALL",+CALLNUM,50)):1,1:"")
12 I ALL!$D(ARRAY("SUM")) S ARRAY("SUM")=$S($D(^FSCD("CALL",+CALLNUM,80)):1,1:"")
13 I ALL!$D(ARRAY("STATHIST")) S ARRAY("STATHIST")=$S($D(^FSCD("CALL",+CALLNUM,110)):1,1:"")
14 I ALL!$D(ARRAY("DUPHIST")) S ARRAY("DUPHIST")=$S($D(^FSCD("CALL",+CALLNUM,103)):1,1:"")
15 I ALL!$D(ARRAY("REF")) S ARRAY("REF")=$P(ZERO,U)
16 I ALL!$D(ARRAY("PHONE")) S ARRAY("PHONE")=$P(ZERO,U,7)_U_$P(ZERO,U,7)
17 I ALL!$D(ARRAY("HRSTOT")) S ARRAY("HRSTOT")=$P(ZERO,U,13)_U_$P(ZERO,U,13)
18 I ALL!$D(ARRAY("STATUS")) S (ARRAY("STATUS"),VALUE)=$P(ZERO,U,2) I VALUE S $P(ARRAY("STATUS"),U,2)=$$VALUE(VALUE,7100,4)
19 I ALL!$D(ARRAY("DATEO")) S (ARRAY("DATEO"),VALUE)=$P(ZERO,U,3) I VALUE S $P(ARRAY("DATEO"),U,2)=$$VALUE(VALUE,7100,10)
20 I ALL!$D(ARRAY("DATEC")) S (ARRAY("DATEC"),VALUE)=$P(ZERO,U,4) I VALUE S $P(ARRAY("DATEC"),U,2)=$$VALUE(VALUE,7100,82)
21 I ALL!$D(ARRAY("SITE")) S (ARRAY("SITE"),VALUE)=$P(ZERO,U,5) I VALUE S $P(ARRAY("SITE"),U,2)=$$VALUE(VALUE,7100,2)
22 I ALL!$D(ARRAY("IRM")) S (ARRAY("IRM"),VALUE)=$P(ZERO,U,6) I VALUE S $P(ARRAY("IRM"),U,2)=$$VALUE(VALUE,7100,2.1)
23 I ALL!$D(ARRAY("MOD")) S (ARRAY("MOD"),VALUE)=$P(ZERO,U,8) I VALUE S $P(ARRAY("MOD"),U,2)=$$VALUE(VALUE,7100,3)
24 I ALL!$D(ARRAY("SPEC")) S (ARRAY("SPEC"),VALUE)=$P(ZERO,U,9) I VALUE S $P(ARRAY("SPEC"),U,2)=$$VALUE(VALUE,7100,5)
25 I ALL!$D(ARRAY("PRI")) S (ARRAY("PRI"),VALUE)=$P(ZERO,U,10) I VALUE S $P(ARRAY("PRI"),U,2)=$$VALUE(VALUE,7100,6)
26 I ALL!$D(ARRAY("SPECC")) S (ARRAY("SPECC"),VALUE)=$P(ZERO,U,11) I VALUE S $P(ARRAY("SPECC"),U,2)=$$VALUE(VALUE,7100,81)
27 I ALL!$D(ARRAY("FUNC")) S (ARRAY("FUNC"),VALUE)=$P(ZERO,U,14) I VALUE S $P(ARRAY("FUNC"),U,2)=$$VALUE(VALUE,7100,8)
28 I ALL!$D(ARRAY("TASK")) S (ARRAY("TASK"),VALUE)=$P(ZERO,U,15) I VALUE S $P(ARRAY("TASK"),U,2)=$$VALUE(VALUE,7100,9)
29 I ALL!$D(ARRAY("ISC")) S (ARRAY("ISC"),VALUE)=$P(ZERO,U,16) I VALUE S $P(ARRAY("ISC"),U,2)=$$VALUE(VALUE,7100,2.3)
30 I ALL!$D(ARRAY("ISCD")) S (ARRAY("ISCD"),VALUE)=$P(ZERO,U,20) I VALUE S $P(ARRAY("ISCD"),U,2)=$$VALUE(VALUE,7100,2.4)
31 I ALL!$D(ARRAY("SPECD")) S (ARRAY("SPECD"),VALUE)=$P(ZERO,U,21) I VALUE S $P(ARRAY("SPECD"),U,2)=$$VALUE(VALUE,7100,5.1)
32 I ALL!$D(ARRAY("REOPEN")) S (ARRAY("REOPEN"),VALUE)=$P(ZERO,U,22) I VALUE S $P(ARRAY("REOPEN"),U,2)=$$VALUE(VALUE,7100,2.6)
33 I ALL!$D(ARRAY("RTDIN")) S (ARRAY("RTDIN"),VALUE)=$P(STAMP,U,16) I VALUE S $P(ARRAY("RTDIN"),U,2)=$$VALUE(VALUE,7100,4.7)
34 I ALL!$D(ARRAY("RTDOUT")) S (ARRAY("RTDOUT"),VALUE)=$P(STAMP,U,17) I VALUE S $P(ARRAY("RTDOUT"),U,2)=$$VALUE(VALUE,7100,4.8)
35 I ALL!$D(ARRAY("RTDRE")) S (ARRAY("RTDRE"),VALUE)=$P(STAMP,U,18) I VALUE S $P(ARRAY("RTDRE"),U,2)=$$VALUE(VALUE,7100,4.9)
36 I ALL!$D(ARRAY("RECD")) S (ARRAY("RECD"),VALUE)=$P(STAMP,U) I VALUE S $P(ARRAY("RECD"),U,2)=$$VALUE(VALUE,7100,120)
37 I ALL!$D(ARRAY("PRIMARY")) S (ARRAY("PRIMARY"),VALUE)=$P(STAMP,U,24) I VALUE S $P(ARRAY("PRIMARY"),U,2)=$$VALUE(VALUE,7100,101)
38 I ALL!$D(ARRAY("DUP")) S (ARRAY("DUP"),VALUE)=$P(STAMP,U,25) I VALUE S $P(ARRAY("DUP"),U,2)=$$VALUE(VALUE,7100,102)
39 I ALL!$D(ARRAY("STATD")) S (ARRAY("STATD"),VALUE)=$P(STAMP,U,2) I VALUE S $P(ARRAY("STATD"),U,2)=$$VALUE(VALUE,7100,121)
40 I ALL!$D(ARRAY("CLOSED")) S (ARRAY("CLOSED"),VALUE)=$P(STAMP,U,3) I VALUE S $P(ARRAY("CLOSED"),U,2)=$$VALUE(VALUE,7100,122)
41 I ALL!$D(ARRAY("EDITD")) S (ARRAY("EDITD"),VALUE)=$P(STAMP,U,4) I VALUE S $P(ARRAY("EDITD"),U,2)=$$VALUE(VALUE,7100,123)
42 I ALL!$D(ARRAY("EDITBY")) S (ARRAY("EDITBY"),VALUE)=$P(STAMP,U,5) I VALUE S $P(ARRAY("EDITBY"),U,2)=$$VALUE(VALUE,7100,124)
43 I ALL!$D(ARRAY("PACK")) S (ARRAY("PACK"),VALUE)=$P(STAMP,U,9) I VALUE S $P(ARRAY("PACK"),U,2)=$$VALUE(VALUE,7100,3.1)
44 I ALL!$D(ARRAY("ISCP")) S (ARRAY("ISCP"),VALUE)=$P(STAMP,U,10) I VALUE S $P(ARRAY("ISCP"),U,2)=$$VALUE(VALUE,7100,2.55)
45 I ALL!$D(ARRAY("DEVSUB")) S (ARRAY("DEVSUB"),VALUE)=$P(STAMP,U,11) I VALUE S $P(ARRAY("DEVSUB"),U,2)=$$VALUE(VALUE,7100,3.2)
46 I ALL!$D(ARRAY("LTYPE")) S (ARRAY("LTYPE"),VALUE)=$P(STAMP,U,12) I VALUE S $P(ARRAY("LTYPE"),U,2)=$$VALUE(VALUE,7100,2.7)
47 I ALL!$D(ARRAY("SYS")) S (ARRAY("SYS"),VALUE)=$P(STAMP,U,19) I VALUE S $P(ARRAY("SYS"),U,2)=$$VALUE(VALUE,7100,2.9)
48 I ALL!$D(ARRAY("PATCH")) S (ARRAY("PATCH"),VALUE)=$P(STAMP,U,14)_U_$P(STAMP,U,14)
49 I ALL!$D(ARRAY("VISN")) S (ARRAY("VISN"),VALUE)=$P(STAMP,U,15)_U_$P(STAMP,U,15)
50 I ALL!$D(ARRAY("KEYWORDS")) S (ARRAY("KEYWORDS"),VALUE)=$P(KEY,U,1)_U_$P(KEY,U,1)
51 I ALL!$D(ARRAY("WEB")) S (ARRAY("WEB"),VALUE)=$P(WEB,U,1)_U_$P(WEB,U,1)
52 I ALL!$D(ARRAY("PACKG")) S (ARRAY("PACKG"),VALUE)=$P(STAMP,U,13) I VALUE S $P(ARRAY("PACKG"),U,2)=$$VALUE(VALUE,7100,3.3)
53 I ALL!$D(ARRAY("EP")) S (ARRAY("EP"),VALUE)=$P(STAMP,U,20) I VALUE S $P(ARRAY("EP"),U,2)=$$VALUE(VALUE,7100,5.2)
54 I ALL!$D(ARRAY("EPT")) S (ARRAY("EPT"),VALUE)=$P(STAMP,U,21) I VALUE S $P(ARRAY("EPT"),U,2)=$$VALUE(VALUE,7100,5.3)
55 I ALL!$D(ARRAY("DEVSTAT")) S (ARRAY("DEVSTAT"),VALUE)=$P(ZERO,U,17) I VALUE S $P(ARRAY("DEVSTAT"),U,2)=$$VALUE(VALUE,7100,4.1)
56 I ALL!$D(ARRAY("AGE")) S ARRAY("AGE")=$P(ZERO,U,18)_U_$P(ZERO,U,18)
57 I ALL!$D(ARRAY("AGEEDIT")) S ARRAY("AGEEDIT")=$P(ZERO,U,19)_U_$P(ZERO,U,19)
58 I ALL!$D(ARRAY("AGESTAT")) S ARRAY("AGESTAT")=$P(ZERO,U,23)_U_$P(ZERO,U,23)
59 I ALL!$D(ARRAY("PT")) S ARRAY("PT")=$P(STAMP,U,23)_U_$P(STAMP,U,23)
60 I ALL!$D(ARRAY("PDT")) S (ARRAY("PDT"),VALUE)=$P(STAMP,U,22) I VALUE S $P(ARRAY("PDT"),U,2)=$$VALUE(VALUE,7100,125)
61 D PFIELDS^FSCGETP
62 Q
63 ;
64VALUE(Y,FILE,FIELD) ; $$(internal value,file,field) -> external value or ""
65 I 'Y Q ""
66 I FILE=7100 Q $$NOISCALL(Y,FIELD)
67 N C S C=$P(^DD(FILE,FIELD,0),U,2) D Y^DIQ Q Y
68 ;
69NOISCALL(Y,FIELD) ; $$(internal value,field) -> external value in 7100
70 I FIELD=2 Q $P($G(^FSC("SITE",Y,0)),U)
71 I FIELD=2.1 Q $P($G(^VA(200,Y,0)),U)
72 I FIELD=2.3 Q $P($G(^FSC("ISC",Y,0)),U)
73 I FIELD=2.4 Q $P($G(^FSC("ISC",Y,0)),U)
74 I FIELD=2.55 Q $P($G(^FSC("ISC",Y,0)),U)
75 I FIELD=2.6 Q $$FMTE^XLFDT(Y)
76 I FIELD=2.7 Q $P($G(^FSC("LTYPE",Y,0)),U)
77 I FIELD=2.8 Q $P($G(^FSC("VISN",Y,0)),U)
78 I FIELD=2.9 Q $P($G(^FSC("SYSTEM",Y,0)),U)
79 I FIELD=3 Q $P($G(^FSC("MOD",Y,0)),U)
80 I FIELD=3.1 Q $P($G(^FSC("PACK",Y,0)),U)
81 I FIELD=3.2 Q $P($G(^FSC("SUB",Y,0)),U)
82 I FIELD=3.3 Q $P($G(^FSC("PACKG",Y,0)),U)
83 I FIELD=4 Q $P($G(^FSC("STATUS",Y,0)),U)
84 I FIELD=4.1 Q $P($G(^FSC("STATUS",Y,0)),U)
85 I FIELD=4.5 Q $P($G(^FSC("STATUS",Y,0)),U)
86 I FIELD=4.6 Q $P($G(^FSC("STATUS",Y,0)),U)
87 I FIELD=4.7 Q $$FMTE^XLFDT(Y)
88 I FIELD=4.8 Q $$FMTE^XLFDT(Y)
89 I FIELD=4.9 Q $$FMTE^XLFDT(Y)
90 I FIELD=5 Q $P($G(^VA(200,Y,0)),U)
91 I FIELD=5.1 Q $P($G(^VA(200,Y,0)),U)
92 I FIELD=5.2 Q $P($G(^VA(200,Y,0)),U)
93 I FIELD=5.3 Q $P($G(^FSC("EPTYPE",Y,0)),U)
94 I FIELD=6 Q $P($G(^FSC("PRI",Y,0)),U)
95 I FIELD=8 Q $P($G(^FSC("FUNC",Y,0)),U)
96 I FIELD=9 Q $P($G(^FSC("TASK",Y,0)),U)
97 I FIELD=10 Q $$FMTE^XLFDT(Y)
98 I FIELD=81 Q $P($G(^VA(200,Y,0)),U)
99 I FIELD=82 Q $$FMTE^XLFDT(Y)
100 I FIELD=101 Q $P($G(^FSCD("CALL",Y,0)),U)
101 I FIELD=102 Q $P($G(^FSCD("CALL",Y,0)),U)
102 I FIELD=120 Q $$FMTE^XLFDT(Y)
103 I FIELD=121 Q $$FMTE^XLFDT(Y)
104 I FIELD=122 Q $$FMTE^XLFDT(Y)
105 I FIELD=123 Q $$FMTE^XLFDT(Y)
106 I FIELD=124 Q $P($G(^VA(200,Y,0)),U)
107 I FIELD=125 Q $$FMTE^XLFDT(Y)
108 Q Y
Note: See TracBrowser for help on using the repository browser.