source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LROSPLG1.m@ 1046

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1SROSPLG1 ;B'HAM ISC/ADM - STATUS OF SURGICAL CASE ;4/12/94 08:55
2 ;;3.0; Surgery ;**28**;24 Jun 93
3STATUS ; print case status
4 I $P($G(^SRF(SROP,"NON")),"^")="Y" S SROPER=SROPER_$S($P($G(^(30)),"^"):" (ABORTED)",$P($G(^("NON")),"^",5):" (COMPLETED)",1:" (NOT COMPLETE)") Q
5 I $P($G(^SRF(SROP,30)),"^")'="" D CAN Q
6 I $P($G(^SRF(SROP,31)),"^",8)'="" D CAN Q
7 I $P($G(^SRF(SROP,.2)),"^",12) S SROPER=SROPER_" (COMPLETED)" Q
8 I $D(^SRF(SROP,.2)),$P(^(.2),"^",12)="" S SRSTAT=0 D SCH I SRSTATUS=0 D REQ Q:SRSTATUS G NO
9 I '$D(^SRF(SROP,.2)) S SRSTAT=0 D SCH I SRSTATUS=0 D REQ Q:SRSTATUS=1 G NO
10 Q
11NO ; not requested or scheduled
12 S SROPER=SROPER_" (NOT COMPLETE)"
13 Q
14CAN ; cancelled or aborted
15 S SR(.2)=$G(^SRF(SROP,.2)) I $P(SR(.2),"^")!($P(SR(.2),"^",10)) S SROPER=SROPER_" (ABORTED)" Q
16 S SROPER=SROPER_" (CANCELLED)"
17 Q
18SCH ; check to see if case is scheduled
19 I '$D(^SRF(SROP,31)) S SRSTATUS=0 Q
20 I $P($G(^SRF(SROP,31)),"^",4)="" S SRSTATUS=0 Q
21 I $P($G(^SRF(SROP,31)),"^",4) D:SRSTAT=0 TIM0 D:SRSTAT=1 TIM1 S SRSTATUS=1 Q
22 Q
23TIM0 I '$D(^SRF(SROP,.2)) S SROPER=SROPER_" (SCHEDULED)" Q
24 I $P(^SRF(SROP,.2),"^",2) S SROPER=SROPER_" (NOT COMPLETE)" Q
25 I $P(^SRF(SROP,.2),"^",2)="" S SROPER=SROPER_" (SCHEDULED)"
26 Q
27TIM1 S SROPER=SROPER_" (SCHEDULED)" Q
28REQ ; check to see if case has been requested
29 I $D(^SRF(SROP,"REQ")),$P(^("REQ"),"^")=1,'$D(^SRF(SROP,.2)) S SROPER=SROPER_" (REQUESTED)" S SRSTATUS=1 Q
30 I $D(^SRF(SROP,"REQ")),$P(^("REQ"),"^")=1,$D(^SRF(SROP,.2)),$P(^(.2),"^",2)="" S SROPER=SROPER_" (REQUESTED)" S SRSTATUS=1
31 Q
32ABORT ; aborted case
33 S SRABORT=0 I $D(^SRF(SROP,.2)),$P(^(.2),"^",10)'="" S SRABORT=1
34 Q
Note: See TracBrowser for help on using the repository browser.