PRCVINIT ;WOIFO/DAP-ITEM/VENDOR FILE INITIALIZATION CALLING; 05/23/05
V ;;5.1;IFCAP;**81**;Oct 20, 2000
 ;Per VHA Directive 10-93-142, this routine should not be modified.
 ;
 Q
 ;
INIT ;Entry call for the routine, allows users to initialize 
 ;the item and vendor file checksums while offering enhanced feedback
 ;
 ;Verify that site parameter is properly set for use of COTS Inventory Interface
 I $$GET^XPAR("SYS","PRCV COTS INVENTORY",1,"Q")'=1 W !,"The site parameter is not properly set for",!,"use of the COTS Inventory interface!",! Q
 ;
 ;If checksums have already been initialized for the site this routine will quit to avoid errors caused by re-initiating the checksums
 I $D(^PRCV(414.04,1,0)) W !,"Item or Vendor file checksum has already been initialized!",! Q
 ;
 W !,"Item file checksum initialization beginning...",!
 D INIT^PRCVIT
 I $D(^PRCV(414.04,1,0)) W !,"Item file checksum initialization complete!",!
 I '$D(^PRCV(414.04,1,0)) W !,"Item file checksum initialization failed!",! Q
 ;
 W !,"Vendor file checksum initialization beginning...",!
 D INIT^PRCVNDR
 I $D(^PRCV(414.04,2,0)) W !,"Vendor file checksum initialization complete!",!
 I '$D(^PRCV(414.04,2,0)) W !,"Vendor file checksum initialization failed!",! Q
 ;
 Q 
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRCVINIT   1273     printed  Sep 23, 2025@19:56:08                                                                                                                                                                                                    Page 2
PRCVINIT  ;WOIFO/DAP-ITEM/VENDOR FILE INITIALIZATION CALLING; 05/23/05
V         ;;5.1;IFCAP;**81**;Oct 20, 2000
 +1       ;Per VHA Directive 10-93-142, this routine should not be modified.
 +2       ;
 +3        QUIT 
 +4       ;
INIT      ;Entry call for the routine, allows users to initialize 
 +1       ;the item and vendor file checksums while offering enhanced feedback
 +2       ;
 +3       ;Verify that site parameter is properly set for use of COTS Inventory Interface
 +4        IF $$GET^XPAR("SYS","PRCV COTS INVENTORY",1,"Q")'=1
               WRITE !,"The site parameter is not properly set for",!,"use of the COTS Inventory interface!",!
               QUIT 
 +5       ;
 +6       ;If checksums have already been initialized for the site this routine will quit to avoid errors caused by re-initiating the checksums
 +7        IF $DATA(^PRCV(414.04,1,0))
               WRITE !,"Item or Vendor file checksum has already been initialized!",!
               QUIT 
 +8       ;
 +9        WRITE !,"Item file checksum initialization beginning...",!
 +10       DO INIT^PRCVIT
 +11       IF $DATA(^PRCV(414.04,1,0))
               WRITE !,"Item file checksum initialization complete!",!
 +12       IF '$DATA(^PRCV(414.04,1,0))
               WRITE !,"Item file checksum initialization failed!",!
               QUIT 
 +13      ;
 +14       WRITE !,"Vendor file checksum initialization beginning...",!
 +15       DO INIT^PRCVNDR
 +16       IF $DATA(^PRCV(414.04,2,0))
               WRITE !,"Vendor file checksum initialization complete!",!
 +17       IF '$DATA(^PRCV(414.04,2,0))
               WRITE !,"Vendor file checksum initialization failed!",!
               QUIT 
 +18      ;
 +19       QUIT