source: FOIAVistA/trunk/r/AUTO_REPLENISHMENT_WARD_STOCK-PSGW/PSGWSC1.m@ 812

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1PSGWSC1 ;BHAM ISC/PTD,CML-Print Cost Report for Single Item for Selected Date Range - CONTINUED ; 23 Mar 93 / 12:55 PM
2 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
3EN1 S (QD,CST,INACTOT)=0,PGCT=1,QFLG="",$P(LN,"-",80)="" D HDR
4AOU F AOU=0:0 S AOU=$O(^TMP("PSGWSC",$J,AOU)) Q:'AOU D WRTLN G:QFLG END
5 I '$O(^TMP("PSGWSC",$J,0)) W !?5,"NO COST DATA IN FILE FOR SELECTED DATES." G DONE
6WRTOT W !?44 F J=1:1:31 W "-"
7 W !?39,"TOTAL",?46,$J((QD),8,0),?64,$S(INACTOT=1:"INCOMPLETE",1:$J((CST),10,2)),!!
8 ;
9DONE I $E(IOST)'="C" W @IOF
10 I $E(IOST)="C" D:'QFLG SS^PSGWUTL1
11END K ZTSK,ALL,AOU,CST,BDT,DRGCST,DRGDA,DRGNM,DRGQD,EDT,INACTOT,INC,INVDA,INVDT,INVN,J,JJ,SEL,IGDA,LOC,LOC1,LOC2,ODA,ODT,PGCT,ITNAM,QD,RETDT,%,%I,%H,D,DA,G,^TMP("PSGWSC",$J),^TMP("PSGWINV",$J),IO("Q"),X,Y,ANS,QFLG,LN,JJ,CHK,AOUCNT,AOULP
12 D ^%ZISC
13 S:$D(ZTQUEUED) ZTREQ="@" Q
14 ;
15HDR ;PRINT REPORT MAIN HEADER
16 W:$Y @IOF W !?5,"COST REPORT FROM " S Y=BDT X ^DD("DD") W Y," TO " S Y=EDT X ^DD("DD") W Y,?70,"PAGE ",PGCT I $D(SEL),SEL="I",$D(IGDA) W !?5,"FOR INVENTORY GROUP - ",$P(^PSI(58.2,IGDA,0),"^")
17 W !?5,"DATE: ",$$PSGWDT^PSGWUTL1 S PGCT=PGCT+1 W !!?5,"ITEM: ",ITNAM,!?46,"QUANTITY",!?5,"AREA OF USE",?45,"DISPENSED",?67,"COST",!,LN
18 Q
19 ;
20WRTLN S LOC=^TMP("PSGWSC",$J,AOU) D:$Y+5>IOSL PRTCHK Q:QFLG W !?5,$P(^PSI(58.1,AOU,0),"^"),?46,$J($P(LOC,"^"),8,0),?64,$S($P(LOC,"^",2)'="NO DATA":$J($P(LOC,"^",2),10,2),1:"DATA MISSING")
21 S QD=QD+$P(LOC,"^") I $P(LOC,"^",2)'="NO DATA" S CST=CST+$P(LOC,"^",2) Q
22 E S INACTOT=1 Q
23PRTCHK ;
24 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
25 D HDR Q
Note: See TracBrowser for help on using the repository browser.