Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PSGWPL1

PSGWPL1.m

Go to the documentation of this file.
  1. PSGWPL1 ;BHAM ISC/MPH,CML-Print AOU Inventory Pick List - CONTINUED ; 17 Jun 93 / 10:39 AM
  1. ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
  1. S PSGDL1=""
  1. I $P(^PSI(58.19,PSGWIDA,0),"^",4)="" W !!,"AOU INVENTORY GROUP MISSING" G END
  1. D HDGP
  1. PSGDL1 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)
  1. PSGDL2 S PSGDL2=$O(^TMP("PSGWDL",$J,PSGDL1,PSGDL2)) G PSGDL1:PSGDL2="" S PSGDL3=""
  1. PSGDL3 S PSGDL3=$O(^TMP("PSGWDL",$J,PSGDL1,PSGDL2,PSGDL3)) G PSGDL2:PSGDL3="" S PSGDR=""
  1. PSGDR S PSGDR=$O(^TMP("PSGWDL",$J,PSGDL1,PSGDL2,PSGDL3,PSGDR)) G PSGDL3:PSGDR="" S PSGDA=""
  1. D:$Y+5>IOSL HDGP
  1. PNT W !,?1,PSGDL2,$S(PSGDL3'=" ":","_PSGDL3,PSGDL3="":" ",1:""),?10,PSGDR
  1. PSGDA 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
  1. I $D(PSGST) W ?52,$P(^PSI(58.1,PSGDA,0),"^",1),?73,$J(+^TMP("PSGWDL",$J,PSGDL1,PSGDL2,PSGDL3,PSGDR,PSGDA),3),!
  1. E W ?73,$J(+^TMP("PSGWDL",$J,PSGDL1,PSGDL2,PSGDL3,PSGDR),3),?90,"______"
  1. G PSGDR:'$D(PSGST),PSGDA:$D(PSGST)
  1. HDGP ;PRINT PICK LIST HEADER
  1. 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
  1. W !,"GROUP: " D WRTGRP^PSGWPI2
  1. W !,?10,"ITEM",?75,"TO BE",?90,"QUANTITY",!,?73,"DISPENSED",?91,"PICKED",!
  1. F I=1:1:132 W "-"
  1. S PSGPAGE=PSGPAGE+1
  1. Q
  1. END K ^TMP("PSGWDL",$J),I,PSGDA,PSGDL1,PSGDL2,PSGDL3,PSGDR,PSGPAGE,PSGTODAY,PSGST Q