source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SCCVEGD1.m@ 1724

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1SCCVEGD1 ;ALB/JRP,TMP - DSPLY RSLTS 4 ENCNTR CNVRSN GLBL ESTMTR;15-JAN-96
2 ;;5.3;Scheduling;**211**;Aug 13, 1993
3DSPGLBL(PTRLOG,OUTARRAY,STARTLN) ;BUILD DISPLAY FOR GLOBAL ESTIMATES
4 ;INPUT : PTRLOG - Pointer to entry in SCHEDULING CONVERSION LOG
5 ; file (#404.98) that estimation is for
6 ; OUTARRAY - Array to build display into (full global reference)
7 ; Defaults to ^TMP("SCCVEG",$J,"DISPLAY")
8 ; STARTLN - The line # in the display where this portion starts
9 ; [optional]
10 ;OUTPUT : N - Number of lines in this display
11 ; OUTARRAY will be returned as follows
12 ; OUTARRAY(x,0) = Line x of display
13 ;
14 N ESTGLBL,GLOBAL,INFO,EQUALS,LINE,HEADER,FOOTER,TMP,DASHES,SD0,TOTAL
15 N DIC,X,DA,DR,DIQ,SCBLK,SC207
16 ;
17 Q:('$D(^SD(404.98,+$G(PTRLOG),0))) 0
18 ;
19 S:$G(OUTARRAY)="" OUTARRAY="^TMP(""SCCVEG"","_$J_",""DISPLAY"")"
20 S LINE=+$G(STARTLN)
21 S DASHES="",$P(DASHES,"-",81)="",EQUALS="",$P(EQUALS,"=",81)=""
22 ;
23 S TMP=$G(^SD(404.98,PTRLOG,2)),SD0=$G(^(0))
24 S TOTAL("SCE","NEW")=+$P(TMP,"^",7)
25 S TOTAL("SCE","UPD")=$P(TMP,"^",8)-$P(TMP,"^",7)
26 S TOTAL("AUPNVSIT")=+$P(TMP,"^",8)
27 S TOTAL("AUPNVPRV")=+$P(TMP,"^",9)
28 S TOTAL("AUPNVPOV")=+$P(TMP,"^",10)
29 S TOTAL("AUPNVCPT")=+$P(TMP,"^",11)
30 ;
31 ;Get estimated global growths
32 S DIC=404.98,DR="207:211",DIQ="ESTGLBL",DIQ(0)="IE",DA=PTRLOG
33 D EN^DIQ1
34 ;
35 S HEADER(1)="+"_$E(EQUALS,1,54)_"+"
36 S TMP=$$CENTER^SCCVEGU0("ESTIMATED GLOBAL BLOCK GROWTH",54)
37 S HEADER(2)="|"_TMP_"|"
38 S TMP=$$CENTER^SCCVEGU0($$FMTE^XLFDT($P(SD0,U,3),"5Z")_" - "_$$FMTE^XLFDT($P(SD0,U,4),"5Z"),54)
39 S HEADER(3)="|"_TMP_"|",HEADER(4)="|"_$E(DASHES,1,54)_"|",HEADER(5)="|"
40 S HEADER(6)="+"
41 F TMP=1:1:5 S HEADER(6)=HEADER(6)_$E(EQUALS,1,10)_"+"
42 ;
43 S FOOTER(1)="+"
44 F TMP=1:1:5 S FOOTER(1)=FOOTER(1)_$E(EQUALS,1,10)_"+"
45 ;
46 ;Build display for global estimates
47 S INFO="|"
48 F X=207:1:211 D
49 . S INFO=INFO_" "_$J(+$G(ESTGLBL(404.98,PTRLOG,X,"E")),8,0)_" |"
50 F X="SCE","AUPNVSIT","AUPNVPRV","AUPNVPOV","AUPNVCPT" D
51 . S HEADER(5)=HEADER(5)_$$CENTER^SCCVEGU0(X,10)_"|"
52 ;
53 ;Put lines into display
54 F TMP=1:1 Q:('$D(HEADER(TMP))) S LINE=LINE+1,@OUTARRAY@(LINE,0)=HEADER(TMP)
55 S LINE=LINE+1,@OUTARRAY@(LINE,0)=INFO
56 F TMP=1:1 Q:('$D(FOOTER(TMP))) S LINE=LINE+1,@OUTARRAY@(LINE,0)=FOOTER(TMP)
57 ;
58 ; ending text
59 ;
60 S FOOTER="**"_$J("",52)_"**"
61 S TMP=" The estimate algorithm factors in global"
62 S LINE=LINE+1,@OUTARRAY@(LINE,0)=$$INSERT^SCCVEGU0(TMP,FOOTER,5)
63 S TMP=" pointer data and data requirements (including"
64 S LINE=LINE+1,@OUTARRAY@(LINE,0)=$$INSERT^SCCVEGU0(TMP,FOOTER,5)
65 S TMP=" cross references) at a 70% efficiency level."
66 S LINE=LINE+1,@OUTARRAY@(LINE,0)=$$INSERT^SCCVEGU0(TMP,FOOTER,5)
67 S SCBLK=$$BLKSIZE^SCCVEGU1()
68 S SC207=+$G(ESTGLBL(404.98,PTRLOG,207,"E"))
69 S TMP=" Each block represents "_SCBLK_" bytes."
70 S LINE=LINE+1,@OUTARRAY@(LINE,0)=$$INSERT^SCCVEGU0(TMP,FOOTER,5)
71 S TMP=" SCE Example: "_SC207_" x "_SCBLK_" = "_$FN(SC207*SCBLK,",")_" bytes."
72 S LINE=LINE+1,@OUTARRAY@(LINE,0)=$$INSERT^SCCVEGU0(TMP,FOOTER,5)
73 S LINE=LINE+1,@OUTARRAY@(LINE,0)="+"_$E(EQUALS,1,54)_"+"
74 ;
75 Q (LINE-STARTLN)
76 ;
Note: See TracBrowser for help on using the repository browser.