source: FOIAVistA/trunk/r/DRUG_ACCOUNTABILITY-PSA/PSAUNM.m@ 1328

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1PSAUNM ;BIR/LTL-Report of Unlinked DRUG/ITEM MASTER file Entries ;7/23/97
2 ;;3.0; DRUG ACCOUNTABILITY/INVENTORY INTERFACE;**15**; 10/24/97
3 ;
4 ;References to ^PSDRUG( are covered by IA #2095
5 ;
6 D DT^DICRW
7DEV ;asks device and queueing info
8 K IO("Q") N %ZIS,DTOUT,DUOUT,IOP,POP,PSAOUT S %ZIS="Q" D ^%ZIS I POP W !,"NO DEVICE SELECTED OR REPORT PRINTED!" S PSAOUT=1 G QUIT
9 I $D(IO("Q")) N ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTDTH,ZTSK S ZTRTN="START^PSAUNM",ZTDESC="Unlinked DRUG/ITEM FILE entries" D ^%ZTLOAD,HOME^%ZIS S PSAOUT=1 G QUIT
10START ;compiles and prints data for report
11 N DIR,DIRUT,POP,PSAB,PSAD,PSADD,PSAIT,PSALN,PSAPG,PSARPDT,X,Y S (PSAD,PSAPG,PSAOUT)=0,Y=DT D DD^%DT S PSARPDT=Y D HEADER
12LOOP F S PSAD=$O(^PSDRUG(PSAD)) G:'PSAD QUIT D:$Y+4>IOSL HEADER G:PSAOUT QUIT I '$O(^PSDRUG(PSAD,441,0)),'$D(^PSDRUG(PSAD,"I")) W !!,$E($P(^PSDRUG(PSAD,0),U),1,35),?36,$P(^(0),U,6),?56,$P($G(^(2)),U,4),?75,$S($D(^("ND")):"YES",1:"NO")
13QUIT I $E(IOST)'="C" W @IOF
14 I $E(IOST,1,2)="C-",'PSAOUT W !! S DIR(0)="E",DIR("A")="END OF REPORT! Press <RET> to return to the menu" D ^DIR
15 D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@" K IO("Q")
16 Q
17HEADER ;prints header info
18 I $E(IOST,1,2)'="P-",PSAPG S DIR(0)="E" D ^DIR K DIR I 'Y S PSAOUT=1 Q
19 I $$S^%ZTLOAD W !!,"Task #",$G(ZTSK),", ",$G(ZTDESC)," was stopped by ",$P($G(^VA(200,+$G(DUZ),0)),U),"." S PSAOUT=1 Q
20 W:$Y @IOF S $P(PSALN,"*",81)="",PSAPG=PSAPG+1 W !?2,"Unlinked DRUG/ITEM MASTER file entries",?55,PSARPDT,?70,"PAGE: "_PSAPG,!,PSALN,!,"DRUG",?36,"FSN",?56,"NDC",?75,"NDF?"
21 Q
Note: See TracBrowser for help on using the repository browser.