BRNDEL ; IHS/PHXAO/TMJ - DISCLOSURE DELETE ;
;;2.0;RELEASE OF INFO SYSTEM;;APR 10, 2003
;
D GETREF
I Y<1 W !!,"No DISCLOSURE selected!" D EOJ Q
D DSPLY
D DELETE
D EOJ
Q
;
GETREF ; GET DISCLOSURE IEN - Do Not Display Closed Disclosures
W !
S BRNQ=1
W !
S DIC="^BRNREC(",DIC(0)="AEMQ",DIC("S")="I $D(^(0)),$P(^(0),U,8)'[""C""",DIC("A")="Select DISCLOSURE by Patient or by Disclosure Date or #: "
D DIC^BRNFMC
Q:Y<1
S BRNRIEN=+Y
S BRNQ=0
Q
;
;
;
;
DSPLY ;
S BRNRDSP=BRNRIEN D START2^BRNRDSP
W !!,"THE ABOVE DISCLOSURE AND RELATED ENTRIES WILL BE REMOVED FOREVER !!!"
Q
;
DELETE ; DELETE VISIT AND RELATED V FILES
W !,"Sure you want to delete" S %=2 D YN^DICN S %Y=$E(%Y)
Q:"Nn"[%Y
S BRNRDLT=BRNRDSP D ^BRNRDLT
I $D(^BRNREC(BRNRDSP,0)) D MSG
Q
;
EOJ ; EOJ HOUSE KEEPING
K %,%DT,%X,%Y,C,DIYS,X,Y
K BRNRIEN,BRNRDSP,BRNRDLT,BRNQ
Q
;
MSG ;No Delete of Disclosure Message IHS/PHXAO/TMJ Patch #4 New Message
Q ; Quit No Delete Message on disclosure Program
W !!,?10,"The Selected Disclosure was NOT deleted.......",!,?10,"This Disclosure either contains required Required Data!!",!
W ?10,"OR the Disclosure has been CLOSED!",!!
H 5 Q
BRNDEL ; IHS/PHXAO/TMJ - DISCLOSURE DELETE ;
+1 ;;2.0;RELEASE OF INFO SYSTEM;;APR 10, 2003
+2 ;
+3 DO GETREF
+4 IF Y<1
WRITE !!,"No DISCLOSURE selected!"
DO EOJ
QUIT
+5 DO DSPLY
+6 DO DELETE
+7 DO EOJ
+8 QUIT
+9 ;
GETREF ; GET DISCLOSURE IEN - Do Not Display Closed Disclosures
+1 WRITE !
+2 SET BRNQ=1
+3 WRITE !
+4 SET DIC="^BRNREC("
SET DIC(0)="AEMQ"
SET DIC("S")="I $D(^(0)),$P(^(0),U,8)'[""C"""
SET DIC("A")="Select DISCLOSURE by Patient or by Disclosure Date or #: "
+5 DO DIC^BRNFMC
+6 IF Y<1
QUIT
+7 SET BRNRIEN=+Y
+8 SET BRNQ=0
+9 QUIT
+10 ;
+11 ;
+12 ;
+13 ;
DSPLY ;
+1 SET BRNRDSP=BRNRIEN
DO START2^BRNRDSP
+2 WRITE !!,"THE ABOVE DISCLOSURE AND RELATED ENTRIES WILL BE REMOVED FOREVER !!!"
+3 QUIT
+4 ;
DELETE ; DELETE VISIT AND RELATED V FILES
+1 WRITE !,"Sure you want to delete"
SET %=2
DO YN^DICN
SET %Y=$EXTRACT(%Y)
+2 IF "Nn"[%Y
QUIT
+3 SET BRNRDLT=BRNRDSP
DO ^BRNRDLT
+4 IF $DATA(^BRNREC(BRNRDSP,0))
DO MSG
+5 QUIT
+6 ;
EOJ ; EOJ HOUSE KEEPING
+1 KILL %,%DT,%X,%Y,C,DIYS,X,Y
+2 KILL BRNRIEN,BRNRDSP,BRNRDLT,BRNQ
+3 QUIT
+4 ;
MSG ;No Delete of Disclosure Message IHS/PHXAO/TMJ Patch #4 New Message
+1 ; Quit No Delete Message on disclosure Program
QUIT
+2 WRITE !!,?10,"The Selected Disclosure was NOT deleted.......",!,?10,"This Disclosure either contains required Required Data!!",!
+3 WRITE ?10,"OR the Disclosure has been CLOSED!",!!
+4 HANG 5
QUIT