- BMCRRDEL ; IHS/PHXAO/TMJ - delete Routine Referral Templates ;
- ;;4.0;REFERRED CARE INFO SYSTEM;;JAN 09, 2006
- ;
- ;This routine will do a DIC lookup into the Routine Referral
- ;file and delete the entry
- ;
- EN ;EP - called from an option
- W !!,"This option enables the user to delete a Routine Referral Template.",!!
- D GETRPT
- G:'BMCRRPT XIT ;no report selected
- D DELETE
- D XIT
- Q
- GETRPT ;get Rourtine Referral entry - Any Routine Referral May be Deleted
- S BMCRRPT=""
- S DIC="^BMCRTNRF(" S DIC(0)="AEQ",DIC("A")="ROUTINE REFERRAL TEMPLATE NAME: " D ^DIC K DIC,DA,DR
- Q:Y=-1
- S BMCRRPT=+Y
- Q
- DELETE ;
- S DIR(0)="Y",DIR("A")="Are you sure you want to delete the "_$P(^BMCRTNRF(BMCRRPT,0),U)_" Routine Referral",DIR("B")="N" K DA D ^DIR K DIR
- Q:$D(DIRUT)
- Q:'Y
- W !,"Routine Referral ",$P(^BMCRTNRF(BMCRRPT,0),U)," deleted.",!
- S DA=BMCRRPT,DIK="^BMCRTNRF(" D ^DIK
- Q
- XIT ;
- K BMCRRPT
- K DA,DIK,D0
- Q
- BMCRRDEL ; IHS/PHXAO/TMJ - delete Routine Referral Templates ;
- +1 ;;4.0;REFERRED CARE INFO SYSTEM;;JAN 09, 2006
- +2 ;
- +3 ;This routine will do a DIC lookup into the Routine Referral
- +4 ;file and delete the entry
- +5 ;
- EN ;EP - called from an option
- +1 WRITE !!,"This option enables the user to delete a Routine Referral Template.",!!
- +2 DO GETRPT
- +3 ;no report selected
- IF 'BMCRRPT
- GOTO XIT
- +4 DO DELETE
- +5 DO XIT
- +6 QUIT
- GETRPT ;get Rourtine Referral entry - Any Routine Referral May be Deleted
- +1 SET BMCRRPT=""
- +2 SET DIC="^BMCRTNRF("
- SET DIC(0)="AEQ"
- SET DIC("A")="ROUTINE REFERRAL TEMPLATE NAME: "
- DO ^DIC
- KILL DIC,DA,DR
- +3 IF Y=-1
- QUIT
- +4 SET BMCRRPT=+Y
- +5 QUIT
- DELETE ;
- +1 SET DIR(0)="Y"
- SET DIR("A")="Are you sure you want to delete the "_$PIECE(^BMCRTNRF(BMCRRPT,0),U)_" Routine Referral"
- SET DIR("B")="N"
- KILL DA
- DO ^DIR
- KILL DIR
- +2 IF $DATA(DIRUT)
- QUIT
- +3 IF 'Y
- QUIT
- +4 WRITE !,"Routine Referral ",$PIECE(^BMCRTNRF(BMCRRPT,0),U)," deleted.",!
- +5 SET DA=BMCRRPT
- SET DIK="^BMCRTNRF("
- DO ^DIK
- +6 QUIT
- XIT ;
- +1 KILL BMCRRPT
- +2 KILL DA,DIK,D0
- +3 QUIT