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

PSAVER4.m

Go to the documentation of this file.
  1. PSAVER4 ;;BIR/JMB-Verify Invoices - CONT'D ;9/8/97
  1. ;;3.0; DRUG ACCOUNTABILITY/INVENTORY INTERFACE;**15**; 10/24/97
  1. ;This routine prints the report of new drugs that will be added to
  1. ;each pharmacy location or master vault.
  1. ;
  1. ;Asks & prints all invoices the user can verify.
  1. W @IOF,!,"The verified invoices contain new drugs for the assigned pharmacy location.",!,"A report will print by pharmacy location listing the new drugs. Use the"
  1. W !,"Balance Adjustment option to enter an adjustment that reflects the total",!,"dispense units on hand for each new drug.",!!,"It is suggested that you send the report to a print."
  1. K IO("Q") S %ZIS="Q" W !
  1. D ^%ZIS I POP W !,"NO DEVICE SELECTED OR OUTPUT PRINTED!" Q
  1. I $D(IO("Q")) D G QUIT
  1. .N ZTSAVE,ZTIO,ZTRTN,ZTSAVE,ZTDTH,ZTSK
  1. .S ZTDESC="Drug Acct. - Print New Drugs",ZTDTH=$H,ZTRTN="PRINT^PSAVER4"
  1. .S ZTSAVE("PSANEWD(")="" D ^%ZTLOAD
  1. ;
  1. PRINT ;Sends invoices to printer
  1. S (PSALOC,PSAOUT)=0,PSAPG=1,PSADLN="",$P(PSADLN,"=",80)="",PSASLN="",$P(PSASLN,"-",80)=""
  1. F S PSALOC=+$O(PSANEWD(PSALOC)) Q:'PSALOC!(PSAOUT) S PSADRGN=1 D HDR Q:PSAOUT D Q:PSAOUT
  1. .F S PSADRGN=$O(PSANEWD(PSALOC,PSADRGN)) Q:PSADRGN=""!(PSAOUT) D:$Y+5>IOSL HDR Q:PSAOUT W !,PSADRGN,!,PSASLN,!
  1. D:$E(IOST,1,2)="C-"&('PSAOUT) END^PSAPROC W:$E(IOST)'="C" @IOF
  1. K PSANEWD(PSALOC)
  1. QUIT D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@" K IO("Q")
  1. Q
  1. ;
  1. HDR ;Prints the header to the New Drug Report on the screen & paper.
  1. I $E(IOST,1,2)="C-" D:PSAPG'=1 END^PSAPROC Q:PSAOUT W @IOF,!?28,"<<< NEW DRUG REPORT >>>"
  1. I $E(IOST)'="C" W:PSAPG'=1 @IOF W !?20,"DRUG ACCOUNTABILITY/INVENTORY INTERFACE",!?28,"<<< NEW DRUG REPORT >>>",?72,"Page "_PSAPG
  1. I $P($G(^PSD(58.8,PSALOC,0)),"^",2)="M" W !?34,"MASTER VAULT",!!,$P($G(^PSD(58.8,PSALOC,0)),"^")
  1. I $P($G(^PSD(58.8,PSALOC,0)),"^",2)="P" D
  1. .D SITES^PSAUTL1 S PSALOCN=$P(^PSD(58.8,PSALOC,0),"^")_PSACOMB
  1. .W !?31,"PHARMACY LOCATION",!!
  1. .W:$L(PSALOCN)>76 $P(PSALOCN,"(IP)",1)_"(IP)",!?17,$P(PSALOCN,"(IP)",2) W:$L(PSALOCN)<77 PSALOCN
  1. W !,PSADLN S PSAPG=PSAPG+1
  1. Q