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

ABMDRPER.m

Go to the documentation of this file.
  1. ABMDRPER ; IHS/ASDST/DMJ - UTILITY TO DISPLAY % COMPLETE SCALE ;
  1. ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
  1. ;Original;TMD;
  1. ;
  1. ; This utility generates a scale which is used to inform the user
  1. ; of the completion percentage of a job.
  1. ;
  1. ; Input Variables: ABMR("R") - Number of Records
  1. ; ABMR - Current Value
  1. ;
  1. ; Entry Points: START - Sets variables, prints scale and starting time.
  1. ; CURR - Prints present completion percentage.
  1. ; END - Prints ending time and kills all variables.
  1. ;
  1. START ;EP for entering utility
  1. S ABMR("C%")=.02
  1. W $$EN^ABMVDF("IOF")
  1. F ABMR("%I")=.02:.02:1 S ABMR(ABMR("%I"),"%")=ABMR("R")*ABMR("%I")
  1. U IO(0) S ABMR("%X")="========== PROCESSING ACTIVITY =========="
  1. W !!,?(40-($L(ABMR("%X"))\2)),ABMR("%X")
  1. W !!?3,"Total Records to Process.....: ",ABMR("R")
  1. W !?3,"Currently Processing Record..: 1"
  1. W !!?3,"Starting Time................: " D NOW^%DTC W $$MDT^ABMDUTL(%)
  1. S ABMR("%X")="Job Completion Percentage"
  1. W !!,?(40-($L(ABMR("%X"))\2)),ABMR("%X"),!
  1. W ?13,0 F ABMR("%I")=10:10:100 W ?($X+3) W:ABMR("%I")=10 " " W ABMR("%I")
  1. W !?13,"|" F ABMR("%I")=1:1:10 W "----|"
  1. S ABMR("X%")=13
  1. Q
  1. ;
  1. CURR ;EP for writing scale
  1. Q:ABMR("C%")>1
  1. F Q:ABMR(ABMR("C%"),"%")>ABMR D Q:'$D(ABMR(ABMR("C%"),"%"))
  1. .U IO(0)
  1. .S DX=34,DY=6 X IOXY W ABMR
  1. .S DY=12,DX=ABMR("X%")+$S(ABMR("C%")'=.02:1,1:0)
  1. .X IOXY W $$EN^ABMVDF("RVN")
  1. .I ABMR("C%")#.1'=0 W $S(ABMR("C%")'=".02":"=",1:"|=")
  1. .E W "|"
  1. .W $$EN^ABMVDF("RVF")
  1. .S ABMR("C%")=ABMR("C%")+.02,ABMR("X%")=ABMR("X%")+1
  1. Q
  1. END ;EP for cleaning up
  1. U IO(0)
  1. W !!?3,"Ending Time..................: " D NOW^%DTC W $$MDT^ABMDUTL(%),!!
  1. K ABMR
  1. XIT Q
  1. ;
  1. CHK1 I $G(ABMR("R"))="" G ERR
  1. Q
  1. CHK2 I $G(ABMR)="" G ERR
  1. Q
  1. ;
  1. ERR S ABMR("%XIT")=""
  1. W !!,*7,"NECESSARY VARIABLES NOT DEFINED!"
  1. Q
  1. ;
  1. TEST S ABMR("R")=$P(^AUPNVSIT(0),U,4),ABMR("T")=0 D START F ABMR=1:1 S ABMR("T")=$O(^AUPNVSIT(ABMR("T"))) Q:'ABMR("T") D CURR
  1. D END
  1. Q