source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPCDIR.m@ 1154

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1PRCPCDIR ;WISC/RFJ-disassemble cc or ik (print items) ;01 Sep 93
2 ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6 ;
7PRINT(ITEMDA,QUANTITY) ; print items to disassemble
8 ; returns variable notinvpt=1 if items not stored in inventory point
9 ; returns variable prcpflag=1 if user ^ during display
10 ; returns ^tmp($j,"prcpcdir",itemda)=qty needed ^ inventory value
11 N %,CCIKITEM,DATA,INVVAL,ITEMDATA,NEWQTY,REUSABLE,SCREEN
12 K ^TMP($J,"PRCPCDIR"),NOTINVPT,PRCPFLAG
13 W ! D H
14 S SCREEN=1,CCIKITEM=0 F S CCIKITEM=$O(^PRCP(445,PRCP("I"),1,ITEMDA,8,CCIKITEM)) Q:'CCIKITEM!($G(PRCPFLAG)) S DATA=$P(^(CCIKITEM,0),"^",2)*QUANTITY D
15 . S ITEMDATA=$G(^PRCP(445,PRCP("I"),1,CCIKITEM,0))
16 . I ITEMDATA'="",$P(ITEMDATA,"^",7)="" S $P(ITEMDATA,"^",7)=0
17 . I ITEMDATA="" S $P(ITEMDATA,"^",7)="Not in InvPt" S NOTINVPT=1
18 . S INVVAL=$J($S('$P(ITEMDATA,"^",7):0,1:$P(ITEMDATA,"^",27)/$P(ITEMDATA,"^",7))*DATA,0,3)
19 . S NEWQTY=$P(ITEMDATA,"^",7)+DATA
20 . W !,CCIKITEM,?7,$E($$DESCR^PRCPUX1(PRCP("I"),CCIKITEM),1,22),?44,$J($P(ITEMDATA,"^",7),13),$J(DATA,10),$J(NEWQTY,13)
21 . S ^TMP($J,"PRCPCDIR",CCIKITEM)=DATA_"^"_INVVAL
22 . S SCREEN=SCREEN+1
23 . I SCREEN'<IOSL D P^PRCPUREP Q:$D(PRCPFLAG) D H S SCREEN=1
24 Q
25 ;
26 ;
27H ; display header on display
28 W !?44,$J("CURRENT",13),$J("QTY",10),$J("** NEW **",13),!,"IM#",?7,"DESCRIPTION",?44,$J("QTY ON-HAND",13),$J("NEEDED",10),$J("QTY ON-HAND",13)
29 S %="",$P(%,"-",81)="" W !,%
30 Q
Note: See TracBrowser for help on using the repository browser.