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

PRCSEA1.m

Go to the documentation of this file.
  1. PRCSEA1 ;WISC/KMB/DXH - REQUESTOR ENTER 1358 ;7.26.99
  1. V ;;5.1;IFCAP;**150,204**;Oct 20, 2000;Build 14
  1. ;Per VA Directive 6402, this routine should not be modified.
  1. ;PRC*5.1*150 RGB 4/23/12 DO NOT allow the same temporary tx
  1. ;number to be used at all. Previously, the same temp tx #
  1. ;could be used by different users, not same user.
  1. ;
  1. EN ;
  1. N PRCAED,DIR,DIRUT,PRCS,PRCSCP,PRCSN,PRCSTT,PRC,X,X1,DIC,DIE,DR,PRCSL,PRCSIP,X3
  1. K PRCBBMY
  1. S PRCSK=1,X3="H"
  1. D EN1F^PRCSUT(1) Q:Y<0
  1. D EN^DDIOL("Enter a 2-16 digit number with a leading alpha, as in 'ABC123'","","!!")
  1. D EN^DDIOL(" ") ; blank line
  1. EN1 ;
  1. S DLAYGO=410,DIC="^PRCS(410,",DIC(0)="ABELQX",D="H"
  1. S DIC("A")="Select TRANSACTION: "
  1. S DIC("S")="I '^(0),$P(^(0),U)'="""",$D(^PRCS(410,""B"",$P(^(0),U),+Y))" ; only temp tx number not defined will be allowed ;PRC*5.1*150
  1. D ^PRCSDIC
  1. K DLAYGO,DIC("A"),DIC("S")
  1. Q:Y<0
  1. I $P(Y,U,3)'=1 D EN^DDIOL("Must be a new entry. ") G EN1
  1. L +^PRCS(410,+Y):1 ;CHANGED DA TO +Y IN P182
  1. I $T=0 D EN^DDIOL("File being accessed, please try another entry") G EN1
  1. S T(2)=$P(Y,U,2)
  1. D EN2A^PRCSUT3 ; saves CP,sta,substa,txn name,user,BBFY,RB stat,acct data, etc. in new ien (nodes 0,3,6,11 of file 410)
  1. S $P(^PRCS(410,DA,14),"^")=DUZ ; originator (entered by)
  1. S $P(^PRCS(410,DA,7),"^",1)=DUZ,$P(^PRCS(410,DA,7),"^",2)=$P($G(^VA(200,DUZ,20)),"^",3)
  1. ; commented out by PRC*5*140 - automated flag not implemeted in option, if commented lines are removed, remember to stop newing the PRCS variable
  1. ; S PRCS="" I $D(^PRC(420,PRC("SITE"),1,+PRC("CP"),0)) S:$P(^(0),"^",11)="Y" PRCS=1
  1. S X=T(2)
  1. D EN^DDIOL("This transaction is assigned temporary transaction number: "_X,"","!!")
  1. K PRCSERR
  1. S DIC(0)="AEMQ",DIE=DIC,DIE("NO^")=1
  1. S DR="3///1"_$S($D(PRCSIP):";4////"_PRCSIP,1:""),X4=1
  1. D ^DIE
  1. S PRCAED=1 ; cannot find where or how PRCAED is used
  1. S DR="[PRCE NEW 1358S]"
  1. D ^DIE
  1. D W1^PRCSEB ; ask 'review?'
  1. L -^PRCS(410,DA)
  1. S DIR("B")="NO",DIR(0)="Y"
  1. S DIR("A")="Do you want to enter another new request"
  1. D ^DIR Q:'Y!($D(DIRUT))
  1. W !!
  1. ; removed by PRC*5*140 - PRCS2 never set up
  1. ; K PRCS2
  1. G EN1
  1. ED ;edit 1358 for requestor
  1. N PRCAED,DIR,DIRUT,PRCS,PRCSCP,PRCSN,PRCSTT,PRC,X,X1,DIC,DIE,DR,PRCSL,PRCSIP,X3
  1. K PRCBBMY
  1. ED1 ;
  1. S PRCAED=1,X3=1 ; PRC*5*140 comment - PRCAED used?, X3="H" for all other temp txn options. X3 determines xrefs to search in finding txn name.
  1. D EN^DDIOL("Enter a 2-16 digit number with a leading alpha, as in 'ABC123'","","!!")
  1. D EN^DDIOL(" ")
  1. S DIC="^PRCS(410,",DIC(0)="AEQ",D="H"
  1. S DIC("A")="Select TRANSACTION: "
  1. S DIC("S")="I '^(0),$P(^(0),U,3)'="""",$P(^(0),U,4)=1,^PRCS(410,""H"",$P(^(0),U,3),+Y)=DUZ!(^(+Y)="""")" ; request must be authored by user or unauthored & must be a 1358
  1. D ^PRCSDIC ; lookup & prelimiary validity checking
  1. K DIC("A"),DIC("S")
  1. Q:Y<0
  1. S DA=+Y
  1. L +^PRCS(410,DA):1 I $T=0 D EN^DDIOL("File being accessed...try later") Q
  1. S DIC=(0)="AEMQ",DIE="^PRCS(410,"
  1. S PRC("SITE")=+$P(^PRCS(410,DA,0),"^",5)
  1. S PRC("CP")=$P(^PRCS(410,DA,3),"^")
  1. ;PRC*5.1*204 Creates arrays PRC("FY"),PRC("QTR), and PRC("BBFY") if needed
  1. I '$D(PRC("FY")) D FY^PRCSUT G EX^PRCSUT:PRC("FY")="^"
  1. I '$D(PRC("QTR")) D QT^PRCSUT G EX^PRCSUT:PRC("QTR")="^"
  1. I '$$BBFY^PRCSUT(PRC("SITE"),PRC("FY"),PRC("CP")) G EX^PRCSUT
  1. S (PRCSDR,DR)="[PRCE NEW 1358S]"
  1. K DTOUT,DUOUT,Y
  1. S PDA=DA
  1. D ^DIE
  1. S DA=PDA
  1. I $D(Y)!($D(DTOUT)) S PRCAED=-1
  1. D W1^PRCSEB
  1. L -^PRCS(410,DA)
  1. S DIR("B")="NO",DIR(0)="Y"
  1. S DIR("A")="Would you like to edit another request"
  1. D ^DIR
  1. Q:'Y!($D(DIRUT))
  1. G ED1
  1. W6 D EN^DDIOL("For the transaction number,use an uppercase alpha as the first character,")
  1. D EN^DDIOL(" and then 2-15 alphanumerics, as in 'ADP1'.")
  1. D EN^DDIOL(" ")
  1. Q