source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPRSUB.m@ 1608

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1PRCPRSUB ;WISC/RFJ-substitute listing for whse ;08 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" W !,"THIS REPORT CAN ONLY BE USED BY THE WAREHOUSE." Q
6 N PRCPEND,PRCPSTRT,X
7 K X S X(1)="The Substitute Listing Report will display inventory items which have at least one substitute item stored. The report will sort Warehouse inventory items by the NSN." D DISPLAY^PRCPUX2(40,79,.X)
8 K X S X(1)="Select the range of NSNs to display." D DISPLAY^PRCPUX2(2,40,.X)
9 D NSNSEL^PRCPURS0 I '$D(PRCPSTRT) Q
10 W ! S %ZIS="Q" D ^%ZIS Q:POP I $D(IO("Q")) D D ^%ZTLOAD K IO("Q"),ZTSK Q
11 . S ZTDESC="Substitute Listing",ZTRTN="DQ^PRCPRSUB"
12 . S ZTSAVE("PRCP*")="",ZTSAVE("ZTREQ")="@"
13 W !!,"<*> please wait <*>"
14DQ ; queue starts here
15 N %,%H,%I,ITEMDA,ITEMDATA,NOW,NSN,PAGE,PRCPFLAG,SCREEN,SUBST,Y
16 K ^TMP($J,"PRCPRSUB")
17 S ITEMDA=0 F S ITEMDA=$O(^PRCP(445,PRCP("I"),1,ITEMDA)) Q:'ITEMDA I +$O(^(ITEMDA,4,0)) D
18 . S NSN=$$NSN^PRCPUX1(ITEMDA) S:NSN="" NSN=" "
19 . I $E(NSN,1,$L(PRCPSTRT))'=PRCPSTRT,$E(NSN,1,$L(PRCPEND))'=PRCPEND I NSN']PRCPSTRT!(PRCPEND']NSN) Q
20 . S %=0 F S %=$O(^PRCP(445,PRCP("I"),1,ITEMDA,4,%)) Q:'% S ^TMP($J,"PRCPRSUB",NSN,ITEMDA,%)=""
21 ; print report
22 D NOW^%DTC S Y=% D DD^%DT S NOW=Y,PAGE=1,SCREEN=$$SCRPAUSE^PRCPUREP U IO D H
23 S NSN="" F S NSN=$O(^TMP($J,"PRCPRSUB",NSN)) Q:'NSN!($G(PRCPFLAG)) S ITEMDA=0 F S ITEMDA=$O(^TMP($J,"PRCPRSUB",NSN,ITEMDA)) Q:'ITEMDA!($G(PRCPFLAG)) D
24 . I $G(ZTQUEUED),$$S^%ZTLOAD S PRCPFLAG=1 W !?10,"<<< TASKMANAGER JOB TERMINATED BY USER >>>" Q
25 . I $Y>(IOSL-6) D:SCREEN P^PRCPUREP Q:$D(PRCPFLAG) D H
26 . S ITEMDATA=$G(^PRCP(445,PRCP("I"),1,ITEMDA,0))
27 . W !!,$TR(NSN,"-"),?19,$E($$DESCR^PRCPUX1(PRCP("I"),ITEMDA),1,30),?52,$J(ITEMDA,6),$J($$UNIT^PRCPUX1(PRCP("I"),ITEMDA,"/"),10),$J(+$P(ITEMDATA,"^",7),12)
28 . S SUBST=0 F S SUBST=$O(^TMP($J,"PRCPRSUB",NSN,ITEMDA,SUBST)) Q:'SUBST!($G(PRCPFLAG)) D
29 . . I $Y>(IOSL-6) D:SCREEN P^PRCPUREP Q:$D(PRCPFLAG) D H
30 . . S ITEMDATA=$G(^PRCP(445,PRCP("I"),1,SUBST,0))
31 . . W !?4,$TR(NSN,"-"),?19,$E($$DESCR^PRCPUX1(PRCP("I"),SUBST),1,30),?52,$J(SUBST,6),$J($$UNIT^PRCPUX1(PRCP("I"),SUBST,"/"),10),$J(+$P(ITEMDATA,"^",7),12)
32 I '$G(PRCPFLAG) D END^PRCPUREP
33 D ^%ZISC K ^TMP($J,"PRCPRSUB")
34 Q
35 ;
36H S %=NOW_" PAGE "_PAGE,PAGE=PAGE+1 I PAGE'=2!(SCREEN) W @IOF
37 W $C(13),"SUBSTITUTE ITEM LISTING FOR: ",$E(PRCP("IN"),1,20),?(80-$L(%)),%
38 S %="",$P(%,"-",81)="" W !,"NSN",?19,"DESCRIPTION",?56,"MI",$J("UNIT/IS",10),$J("ONHAND QTY",12),!?4,"SUBSTITUTE ITEM(S)",!,%
39 Q
Note: See TracBrowser for help on using the repository browser.