source: WorldVistAEHR/trunk/r/CONTROLLED_SUBSTANCES-PSD/PSDPWK3.m@ 1608

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

initial load of WorldVistAEHR

File size: 967 bytes
Line 
1PSDPWK3 ;BIR/JPW-Print Pharm Disp. Worksheet (Summary) ; 23 Jun 94
2 ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
3 D NOW^%DTC S Y=+$E(%,1,12) X ^DD("DD") S RPDT=Y
4 S (PG,PSDOUT)=0
5 I '$D(^TMP("PSDWKT",$J)) D HDR W !!,?45,"**** NO PENDING REQUESTS FOR THIS DISPENSING LOCATION ****" Q
6PRINT ;prints data for worksheet
7 D HDR Q:PSDOUT
8 S LOOP="" F S LOOP=$O(^TMP("PSDWKT",$J,LOOP)) Q:LOOP=""!(PSDOUT) W !,?2,"=> ",LOOP D:$Y+4>IOSL HDR Q:PSDOUT D
9 .S LOOP2="" F S LOOP2=$O(^TMP("PSDWKT",$J,LOOP,LOOP2)) Q:LOOP2=""!(PSDOUT) D:$Y+4>IOSL HDR Q:PSDOUT W !,LOOP2,?60,+^TMP("PSDWKT",$J,LOOP,LOOP2),!
10DONE I SUM,$E(IOST)'="C" W @IOF
11 Q
12HDR ;lists header information
13 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
14 K LN S $P(LN,"-",80)=""
15 W:$Y @IOF S PG=PG+1 W !,?22,"PHARMACY DISPENSING WORKSHEET",?70,"PG "_PG,!,?29,"** SUMMARY **",!,?27,RPDT,!!,"Dispensing Location: ",PSDSN,!!
16 W ?2,"=> DRUG",!,"NAOU",?55,"TOTAL TO DISPENSE",!,LN,!
17 Q
Note: See TracBrowser for help on using the repository browser.