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

FSCELS.m

Go to the documentation of this file.
FSCELS ;SLC/STAFF-NOIS Edit Log Setup ;8/30/97  17:03
 ;;1.1;NOIS;;Sep 06, 1998
 ;
NEW(SITE,CALLNUM) ; from FSCEL
 N ASK,DA,DIE,DR,SITE0,STUFF
 S SITE0=^FSC("SITE",SITE,0)
 S DA=CALLNUM,DIE="^FSCD(""CALL"",",(ASK,DR,STUFF)=""
 D STRING($$MOD(DUZ),.STUFF,.ASK)
 D STRING($$SUBJECT(DUZ),.STUFF,.ASK)
 S ASK=ASK_";30Problem Description"
 D STRING($$CONTACT(SITE0,DUZ),.STUFF,.ASK)
 D STRING($$PRIORITY(DUZ),.STUFF,.ASK)
 D STRING($$SPEC(DUZ),.STUFF,.ASK)
 I $$PATCH^FSCEUD(DUZ)="P" D STRING(";7T",.STUFF,.ASK)
 I $$SUB^FSCEUD(DUZ)="P" D STRING(";S Y=$$SUB^FSCEU(DA);@1;3.2T;@2",.STUFF,.ASK)
 I $$KEYWORDS^FSCEUD(DUZ)="P" D STRING(";1.5T",.STUFF,.ASK)
 S DR=DR_STUFF_ASK I '$L(DR) Q
 I $E(DR)=";" S DR=$E(DR,2,245)
 L +^FSCD("CALL",CALLNUM):30 I '$T D SOMEONE^FSCLMPE1 Q
 D ^DIE
 L -^FSCD("CALL",CALLNUM)
 D PICKUP^FSCES(CALLNUM)
 Q
 ;
RECON(SITE,CALLNUM) ; from FSCEL
 N ASK,DA,DIE,DR,SITE0,STUFF
 S SITE0=^FSC("SITE",SITE,0)
 S DA=CALLNUM,DIE="^FSCD(""CALL"",",(ASK,DR,STUFF)=""
 D STRING($$CONTACT(SITE0,DUZ),.STUFF,.ASK)
 S DR=DR_STUFF_ASK I '$L(DR) Q
 I $E(DR)=";" S DR=$E(DR,2,245)
 L +^FSCD("CALL",CALLNUM):30 I '$T D SOMEONE^FSCLMPE1 Q
 D ^DIE
 L -^FSCD("CALL",CALLNUM)
 Q
 ;
CLOSE(CALLNUM,OK) ; from FSCEL, FSCLMPE1
 N ASK,DA,DIE,DR,STUFF S OK=1
 S DA=CALLNUM,DIE="^FSCD(""CALL"",",DR="81///`"_DUZ_";122///NOW",ASK=";80",STUFF=""
 D STRING($$HOURS(DUZ),.STUFF,.ASK)
 D STRING($$CDATE(DUZ),.STUFF,.ASK)
 D STRING($$FUNC(DUZ),.STUFF,.ASK)
 D STRING($$TASK(DUZ),.STUFF,.ASK)
 S DR=DR_STUFF_ASK
 L +^FSCD("CALL",CALLNUM):30 I '$T D SOMEONE^FSCLMPE1 Q
 D ^DIE
 L -^FSCD("CALL",CALLNUM)
 I $D(DTOUT) S OK=0
 Q
 ;
