source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPRAIR.m@ 1061

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1PRCPRAIR ;WISC/RFJ-abbreviated item report (option, whse) ;09 Jun 93
2 ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 D ^PRCPUSEL Q:'$G(PRCP("I"))
5 I PRCP("DPTYPE")'="W" D PRIMARY^PRCPRAIP Q
6 ;
7 ; abbreviated item report for whse
8 N PRCPEND,PRCPSTRT,X
9 K X S X(1)="The Abbreviated Item Report will sort the Warehouse inventory items by the NSN." D DISPLAY^PRCPUX2(40,79,.X)
10 K X S X(1)="Select the range of NSNs to display" D DISPLAY^PRCPUX2(2,40,.X)
11 D NSNSEL^PRCPURS0 I '$D(PRCPSTRT) Q
12 W ! S %ZIS="Q" D ^%ZIS Q:POP I $D(IO("Q")) D D ^%ZTLOAD K IO("Q"),ZTSK Q
13 . S ZTDESC="Abbreviated Item Report",ZTRTN="DQ^PRCPRAIR"
14 . S ZTSAVE("PRCP*")="",ZTSAVE("ZTREQ")="@"
15 W !!,"<*> please wait <*>"
16DQ ; queue starts here
17 N %,%H,%I,ITEMDA,ITEMDATA,NOW,NSN,PAGE,PRCPFLAG,SCREEN,X,Y
18 K ^TMP($J,"PRCPRAIR")
19 S ITEMDA=0 F S ITEMDA=$O(^PRCP(445,PRCP("I"),1,ITEMDA)) Q:'ITEMDA D
20 . S NSN=$$NSN^PRCPUX1(ITEMDA) S:NSN="" NSN=" "
21 . I NSN]PRCPSTRT,PRCPEND]NSN S ^TMP($J,"PRCPRAIR",NSN,ITEMDA)=""
22 . I $E(NSN,1,$L(PRCPSTRT))=PRCPSTRT!($E(NSN,1,$L(PRCPEND))=PRCPEND) S ^TMP($J,"PRCPRAIR",NSN,ITEMDA)=""
23 ; print report
24 D NOW^%DTC S Y=% D DD^%DT S NOW=Y,PAGE=1,SCREEN=$$SCRPAUSE^PRCPUREP U IO D H
25 S NSN="" F S NSN=$O(^TMP($J,"PRCPRAIR",NSN)) Q:NSN=""!($G(PRCPFLAG)) S ITEMDA=0 F S ITEMDA=$O(^TMP($J,"PRCPRAIR",NSN,ITEMDA)) Q:'ITEMDA!($G(PRCPFLAG)) D
26 . I $Y>(IOSL-6) D:SCREEN P^PRCPUREP Q:$D(PRCPFLAG) D H
27 . S ITEMDATA=$G(^PRCP(445,PRCP("I"),1,ITEMDA,0))
28 . W !,$TR(NSN,"-"),?15,$E($$DESCR^PRCPUX1(PRCP("I"),ITEMDA),1,23),?39,ITEMDA,?46,$J(+$P(ITEMDATA,"^",7),8),$J($$UNIT^PRCPUX1(PRCP("I"),ITEMDA,"/"),10),$J($$STORAGE^PRCPESTO(PRCP("I"),ITEMDA),16)
29 . S %=0 F S %=$O(^PRCP(445,PRCP("I"),1,ITEMDA,1,%)) Q:'%!($G(PRCPFLAG)) D
30 . . I $X>60 W !
31 . . S X=$E($$STORELOC^PRCPESTO(%),1,15),X=" "_X_$E(" ",$L(X)+1,15)
32 . . W X
33 . . I $X>60,$Y>(IOSL-6) D:SCREEN P^PRCPUREP Q:$D(PRCPFLAG) D H
34 . I $G(ZTQUEUED),$$S^%ZTLOAD S PRCPFLAG=1 W !?10,"<<< TASKMANAGER JOB TERMINATED BY USER >>>"
35 I '$G(PRCPFLAG) D END^PRCPUREP
36 D ^%ZISC K ^TMP($J,"PRCPRAIR")
37 Q
38 ;
39H S %=NOW_" PAGE "_PAGE,PAGE=PAGE+1 I PAGE'=2!(SCREEN) W @IOF
40 W $C(13),"ABBREVIATED ITEM REPORT FOR: ",$E(PRCP("IN"),1,20),?(80-$L(%)),%
41 S %="",$P(%,"-",81)=""
42 W !,"NSN",?15,"DESCRIPTION",?39,"MI",$J("QTY OH",13),$J("UNIT/IS",10),$J("MAIN STORAGE",16),!?5,"ADD STORAGE",?26,"ADD STORAGE",?46,"ADD STORAGE",?66,"ADD STORAGE",!,%
43 Q
Note: See TracBrowser for help on using the repository browser.