source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SCCVEGU1.m@ 1535

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

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1SCCVEGU1 ;ALB/TMP - UTILS FOR ENCNTR CNVRSN GLBL ESTMTR;20-JAN-1998
2 ;;5.3;Scheduling;**211**;Aug 13, 1993
3 ;
4INCRTOT(SCTOT,INCRWHAT,HOWMUCH) ;Update local counters for estimate
5 ; SCTOT -- The array containing the running estimate totals
6 ; Subcripted by the piece it is stored on in the CST's node 2
7 ; INCRWHAT -- The piece of the CST 2-node that stores the correspnding count
8 ; 1 = Add/edits (Default)
9 ; 2 = Ancillaries
10 ; 3 = Appointments
11 ; 4 = Credit stops
12 ; 5 = Dispositions
13 ; 7 = Encounters and Visits
14 ; 8 = Visits only
15 ; 9 = # V-Providers
16 ; 10 = # V-Diagnoses
17 ; 11 = # V-Procedures
18 ; HOWMUCH -- The amount to add to the existing total
19 ;
20 ;OUTPUT :
21 ; SCTOT(INCRWHAT) -- local array to hold the # found
22 ;
23 I $G(HOWMUCH)="" N HOWMUCH S HOWMUCH=1
24 S SCTOT(+INCRWHAT)=$G(SCTOT(+INCRWHAT))+HOWMUCH
25 I +INCRWHAT=7 S SCTOT(8)=$G(SCTOT(8))+HOWMUCH
26 Q
27 ;
28UPDTOTL(PTRLOG,SCTOT) ;UPDATE CST WITH ESTIMATE TOTALS
29 ;INPUT : PTRLOG - Pointer to entry in SCHEDULING CONVERSION TEMPLATE
30 ; file (#404.98)
31 ; SCTOT - Array subscripted by storage pc and containing
32 ; the totals to be stored for the estimate
33 ;OUTPUT : None
34 ;
35 N SC2,SCDATA,SCF
36 Q:'$D(^SD(404.98,+$G(PTRLOG),0))
37 S SC2=0 F S SC2=$O(SCTOT(SC2)) Q:'SC2 S SCF="2."_$S($L(SC2)<2:"0",1:"")_SC2,SCDATA(+SCF)=SCTOT(SC2)
38 ; -- Update count(s)
39 D UPD^SCCVDBU(404.98,PTRLOG,.SCDATA)
40 Q
41 ;
42ESTGROW(ARRAY) ;RETURN ESTIMATED GLOBAL GROWTH FOR AFFECTED GLOBALS
43 ;INPUT : ARRAY - Array to store output in (full global reference)
44 ; Defaults to ^TMP("SCCVEG",$J,"SIZE")
45 ;OUTPUT : None
46 ; ARRAY will be returned as follows
47 ; ARRAY(GLOBAL) = Estimated global growth
48 ; Where GLOBAL will be
49 ; SCE,
50 ; AUPNVCPT, AUPNVPOV, AUPNVPRV, AUPNVSIT <- PCE Globals
51 ;
52 N X,Y
53 S:($G(ARRAY)="") ARRAY="^TMP(""SCCVEG"","_$J_",""SIZE"")"
54 K @ARRAY
55 ;
56 ; Sets # of blocks per record by global at 70% Global Efficiency
57 ;
58 S @ARRAY@("SCE","NEW")=$$SCE() ; New encounters
59 S @ARRAY@("SCE","UPD")=$$SCEUPD() ; Updated encounters (visit pointer/convert)
60 S @ARRAY@("AUPNVSIT")=$$AUPNVSIT() ; visits
61 S @ARRAY@("AUPNVCPT")=$$AUPNVCPT() ; procedures
62 S @ARRAY@("AUPNVPRV")=$$AUPNVPRV() ; providers
63 S @ARRAY@("AUPNVPOV")=$$AUPNVPOV() ; diagnoses
64 Q
65 ;
66FACTOR() ; -- determine block factor (1 := 1024/dsm 2 := 2048/openm)
67 Q $S($G(^%ZOSF("OS"))["DSM":1,1:2)
68 ;
69BLKSIZE() ; -- determine block size
70 Q $S($$FACTOR()=1:1024,1:2048)
71 ;
72PER(EST) ; -- adjust 'per' record size for os
73 Q $J(EST/$$FACTOR(),4,3)
74 ;
75 ; -- block per entry estimates for dsm (1024 bytes per block)
76SCE() ; -- encounter
77 Q $$PER(.288)
78SCEUPD() ; -- encounter update only
79 Q $$PER(.147)
80AUPNVSIT() ; -- visit file
81 Q $$PER(.336) ; original est. was .325
82AUPNVPRV() ; -- providers
83 Q $$PER(.139) ; original est. was .145
84AUPNVPOV() ; -- dx
85 Q $$PER(.163) ; original est. was .132
86AUPNVCPT() ; -- cpts
87 Q $$PER(.196) ; original est. was .159
88 ;
Note: See TracBrowser for help on using the repository browser.