Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRCBVE

PRCBVE.m

Go to the documentation of this file.
  1. PRCBVE ;WISC@ALTOONA/CLH-ADD/EDIT CALM VENDOR FILE ;9-21-89/09:27
  1. V ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;MUST PASS VARIABLE PRCB("VEN") WHICH IS INTERNAL VENDOR NUMBER
  1. ;PRC VARIABLES MUST BE SET IE. PRC("SITE")
  1. GN ;GET TEMP NUM
  1. D WAIT^PRCFYN S DIC="^PRCF(421.6,",DLAYGO=421.6,DIC(0)="XOLM",X=PRC("SITE")_"-"_^%ZOSF("VOL")_"-"_$J,PRCBT=0
  1. S:'$D(COUNT) COUNT=0 D ^DIC Q:+Y<0 I +$P(Y,U,3)'=1 S COUNT=COUNT+1 Q:COUNT=3 S DIK=DIC,DA=+Y D ^DIK K DIK G GN
  1. S PRCB("TDA")=+Y,PRCBT=1
  1. Q
  1. EN ;ADD VENDOR
  1. I $D(^PRC(440,PRCB("VEN"),7)) S PRCBE=1,%A="Do you want to review the current information on this vendor",%B="",%=2 D ^PRCFYN D:%'=2 REVO
  1. D GN S DIE=DIC,DA=PRCB("TDA"),DR="[PRCB VENDOR EDIT]"
  1. ENV D ^DIE D REVN S %A="Is this data correct",%B="",%=1 D ^PRCFYN I %'=1 S %A="Re-edit data",%B="",%=1 D ^PRCFYN G:%=1 ENV
  1. I '$D(^PRC(440,PRCB("VEN"),7)) S %A(1)="This vendor does not appear to have been established in CALM Vendor File",%A(2)="Do you want to establish them at this time",%B="",%=1 D ^PRCFYN G:%=1 ADVEN G SET
  1. I $P(^PRC(440,PRCB("VEN"),7),U,10)="" S %A(1)="This vendor does not appear to have a CALM ID Number",%A(2)="Do you want to establish them to the CALM Vendor File",%B="",%=1 D ^PRCFYN G:%=1 ADVEN G SET
  1. I $D(PRCBE) S %A="Do you want to update the CALM vendor file at this time",%B="",%=1 D ^PRCFYN G:%'=1 SET
  1. ;THIS AREA FOR UPDATING EXSITING VENDOR INFO IN CALM
  1. ADVEN ;AREA TO SET UP MSG FOR AUSTIN TO ESTABLISH NEW VENDOR
  1. W !!,"Twix will be sent to establish vendor: ",$P(^PRC(440,PRCB("VEN"),0),U)," in the CALM Vendor File."
  1. SET ;MOVE TEMP INFO FROM 421.6 TO 440
  1. W !!,"I'm going to update the your Vendor File..."
  1. I '$D(^PRCF(421.6,PRCB("TDA"),3)) G OUT
  1. I '$D(^PRC(440,PRCB("VEN"),7)) S OR="",$P(OR,U,1,11)=""
  1. E S OR=$P(^PRC(440,PRCB("VEN"),7),U,1,99)
  1. S NR=$P(^PRCF(421.6,PRCB("TDA"),3),U,1,99)
  1. ;I $P(NR,U,3)
  1. S ^PRC(440,PRCB("VEN"),7)=$P(NR,U,12)_U_$P(NR,U,11)_U_$P(NR,U,3,9)
  1. W !!,"Finished. Hold on while I do some clean up...."
  1. OUT I $D(PRCB("TDA")) S DIK="^PRCF(421.6,",DA=PRCB("TDA") D ^DIK
  1. K DIK,DIC,DIE,PRCB("TDA"),DA,X,COUNT,PRCBT,DLAYGO,%,REC,REC1,TEMP,TEMP1
  1. Q
  1. REVO ;REVIEW OLD VENDOR INFO
  1. I '$D(^PRC(440,PRCB("VEN"),0)) W !!,$C(7),"** No Vendor Information available **" Q
  1. S REC=^PRC(440,PRCB("VEN"),0) I '$D(^PRC(440,PRCB("VEN"),7)) S REC1="",$P(REC1,U,1,11)=""
  1. E S REC1=^PRC(440,PRCB("VEN"),7)
  1. I $D(IOF) W @IOF
  1. W !!?5,"Vendor Name: ",$P(REC,U,1),?48,"Vendor Number: ",PRCB("VEN")
  1. W !!!?5,"Payment Information: "
  1. W !!?19,"Calm ID Number: " I $P(REC1,U,10)'="" W $P(REC1,U,10)
  1. W !?19,"Stub Name: " I $P(REC1,U,11)'="" W ?35,$P(REC1,U,11)
  1. W !?19,"Address: " I $P(REC1,U,3)'="" W ?35,$P(REC1,U,3)
  1. I $P(REC1,U,4)'="" W !?35,$P(REC1,U,4)
  1. I $P(REC1,U,5)'="" W !?35,$P(REC1,U,5)
  1. I $P(REC1,U,6)'="" W !?35,$P(REC1,U,6)
  1. I $P(REC1,U,7)'="" W !?35,$P(REC1,U,7)_", ",$P(^DIC(5,$P(REC1,U,8),0),U)_" ",$P(REC1,U,9)
  1. W !!?19,"Phone Number: " I $P(REC1,U,2)'="" W ?35,$P(REC1,U,2)
  1. Q
  1. REVN ;REVIEW NEW VENDOR INFO
  1. I '$D(^PRCF(421.6,PRCB("TDA"),3)) W !,$C(7)," - No Data Entered - " Q
  1. E S TEMP1=^PRCF(421.6,PRCB("TDA"),3)
  1. I $D(IOF) W @IOF
  1. W !!?5,"Vendor Name: ",$P(^PRC(440,PRCB("VEN"),0),U)
  1. W !!!?5,"Payment Information: "
  1. W !!?19,"Calm ID Number: " I $P(TEMP1,U,1)'="" W $P(TEMP1,U,1)
  1. W !?19,"Calm Stub Name: " I $P(TEMP1,U,10)'="" W ?35,$P(TEMP1,U,10)
  1. W !?19,"Address: " I $P(TEMP1,U,3)'="" W ?35,$P(TEMP1,U,3)
  1. I $P(TEMP1,U,4)'="" W !?35,$P(TEMP1,U,4)
  1. I $P(TEMP1,U,5)'="" W !?35,$P(TEMP1,U,5)
  1. I $P(TEMP1,U,6)'="" W !?35,$P(TEMP1,U,6)
  1. I $P(TEMP1,U,7)'="" W !?35,$P(TEMP1,U,7)_", ",$P(TEMP1,U,8)_" ",$P(TEMP1,U,9)
  1. Q