source: WorldVistAEHR/trunk/r/CONTROLLED_SUBSTANCES-PSD/PSDLBLR.m@ 1042

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1PSDLBLR ;BIR/JPW-CS Label Reprint for CS Disp Drug ; 29 Aug 94
2 ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
3 I '$D(PSDSITE) D ^PSDSET Q:'$D(PSDSITE)
4 S OK=$S($D(^XUSEC("PSJ RPHARM",DUZ)):1,$D(^XUSEC("PSJ PHARM TECH",DUZ)):1,1:0)
5 I 'OK W $C(7),!!,?9,"** Please contact your Pharmacy Coordinator for access to",!,?12,"print CS dispensing labels.",!!,"PSJ RPHARM or PSJ PHARM TECH security key required.",! K OK Q
6 W !!,"Green Sheets/Transactions that have a status of FILLED - NOT DELIVERED",!,"or DELIVERED - ACTIVELY ON NAOU will be reprinted for a given number range.",!!
7GS ;ask disp number range
8 S PSDS=$P(PSDSITE,U,3),PSDSN=$P(PSDSITE,U,4)
9 G:$P(PSDSITE,U,5) GS1
10 K DIC,DA S DIC=58.8,DIC(0)="QEAZ",DIC("S")="I $P(^(0),""^"",3)=+PSDSITE,$S($P(^(0),""^"",2)[""M"":1,$P(^(0),""^"",2)[""S"":1,1:0)"
11 S DIC("A")="Select Primary Dispensing Site: ",DIC("B")=PSDSN
12 D ^DIC K DIC G:Y<0 END
13 S PSDS=+Y,PSDSN=$P(Y,"^",2),$P(PSDSITE,U,3)=+Y,$P(PSDSITE,U,4)=PSDSN
14GS1 ;
15 W !!,"You may enter a Dispensing Number list and/or a Dispensing Number range.",!
16 W "NOTE: This response must be a list or range, e.g., 1,3,5 or 2-4,8.",!
17 K DA,DIR,DIRUT S DIR(0)="LOA^0:999999999",DIR("A")="Select Dispensing Number(s): "
18 D ^DIR K DIR G:$D(DIRUT) END
19 S PSD1="" F S PSD1=$O(Y(PSD1)) Q:PSD1="" S:$D(Y(PSD1)) PSD1(PSD1)=Y(PSD1) K Y(PSD1)
20DEV ;ask device and queue info
21 S DIR(0)="Y",DIR("A")="Would you like to try printing these on PIN FED labels",DIR("B")="No" D ^DIR K DIR Q:$D(DIRUT) G:Y=1 ^PSDLBLR1
22 W $C(7),!!,?3,"WARNING: The printing of these labels requires the use of a sheet fed",!,?12,"laser printer setup to create Controlled Substances",!,?12,"barcodes.",!
23 W !,?12,"*** Check printer for LABEL paper before printing! ***",!
24 W !!,"This report is designed for a 3 column label format.",!,"You may queue this report to print at a later time.",!!
25 S Y=$P($G(^PSD(58.8,+PSDS,2)),"^",10),C=$P(^DD(58.8,24,0),"^",2) D Y^DIQ S PSDEV=Y
26 K %ZIS,IOP,IO("Q"),POP S %ZIS="QM",%ZIS("B")=PSDEV D ^%ZIS I POP W !,"NO DEVICE SELECTED OR REPORT PRINTED!" G END
27 I $D(IO("Q")) K IO("Q"),ZTSAVE,ZTDTH,ZTSK S ZTRTN="START^PSDLBLR0",ZTDESC="Print Dispensing Labels for CS PHARM" D SAVE,^%ZTLOAD,HOME^%ZIS K ZTSK G END
28 U IO D ^PSDLBLR0
29END ;kill variables and exit
30 K %,%DT,%H,%I,%ZIS,C,DA,DIC,DIE,DIR,DIROUT,DIRUT,DR,DRUG,DTOUT,DUOUT,JJ,JLP1,LIQ,NAOU,NAOUN,NODE,OK
31 K POP,PSD,PSD1,PSDA,PSDBAR0,PSDBAR1,PSDCNT,PSDEV,PSDJ,PSDN,PSDPN,PSDOUT,PSDR,PSDRG,PSDPRT,PSDRN,PSDS,PSDSN,PSDT,PSDX1,PSDX2
32 K QTY,STAT,TEMP,TEST,TEXT,X,Y,ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK
33 K ^TMP("PSDLBLR",$J)
34 D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@"
35 Q
36SAVE ;save queued variables
37 S (ZTSAVE("PSDS"),ZTSAVE("PSDSN"))=""
38 S ZTSAVE("PSD1(")=""
39 Q
Note: See TracBrowser for help on using the repository browser.