source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCSP121.m@ 1078

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

initial load of WorldVistAEHR

File size: 4.5 KB
Line 
1PRCSP121 ;WISC/SAW/BMM-CONTROL POINT ACTIVITY 2237 PRINTOUT CON'T ; 3/29/05 1:50pm
2 ;;5.1;IFCAP;**81**;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ;PRINT ITEMS ; REW fixed next line for Archiving "just in case"
6 ;
7 ;PRC*5.1*81 BMM edit PRCARD to add DM Doc ID (410.02, 17) and Date
8 ;Needed By (410.02, 18) fields to printout
9 ;
10 I $D(^PRCS(410,DA,1)),$P(^(1),U,5)'="" S P=$P(^(1),U,5),P=$P($G(^PRCS(410.2,P,0),">>> PRCS(410.2,"_P_",0) is not defined but referenced in PRCSP121 for record: "_DA_" <<<"),U) W !,?12,"|",P,":",?38,"|",?48,"|",?53,"|",?63,"|",?73,"|",?84,"|"
11 S DIWL=19,DIWR=35,DIWF="",P(1)=0
12 F I=1:1 K ^UTILITY($J,"W") S P(1)=$O(^PRCS(410,DA,"IT",P(1))) G VENDOR:P(1)'>0 D ITEM1
13ITEM1 Q:'$D(^PRCS(410,DA,"IT",P(1),0)) S Z=^(0),P(4)=$P(Z,U,6)
14 S PRCS("SUB")=+$P(Z,U,4),P(3)=$P(Z,U,3) S P(3)=$S($D(^PRCD(420.5,+P(3),0)):$P(^(0),U),1:"")
15 S P(0)="|"_$S($P(Z,U,2)[".":$J($P(Z,U,2),9,2),1:$J($P(Z,U,2),9))_"|"_$J(P(3),4)_"|"_$S($P(Z,U,7)="N/C":$J("N/C",9),1:$J($P(Z,U,7),9,4))_"|"
16 G PRCARD:$P(Z,U,5)
17 S P(2)=0 F I=1:1 S P(2)=$O(^PRCS(410,DA,"IT",P(1),1,P(2))) Q:P(2)="" S X=^(P(2),0) S:I=1 X=$P(^PRCS(410,DA,"IT",P(1),0),U)_" "_X D DIWP^PRCUTL($G(DA))
18ITEM2 I '$D(^UTILITY($J,"W",DIWL)) S ^(DIWL)=1,^(DIWL,1,0)="***NO DESCRIPTION***"
19 S Z=^UTILITY($J,"W",DIWL)
20 I $L(P(4))>12 W !,$E(P(4),1,12),"|",?38,"|",?48,"|",?53,"|",?63,"|",?73,"|",?84,"|",!,$E(P(4),13,24)
21 I $L(P(4))<13 W !,P(4)
22 I Z>1 F J=1:1:(Z-1) W ?12,"|",^UTILITY($J,"W",DIWL,J,0),?38,"|",?48,"|",?53,"|",?63,"|",?73,"|",?84,"|" D:$Y>61 NEWP W !
23 I Z>1 W ?12,"|",^UTILITY($J,"W",DIWL,Z,0),?38,P(0),?73,"|",?84,"|" D:$Y>61 NEWP W !,?12,"|",?38,"|",?48,"|",?53,"|",?63,"|",?73,"|",?84,"|"
24 I Z<2 W ?12,"|",^UTILITY($J,"W",DIWL,1,0),?38,P(0),?73,"|",?84,"|" D:$Y>61 NEWP W !,?12,"|",?38,"|",?48,"|",?53,"|",?63,"|",?73,"|",?84,"|"
25 Q
26PRCARD S P("PR")=$P(^PRCS(410,DA,"IT",P(1),0),U,5) G ITEM2:'$D(^PRC(441,P("PR"),1,0))
27 S P("PR1")=0,X=$P(^PRCS(410,DA,"IT",P(1),0),U)_" ITEM ID NO. "_P("PR") D DIWP^PRCUTL($G(DA)) F I=1:1 S P("PR1")=$O(^PRC(441,P("PR"),1,P("PR1"))) Q:P("PR1")="" S X=^(P("PR1"),0) D DIWP^PRCUTL($G(DA))
28 S Z="" S:$P(^PRC(441,P("PR"),0),U,5)'="" Z=Z_" (NSN: "_$P(^(0),U,5)_")" S Z1=$P(^PRCS(410,DA,3),U,4) I Z1,$D(^PRC(441,P("PR"),2,Z1,0)) S:$P(^(0),U,5)'="" Z=Z_" (NDC: "_$P(^(0),U,5)_")" S:$P(^(0),U,3) Z2=$P(^(0),U,3)
29 S:$P($G(^PRC(441,P("PR"),3)),U,7)'="" Z=Z_" FOOD GROUP: "_$P(^(3),U,7)
30 I Z1,$D(^PRC(441,P("PR"),2,Z1,0)) S Z=Z_" PKG: "_$P(^(0),U,8)_" per "_$S($D(^PRCD(420.5,+$P(^(0),U,7),0)):$P(^(0),U),1:"")
31 I $D(Z2),$D(^PRC(440,+Z1,4,+Z2,0)),$P(^(0),U)'="" S Y=$S($P(^(0),U,2):$P(^(0),U,2),1:"") X:Y ^DD("DD") S Z=Z_" (CONTRACT # "_$P(^PRC(440,Z1,4,Z2,0),U)_$S(Y'="":", EXPIRATION DATE: "_Y_")",1:")") K Z2
32 S X=Z D:$L(X) DIWP^PRCUTL($G(DA))
33 ;PRC*5.1*81 add DM Doc ID and Date Needed By fields to ^UTILITY
34 I $$GET^XPAR("SYS","PRCV COTS INVENTORY",1,"Q")=1,$P($G(^PRCS(410,DA,"IT",P(1),4)),U)]"" D
35 . S X="DM Doc ID: "_$P(^PRCS(410,DA,"IT",P(1),4),U)_" Date Needed By: "_$$FMTE^XLFDT($P(^(4),U,2)) D DIWP^PRCUTL($G(DA))
36 G ITEM2
37VENDOR ;PRINT VENDOR AND REQ MESSAGES
38 N Z0
39 I $Y>60 D NEWP
40 I $D(^PRCS(410,DA,4)),$P(^(4),U)'="" W !,?12,"|TOTAL COST: ","$"_$J($P(^(4),U),0,2),?38,"|",?48,"|",?53,"|",?63,"|",?73,"|",?84,"|"
41 W !,$E(L,1,12),"|",$E(L,1,25),"|",$E(L,1,9),"|",$E(L,1,4),"|",$E(L,1,9),"|",$E(L,1,9),"|",$E(L,1,10),"|",$E(L,1,5) I $Y>60 D NEWP
42 G RM:'$D(^PRCS(410,DA,2))
43 I $D(^PRCS(410,DA,2)),$P(^(2),U)="" G RM
44 I $Y>56 D NEWP
45 S (X,Z0)=$P(^PRCS(410,DA,3),U,4),X=$S(X:"VENDOR INFORMATION: NO. "_X,1:"NEW VENDOR INFORMATION:") W !,X
46 I Z0,$D(^PRC(440,Z0,3)),$P(^(3),U,2)="Y" W ?38,"EDI"
47 I Z0,$D(^PRC(440,Z0,10)),$P(^(10),U,6)'="" W ?46,"FAX: "_$P(^(10),U,6)
48 S X=^PRCS(410,DA,2) W !,"VENDOR: ",$P(X,U) W:$P(X,U,9)'="" ?42,"CONTACT: ",$P(X,U,9)
49 W:$P(X,U,2)'="" !,?8,$P(X,U,2) W:$P(X,U,10)'="" ?44,"PHONE: ",$P(X,U,10)
50 W:$P(X,U,3)'="" !,?8,$P(X,U,3) S Z1=$P(^PRCS(410,DA,3),U,4) I Z1,$D(^PRC(440,Z1,2)),$P(^(2),U)'="" W ?42,"ACCT. #: ",$P(^(2),U)
51 W:$P(X,U,4)'="" !,?8,$P(X,U,4) W:$P(X,U,5)'="" !,?8,$P(X,U,5)
52 I $P(X,U,6)'="" W !,?8,$P(X,U,6) W:+$P(X,U,7)'=0 ",",$P($G(^DIC(5,$P(X,U,7),0)),U,2) W:$P(X,U,8)'="" " ",$P(X,U,8)
53 W !,L W !,"Ref. Voucher Number: ",! W:$P($G(^PRCS(410,DA,445)),"^")'="" $P(^(445),"^"),!
54RM I $Y>68 D NEWP
55 Q
56NEWP ;PRINT HEADER FOR NEW PAGE
57 W !,"VA FORM 90-2237-ADP MAR 1985" W:$Y>0 @IOF
58 S PRCS("P")=PRCS("P")+1 W !,?36,$P(^PRCS(410,DA,0),U),?83,"PAGE ",PRCS("P"),!,L
59 W !,?16,"REQUEST, TURN-IN, AND RECEIPT FOR PROPERTY OR SERVICES",! I $D(ZTDESC("NOPRINT")) W ?37,"**REPRINT**",!
60 W !,L
61 Q
Note: See TracBrowser for help on using the repository browser.