Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SROP1

SROP1.m

Go to the documentation of this file.
  1. SROP1 ;B'HAM ISC/MAM - SELECT OPERATION (CONT); 8 Feb 1989 2:58 PM
  1. ;;3.0;Surgery;**184,188**;24 Jun 93;Build 2
  1. STATUS ; print case status
  1. I $P($G(^SRF(SROP,30)),"^")'="" D CAN Q
  1. I $P($G(^SRF(SROP,31)),"^",8)'="" D CAN Q
  1. I $P($G(^SRF(SROP,.2)),"^",12) S SROPER=SROPER_" (COMPLETED)" Q
  1. I $D(^SRF(SROP,.2)),$P(^(.2),"^",12)="" S SRSTAT=0 D SCH I SRSTATUS=0 D REQ Q:SRSTATUS G NO
  1. I '$D(^SRF(SROP,.2)) S SRSTAT=0 D SCH I SRSTATUS=0 D REQ Q:SRSTATUS=1 G NO
  1. Q
  1. NO ; not requested or scheduled
  1. S SROPER=SROPER_" (NOT COMPLETE)"
  1. Q
  1. CAN ; cancelled or aborted
  1. S SR(.2)=$G(^SRF(SROP,.2)) I $P(SR(.2),"^")!($P(SR(.2),"^",10))&($P($G(^SRF(SROP,30)),"^",6)>1) S SROPER=SROPER_" (ABORTED)" Q
  1. I $P($G(^SRF(SROP,30)),"^",6)="",$P(SR(.2),"^")!($P(SR(.2),"^",10)) S SROPER=SROPER_" (ABORTED)" Q
  1. S SROPER=SROPER_" (CANCELLED)"
  1. Q
  1. SCH ; check to see if case is scheduled
  1. I '$D(^SRF(SROP,31)) S SRSTATUS=0 Q
  1. I $P($G(^SRF(SROP,31)),"^",4)="" S SRSTATUS=0 Q
  1. I $P($G(^SRF(SROP,31)),"^",4) D:SRSTAT=0 TIM0 D:SRSTAT=1 TIM1 S SRSTATUS=1 Q
  1. Q
  1. TIM0 I '$D(^SRF(SROP,.2)) S SROPER=SROPER_" (SCHEDULED)" Q
  1. I $P(^SRF(SROP,.2),"^",2) S SROPER=SROPER_" (NOT COMPLETE)" Q
  1. I $P(^SRF(SROP,.2),"^",2)="" S SROPER=SROPER_" (SCHEDULED)"
  1. Q
  1. TIM1 S SROPER=SROPER_" (SCHEDULED)" Q
  1. REQ ; check to see if case has been requested
  1. I $D(^SRF(SROP,"REQ")),$P(^("REQ"),"^")=1,'$D(^SRF(SROP,.2)) S SROPER=SROPER_" (REQUESTED)" S SRSTATUS=1 Q
  1. I $D(^SRF(SROP,"REQ")),$P(^("REQ"),"^")=1,$D(^SRF(SROP,.2)),$P(^(.2),"^",2)="" S SROPER=SROPER_" (REQUESTED)" S SRSTATUS=1
  1. Q
  1. RET I 'SRSOUT W !!,"Press RETURN to continue " R Z:DTIME
  1. Q
  1. END W !! D ^SRSKILL
  1. Q
  1. ABORT ; aborted case
  1. S SRABORT=0 I $D(^SRF(SROP,.2)),$P(^(.2),"^",10)'="" S SRABORT=1
  1. Q