source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPCRDC.m@ 1271

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

initial load of WorldVistAEHR

File size: 3.2 KB
RevLine 
[613]1PRCPCRDC ;WISC/RFJ-case cart definition ;01 Sep 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 N ALLCARTS,X
6 K X S X(1)="The Definition Case Cart Report will print a list of selected case carts displaying the items and quantities needed to assemble a case cart."
7 D DISPLAY^PRCPUX2(40,79,.X)
8 D CASECART^PRCPCRU1
9 I '$O(^TMP($J,"PRCPCARTS",0)),'$D(ALLCARTS) Q
10 I $D(ALLCARTS) W !!,"NOTE -- This option will use a lot of paper!"
11 W ! S %ZIS="Q" D ^%ZIS Q:POP I $D(IO("Q")) D D ^%ZTLOAD K IO("Q"),ZTSK D Q Q
12 . S ZTDESC="Case Cart Definition Report",ZTRTN="DQ^PRCPCRDC"
13 . S ZTSAVE("PRCP*")="",ZTSAVE("ALLCARTS")="",ZTSAVE("^TMP($J,""PRCPCARTS"",")="",ZTSAVE("ZTREQ")="@"
14 W !!,"<*> please wait <*>"
15DQ ; queue starts here
16 N CCITEM,PRCPFLAG,SCREEN,X,Y
17 S SCREEN=$$SCRPAUSE^PRCPUREP
18 I $D(ALLCARTS) S CCITEM=0 F S CCITEM=$O(^PRCP(445.7,CCITEM)) Q:'CCITEM!($G(PRCPFLAG)) D
19 . D PRINT I $G(PRCPFLAG) Q
20 . I SCREEN,$O(^PRCP(445.7,CCITEM)) D P^PRCPUREP
21 ;
22 I '$D(ALLCARTS) S CCITEM=0 F S CCITEM=$O(^TMP($J,"PRCPCARTS",CCITEM)) Q:'CCITEM D PRINT
23Q D ^%ZISC K ^TMP($J,"PRCPCARTS")
24 Q
25 ;
26 ;
27PRINT ; print a case cart definition
28 N %,%I,CATALOG,CCDATA,CCDATE,CCLOC,CCNAME,CCUSER,DATA,EDITDATE,EDITUSER,ITEMDA,LOCATION,NOW,ONHAND,PAGE,PRCPINNM,PRCPINPT,REUSABLE,VENDOR
29 S CCDATA=$G(^PRCP(445.7,CCITEM,0))
30 S PRCPINPT=+$P(CCDATA,"^",2),PRCPINNM=$$INVNAME^PRCPUX1(PRCPINPT)
31 S CCNAME=$$DESCR^PRCPUX1(PRCPINPT,CCITEM),CCUSER=$$USER^PRCPUREP($P(CCDATA,"^",3)),Y=$P(CCDATA,"^",4) D DD^%DT S CCDATE=Y,EDITUSER=$$USER^PRCPUREP($P(CCDATA,"^",5)),Y=$P(CCDATA,"^",6) D DD^%DT S EDITDATE=Y
32 S CCLOC=$$STORAGE^PRCPESTO(PRCPINPT,CCITEM),ONHAND=$G(^PRCP(445,PRCPINPT,1,CCITEM,0)),ONHAND=$S(ONHAND="":"NOT STORED IN INVENTORY POINT",1:+$P(ONHAND,"^",7))
33 D NOW^%DTC S Y=% D DD^%DT S NOW=Y,PAGE=1 U IO D H
34 S ITEMDA=0 F S ITEMDA=$O(^PRCP(445.7,CCITEM,1,ITEMDA)) Q:'ITEMDA!($G(PRCPFLAG)) S DATA=$G(^(ITEMDA,0)) D
35 . S VENDOR=$$MANDSRCE^PRCPU441(ITEMDA),CATALOG=$P($G(^PRC(441,ITEMDA,2,+VENDOR,0)),"^",4) I $E(CATALOG,16)'="" S CATALOG=$E(CATALOG,1,15)_"+"
36 . S LOCATION=$$STORAGE^PRCPESTO(PRCPINPT,ITEMDA)
37 . S REUSABLE=$$REUSABLE^PRCPU441(ITEMDA),REUSABLE=$S(REUSABLE:"R",1:"D")
38 . W !,$J(+$P(DATA,"^",2),7),?10,$E($$DESCR^PRCPUX1(PRCPINPT,ITEMDA),1,20),?31,ITEMDA,?38,REUSABLE,?40,VENDOR,?48,CATALOG,?67,$E(LOCATION,1,12)
39 . I $Y>(IOSL-4) D:SCREEN P^PRCPUREP Q:$D(PRCPFLAG) D H
40 I $G(PRCPFLAG) Q
41 I $Y>(IOSL-7) D:SCREEN P^PRCPUREP Q:$D(PRCPFLAG) D H
42 W !!,"SPECIAL INSTRUCTIONS/REMARKS:"
43 S X=0 F S X=$O(^PRCP(445.7,CCITEM,2,X)) Q:'X!($G(PRCPFLAG)) S DATA=$G(^(X,0)) D
44 . I $Y>(IOSL-4) D:SCREEN P^PRCPUREP Q:$D(PRCPFLAG) D H
45 . W !,DATA
46 D END^PRCPUREP
47 Q
48 ;
49 ;
50H S %=NOW_" PAGE "_PAGE,PAGE=PAGE+1 I PAGE'=2!(SCREEN) W @IOF
51 W $C(13),"DEFINITION OF CASE CART REPORT FOR: ",$E(PRCPINNM,1,20),?(80-$L(%)),%
52 W !?9,"NAME: ",CCNAME," (#",CCITEM,") ",?46,"LOCATION: ",CCLOC
53 W !?15,"CURRENT QUANTITY ASSEMBLED: ",ONHAND
54 W !?3,"CREATED BY: ",CCUSER,?50,"DATE: ",CCDATE
55 W !?1,"LAST EDIT BY: ",EDITUSER,?50,"DATE: ",EDITDATE
56 S %="",$P(%,"-",81)=""
57 W !,$J("QTY",7),?10,"DESCRIPTION",?31,"MI#",?37,"RD",?40,"VEND#",?48,"CATALOG#",?67,"LOCATION",!,%
58 Q
Note: See TracBrowser for help on using the repository browser.