Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SCCVEGU1

SCCVEGU1.m

Go to the documentation of this file.
  1. SCCVEGU1 ;ALB/TMP - UTILS FOR ENCNTR CNVRSN GLBL ESTMTR;20-JAN-1998
  1. ;;5.3;Scheduling;**211**;Aug 13, 1993
  1. ;
  1. INCRTOT(SCTOT,INCRWHAT,HOWMUCH) ;Update local counters for estimate
  1. ; SCTOT -- The array containing the running estimate totals
  1. ; Subcripted by the piece it is stored on in the CST's node 2
  1. ; INCRWHAT -- The piece of the CST 2-node that stores the correspnding count
  1. ; 1 = Add/edits (Default)
  1. ; 2 = Ancillaries
  1. ; 3 = Appointments
  1. ; 4 = Credit stops
  1. ; 5 = Dispositions
  1. ; 7 = Encounters and Visits
  1. ; 8 = Visits only
  1. ; 9 = # V-Providers
  1. ; 10 = # V-Diagnoses
  1. ; 11 = # V-Procedures
  1. ; HOWMUCH -- The amount to add to the existing total
  1. ;
  1. ;OUTPUT :
  1. ; SCTOT(INCRWHAT) -- local array to hold the # found
  1. ;
  1. I $G(HOWMUCH)="" N HOWMUCH S HOWMUCH=1
  1. S SCTOT(+INCRWHAT)=$G(SCTOT(+INCRWHAT))+HOWMUCH
  1. I +INCRWHAT=7 S SCTOT(8)=$G(SCTOT(8))+HOWMUCH
  1. Q
  1. ;
  1. UPDTOTL(PTRLOG,SCTOT) ;UPDATE CST WITH ESTIMATE TOTALS
  1. ;INPUT : PTRLOG - Pointer to entry in SCHEDULING CONVERSION TEMPLATE
  1. ; file (#404.98)
  1. ; SCTOT - Array subscripted by storage pc and containing
  1. ; the totals to be stored for the estimate
  1. ;OUTPUT : None
  1. ;
  1. N SC2,SCDATA,SCF
  1. Q:'$D(^SD(404.98,+$G(PTRLOG),0))
  1. 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)
  1. ; -- Update count(s)
  1. D UPD^SCCVDBU(404.98,PTRLOG,.SCDATA)
  1. Q
  1. ;
  1. ESTGROW(ARRAY) ;RETURN ESTIMATED GLOBAL GROWTH FOR AFFECTED GLOBALS
  1. ;INPUT : ARRAY - Array to store output in (full global reference)
  1. ; Defaults to ^TMP("SCCVEG",$J,"SIZE")
  1. ;OUTPUT : None
  1. ; ARRAY will be returned as follows
  1. ; ARRAY(GLOBAL) = Estimated global growth
  1. ; Where GLOBAL will be
  1. ; SCE,
  1. ; AUPNVCPT, AUPNVPOV, AUPNVPRV, AUPNVSIT <- PCE Globals
  1. ;
  1. N X,Y
  1. S:($G(ARRAY)="") ARRAY="^TMP(""SCCVEG"","_$J_",""SIZE"")"
  1. K @ARRAY
  1. ;
  1. ; Sets # of blocks per record by global at 70% Global Efficiency
  1. ;
  1. S @ARRAY@("SCE","NEW")=$$SCE() ; New encounters
  1. S @ARRAY@("SCE","UPD")=$$SCEUPD() ; Updated encounters (visit pointer/convert)
  1. S @ARRAY@("AUPNVSIT")=$$AUPNVSIT() ; visits
  1. S @ARRAY@("AUPNVCPT")=$$AUPNVCPT() ; procedures
  1. S @ARRAY@("AUPNVPRV")=$$AUPNVPRV() ; providers
  1. S @ARRAY@("AUPNVPOV")=$$AUPNVPOV() ; diagnoses
  1. Q
  1. ;
  1. FACTOR() ; -- determine block factor (1 := 1024/dsm 2 := 2048/openm)
  1. Q $S($G(^%ZOSF("OS"))["DSM":1,1:2)
  1. ;
  1. BLKSIZE() ; -- determine block size
  1. Q $S($$FACTOR()=1:1024,1:2048)
  1. ;
  1. PER(EST) ; -- adjust 'per' record size for os
  1. Q $J(EST/$$FACTOR(),4,3)
  1. ;
  1. ; -- block per entry estimates for dsm (1024 bytes per block)
  1. SCE() ; -- encounter
  1. Q $$PER(.288)
  1. SCEUPD() ; -- encounter update only
  1. Q $$PER(.147)
  1. AUPNVSIT() ; -- visit file
  1. Q $$PER(.336) ; original est. was .325
  1. AUPNVPRV() ; -- providers
  1. Q $$PER(.139) ; original est. was .145
  1. AUPNVPOV() ; -- dx
  1. Q $$PER(.163) ; original est. was .132
  1. AUPNVCPT() ; -- cpts
  1. Q $$PER(.196) ; original est. was .159
  1. ;