1 | DVBAB5 ;ALB/KLB - CAPRI PENDING REQUESTS CONT ;08/01/00
|
---|
2 | ;;2.7;AMIE;**35**;Apr 10, 1995
|
---|
3 | ;
|
---|
4 | SORT S STAT=$P(^DVB(396.3,REQDA,0),U,18) Q:"^R^X^RX^C^CT^"[(U_STAT_U) I DVBCSORT="S" Q:STAT'=RSTAT&(RSTAT'="A")
|
---|
5 | 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)
|
---|
6 | I DVBCSORT="V" S ^TMP($J,PNAM,DFN,REQDA)="" Q
|
---|
7 | I DVBCSORT="S" S ^TMP($J,STAT,PNAM,DFN,REQDA)="" Q
|
---|
8 | I DVBCSORT="R",$D(ADIVNUM),ROUT=ADIVNUM S ^TMP($J,ROUT,PNAM,DFN,REQDA)="" Q
|
---|
9 | I DVBCSORT="A" D ELAPSED I EDAYS'<ERDAYS,EDAYS'>OLDAYS S ^TMP($J,EDAYS,PNAM,DFN,REQDA)=""
|
---|
10 | Q
|
---|
11 | ;
|
---|
12 | ELAPSED K EDAYS,X1,X2,X S X1=DT,(X2,X)=RDATE D:ELTYP="C" ^%DTC D:ELTYP="W" ^XUWORKDY S EDAYS=X
|
---|
13 | Q
|
---|