- APCLVLD ; IHS/CMI/LAB - delete vgen/pgen custom report ;
- ;;2.0;IHS PCC SUITE;;MAY 14, 2009
- ;
- ;This routine will do a DIC lookup into the lister report
- ;temporary file and delete the entry.
- ;
- EN ;EP - called from an option
- W !!,"This option enables the user to delete a PCC Visit or Patient",!,"General Retrieval report definition.",!!
- D GETRPT
- G:'APCLRPT XIT ;no report selected
- D DELETE
- D XIT
- Q
- GETRPT ;get report entry - only allow lookup on own reports
- S APCLRPT=""
- S DIC="^APCLVRPT(" S DIC(0)="AEQ",DIC("A")="REPORT NAME: ",D="C" D IX^DIC K DIC,DA,DR
- Q:Y=-1
- S APCLRPT=+Y
- Q
- DELETE ;
- S DIR(0)="Y",DIR("A")="Are you sure you want to delete the "_$P(^APCLVRPT(APCLRPT,0),U,3)_" report definition",DIR("B")="N" K DA D ^DIR K DIR
- Q:$D(DIRUT)
- Q:'Y
- W !,"Report Definition ",$P(^APCLVRPT(APCLRPT,0),U)," deleted.",!
- S DA=APCLRPT,DIK="^APCLVRPT(" D ^DIK
- Q
- XIT ;
- K APCLRPT
- K DA,DIK,D0
- Q
- APCLVLD ; IHS/CMI/LAB - delete vgen/pgen custom report ;
- +1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
- +2 ;
- +3 ;This routine will do a DIC lookup into the lister report
- +4 ;temporary file and delete the entry.
- +5 ;
- EN ;EP - called from an option
- +1 WRITE !!,"This option enables the user to delete a PCC Visit or Patient",!,"General Retrieval report definition.",!!
- +2 DO GETRPT
- +3 ;no report selected
- IF 'APCLRPT
- GOTO XIT
- +4 DO DELETE
- +5 DO XIT
- +6 QUIT
- GETRPT ;get report entry - only allow lookup on own reports
- +1 SET APCLRPT=""
- +2 SET DIC="^APCLVRPT("
- SET DIC(0)="AEQ"
- SET DIC("A")="REPORT NAME: "
- SET D="C"
- DO IX^DIC
- KILL DIC,DA,DR
- +3 IF Y=-1
- QUIT
- +4 SET APCLRPT=+Y
- +5 QUIT
- DELETE ;
- +1 SET DIR(0)="Y"
- SET DIR("A")="Are you sure you want to delete the "_$PIECE(^APCLVRPT(APCLRPT,0),U,3)_" report definition"
- SET DIR("B")="N"
- KILL DA
- DO ^DIR
- KILL DIR
- +2 IF $DATA(DIRUT)
- QUIT
- +3 IF 'Y
- QUIT
- +4 WRITE !,"Report Definition ",$PIECE(^APCLVRPT(APCLRPT,0),U)," deleted.",!
- +5 SET DA=APCLRPT
- SET DIK="^APCLVRPT("
- DO ^DIK
- +6 QUIT
- XIT ;
- +1 KILL APCLRPT
- +2 KILL DA,DIK,D0
- +3 QUIT