source: FOIAVistA/trunk/r/AUTO_REPLENISHMENT_WARD_STOCK-PSGW/PSGWBOIP.m

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1PSGWBOIP ;BHAM ISC/CML-Print Backorder Report by Specific Item (Single or Multiple) - CONTINUED ; 03 Sep 93 / 12:25 PM
2 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
3PRT1 ;
4 S $P(LN,"-",81)="",PG=0,%DT="",(DNM,ANM,QFLG)="" S HDT=$$PSGWDT^PSGWUTL1 D HDR
5 I '$D(^TMP("PSGWBOI",$J)) W !?17,"***** NO DATA AVAILABLE FOR THIS REPORT *****" S QFLG=1 G DONE
6 F LL=0:0 S TOT=0,DNM=$O(^TMP("PSGWBOI",$J,DNM)) Q:DNM="" D:$Y+6>IOSL PRTCHK Q:QFLG W !!,"=> ",DNM D PRT2 Q:QFLG
7DONE ;
8 D:'QFLG INACT I $E(IOST)'="C" W @IOF
9 I $E(IOST)="C" D:'QFLG SS^PSGWUTL1
10QUIT ;
11 K %DT,%,%H,%I,BO,BODA,BODT,CURBO,DIC,DNM,DRGDA,ITMDA,JJ,LOC,TOT,AOU,ANM,HDT,INACT,LL,LN,LNS,QQ,PG,X,Y,ANS,QFLG
12 K ^TMP("PSGWBOI",$J),^TMP("PSGWQ",$J),PSGWIO,ZTSK,ZTIO,DA,HDRFLG,IO("Q") D ^%ZISC
13 Q
14PRT2 F LL=0:0 S ANM=$O(^TMP("PSGWBOI",$J,DNM,ANM)) Q:QFLG D ANMCHK Q:ANM="" F BODT=0:0 S BODT=$O(^TMP("PSGWBOI",$J,DNM,ANM,BODT)) Q:'BODT D DATA Q:QFLG
15 Q
16DATA ;DATA LINES
17 S LOC=$P(^TMP("PSGWBOI",$J,DNM,ANM,BODT),"^"),CURBO=$P(^(BODT),"^",2),TOT=TOT+CURBO Q:CURBO<1 I $Y+6>IOSL D PRTCHK Q:QFLG
18 S:ANM["**" INACT=1 S Y=$E(BODT,1,12) X ^DD("DD") W !?7,ANM,?40,LOC,?54,Y,?73,$J(CURBO,6)
19 Q
20ANMCHK ;
21 I ANM="ZZZ" W ?48,"<NO CURRENT BACKORDERS>" S ANM="" Q
22 I ANM="",TOT<1 W ?48,"<NO CURRENT BACKORDERS>" Q
23 I ANM="" D:$Y+6>IOSL PRTCHK Q:QFLG W !?72,"-------",!?66,"TOTAL:",?72,$J(TOT,7) Q
24 Q
25HDR ;HEADER
26 S INACT=0 W:$Y @IOF S PG=PG+1 I HDRFLG="S" W !?24,"PHARMACY SINGLE ITEM BACKORDER LIST"
27 I HDRFLG="M" W !?22,"PHARMACY MULTIPLE ITEMS BACKORDER LIST"
28 W ?71,"PAGE: ",PG,!?28,"PRINTED: ",HDT,!!,"=> ITEM",?56,"DATE/TIME FOR",?72,"CURRENT",!?12,"AOU",?42,"LOCATION",?58,"BACKORDER",?71,"BACKORDER",!,LN
29 Q
30INACT I INACT F LNS=1:1:((IOSL-$Y)-3) W !
31 I W "** Indicates an Inactive AOU"
32 Q
33PRTCHK ;
34 D INACT 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
35 D HDR Q
Note: See TracBrowser for help on using the repository browser.