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

DVBAB5.m

Go to the documentation of this file.
DVBAB5 ;ALB/KLB - CAPRI PENDING REQUESTS CONT ;08/01/00
 ;;2.7;AMIE;**35,185,193**;Apr 10, 1995;Build 84
 ;
SORT ; AJF;Request Status Conversion
 N ROUT
 S STAT=$P(^DVB(396.3,REQDA,0),U,18)
 Q:STAT=""
 S STAT=$$RSTAT^DVBCUTL8(STAT)
 Q:"^R^X^RX^C^CT^RR^RA^"[(U_STAT_U)  I DVBCSORT="S" Q:STAT'=RSTAT&(RSTAT'="A")
 S RONUM=$P(^DVB(396.3,REQDA,0),U,3),RONAME=$S(RONUM]"":$P(^DIC(4,+RONUM,0),U,1),1:"")
 S ROFILTER=$S($D(ROFILTER)'=0:ROFILTER,1:0)
 I (ROFILTER'[RONAME)&(ROFILTER'=0) Q 
 S PNAM=$S($D(^DPT(DFN,0)):$P(^(0),U,1),1:"Unknown"),ROUT=$S($D(^DVB(396.3,REQDA,1)):$P(^(1),U,4),1:0),RDATE=$P(^(0),U,5)
 I DVBCSORT="V" S ^TMP($J,PNAM,DFN,REQDA)="" Q
 I DVBCSORT="S" S ^TMP($J,STAT,PNAM,DFN,REQDA)="" Q
 I DVBCSORT="R",$D(ADIVNUM),ROUT=ADIVNUM S ^TMP($J,ROUT,PNAM,DFN,REQDA)="" Q
 I DVBCSORT="A" D ELAPSED I EDAYS'<ERDAYS,EDAYS'>OLDAYS S ^TMP($J,EDAYS,PNAM,DFN,REQDA)=""
 Q
 ;
ELAPSED K EDAYS,X1,X2,X S X1=DT,(X2,X)=RDATE D:ELTYP="C" ^%DTC D:ELTYP="W" ^XUWORKDY S EDAYS=X
 Q
 ;