source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPPOU1.m@ 699

Last change on this file since 699 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.6 KB
RevLine 
[613]1PRCPPOU1 ;WISC/RFJ-receive purchase order (utilities) ;06 Jan 94
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6 ;
7SELECTPO(PRCPINPT) ; select purchase order
8 N %,C,DIC,I,PRCPORDR,PRCPSCRN,X,Y
9 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^""[(""^""_%_""^"")"
10 F D Q:$G(PRCPORDR)
11 . W !!,"Select PURCHASE ORDER: "
12 . R X:DTIME I '$T!(X["^")!(X="") S PRCPORDR=-1 Q
13 . I X["?" D S PRCPORDR=0 Q
14 . . S D="G",DIC="^PRC(442,",DIC(0)="QECM",DIC("W")="D DICW^PRCPPOU1",DIC("S")=PRCPSCRN
15 . . D IX^DIC
16 . ; lookup po in x
17 . S DIC="^PRC(442,",DIC(0)="EQMZ",DIC("S")=PRCPSCRN
18 . D ^DIC I Y<0 S PRCPORDR=0 Q
19 . S PRCPORDR=+Y
20 Q PRCPORDR
21 ;
22 ;
23PARTIAL(PRCPORDR) ; select partial date
24 N %,C,DA,DIC,X,Y
25 I '$D(^PRC(442,PRCPORDR,11,0)) S ^(0)="^442.11D^^"
26 S DIC="^PRC(442,"_PRCPORDR_",11,",DA(1)=PRCPORDR,DIC(0)="QEAMZ",DIC("S")="I $P(^(0),U,16)="""""
27 W ! D ^DIC
28 Q +Y
29 ;
30 ;
31DICW ; write id for purchase order lookup
32 N %,DATA
33 S DATA=^PRC(442,+Y,0)
34 W " ",$P(DATA,U)
35 S %=$P($G(^PRC(442,+Y,1)),"^",15) W:% " ",$E(%,4,5),"-",$E(%,6,7),"-",$E(%,2,3)
36 S %=$P($G(^PRCD(442.5,+$P(DATA,"^",2),0)),"^") W:%'="" " ",%
37 S %=$P($G(^PRCD(442.3,+$G(^PRC(442,+Y,7)),0)),"^")
38 W !?7,$E(%,1,34),?45,"FCP: ",$P($P(DATA,"^",3)," ",1)," $ ",$P(DATA,"^",15)
39 Q
40 ;
41 ;
42LINEITEM(PRCPORDR) ; select line item
43 N D0,DA,DIC,X,Y
44 S DIC="^PRC(442,"_PRCPORDR_",2,",(DA(1),D0)=PRCPORDR,DIC(0)="QEAMZ",DIC("S")="I $D(^TMP($J,""PRCPPOLMCOS"",Y))"
45 W ! D ^DIC
46 Q +Y
Note: See TracBrowser for help on using the repository browser.