SROADEL ;B'HAM ISC/MAM - DELETE ASSESSMENT ; [ 01/23/01 1:52 PM ]
;;3.0; Surgery ;**38,83,100**;24 Jun 93
S SRASTAT=$P($G(^SRF(SRTN,"RA")),"^")
I SRASTAT="T" W !!,"This assessment has already been verified and transmitted. It cannot be",!,"deleted. If the assessment was transmitted in error, use the option 'Update",!,"an Assessment Transmitted in Error'." D RET Q
I SRASTAT="V" W !!,"This assessment has already been verified. It cannot be deleted. If the",!,"assessment was verified in error, use the option 'Update an Assessment Verified",!,"in Error'." D RET Q
DEL W !!,"This assessment has a current status of "_$S(SRASTAT="I":"'Incomplete'",1:"'Complete/Unverified'"),!!,"Are you sure that you want to delete this assessment ? NO// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 Q
S SRYN=$E(SRYN) I "Nn"[SRYN S SRSOUT=1 Q
I "Yy"'[SRYN W !!,"Enter <RET> if this assessment was selected in error and should not be deleted.",!,"If you want to delete this assessment, enter 'YES'." G DEL
I $$LOCK^SROUTL(SRTN) D D UNLOCK^SROUTL(SRTN)
.K DR,DIE,DA S DA=SRTN,DIE=130,DR="235///@;284///@;393///@;260///@;272///@;323///@;102///@" D ^DIE W !!,"Deleting Assessment..."
.K DA,DIK S DIK="^SRF(",DIK(1)=".232^AQ",DA=SRTN D EN1^DIK
Q
RET W !!,"Press <RET> to continue " R X:DTIME
K SRTN
Q
SROADEL ;B'HAM ISC/MAM - DELETE ASSESSMENT ; [ 01/23/01 1:52 PM ]
+1 ;;3.0; Surgery ;**38,83,100**;24 Jun 93
+2 SET SRASTAT=$PIECE($GET(^SRF(SRTN,"RA")),"^")
+3 IF SRASTAT="T"
WRITE !!,"This assessment has already been verified and transmitted. It cannot be",!,"deleted. If the assessment was transmitted in error, use the option 'Update",!,"an Assessment Transmitted in Error'."
DO RET
QUIT
+4 IF SRASTAT="V"
WRITE !!,"This assessment has already been verified. It cannot be deleted. If the",!,"assessment was verified in error, use the option 'Update an Assessment Verified",!,"in Error'."
DO RET
QUIT
DEL WRITE !!,"This assessment has a current status of "_$SELECT(SRASTAT="I":"'Incomplete'",1:"'Complete/Unverified'"),!!,"Are you sure that you want to delete this assessment ? NO// "
READ SRYN:DTIME
IF '$TEST!(SRYN["^")
SET SRSOUT=1
QUIT
+1 SET SRYN=$EXTRACT(SRYN)
IF "Nn"[SRYN
SET SRSOUT=1
QUIT
+2 IF "Yy"'[SRYN
WRITE !!,"Enter <RET> if this assessment was selected in error and should not be deleted.",!,"If you want to delete this assessment, enter 'YES'."
GOTO DEL
+3 IF $$LOCK^SROUTL(SRTN)
Begin DoDot:1
+4 KILL DR,DIE,DA
SET DA=SRTN
SET DIE=130
SET DR="235///@;284///@;393///@;260///@;272///@;323///@;102///@"
DO ^DIE
WRITE !!,"Deleting Assessment..."
+5 KILL DA,DIK
SET DIK="^SRF("
SET DIK(1)=".232^AQ"
SET DA=SRTN
DO EN1^DIK
End DoDot:1
DO UNLOCK^SROUTL(SRTN)
+6 QUIT
RET WRITE !!,"Press <RET> to continue "
READ X:DTIME
+1 KILL SRTN
+2 QUIT