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

PRCBCPE.m

Go to the documentation of this file.
  1. PRCBCPE ;WISC@ALTOONA/CTB-CONTROL POINT EDIT ; 01/03/94 9:53 AM
  1. V ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. OUT K C,D,D0,DA,DI,DIC,DIE,DINUM,DLAYGO,DQ,DR,DWLW,I,J,NEW,NEWNAME,OLD,OLDNAME,OLDNUM,PRCFA,X,Y Q
  1. ADD ;ADD NEW FUND CONTROL POINT
  1. K PRCFA S PRCF("X")="AS" D ^PRCFSITE Q:'%
  1. I '$D(^PRC(420,PRC("SITE"))) K DD,DO S (DINUM,X)=PRC("SITE"),DIC="^PRC(420,",DIC(0)="EMNQL",DLAYGO=420 D FILE^DICN G OUT:Y<0 S $P(^PRC(420,+Y,1,0),"^",2)="420.01s"
  1. K PRCFA("OUT") D CPEDIT I '$D(PRCFA("OUT")) S DIE="^PRC(420,",DA=PRC("SITE"),DR="2;3" D ^DIE
  1. K PRCFA("OUT") G OUT
  1. CPEDIT K PRCFA S DIC("S")="I X'=9999",PRCFA("ALL")="",DA(1)=PRC("SITE"),DLAYGO=420.01,DIC="^PRC(420,"_DA(1)_",1,",DIC(0)="AEMNZLQ" D ^DIC I X["^" S PRCFA("OUT")="" Q
  1. Q:+Y<0 S DA=+Y,OLD=$P(Y(0),"^"),OLDNUM=$P(OLD," "),OLDNAME=$P(OLD," ",2,99)
  1. I $P(Y(0),"^",19)'=1 G C
  1. E S %A="This Control Point has been marked as INACTIVE, do you wish to",%A(1)="reactivate it at this time",%B="",%=2 D ^PRCFYN
  1. I %<0 S PRCFA("OUT")="" Q
  1. I %=2 S %A="Are you sure you what to reactivate this Control Point",%B="" D ^PRCFYN I %<0 S PRCFA("OUT")="" Q
  1. I %=2 S X=" <No Action Taken>*" D MSG^PRCFQ
  1. I %=1 S $P(^PRC(420,DA(1),1,DA,0),"^",23,24)="^",$P(^(0),"^",19)=0,X=" --Fund Control Point has been reactivated*" D MSG^PRCFQ
  1. C W ! S %A="Do you need to edit the Fund Control Point Name",%B="",%=2 D ^PRCFYN G AD1:%=2 I %<0 S PRCFA("OUT")="" Q
  1. W ! S %A="You may edit only the NAME of this Control Point, you may NOT change the number",%A(1)="Do you REALLY wish to change the NAME of this Fund Control Point",%B="",%=1 D ^PRCFYN G AD1:%=2 I %<0 S PRCFA("OUT")="" Q
  1. AD2 S Y=OLDNAME W !!,"Fund Control Point NAME: ",Y W:$X>48 !?9 W "// "
  1. I $L(OLDNAME)>19 D RW^PRCBSA Q:$D(X)[0
  1. I $L(OLDNAME)<20 R X:DTIME I '$T!(X["^") S PRCFA("OUT")="" Q
  1. G:X="" AD1
  1. I X["?"!($L(X)>30)!(+X=+OLDNUM)!(X'?1.30ANP) W !,$C(7),"Enter FUND CONTROL POINT NAME, (up to ",30-$L(OLDNUM)," characters), do not include the NUMBER" G AD2
  1. S NEW=OLDNUM_" "_X,NEWNAME=X,%A=" ",%A(1)="The NEW Fund Control Point Number and Name will be:",%A(2)=NEW,%A(3)="IS THIS CORRECT",%B="",%=2 D ^PRCFYN G AD2:%=2 I %<0 S PRCFA("OUT")="" Q
  1. S %A="OK to update the file",%=1,%B="" D ^PRCFYN I %<0 S PRCFA("OUT")="" Q
  1. I %=2 S X=" <No Updating has Occurred>*" D MSG^PRCFQ G AD1
  1. K ^PRC(420,DA(1),1,"B",$E(OLD,1,30),DA),^PRC(420,DA(1),1,"C",$E(OLDNAME,1,30),DA)
  1. S $P(^PRC(420,DA(1),1,DA,0),"^")=NEW,^PRC(420,DA(1),1,"B",$E(NEW,1,30),DA)="",^PRC(420,DA(1),1,"C",$E(NEWNAME,1,30),DA)="",X=" <Fund Control Point name has been changed.>*" D MSG^PRCFQ
  1. AD1 S DIE=DIC,DR=".5;1;4;12;6;13;7;8;14;22" D ^DIE W:$P(^PRC(420,DA(1),1,DA,0),"^",11)["N" "Notify users of this control point that the control point is non-automated!"
  1. W ! S DIC("A")="Select next FUND CONTROL POINT: "
  1. G CPEDIT
  1. Q I X="^" K X
  1. Q
  1. REA ;REACTIVATE AN INACTIVE FUND CONTROL POINT
  1. K PRCFA S PRCF("X")="AS" D ^PRCFSITE Q:'%
  1. S $P(^PRC(420,PRC("SITE"),1,0),"^",2)="420.01s"
  1. REA1 S PRCFA("REACTIVATE")="",DA(1)=PRC("SITE"),DIC="^PRC(420,"_DA(1)_",1,",DIC(0)="AEMQN" D ^DIC K DIC G:Y<0 OUT S DA=+Y
  1. W !,$C(7) S %A="Are you sure that you wish to reactivate this Fund Control Point",%B="",%=1 D ^PRCFYN G OUT:%<0 I %=2 D NA G REA1
  1. S $P(^PRC(420,DA(1),1,DA,0),"^",23,24)="^",$P(^(0),"^",19)=0,X=" --Fund Control Point has been reactivated*" D MSG^PRCFQ S DIC("A")="Select Next Fund Control Point: " G REA1
  1. DEA ;DEACTIVATE A CONTROL POINT
  1. K PRCFA S PRCF("X")="AS" D ^PRCFSITE Q:'%
  1. S $P(^PRC(420,PRC("SITE"),1,0),"^",2)="420.01s"
  1. DEA1 S DA(1)=PRC("SITE"),DIC="^PRC(420,"_DA(1)_",1,",DIC(0)="AEMQN" D ^DIC K DIC G:Y<0 OUT S DA=+Y
  1. W !,$C(7) S %A="Are you sure that you wish to deactivate this Fund Control Point",%B="",%=1 D ^PRCFYN G OUT:%<0 I %=2 D NA G DEA1
  1. S $P(^PRC(420,DA(1),1,DA,0),"^",23,24)=DUZ_"^"_DT,$P(^(0),"^",19)=1,X=" --Fund Control Point has been deactivated*" D MSG^PRCFQ W ! S DIC("A")="Select Next FUND CONTROL POINT: " G DEA
  1. Q
  1. NA S X="<No Action Taken>*" D MSG^PRCFQ Q
  1. ;