source: FOIAVistA/tag/r/NOIS-FSC/FSCELS.m@ 1641

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

initial load of FOIAVistA 6/30/08 version

File size: 4.3 KB
Line 
1FSCELS ;SLC/STAFF-NOIS Edit Log Setup ;8/30/97 17:03
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4NEW(SITE,CALLNUM) ; from FSCEL
5 N ASK,DA,DIE,DR,SITE0,STUFF
6 S SITE0=^FSC("SITE",SITE,0)
7 S DA=CALLNUM,DIE="^FSCD(""CALL"",",(ASK,DR,STUFF)=""
8 D STRING($$MOD(DUZ),.STUFF,.ASK)
9 D STRING($$SUBJECT(DUZ),.STUFF,.ASK)
10 S ASK=ASK_";30Problem Description"
11 D STRING($$CONTACT(SITE0,DUZ),.STUFF,.ASK)
12 D STRING($$PRIORITY(DUZ),.STUFF,.ASK)
13 D STRING($$SPEC(DUZ),.STUFF,.ASK)
14 I $$PATCH^FSCEUD(DUZ)="P" D STRING(";7T",.STUFF,.ASK)
15 I $$SUB^FSCEUD(DUZ)="P" D STRING(";S Y=$$SUB^FSCEU(DA);@1;3.2T;@2",.STUFF,.ASK)
16 I $$KEYWORDS^FSCEUD(DUZ)="P" D STRING(";1.5T",.STUFF,.ASK)
17 S DR=DR_STUFF_ASK I '$L(DR) Q
18 I $E(DR)=";" S DR=$E(DR,2,245)
19 L +^FSCD("CALL",CALLNUM):30 I '$T D SOMEONE^FSCLMPE1 Q
20 D ^DIE
21 L -^FSCD("CALL",CALLNUM)
22 D PICKUP^FSCES(CALLNUM)
23 Q
24 ;
25RECON(SITE,CALLNUM) ; from FSCEL
26 N ASK,DA,DIE,DR,SITE0,STUFF
27 S SITE0=^FSC("SITE",SITE,0)
28 S DA=CALLNUM,DIE="^FSCD(""CALL"",",(ASK,DR,STUFF)=""
29 D STRING($$CONTACT(SITE0,DUZ),.STUFF,.ASK)
30 S DR=DR_STUFF_ASK I '$L(DR) Q
31 I $E(DR)=";" S DR=$E(DR,2,245)
32 L +^FSCD("CALL",CALLNUM):30 I '$T D SOMEONE^FSCLMPE1 Q
33 D ^DIE
34 L -^FSCD("CALL",CALLNUM)
35 Q
36 ;
37CLOSE(CALLNUM,OK) ; from FSCEL, FSCLMPE1
38 N ASK,DA,DIE,DR,STUFF S OK=1
39 S DA=CALLNUM,DIE="^FSCD(""CALL"",",DR="81///`"_DUZ_";122///NOW",ASK=";80",STUFF=""
40 D STRING($$HOURS(DUZ),.STUFF,.ASK)
41 D STRING($$CDATE(DUZ),.STUFF,.ASK)
42 D STRING($$FUNC(DUZ),.STUFF,.ASK)
43 D STRING($$TASK(DUZ),.STUFF,.ASK)
44 S DR=DR_STUFF_ASK
45 L +^FSCD("CALL",CALLNUM):30 I '$T D SOMEONE^FSCLMPE1 Q
46 D ^DIE
47 L -^FSCD("CALL",CALLNUM)
48 I $D(DTOUT) S OK=0
49 Q
50 ;
51STRING(VALUE,STUFF,ASK) ; from FSCED
52 I VALUE["///" S STUFF=STUFF_VALUE Q
53 S ASK=ASK_VALUE
54 Q
55 ;
56PH(PERSON) ; $$(person) -> phone # from file 200
57 Q $P($G(^VA(200,PERSON,.13)),U,2)
58 ;
59MOD(USER) ; $$(user) -> preferred module default
60 N DEF,NUM,VALUE S DEF=";3T",VALUE=$$MOD^FSCEUD(USER)
61 I '$L($P(VALUE,U,2)) Q DEF
62 I $P(VALUE,U)="S" S NUM=+$O(^FSC("MOD","B",$P(VALUE,U,2),0)) I NUM Q DEF_"///`"_NUM
63 Q DEF_"//"_$P(VALUE,U,2)
64 ;
65SPEC(USER) ; $$(user) -> preferred specialist default
66 N DEF,VALUE S DEF=";5T",VALUE=$$SPEC^FSCEUD(USER)
67 I $P(VALUE,U)="I" Q ""
68 I '$L($P(VALUE,U,2)) Q DEF
69 I $P(VALUE,U)="S" I DUZ=$P(VALUE,U,2) Q DEF_"///`"_DUZ
70 Q DEF_"//"_$$VALUE^FSCGET($P(VALUE,U,2),7100,5)
71 ;
72SUBJECT(USER) ; $$(user) -> preferred subject default
73 N DEF,VALUE S DEF=";1T",VALUE=$$SUBJECT^FSCEUD(USER)
74 I '$L($P(VALUE,U,2)) Q DEF
75 I $P(VALUE,U)="S" Q DEF_"///"_$P(VALUE,U,2)
76 Q DEF_"//"_$P(VALUE,U,2)
77 ;
78CONTACT(SITE0,USER) ; $$(site zero node,user) -> preferred site contact default
79 N CONTACT,DEF,DEF1,PHONE
80 S DEF=";D CINFO^FSCELS(DA);2.1T;H .1;2.2T//^S X=$$CPHONE^FSCELS(DA)"
81 S CONTACT=$$CONTACT^FSCEUD(SITE0,USER)
82 I '$L($P(CONTACT,U,2)) Q DEF
83 S DEF1=";D CINFO^FSCELS(DA);2.1T//"_$P(CONTACT,U,2)_";H .1;2.2T//^S X=$$CPHONE^FSCELS(DA)"
84 S PHONE=$$PHONE^FSCEUD(SITE0,USER)
85 I '$L($P(PHONE,U,2)) Q DEF1
86 I $P(CONTACT,U)="S",$P(PHONE,U)="S" Q ";2.1T///`"_$P(SITE0,U,6)_";2.2T///"_$P(PHONE,U,2)
87 Q DEF1
88 ;
89CINFO(CALL) ;
90 N APINFO,IRMINFO,MOD,NOISINFO,SITE,SITEINFO
91 S SITE=$P($G(^FSCD("CALL",CALL,0)),U,5),MOD=$P($G(^(0)),U,8)
92 I 'SITE Q
93 S NOISINFO=$$NOISINFO^FSCLMPOC(SITE),IRMINFO=$$IRMINFO^FSCLMPOC(SITE),APINFO=$$APINFO^FSCLMPOC(SITE,MOD),SITEINFO=$$SITEINFO^FSCLMPOC(SITE)
94 W !!,"Location contact: ",$S($L(NOISINFO):NOISINFO,1:"unavailable")
95 I $L(SITEINFO) W !,SITEINFO
96 I $L(IRMINFO) W !,"IRM Chief: ",IRMINFO
97 I $L(APINFO) W !,"ADPAC: ",APINFO
98 Q
99 ;
100CPHONE(CALL) ; $$(call) -> phone # of contact
101 N CONTACT,PHONE
102 S CONTACT=+$P($G(^FSCD("CALL",CALL,0)),U,6)
103 I 'CONTACT Q ""
104 S PHONE=$P($G(^VA(200,CONTACT,.13)),U,2)
105 I '$L(PHONE),CONTACT=$P($G(^FSC("SITE",+$P(^FSCD("CALL",CALL,0),U,5),0)),U,6) S PHONE=$S($L($P($G(^(0)),U,7)):$P(^(0),U,7),1:$P($G(^(0)),U,8))
106 Q PHONE
107 ;
108PRIORITY(USER) ; $$(user) -> preferred edit
109 N DEF,NUM,VALUE S DEF=";6T",VALUE=$$PRIORITY^FSCEUD(USER)
110 I '$L($P(VALUE,U,2)) Q DEF
111 I $P(VALUE,U)="S" S NUM=+$O(^FSC("PRI","B",$P(VALUE,U,2),0)) I NUM Q DEF_"///`"_NUM
112 Q DEF_"//"_$P(VALUE,U,2)
113 ;
114HOURS(USER) ; $$(user) -> preferred hours default
115 Q ";83T"
116 ;
117CDATE(USER) ; $$(user) -> preferred close date default
118 Q ";82T//TODAY"
119 ;
120FUNC(USER) ; $$(user) -> preferred functional area default
121 Q ";8T//"_$$VALUE^FSCGET($P(^FSC("SPEC",DUZ,0),U,4),7105.2,4)
122 ;
123TASK(USER) ; $$(user) -> preferred task default
124 Q ";9T//PROBLEM RESOLUTION"
Note: See TracBrowser for help on using the repository browser.