SROASWAP ;B'HAM ISC/MAM - MOVE RISK TO FILE 130 ; 13 APR 1992 8:25 am
;;3.0; Surgery ;;24 Jun 93
S SRLINE="" F I=1:1:80 S SRLINE=SRLINE_"-"
S SRSOUT=0 I DT<2940401 D NOTYET G END
START D ^SROASWP I SRSOUT G END
DATE ; get starting date
W ! K %DT S %DT="AEX",%DT("A")="Convert existing assessments starting with which date ? " D ^%DT G:X="^" END I Y<0 D NEEDATE G:SRSOUT END G DATE
S SRDATE=+Y D ^SROASWP0
K ^TMP("CONVERT") D ^SROASWP2 K ^TMP("CONVERT")
I $O(^SRA(0)) W @IOF,!,"The SURGERY RISK ASSSESSMENT file (139) still contains entries. Before you",!,"enter any additional risk assessment information, all entries in this file ",!,"should be converted or deleted." S SRSOUT=0
I '$O(^SRA(0)) W @IOF,!,"The conversion process has been completed. Please review your incomplete",!,"assessments." D ^SROASWPD,DEL
W !!,"Press RETURN to continue " R X:DTIME
END D ^SRSKILL K SRTN W @IOF
Q
NOTYET ; can't convert before April 1, 1994
W @IOF,!,SRLINE,!,"The conversion of the ""stand-alone"" Surgery Risk Assessment Module cannot",!,"be run until after April 1, 1994. It should only be run after that date"
W !,"if your Surgery files are complete, including complications, CPT codes and",!,"anesthesia information since installing Surgery Version 3.0.",!,SRLINE
W !!,"Press RETURN to continue " R X:DTIME
Q
NEEDATE ; message if no date is entered
W !!,"You must select a starting date to begin the conversion process. All ",!,"assessments with operation dates prior to the start date will be automatically"
W !,"deleted. The remaining assessments will then be processed for conversion."
CONT W !!,"Press RETURN to continue, or '^' to quit: " R X:DTIME I X["^" S SRSOUT=1
Q
DEL ; delete file 139
W !!,"The SURGERY RISK ASSESSMENT file will now be deleted from your system... "
K DIU S DIU(0)="DT",DIU=139 D EN^DIU2
Q
SROASWAP ;B'HAM ISC/MAM - MOVE RISK TO FILE 130 ; 13 APR 1992 8:25 am
+1 ;;3.0; Surgery ;;24 Jun 93
+2 SET SRLINE=""
FOR I=1:1:80
SET SRLINE=SRLINE_"-"
+3 SET SRSOUT=0
IF DT<2940401
DO NOTYET
GOTO END
START DO ^SROASWP
IF SRSOUT
GOTO END
DATE ; get starting date
+1 WRITE !
KILL %DT
SET %DT="AEX"
SET %DT("A")="Convert existing assessments starting with which date ? "
DO ^%DT
IF X="^"
GOTO END
IF Y<0
DO NEEDATE
IF SRSOUT
GOTO END
GOTO DATE
+2 SET SRDATE=+Y
DO ^SROASWP0
+3 KILL ^TMP("CONVERT")
DO ^SROASWP2
KILL ^TMP("CONVERT")
+4 IF $ORDER(^SRA(0))
WRITE @IOF,!,"The SURGERY RISK ASSSESSMENT file (139) still contains entries. Before you",!,"enter any additional risk assessment information, all entries in this file ",!,"should be converted or deleted."
SET SRSOUT=0
+5 IF '$ORDER(^SRA(0))
WRITE @IOF,!,"The conversion process has been completed. Please review your incomplete",!,"assessments."
DO ^SROASWPD
DO DEL
+6 WRITE !!,"Press RETURN to continue "
READ X:DTIME
END DO ^SRSKILL
KILL SRTN
WRITE @IOF
+1 QUIT
NOTYET ; can't convert before April 1, 1994
+1 WRITE @IOF,!,SRLINE,!,"The conversion of the ""stand-alone"" Surgery Risk Assessment Module cannot",!,"be run until after April 1, 1994. It should only be run after that date"
+2 WRITE !,"if your Surgery files are complete, including complications, CPT codes and",!,"anesthesia information since installing Surgery Version 3.0.",!,SRLINE
+3 WRITE !!,"Press RETURN to continue "
READ X:DTIME
+4 QUIT
NEEDATE ; message if no date is entered
+1 WRITE !!,"You must select a starting date to begin the conversion process. All ",!,"assessments with operation dates prior to the start date will be automatically"
+2 WRITE !,"deleted. The remaining assessments will then be processed for conversion."
CONT WRITE !!,"Press RETURN to continue, or '^' to quit: "
READ X:DTIME
IF X["^"
SET SRSOUT=1
+1 QUIT
DEL ; delete file 139
+1 WRITE !!,"The SURGERY RISK ASSESSMENT file will now be deleted from your system... "
+2 KILL DIU
SET DIU(0)="DT"
SET DIU=139
DO EN^DIU2
+3 QUIT