- PSNDELTE ;BIRM/WRT-Deletes PMI files for PMI Update Patches ; 10/27/03 10:27
- ;;4.0; NATIONAL DRUG FILE;**75**; 30 Oct 98
- Q
- START ; Begin update process
- W !!,"This option will run the auto-mapping process. This will be accomplished by",!,"taking NDCs from NDC/UPN file #50.67 and the VA Products tied to these NDCs"
- W !,"in file #50.68 AND attempt to find a match in PMI NDC/GCNSEQNO file #50.628."
- W ! S DIR("A")="Are you sure you are ready to proceed? "
- S DIR("B")="NO",DIR(0)="YA" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) Q
- I Y=0 Q
- Q
- ;
- ;
- BEGIN I $D(DUZ)#2 N DIC,X,Y S DIC=200,DIC(0)="N",X="`"_DUZ D ^DIC I Y>0,$D(DUZ(0))#2,DUZ(0)="@" G TEXT
- E W !!,"You must be a valid user with DUZ(0)=""@"""
- Q
- TEXT W !,"This option will automatically DELETE all Patient Medication Information Sheet",!,"data from your system."
- W !!,"If you are not absolutely sure what you are about to do, exit this option",!,"immediately by entering ""^"" at the next prompt."
- W !!,"This option should only be used when installing a update Patient Medication",!,"Information Sheet Data Update patch."
- W "Immediately after running this option, the",!,"new data global MUST be installed using instructions from the Patient Medication",!,"Sheet Data Update patch."
- W !,"You are about to DELETE ALL Patient Medication Sheet data from the following",!,"files:",!
- W !!,?7,"50.621 PMI-ENGLISH ^PS(50.621,"
- W !,?7,"50.622 PMI-SPANISH ^PS(50.622,"
- W !,?7,"50.623 PMI MAP-ENGLISH ^PS(50.623,"
- W !,?7,"50.624 PMI MAP-SPANISH ^PS(50.624,"
- W !,?7,"50.625 WARNING LABEL-ENGLISH ^PS(50.625,"
- W !,?7,"50.626 WARNING LABEL-SPANISH ^PS(50.626,"
- W !,?7,"50.627 WARNING LABEL MAP ^PS(50.627,"
- W ! S DIR("A")="Are you sure you want to delete the Patient Medication Information Sheet data? "
- S DIR("B")="NO",DIR(0)="YA" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) Q
- I Y=0 Q
- D SECND
- Q
- SECND ; Ask a second time
- W !!,"Because running this process inadvertently could cause serious problems, you",!,"will be asked to confirm that you want to proceed."
- K DIR W ! S DIR("A")="Are you sure you are ready to proceed, deleting the Patient Medication Information Sheet data? "
- S DIR("B")="NO",DIR(0)="YA" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) Q
- I Y=0 Q
- DELETE K ^PS(50.621),^PS(50.622),^PS(50.623),^PS(50.624),^PS(50.625),^PS(50.626),^PS(50.627)
- W !!,"Deleting all Patient Medication Information Sheet data...",!,"The deletion process has completed.",!!,"Now, IMMEDIATELY install (restore) the new data global from the latest"
- W !,"Patient Medication Information Sheet data update patch."
- Q
- PSNDELTE ;BIRM/WRT-Deletes PMI files for PMI Update Patches ; 10/27/03 10:27
- +1 ;;4.0; NATIONAL DRUG FILE;**75**; 30 Oct 98
- +2 QUIT
- START ; Begin update process
- +1 WRITE !!,"This option will run the auto-mapping process. This will be accomplished by",!,"taking NDCs from NDC/UPN file #50.67 and the VA Products tied to these NDCs"
- +2 WRITE !,"in file #50.68 AND attempt to find a match in PMI NDC/GCNSEQNO file #50.628."
- +3 WRITE !
- SET DIR("A")="Are you sure you are ready to proceed? "
- +4 SET DIR("B")="NO"
- SET DIR(0)="YA"
- DO ^DIR
- KILL DIR
- IF $DATA(DTOUT)!$DATA(DUOUT)
- QUIT
- +5 IF Y=0
- QUIT
- +6 QUIT
- +7 ;
- +8 ;
- BEGIN IF $DATA(DUZ)#2
- NEW DIC,X,Y
- SET DIC=200
- SET DIC(0)="N"
- SET X="`"_DUZ
- DO ^DIC
- IF Y>0
- IF $DATA(DUZ(0))#2
- IF DUZ(0)="@"
- GOTO TEXT
- +1 IF '$TEST
- WRITE !!,"You must be a valid user with DUZ(0)=""@"""
- +2 QUIT
- TEXT WRITE !,"This option will automatically DELETE all Patient Medication Information Sheet",!,"data from your system."
- +1 WRITE !!,"If you are not absolutely sure what you are about to do, exit this option",!,"immediately by entering ""^"" at the next prompt."
- +2 WRITE !!,"This option should only be used when installing a update Patient Medication",!,"Information Sheet Data Update patch."
- +3 WRITE "Immediately after running this option, the",!,"new data global MUST be installed using instructions from the Patient Medication",!,"Sheet Data Update patch."
- +4 WRITE !,"You are about to DELETE ALL Patient Medication Sheet data from the following",!,"files:",!
- +5 WRITE !!,?7,"50.621 PMI-ENGLISH ^PS(50.621,"
- +6 WRITE !,?7,"50.622 PMI-SPANISH ^PS(50.622,"
- +7 WRITE !,?7,"50.623 PMI MAP-ENGLISH ^PS(50.623,"
- +8 WRITE !,?7,"50.624 PMI MAP-SPANISH ^PS(50.624,"
- +9 WRITE !,?7,"50.625 WARNING LABEL-ENGLISH ^PS(50.625,"
- +10 WRITE !,?7,"50.626 WARNING LABEL-SPANISH ^PS(50.626,"
- +11 WRITE !,?7,"50.627 WARNING LABEL MAP ^PS(50.627,"
- +12 WRITE !
- SET DIR("A")="Are you sure you want to delete the Patient Medication Information Sheet data? "
- +13 SET DIR("B")="NO"
- SET DIR(0)="YA"
- DO ^DIR
- KILL DIR
- IF $DATA(DTOUT)!$DATA(DUOUT)
- QUIT
- +14 IF Y=0
- QUIT
- +15 DO SECND
- +16 QUIT
- SECND ; Ask a second time
- +1 WRITE !!,"Because running this process inadvertently could cause serious problems, you",!,"will be asked to confirm that you want to proceed."
- +2 KILL DIR
- WRITE !
- SET DIR("A")="Are you sure you are ready to proceed, deleting the Patient Medication Information Sheet data? "
- +3 SET DIR("B")="NO"
- SET DIR(0)="YA"
- DO ^DIR
- KILL DIR
- IF $DATA(DTOUT)!$DATA(DUOUT)
- QUIT
- +4 IF Y=0
- QUIT
- DELETE KILL ^PS(50.621),^PS(50.622),^PS(50.623),^PS(50.624),^PS(50.625),^PS(50.626),^PS(50.627)
- +1 WRITE !!,"Deleting all Patient Medication Information Sheet data...",!,"The deletion process has completed.",!!,"Now, IMMEDIATELY install (restore) the new data global from the latest"
- +2 WRITE !,"Patient Medication Information Sheet data update patch."
- +3 QUIT