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

FSCELID.m

Go to the documentation of this file.
FSCELID ;SLC/STAFF-NOIS Edit Log ID ;5/2/98  20:41
 ;;1.1;NOIS;;Sep 06, 1998
 ;
ID(SITE,RDATE,CALLID,CALLNUM,OK) ; from FSCED, FSCEL
 N DIC,DIR,GOOD,SITE0,X,Y K DIC,DIR,Y S OK=0
 S DIC="^FSC(""SITE"",",DIC(0)="AEMQZ",DIC("A")="Select Reporting Location: ",DIC("S")="I '$P(^(0),U,2)"
 D ^DIC K DIC
 Q:$D(DTOUT)  Q:Y<1
 S SITE=+Y,SITE0=Y(0)
 S GOOD=1,RDATE=DT I $$ASKDATE D  I 'GOOD Q
 .S DIR(0)="DAO^0:"_DT_":EX",DIR("A")="Date of Problem: ",DIR("B")="TODAY"
 .S DIR("?",1)="This is the date the problem is reported."
 .S DIR("?",2)="This date is used to create the call ID."
 .S DIR("?")="^D HELP^%DTC,HELP^FSCU(.DIR)"
 .S DIR("??")="FSC U1 NOIS"
 .D ^DIR K DIR
 .I $D(DIRUT) S GOOD=0 Q
 .S RDATE=+Y
 D CALLNUM^FSCUC(SITE0,RDATE,.CALLID,.OK)
 I 'OK Q
 S OK=0
 N DA,DIC,DIE,DLAYGO,DR,EPTYPE,ISC,X,Y K DIC
 S DIC=7100,DIC(0)="XL",DLAYGO=7100,X=CALLID
 D ^DIC K DIC,DLAYGO
 I Y<1 Q
 I $$ACCESS^FSCU(DUZ,"SPEC") S EPTYPE=$O(^FSC("EPTYPE","B","SPECIALIST",0))
 E  S EPTYPE=$O(^FSC("EPTYPE","B","NON-SPECIALIST",0))
 S CALLNUM=+Y,OK=1
 S DA=CALLNUM,DIE="^FSCD(""CALL"",",DR="2///`"_SITE_";10///"_RDATE_";120///NOW;5.2///`"_DUZ_";5.3///"_EPTYPE_";101///`"_CALLNUM
 S ISC=+$P($G(^FSC("SITE",SITE,0)),U,11) I ISC S DR=DR_";2.3///`"_ISC
 L +^FSCD("CALL",CALLNUM)
 D ^DIE
 L -^FSCD("CALL",CALLNUM)
 D MRE^FSCMR(DUZ,CALLNUM)
 D STATUS^FSCES(CALLNUM,"",1)
 Q
 ;
ASKDATE() ;
 I $$ACCESS^FSCU(DUZ,"SPEC") Q 1
 Q 0