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

PRCPPOU1.m

Go to the documentation of this file.
  1. PRCPPOU1 ;WISC/RFJ-receive purchase order (utilities) ;06 Jan 94
  1. V ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. Q
  1. ;
  1. ;
  1. SELECTPO(PRCPINPT) ; select purchase order
  1. N %,C,DIC,I,PRCPORDR,PRCPSCRN,X,Y
  1. S PRCPSCRN="I $D(^PRC(442,""G"",PRCPINPT,+Y)) S %=$P($G(^PRCD(442.3,+$G(^PRC(442,+Y,7)),0)),U,2) I ""^25^26^27^28^30^31^32^33^34^37^38^40^41^46^47^48^49^50^51^""[(""^""_%_""^"")"
  1. F D Q:$G(PRCPORDR)
  1. . W !!,"Select PURCHASE ORDER: "
  1. . R X:DTIME I '$T!(X["^")!(X="") S PRCPORDR=-1 Q
  1. . I X["?" D S PRCPORDR=0 Q
  1. . . S D="G",DIC="^PRC(442,",DIC(0)="QECM",DIC("W")="D DICW^PRCPPOU1",DIC("S")=PRCPSCRN
  1. . . D IX^DIC
  1. . ; lookup po in x
  1. . S DIC="^PRC(442,",DIC(0)="EQMZ",DIC("S")=PRCPSCRN
  1. . D ^DIC I Y<0 S PRCPORDR=0 Q
  1. . S PRCPORDR=+Y
  1. Q PRCPORDR
  1. ;
  1. ;
  1. PARTIAL(PRCPORDR) ; select partial date
  1. N %,C,DA,DIC,X,Y
  1. I '$D(^PRC(442,PRCPORDR,11,0)) S ^(0)="^442.11D^^"
  1. S DIC="^PRC(442,"_PRCPORDR_",11,",DA(1)=PRCPORDR,DIC(0)="QEAMZ",DIC("S")="I $P(^(0),U,16)="""""
  1. W ! D ^DIC
  1. Q +Y
  1. ;
  1. ;
  1. DICW ; write id for purchase order lookup
  1. N %,DATA
  1. S DATA=^PRC(442,+Y,0)
  1. W " ",$P(DATA,U)
  1. S %=$P($G(^PRC(442,+Y,1)),"^",15) W:% " ",$E(%,4,5),"-",$E(%,6,7),"-",$E(%,2,3)
  1. S %=$P($G(^PRCD(442.5,+$P(DATA,"^",2),0)),"^") W:%'="" " ",%
  1. S %=$P($G(^PRCD(442.3,+$G(^PRC(442,+Y,7)),0)),"^")
  1. W !?7,$E(%,1,34),?45,"FCP: ",$P($P(DATA,"^",3)," ",1)," $ ",$P(DATA,"^",15)
  1. Q
  1. ;
  1. ;
  1. LINEITEM(PRCPORDR) ; select line item
  1. N D0,DA,DIC,X,Y
  1. S DIC="^PRC(442,"_PRCPORDR_",2,",(DA(1),D0)=PRCPORDR,DIC(0)="QEAMZ",DIC("S")="I $D(^TMP($J,""PRCPPOLMCOS"",Y))"
  1. W ! D ^DIC
  1. Q +Y