source: FOIAVistA/trunk/r/AUTO_REPLENISHMENT_WARD_STOCK-PSGW/PSGWPI2.m@ 1757

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

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1PSGWPI2 ;BHAM ISC/MPH,CML-Print AOU Inventory Sheet - CONTINUED ; 06/28/89 11:38
2 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
3EN1 I $D(STKCHG) W !!!!,"* Indicates change in stock level." K STKCHG
4 S $P(LN,"-",132)="",$P(LN1,"-",118)="",$P(LN2,"-",95)="" W:$Y @IOF W !,"WARD STOCK INVENTORY FOR" S Y=PSGWIN X ^DD("DD") W ?26,Y," INVENTORY # ",PSGWIDA,?99,PSGTODAY,?120,"PAGE ",PSGPAGE,!,"GROUP: "
5 I $P(^PSI(58.19,PSGWIDA,0),"^",4)'="" D WRTGRP
6 I $D(BARFLG) D BARHDR G EN1A
7 W !,?10,"ITEM",?51,"STOCK",?58,"QUICK",?66,"ON"
8 I $P(PSGWSITE,"^",5) W ?74,"REORDER",?83,"MINIMUM QTY",?97,"QUANTITY"
9 I $P(PSGWSITE,"^",6) S TAB1=$S($P(PSGWSITE,"^",5):120,1:82) W ?TAB1,"RETURN"
10 W !,?51,"LEVEL",?58,"CODE",?66,"HAND"
11 I $P(PSGWSITE,"^",5) W ?74,"LEVEL",?83,"TO DISPENSE",?97,"DISPENSED"
12 I $P(PSGWSITE,"^",6) S TAB1=$S($P(PSGWSITE,"^",5):109,1:74),TAB2=$S($P(PSGWSITE,"^",5):120,1:82) W ?TAB1,"RETURN",?TAB2,"REASON"
13EN1A I PSGPAGE=1 W !!?80,"INVENTORIED/DELIVERED BY __________________________" S LNCNT=LNCNT+3
14 W !,LN S PSGPAGE=PSGPAGE+1 I $D(^PSI(58.1,PSGDA,0)) W !!?12,$P(^(0),"^") I $D(^PSI(58.1,PSGDA,"I")),^("I")]"",^("I")'>DT W " *** INACTIVE ***"
15 I $D(^PSI(58.1,PSGDA,0)),$D(PSGWBARS),PSGWBARS S X="S",X2="A"_PSGDA W " " S X1=$X W @PSGWBAR1,X2,@PSGWBAR0 S LNCNT=LNCNT+3
16 Q
17 ;
18WRTGRP ;Write name(s) of inventory group on header.
19 I '$D(PSGWGRP) S PSGWGRP=$S(($P(^PSI(58.19,PSGWIDA,0),"^",4)'=""):$P(^(0),"^",4),1:"")
20 F PSGWLP=2:1:($L(PSGWGRP,",")-1) S PSGWPC=$P(PSGWGRP,",",PSGWLP) W $S($D(^PSI(58.2,PSGWPC,0)):$P(^(0),"^"),1:"") W:PSGWLP<($L(PSGWGRP,",")-1) ", "
21 Q
22 ;
23EN2 S ^PSI(58.1,PSGDA,1,J,1,PSGWIDA,0)=PSGWIDA_"^"_$P(^PSI(58.1,PSGDA,1,J,0),"^",2)
24 I '$D(^PSI(58.1,PSGDA,1,J,1,0)) S ^(0)="^58.12P^"_PSGWIDA_"^1"
25 E S ^(0)=$P(^PSI(58.1,PSGDA,1,J,1,0),"^",1,2)_"^"_$S($P(^(0),"^",3)<PSGWIDA:PSGWIDA,1:$P(^(0),"^",3))_"^"_($P(^(0),"^",4)+1)
26 Q
27BARHDR ;Bar Coded Inventory Header
28 S LNCNT=0 W !?10,"ITEM",?73,"STOCK" I $P(PSGWSITE,"^",5) W ?80,"REORDER",?89,"MINIMUM QTY",?102,"QUANTITY"
29 E W ?80,"ON"
30 I $P(PSGWSITE,"^",6) S TAB1=$S($P(PSGWSITE,"^",5):121,1:97) W ?TAB1,"RETURN"
31 W !?73,"LEVEL" I $P(PSGWSITE,"^",5) W ?80,"LEVEL",?89,"TO DISPENSE",?102,"DISPENSED"
32 E W ?80,"HAND"
33 I $P(PSGWSITE,"^",6) S TAB1=$S($P(PSGWSITE,"^",5):113,1:87),TAB2=$S($P(PSGWSITE,"^",5):121,1:97) W ?TAB1,"RETURN",?TAB2,"REASON"
34 Q
35BARWRT ;Bar Coded data lines
36 W !?10,PSGDR I DRGDA,$D(PSGWBARS),PSGWBARS S X="S",X2="I"_DRGDA W ?55 S X1=$X W @PSGWBAR1,X2,@PSGWBAR0,*13
37 I $D(^PSI(58.1,PSGDA,1,PSGDDA,"EXP")) S Y=^("EXP") I Y X ^DD("DD") W ?14,"Expiration Date: ",Y
38 I $P(LOC,"^",5)="Y" W ?72,"*" S STKCHG="Y",$P(^PSI(58.1,PSGDA,1,PSGDDA,0),"^",5)=""
39 I (($P(LOC,"^",3)'>PSGWDT)&($P(LOC,"^",10)="Y")) W ?72,"*" S PSGINAD="Y",$P(^PSI(58.1,PSGDA,1,PSGDDA,0),"^",10)=""
40 W ?74,$J(STLEV,3) I '$P(PSGWSITE,"^",5) W ?80,"_____"
41 I $P(PSGWSITE,"^",5) W ?80,$S(+$P(LOC,"^",11):$J($P(LOC,"^",11),5),1:""),?91,$S($P(LOC,"^",12):$J($P(LOC,"^",12),5),1:""),?103,"______"
42 I $P(PSGWSITE,"^",6) S TAB1=$S($P(PSGWSITE,"^",5):113,1:87),TAB2=$S($P(PSGWSITE,"^",5):120,1:97) W ?TAB1,"______",?TAB2,"E O D C"
43 I $D(PSGINAD) W !?14,"*Inactivated Item, pull existing stock" K PSGINAD S LNCNT=LNCNT+1
44 W !?10,$S($P(PSGWSITE,"^",5):LN1,1:LN2) S LNCNT=LNCNT+3 Q
Note: See TracBrowser for help on using the repository browser.