[613] | 1 | DVBASRP1 ;GT- CAPRI SURGERY CASE LOOKUP ; 5/13/2002
|
---|
| 2 | ;;2.7;AMIE;**42**;Apr 10, 1995
|
---|
| 3 | STATUS ; print case status
|
---|
| 4 | I $P($G(^SRF(VAR,30)),"^")'="" D CAN Q
|
---|
| 5 | I $P($G(^SRF(VAR,31)),"^",8)'="" D CAN Q
|
---|
| 6 | I $P($G(^SRF(VAR,.2)),"^",12) S DVBSROP=DVBSROP_"^"_"(COMPLETED)" Q
|
---|
| 7 | I $D(^SRF(VAR,.2)),$P(^(.2),"^",12)="" S DVBSTAT=0 D SCH I DVBSTATS=0 D REQ Q:DVBSTATS G NO
|
---|
| 8 | I '$D(^SRF(VAR,.2)) S DVBSTAT=0 D SCH I DVBSTATS=0 D REQ Q:DVBSTATS=1 G NO
|
---|
| 9 | Q
|
---|
| 10 | NO ; not requested or scheduled
|
---|
| 11 | S DVBSROP=DVBSROP_"^"_"(NOT COMPLETE)"
|
---|
| 12 | Q
|
---|
| 13 | CAN ; cancelled or aborted
|
---|
| 14 | S SR(.2)=$G(^SRF(VAR,.2)) I $P(SR(.2),"^")!($P(SR(.2),"^",10)) S DVBSROP=DVBSROP_"^"_"(ABORTED)" Q
|
---|
| 15 | S DVBSROP=DVBSROP_"^"_"(CANCELLED)"
|
---|
| 16 | Q
|
---|
| 17 | SCH ; check to see if case is scheduled
|
---|
| 18 | I '$D(^SRF(VAR,31)) S DVBSTATS=0 Q
|
---|
| 19 | I $P($G(^SRF(VAR,31)),"^",4)="" S DVBSTATS=0 Q
|
---|
| 20 | I $P($G(^SRF(VAR,31)),"^",4) D:DVBSTAT=0 TIM0 D:DVBSTAT=1 TIM1 S DVBSTATS=1 Q
|
---|
| 21 | Q
|
---|
| 22 | TIM0 I '$D(^SRF(VAR,.2)) S DVBSROP=DVBSROP_"^"_"(SCHEDULED)" Q
|
---|
| 23 | I $P(^SRF(VAR,.2),"^",2) S DVBSROP=DVBSROP_"^"_"(NOT COMPLETE)" Q
|
---|
| 24 | I $P(^SRF(VAR,.2),"^",2)="" S DVBSROP=DVBSROP_"^"_"(SCHEDULED)"
|
---|
| 25 | Q
|
---|
| 26 | TIM1 S DVBSROP=DVBSROP_"^"_"(SCHEDULED)" Q
|
---|
| 27 | REQ ; check to see if case has been requested
|
---|
| 28 | I $D(^SRF(VAR,"REQ")),$P(^("REQ"),"^")=1,'$D(^SRF(VAR,.2)) S DVBSROP=DVBSROP_"^"_" (REQUESTED)" S DVBSTATS=1 Q
|
---|
| 29 | I $D(^SRF(VAR,"REQ")),$P(^("REQ"),"^")=1,$D(^SRF(VAR,.2)),$P(^(.2),"^",2)="" S DVBSROP=DVBSROP_"^"_"(REQUESTED)" S DVBSTATS=1
|
---|
| 30 | Q
|
---|
| 31 | ABORT ; aborted case
|
---|
| 32 | S DVBABORT=0 I $D(^SRF(VAR,.2)),$P(^(.2),"^",10)'="" S DVBABORT=1
|
---|
| 33 | Q
|
---|