STRING(VALUE,STUFF,ASK) ; from FSCED
 I VALUE["///" S STUFF=STUFF_VALUE Q
 S ASK=ASK_VALUE
 Q
 ;
PH(PERSON) ; $$(person) -> phone # from file 200
 Q $P($G(^VA(200,PERSON,.13)),U,2)
 ;
MOD(USER) ; $$(user) -> preferred module default
 N DEF,NUM,VALUE S DEF=";3T",VALUE=$$MOD^FSCEUD(USER)
 I '$L($P(VALUE,U,2)) Q DEF
 I $P(VALUE,U)="S" S NUM=+$O(^FSC("MOD","B",$P(VALUE,U,2),0)) I NUM Q DEF_"///`"_NUM
 Q DEF_"//"_$P(VALUE,U,2)
 ;
SPEC(USER) ; $$(user) -> preferred specialist default
 N DEF,VALUE S DEF=";5T",VALUE=$$SPEC^FSCEUD(USER)
 I $P(VALUE,U)="I" Q ""
 I '$L($P(VALUE,U,2)) Q DEF
 I $P(VALUE,U)="S" I DUZ=$P(VALUE,U,2) Q DEF_"///`"_DUZ
 Q DEF_"//"_$$VALUE^FSCGET($P(VALUE,U,2),7100,5)
 ;
SUBJECT(USER) ; $$(user) -> preferred subject default
 N DEF,VALUE S DEF=";1T",VALUE=$$SUBJECT^FSCEUD(USER)
 I '$L($P(VALUE,U,2)) Q DEF
 I $P(VALUE,U)="S" Q DEF_"///"_$P(VALUE,U,2)
 Q DEF_"//"_$P(VALUE,U,2)
 ;
CONTACT(SITE0,USER) ; $$(site zero node,user) -> preferred site contact default
 N CONTACT,DEF,DEF1,PHONE
 S DEF=";D CINFO^FSCELS(DA);2.1T;H .1;2.2T//^S X=$$CPHONE^FSCELS(DA)"
 S CONTACT=$$CONTACT^FSCEUD(SITE0,USER)
 I '$L($P(CONTACT,U,2)) Q DEF
 S DEF1=";D CINFO^FSCELS(DA);2.1T//"_$P(CONTACT,U,2)_";H .1;2.2T//^S X=$$CPHONE^FSCELS(DA)"
 S PHONE=$$PHONE^FSCEUD(SITE0,USER)
 I '$L($P(PHONE,U,2)) Q DEF1
 I $P(CONTACT,U)="S",$P(PHONE,U)="S" Q ";2.1T///`"_$P(SITE0,U,6)_";2.2T///"_$P(PHONE,U,2)
 Q DEF1
 ;
CINFO(CALL) ;
 N APINFO,IRMINFO,MOD,NOISINFO,SITE,SITEINFO
 S SITE=$P($G(^FSCD("CALL",CALL,0)),U,5),MOD=$P($G(^(0)),U,8)
 I 'SITE Q
 S NOISINFO=$$NOISINFO^FSCLMPOC(SITE),IRMINFO=$$IRMINFO^FSCLMPOC(SITE),APINFO=$$APINFO^FSCLMPOC(SITE,MOD),SITEINFO=$$SITEINFO^FSCLMPOC(SITE)
 W !!,"Location contact: ",$S($L(NOISINFO):NOISINFO,1:"unavailable")
 I $L(SITEINFO) W !,SITEINFO
 I $L(IRMINFO) W !,"IRM Chief: ",IRMINFO
 I $L(APINFO) W !,"ADPAC: ",APINFO
 Q
 ;
CPHONE(CALL) ; $$(call) -> phone # of contact
 N CONTACT,PHONE
 S CONTACT=+$P($G(^FSCD("CALL",CALL,0)),U,6)
 I 'CONTACT Q ""
 S PHONE=$P($G(^VA(200,CONTACT,.13)),U,2)
 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))
 Q PHONE
 ;
PRIORITY(USER) ; $$(user) -> preferred edit
 N DEF,NUM,VALUE S DEF=";6T",VALUE=$$PRIORITY^FSCEUD(USER)
 I '$L($P(VALUE,U,2)) Q DEF
 I $P(VALUE,U)="S" S NUM=+$O(^FSC("PRI","B",$P(VALUE,U,2),0)) I NUM Q DEF_"///`"_NUM
 Q DEF_"//"_$P(VALUE,U,2)
 ;
HOURS(USER) ; $$(user) -> preferred hours default
 Q ";83T"
 ;
CDATE(USER) ; $$(user) -> preferred close date default
 Q ";82T//TODAY"
 ;
FUNC(USER) ; $$(user) -> preferred functional area default
 Q ";8T//"_$$VALUE^FSCGET($P(^FSC("SPEC",DUZ,0),U,4),7105.2,4)
 ;
TASK(USER) ; $$(user) -> preferred task default
 Q ";9T//PROBLEM RESOLUTION"