source: WorldVistAEHR/trunk/r/AUTO_REPLENISHMENT_WARD_STOCK-PSGW/PSGWCCP.m@ 1096

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

initial load of WorldVistAEHR

File size: 2.0 KB
RevLine 
[613]1PSGWCCP ;BHAM ISC/CML-Print Crash Cart Location List ; 05/13/91 9:22
2 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
3 W !!!,"This option will list crash carts and their locations.",!!,"Right margin for this report is 80 columns.",!,"You may queue the report to print at a later time.",!!
4 I '$O(^PSI(58.1,0)) W *7,!!,"There are no AOUs defined!" Q
5DEV K %ZIS,IOP S %ZIS="QM",%ZIS("B")="" D ^%ZIS I POP W !,"NO DEVICE SELECTED OR REPORT PRINTED!" G QUIT
6 I $D(IO("Q")) K IO("Q") S PSGWIO=ION,ZTIO="" K ZTSAVE,ZTDTH,ZTSK S ZTRTN="ENQ^PSGWCCP",ZTDESC="Crash Cart Location List",ZTSAVE("PSGWIO")=""
7 I D ^%ZTLOAD,HOME^%ZIS K ZTSK G QUIT
8 U IO
9 ;
10ENQ ;ENTRY POINT WHEN QUEUED
11 K ^TMP("PSGWCCP",$J) F AOU=0:0 S AOU=$O(^PSI(58.1,AOU)) G:('AOU)&($D(ZTQUEUED)) PRTQUE G:'AOU PRINT I $D(^PSI(58.1,AOU,0)),$P(^(0),"^",5) D BUILD
12 ;
13BUILD ;BUILD DATA ELEMENTS
14 S LOC=$P(^PSI(58.1,AOU,0),"^",6),AOUNM=$P(^(0),"^"),LOCNM="NONE LISTED" I LOC,$D(^SC(LOC,0)) S LOCNM=$P(^(0),"^")
15 S ^TMP("PSGWCCP",$J,AOUNM)=LOCNM Q
16PRTQUE ;AFTER DATA IS COMPILED, QUEUE THE PRINT
17 K ZTSAVE,ZTIO S ZTIO=PSGWIO,ZTRTN="PRINT^PSGWCCP",ZTDESC="Print Crash Cart Location List",ZTDTH=$H,ZTSAVE("^TMP(""PSGWCCP"",$J,")=""
18 D ^%ZTLOAD K ^TMP("PSGWCCP",$J) G QUIT
19PRINT ;
20 S $P(LN,"-",80)="",PG=0,%DT="",(AOUNM,QFLG)="",X="T" D ^%DT X ^DD("DD") S HDT=Y D HDR
21 I '$D(^TMP("PSGWCCP",$J)) W !?17,"***** NO DATA AVAILABLE FOR THIS REPORT *****" S QFLG=1 G DONE
22 F LL=0:0 S AOUNM=$O(^TMP("PSGWCCP",$J,AOUNM)) Q:AOUNM=""!(QFLG) D:$Y+4>IOSL PRTCHK Q:QFLG W !,AOUNM,?35,^(AOUNM)
23DONE I $E(IOST)'="C" W @IOF
24 I $E(IOST)="C" D:'QFLG SS^PSGWUTL1
25QUIT ;
26 K %DT,AOU,AOUNM,LOC,LOCNM,HDT,LL,LN,PG,PSGWDT,X,Y,PSGWIO,ZTSK,ZTIO,DA,IO("Q"),%,%I,%H,ANS,QFLG
27 K ^TMP("PSGWCCP",$J) D ^%ZISC
28 S:$D(ZTQUEUED) ZTREQ="@" Q
29HDR ;HEADER
30 W:$Y @IOF S PG=PG+1 W !?28,"CRASH CART LOCATION LIST",?71,"PAGE: ",PG,!?30,"PRINTED: ",HDT,!!,"CRASH CART",?35,"LOCATION",!,LN
31 Q
32PRTCHK ;
33 I $E(IOST)="C" W !!,"Press <RETURN> to Continue or ""^"" to Exit: " R ANS:DTIME S:'$T ANS="^" D:ANS?1."?" HELP^PSGWUTL1 I ANS="^" S QFLG=1 Q
34 D HDR Q
Note: See TracBrowser for help on using the repository browser.