source: WorldVistAEHR/trunk/r/AUTOMATED_MED_INFO_EXCHANGE-DVBA-DVBC/DVBASRP1.m@ 701

Last change on this file since 701 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.5 KB
RevLine 
[613]1DVBASRP1 ;GT- CAPRI SURGERY CASE LOOKUP ; 5/13/2002
2 ;;2.7;AMIE;**42**;Apr 10, 1995
3STATUS ; 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
10NO ; not requested or scheduled
11 S DVBSROP=DVBSROP_"^"_"(NOT COMPLETE)"
12 Q
13CAN ; 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
17SCH ; 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
22TIM0 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
26TIM1 S DVBSROP=DVBSROP_"^"_"(SCHEDULED)" Q
27REQ ; 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
31ABORT ; aborted case
32 S DVBABORT=0 I $D(^SRF(VAR,.2)),$P(^(.2),"^",10)'="" S DVBABORT=1
33 Q
Note: See TracBrowser for help on using the repository browser.