source: WorldVistAEHR/trunk/r/AUTO_REPLENISHMENT_WARD_STOCK-PSGW/PSGWPL1.m@ 1704

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1PSGWPL1 ;BHAM ISC/MPH,CML-Print AOU Inventory Pick List - CONTINUED ; 17 Jun 93 / 10:39 AM
2 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
3 S PSGDL1=""
4 I $P(^PSI(58.19,PSGWIDA,0),"^",4)="" W !!,"AOU INVENTORY GROUP MISSING" G END
5 D HDGP
6PSGDL1 S PSGDL1=$O(^TMP("PSGWDL",$J,PSGDL1)) G:PSGDL1="" END W !,?17,PSGDL1 S PSGDL2="",EXP=$O(^PSI(58.17,"B",PSGDL1,0)) W:EXP>0 " ",$P(^PSI(58.17,EXP,0),"^",3)
7PSGDL2 S PSGDL2=$O(^TMP("PSGWDL",$J,PSGDL1,PSGDL2)) G PSGDL1:PSGDL2="" S PSGDL3=""
8PSGDL3 S PSGDL3=$O(^TMP("PSGWDL",$J,PSGDL1,PSGDL2,PSGDL3)) G PSGDL2:PSGDL3="" S PSGDR=""
9PSGDR S PSGDR=$O(^TMP("PSGWDL",$J,PSGDL1,PSGDL2,PSGDL3,PSGDR)) G PSGDL3:PSGDR="" S PSGDA=""
10 D:$Y+5>IOSL HDGP
11PNT W !,?1,PSGDL2,$S(PSGDL3'=" ":","_PSGDL3,PSGDL3="":" ",1:""),?10,PSGDR
12PSGDA I $D(PSGST) S PSGDA=$O(^TMP("PSGWDL",$J,PSGDL1,PSGDL2,PSGDL3,PSGDR,PSGDA)) W:PSGDA="" ?52,"-------------------------",!?52,"TOTAL ",?73,$J(+^TMP("PSGWDL",$J,PSGDL1,PSGDL2,PSGDL3,PSGDR),3),?90,"______",! G:PSGDA="" PSGDR
13 I $D(PSGST) W ?52,$P(^PSI(58.1,PSGDA,0),"^",1),?73,$J(+^TMP("PSGWDL",$J,PSGDL1,PSGDL2,PSGDL3,PSGDR,PSGDA),3),!
14 E W ?73,$J(+^TMP("PSGWDL",$J,PSGDL1,PSGDL2,PSGDL3,PSGDR),3),?90,"______"
15 G PSGDR:'$D(PSGST),PSGDA:$D(PSGST)
16HDGP ;PRINT PICK LIST HEADER
17 W:$Y @IOF W !,"WARD STOCK PHARMACY PICK LIST FOR " S Y=PSGWIN X ^DD("DD") W ?35,Y," INVENTORY # ",PSGWIDA,?99,PSGTODAY,?120,"PAGE ",PSGPAGE
18 W !,"GROUP: " D WRTGRP^PSGWPI2
19 W !,?10,"ITEM",?75,"TO BE",?90,"QUANTITY",!,?73,"DISPENSED",?91,"PICKED",!
20 F I=1:1:132 W "-"
21 S PSGPAGE=PSGPAGE+1
22 Q
23END K ^TMP("PSGWDL",$J),I,PSGDA,PSGDL1,PSGDL2,PSGDL3,PSGDR,PSGPAGE,PSGTODAY,PSGST Q
Note: See TracBrowser for help on using the repository browser.