source: FOIAVistA/trunk/r/SURGERY-SR/SROP1.m@ 1166

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1SROP1 ;B'HAM ISC/MAM - SELECT OPERATION (CONT); 8 Feb 1989 2:58 PM
2 ;;3.0; Surgery ;;24 Jun 93
3STATUS ; print case status
4 I $P($G(^SRF(SROP,30)),"^")'="" D CAN Q
5 I $P($G(^SRF(SROP,31)),"^",8)'="" D CAN Q
6 I $P($G(^SRF(SROP,.2)),"^",12) S SROPER=SROPER_" (COMPLETED)" Q
7 I $D(^SRF(SROP,.2)),$P(^(.2),"^",12)="" S SRSTAT=0 D SCH I SRSTATUS=0 D REQ Q:SRSTATUS G NO
8 I '$D(^SRF(SROP,.2)) S SRSTAT=0 D SCH I SRSTATUS=0 D REQ Q:SRSTATUS=1 G NO
9 Q
10NO ; not requested or scheduled
11 S SROPER=SROPER_" (NOT COMPLETE)"
12 Q
13CAN ; cancelled or aborted
14 S SR(.2)=$G(^SRF(SROP,.2)) I $P(SR(.2),"^")!($P(SR(.2),"^",10)) S SROPER=SROPER_" (ABORTED)" Q
15 S SROPER=SROPER_" (CANCELLED)"
16 Q
17SCH ; check to see if case is scheduled
18 I '$D(^SRF(SROP,31)) S SRSTATUS=0 Q
19 I $P($G(^SRF(SROP,31)),"^",4)="" S SRSTATUS=0 Q
20 I $P($G(^SRF(SROP,31)),"^",4) D:SRSTAT=0 TIM0 D:SRSTAT=1 TIM1 S SRSTATUS=1 Q
21 Q
22TIM0 I '$D(^SRF(SROP,.2)) S SROPER=SROPER_" (SCHEDULED)" Q
23 I $P(^SRF(SROP,.2),"^",2) S SROPER=SROPER_" (NOT COMPLETE)" Q
24 I $P(^SRF(SROP,.2),"^",2)="" S SROPER=SROPER_" (SCHEDULED)"
25 Q
26TIM1 S SROPER=SROPER_" (SCHEDULED)" Q
27REQ ; check to see if case has been requested
28 I $D(^SRF(SROP,"REQ")),$P(^("REQ"),"^")=1,'$D(^SRF(SROP,.2)) S SROPER=SROPER_" (REQUESTED)" S SRSTATUS=1 Q
29 I $D(^SRF(SROP,"REQ")),$P(^("REQ"),"^")=1,$D(^SRF(SROP,.2)),$P(^(.2),"^",2)="" S SROPER=SROPER_" (REQUESTED)" S SRSTATUS=1
30 Q
31RET I 'SRSOUT W !!,"Press RETURN to continue " R Z:DTIME
32 Q
33END W !! D ^SRSKILL
34 Q
35ABORT ; aborted case
36 S SRABORT=0 I $D(^SRF(SROP,.2)),$P(^(.2),"^",10)'="" S SRABORT=1
37 Q
Note: See TracBrowser for help on using the repository browser.