source: WorldVistAEHR/trunk/r/CONTROLLED_SUBSTANCES-PSD/PSDPMFG1.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: 1.7 KB
RevLine 
[613]1PSDPMFG1 ;BIR/JPW-Print Mfg data for CS Drugs (cont'd) ; 2 Aug 94
2 ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
3PRINT ;print data for stock drugs
4 K LN S (PG,PSDOUT)=0,$P(LN,"-",132)="",%DT="",X="T" D ^%DT X ^DD("DD") S RPDT=Y D HEADER Q:PSDOUT
5 I '$D(^TMP("PSDPMFG",$J)) W !!,?45,"***** NO DATA AVAILABLE FOR THIS REPORT *****" G END
6 S VAR1="" F S VAR1=$O(^TMP("PSDPMFG",$J,VAR1)) Q:VAR1=""!(PSDOUT) D:$Y+5>IOSL HEADER Q:PSDOUT W !,"=> ",$S(VAR1["ZZ/":"#"_$P(VAR1,"/",2)_" NAME MISSING",1:VAR1) D Q:PSDOUT
7 .S VAR2="" F S VAR2=$O(^TMP("PSDPMFG",$J,VAR1,VAR2)) Q:VAR2=""!(PSDOUT) D Q:PSDOUT
8 ..S NODE=^TMP("PSDPMFG",$J,VAR1,VAR2) S VAR2N=$S(VAR2["ZZ/":"#"_$P(VAR2,"/",2)_" NAME MISSING",1:VAR2)
9 ..S MFG=$P(NODE,"^"),LOT=$P(NODE,"^",2),BKU=$P(NODE,"^",4),PKG=$P(NODE,"^",5),EXP=$P(NODE,"^",3)
10 ..D:$Y+5>IOSL HEADER Q:PSDOUT W !,?4,VAR2N,?46,MFG,?80,LOT,?95,EXP,?110,BKU,?122,PKG
11DONE I $E(IOST)'="C" W @IOF
12 I $E(IOST,1,2)="C-",'PSDOUT W ! K DIR,DIRUT S DIR(0)="EA",DIR("A")="END OF REPORT! Press <RET> to return to the menu" D ^DIR K DIR
13END ;
14 K %DT,%ZIS,ANS,BKU,CNT,DA,DIK,DIR,DIROUT,DIRUT,DRUG,DRUGN,DTOUT,DUOUT,EXP,LN,LOT,MFG,NAOU,NAOUN,NODE,PG,PKG,POP,PSD,PSDIO,PSDT,PSDOUT,RPDT
15 K VAR1,VAR2,VAR2N,X,Y,ZTDESC,ZTDTH,ZTIO,ZTSAVE,ZTRTN,^TMP("PSDPMFG",$J) D ^%ZISC
16 S:$D(ZTQUEUED) ZTREQ="@"
17 Q
18HEADER ;lists header infomation
19 I $E(IOST,1,2)="C-",PG W ! K DA,DIR S DIR(0)="E" D ^DIR K DIR I 'Y S PSDOUT=1 Q
20 W:$Y @IOF S PG=PG+1 W !,RPDT,?122,"PAGE: "_PG,!,?50,"MANUFACTURER and NARCOTIC INFORMATION",!,?60,"FOR CS STOCK DRUGS",!!
21 W "=> ",$S(CNT=1:"NAOU",ANS="N":"NAOU",1:"DRUG"),?95,"EXPIRATION",?110,"BREAKDOWN",?122,"PACKAGE",!,?14,$S(CNT=1:"DRUG",ANS="N":"DRUG",1:"NAOU")
22 W ?46,"MANUFACTURER",?80,"LOT #",?95,"DATE",?110,"UNIT",?122,"SIZE",!,LN,!
23 Q
Note: See TracBrowser for help on using the repository browser.