source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPRGRA.m@ 1654

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1PRCPRGRA ;WISC/RFJ-graph using list manager ;09 Feb 94
2 ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 D ^PRCPUSEL Q:'$G(PRCP("I"))
5 N BARCHART,ITEMDA,PRCPINPT,PRCPFAVG
6 S PRCPINPT=PRCP("I")
7 F W !! S ITEMDA=$$ITEM^PRCPUITM(PRCP("I"),0,"","") Q:'ITEMDA D
8 . S XP="Do you want a BAR CHART",XH="Enter YES to display a BARCHART, NO to display a LINE CHART"
9 . W ! S %=$$YN^PRCPUYN(1) I %<1 Q
10 . S BARCHART=$S(%=1:1,1:0)
11 . S XP="Do you want to include ZERO values when calculating the AVERAGE",XH="Enter YES to include ZERO values when calculating the AVERAGE, NO to calculate",XH(1)="average using values greater than zero."
12 . W ! S %=$$YN^PRCPUYN(1) I %<1 Q
13 . S PRCPFAVG=$S(%=1:1,1:0)
14 . D EN^VALM("PRCP GRAPH DATA")
15 Q
16 ;
17 ;
18HDR ; build header
19 S VALMHDR(1)="INVENTORY POINT: "_$$INVNAME^PRCPUX1(PRCPINPT)_" * * * ITEM MASTER NUMBER: "_ITEMDA_" * * *"
20 S VALMHDR(2)=" DESCRIPTION: "_$$DESCR^PRCPUX1(PRCPINPT,ITEMDA)_" NSN: "_$$NSN^PRCPUX1(ITEMDA)
21 Q
22 ;
23 ;
24INIT ; build array
25 N DATA,DATE,X1,X2,YLINE
26 S X1=DT,X2=-400 D C^%DTC S DATE=$E(X,1,5)
27 F S DATE=DATE+1 S:$E(DATE,4,5)=13 DATE=($E(DATE,1,3)+1)_"01" Q:DATE>$E(DT,1,5) D
28 . S DATA(DATE)=+$P($G(^PRCP(445,PRCPINPT,1,ITEMDA,2,DATE,0)),"^",2)
29 D GETGRAPH^PRCPRGRU("*** AMOUNT USED VERSUS MONTH-YR USED ***","AMOUNT USED","MONTH-YR","S Y=X D DD^%DT S X(1)=$E(X,2,3),X=$E(Y,1,3)",BARCHART,PRCPFAVG,.DATA)
30 K ^TMP($J,"PRCPRGRA")
31 F VALMCNT=1:1 Q:'$D(YLINE(VALMCNT)) S ^TMP($J,"PRCPRGRA",VALMCNT,0)=YLINE(VALMCNT)
32 S VALMCNT=VALMCNT-1
33 Q
34 ;
35 ;
36EXIT ; exit and clean up
37 K ^TMP($J,"PRCPRGRA")
38 Q
Note: See TracBrowser for help on using the repository browser.