source: FOIAVistA/trunk/r/AUTO_REPLENISHMENT_WARD_STOCK-PSGW/PSGWPIS.m@ 674

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1PSGWPIS ;BHAM ISC/CML-Print AOU Inventory Sheet for a single AOU ; 29 Dec 93 / 9:15 AM
2 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
3 I '$D(PSGWSITE) D ^PSGWSET Q:'$D(PSGWSITE) S PSGWFLG=1
4BAR S BARFLG=1 W !!,"This option will print a bar coded Inventory Sheet. In order to do so, you",!,"must queue the output to a printer that is properly set up to produce bar codes."
5EN ; Entry point for no bar codes
6 I '$D(PSGWSITE) D ^PSGWSET Q:'$D(PSGWSITE) S PSGWFLG=1
7 W !!,"This option will print an Inventory Sheet for a single AOU that is included in",!,"an existing Inventory Date/Time.",!
8ASKINV S DIC="^PSI(58.19,",DLAYGO=58.19,DIC(0)="QEAMLNZ",DIC("A")="SELECT DATE/TIME FOR INVENTORY: " D ^DIC K DIC,DLAYGO G:Y<0 QUIT S PSGWIDA=+Y
9 D LIST G:'$D(AOU) ASKINV W ! S DIC="^PSI(58.1,",DIC(0)="QEAM",DIC("S")="I $D(^PSI(58.19,PSGWIDA,1,""B"",+Y,+Y))",DIC("A")="Select AOU: " D ^DIC K DIC G:Y<0 QUIT S AOU=+Y
10 W !!,"Right margin for this printout is 132!",!! S PSGWDT=DT
11DEV K %ZIS,IOP S %ZIS="QM",%ZIS("B")="" D ^%ZIS I POP W !,"NO DEVICE SELECTED OR REPORT PRINTED!" G QUIT
12 I $D(BARFLG),'$D(^%ZIS(2,^%ZIS(1,IOS,"SUBTYPE"),"BAR0"))!('$D(^%ZIS(2,^%ZIS(1,IOS,"SUBTYPE"),"BAR1"))) W *7,!!,"THE DEVICE YOU HAVE SELECTED IS NOT SET UP TO PRINT BAR CODES!!",! G DEV
13 I $D(IO("Q")) K IO("Q") S ZTRTN="EN1^PSGWPIS",ZTDESC=$S($D(BARFLG):"Print Single Bar Coded Inventory Sheet",1:"Print Single Inventory Sheet") F G="PSGWIDA","PSGWDT","PSGWSITE","BARFLG","AOU","PRTFLG" S:$D(G) ZTSAVE(G)=""
14 I D ^%ZTLOAD,HOME^%ZIS K ZTSK G QUIT
15EN1 U IO D EN1^PSGWPI1
16QUIT K PSGW("PO"),PSG1,PSG2,PSG3,PSGDA,PSGDDA,PSGDR,PSGINAD,PSGNT,PSGPAGE,PSGSORTK,STKCHG,PSGTN,PSGTODAY,PSGWIDA,PSGWIN,PSGWN,PSGTYP,PSGWGRP,PSGWLP,PSGWPC,PSGD,PSGISORT,PSGLSORT,PSGSORT,PSGT,PSGW,PSGWDUP,PSGWN,PSGWPGD,PSI,PSGWDT,DIE,DR
17 K CHK,GROUP,ZTSK,BARFLG,PSGWBARS,PSGWBAR0,PSGWBAR1,I,LOC,STLEV,DRGDA,J,K,G,K1,EXP,LN,LN1,LN2,LNCNT,TAB1,TAB2,TYPE,Q,LFC,SK,X,Y,MH,NN,AA,D1,DA,PSGSW,SKK,GRP,LP,PC,AOULP,AOU,JJ,AOUCNT,IO("Q") D ^%ZISC
18 K:$D(PSGWFLG) PSGWFLG,PSGWSITE
19 S:$D(ZTQUEUED) ZTREQ="@" Q
20LIST ; List all the AOUs included in the inventory
21 I '$O(^PSI(58.19,PSGWIDA,1,"B",0)) W *7,!,"There are not any AOUs defined for this Inventory!",! Q
22 S AOUCNT=0 F AOU=0:0 S AOU=$O(^PSI(58.19,PSGWIDA,1,"B",AOU)) Q:'AOU S AOULP($P(^PSI(58.1,AOU,0),"^"))="",AOUCNT=AOUCNT+1
23 W !!,"The following AOU",$S(AOUCNT>1:"s are",1:" is")," included on this Inventory Sheet:" S AOU="" F JJ=0:0 S AOU=$O(AOULP(AOU)) Q:AOU="" W !?5,AOU
24 Q
Note: See TracBrowser for help on using the repository browser.