source: FOIAVistA/trunk/r/NATIONAL_DRUG_FILE-PSN/PSNOCLS.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1PSNOCLS ;BIR/CCH&WRT-Print report of drugs with no classification ;01/12/98 5:18 PM
2 ;;4.0; NATIONAL DRUG FILE;; 30 Oct 98
3 W !!,"This report should be run after executing the menu option ""Merge National Drug",!,"File Data Into Local File"". It may be useful to print this report before and",!,"after executing the ""Allow Unmatched Drugs To Be Classed"" option."
4 W " It gives you",!,"a hard copy of the drugs from your local drug file which are ""active"" and have",!
5 W "no VA Drug Classification.",!,"You may queue the report to print, if you wish.",!
6DVC K %ZIS,POP,IOP S %ZIS="QM",%ZIS("B")="",%ZIS("A")="Select Printer: " D ^%ZIS G:POP DONE W:$E(IOST)'="P" !!,"This report must be run on a printer.",!! G:$E(IOST)'="P" DVC I POP K IOP,POP,IO("Q") Q
7QUEUE I $D(IO("Q")) K IO("Q") S ZTRTN="ENQ^PSNOCLS",ZTDESC="Local Drugs With No VA Class Report" D ^%ZTLOAD K ZTSK D ^%ZISC Q
8ENQ ;ENTRY POINT WHEN QUEUED
9 U IO
10 S PSNPGCT=0,PSNPGLNG=IOSL-6,PSNPRT=0 D TITLE,LOOP
11DONE I $D(PSNPRT) W:PSNPRT=0 !!?23,"No Drugs Found"
12 W @IOF S:$D(ZTQUEUED) ZTREQ="@" K PSNB,BT,PSNPRT,PSNDEA,ZX,PSNMRK,MJT,PSNPGCT,PSNPGLNG,PSNOLD,Y,IOP,POP,IO("Q") D ^%ZISC
13 Q
14TITLE I $D(IOF),IOF]"" W @IOF S PSNPGCT=PSNPGCT+1
15 W !,?23,"LOCAL DRUGS WITH NO VA CLASSIFICATION",!
16 S Y=DT X ^DD("DD") W !,"Date printed: ",Y,?55,"Page: ",PSNPGCT,!
17 W !,"NUMBER",?10,"LOCAL DRUG GENERIC NAME",?67,"DEA",!
18 F MJT=1:1:80 W "-"
19 Q
20LOOP F PSNB=0:0 S PSNB=$O(^PSDRUG(PSNB)) Q:'PSNB I '$D(^PSDRUG(PSNB,"ND")),'$D(^PSDRUG(PSNB,"I")) D REPRT I PSNMRK=1 D WRTDEA
21 Q
22REPRT D:$Y>PSNPGLNG TITLE W !!,PSNB,?10,$P(^PSDRUG(PSNB,0),"^",1) S PSNPRT=1,PSNDEA=$P(^PSDRUG(PSNB,0),"^",3),PSNMRK=0 F ZX=1:1:$L(PSNDEA) S BT=$E(PSNDEA,ZX) I "0IM"[BT S PSNMRK=1
23 Q
24WRTDEA W ?67,$P(^PSDRUG(PSNB,0),"^",3)
25 Q
Note: See TracBrowser for help on using the repository browser.