DGYPSDE1 ;ALB/MJK/LSM - DGYP Global Estimator ; 03/19/2004
 ;;5.3;REGISTRATION;**568**;Aug 13, 1993
 ;
INTRO ; -- display text
 W @IOF
 F I=1:1 S X=$P($T(TEXT+I),";;",2) Q:X="END"  W X,! I $Y>20 S DIR(0)="E" D ^DIR K DIR Q:'Y  W @IOF
 Q
 ;
MAIL ; -- put in mm
 W !
 S DIR(0)="Y",DIR("A")="Place above text in a Mailman Message",DIR("B")="No"
 D ^DIR K DIR G MAILQ:'Y
 K ^UTILITY("DGYPEST",$J)
 F I=1:1 S X=$P($T(TEXT+I),";;",2) Q:X="END"  S ^UTILITY("DGYPEST",$J,I,0)=X
 S XMSUB="SCE Global Estimator",XMDUZ=.5,XMY(DUZ)="",XMTEXT="^UTILITY(""DGYPEST"",$J,"
 D ^XMD W !,"...mailed"
MAILQ K XMY,XMDUZ,XMTEXT,XMSUB,^UTILITY("DGYPEST",$J)
 Q
 ;
TEXT ;
 ;;               *** ^SCE & ^SDD(409.42) Global Estimators ***
 ;;
 ;;Purpose:
 ;;--------
 ;;In previous versions of PIMS, a patient's outpatient information has
 ;;been stored in various files in the VistA database. With the
 ;;requirement to check out all outpatient encounters, it was necessary
 ;;to consolidate much of the common outpatient information into one
 ;;outpatient encounter file.
 ;;
 ;;In PIMS v5.3, the data will reside in the new OUTPATIENT
 ;;ENCOUNTER(#409.68) file as well as in the old data structures.
 ;;This file will hold encounter data for all checked out encounters.
 ;;This will include information from the following:
 ;;         o appointments: SDAPI - Scheduling API
 ;;         o add/edits:    ^SDV
 ;;         o dispositions: ^DPT(patient,"DIS",date/time)
 ;;
 ;;The MUMPS global for this file is ^SCE.
 ;;
 ;;
 ;;Also, as part of the check out process, questions regarding
 ;;whether the encounter was related to a service connected disability,
 ;;agent orange, ionization or environmental contaminants from the
 ;;Persian Gulf war, will be asked when appropriate.
 ;;
 ;;This data will be stored in the new OUTPATIENT CLASSIFICATION(#409.42)
 ;;file in the ^SDD(409.42) global.
 ;;
 ;;
 ;;The purpose of this utility is the following:
 ;;             1. estimate a one year rate of growth for
 ;;                ^SCE using as a base the encounter data
 ;;                for the previous 365 days
 ;;
 ;;             2. estimate a one year rate of growth for
 ;;                ^SDD(409.42) using as a base the encounter data
 ;;                for the previous 365 and the patient demographic
 ;;                information
 ;;
 ;;Using these estimates, you can make a better determination
 ;;as to where to place this new ^SCE global and how large the
 ;;existing ^SDD global will grow.
 ;;
 ;;
 ;;
 ;;Algorithms:
 ;;-----------
 ;;1. Outpatient Encounters - ^SCE:
 ;;
 ;;This utility will scan your site's encounter database for
 ;;the previous 365 days. It will count the number of appointments,
 ;;add/edits and dispositions.
 ;;
 ;;Appointments that were cancelled or no-showed are not included
 ;;in the calculations. Dispositions with a status of 'APPLICATION
 ;;WITHOUT EXAM' are also not included.
 ;;
 ;;After obtaining these counts, they will be applied against
 ;;the estimated block size needed for each type of encounter.
 ;;Each type of encounter is estimated to use .16 1K blocks.
 ;;
 ;;
 ;;2. Outpatient Classifications - ^SDD(409.42):
 ;;The classifications estimate looks at the patient's demographic
 ;;data as it scans the outpatient encounter database in #1 above.
 ;;If the demographic data indicates a classification question
 ;;would have been required for the encounter then a counter for the
 ;;specific classification is incremented.
 ;;
 ;;For example, if the patient is a service connected veteran, the
 ;;SC counter will be incremented.
 ;;
 ;;After obtaining these counts, they will be applied against
 ;;the estimated block size needed for each type of classification.
 ;;Each type of classification is estimated to use .08 1K blocks.
 ;;
 ;;NOTE: Encounters with stop codes 104 thru 170 do not, at this time,
 ;;      require any classification questions to be asked. As a result,
 ;;      they are not included in the classification counts.
 ;;
 ;;
 ;;3. The estimation algorithm takes into account the following factors:
 ;;         o pointer blocks needed
 ;;         o blocks needed for actual data
 ;;         o blocks needed for cross references
 ;;
 ;;   Also, the algorithm is based on a global efficiency of 74%.
 ;;
 ;;
 ;;
 ;;Results Reporting:
 ;;------------------
 ;;After the estimations are calculated, the results will be
 ;;reported to the user via a MailMan message.
 ;;END
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGYPSDE1   4533     printed  Sep 23, 2025@20:36:28                                                                                                                                                                                                    Page 2
DGYPSDE1  ;ALB/MJK/LSM - DGYP Global Estimator ; 03/19/2004
 +1       ;;5.3;REGISTRATION;**568**;Aug 13, 1993
 +2       ;
INTRO     ; -- display text
 +1        WRITE @IOF
 +2        FOR I=1:1
               SET X=$PIECE($TEXT(TEXT+I),";;",2)
               if X="END"
                   QUIT 
               WRITE X,!
               IF $Y>20
                   SET DIR(0)="E"
                   DO ^DIR
                   KILL DIR
                   if 'Y
                       QUIT 
                   WRITE @IOF
 +3        QUIT 
 +4       ;
MAIL      ; -- put in mm
 +1        WRITE !
 +2        SET DIR(0)="Y"
           SET DIR("A")="Place above text in a Mailman Message"
           SET DIR("B")="No"
 +3        DO ^DIR
           KILL DIR
           if 'Y
               GOTO MAILQ
 +4        KILL ^UTILITY("DGYPEST",$JOB)
 +5        FOR I=1:1
               SET X=$PIECE($TEXT(TEXT+I),";;",2)
               if X="END"
                   QUIT 
               SET ^UTILITY("DGYPEST",$JOB,I,0)=X
 +6        SET XMSUB="SCE Global Estimator"
           SET XMDUZ=.5
           SET XMY(DUZ)=""
           SET XMTEXT="^UTILITY(""DGYPEST"",$J,"
 +7        DO ^XMD
           WRITE !,"...mailed"
MAILQ      KILL XMY,XMDUZ,XMTEXT,XMSUB,^UTILITY("DGYPEST",$JOB)
 +1        QUIT 
 +2       ;
TEXT      ;
 +1       ;;               *** ^SCE & ^SDD(409.42) Global Estimators ***
 +2       ;;
 +3       ;;Purpose:
 +4       ;;--------
 +5       ;;In previous versions of PIMS, a patient's outpatient information has
 +6       ;;been stored in various files in the VistA database. With the
 +7       ;;requirement to check out all outpatient encounters, it was necessary
 +8       ;;to consolidate much of the common outpatient information into one
 +9       ;;outpatient encounter file.
 +10      ;;
 +11      ;;In PIMS v5.3, the data will reside in the new OUTPATIENT
 +12      ;;ENCOUNTER(#409.68) file as well as in the old data structures.
 +13      ;;This file will hold encounter data for all checked out encounters.
 +14      ;;This will include information from the following:
 +15      ;;         o appointments: SDAPI - Scheduling API
 +16      ;;         o add/edits:    ^SDV
 +17      ;;         o dispositions: ^DPT(patient,"DIS",date/time)
 +18      ;;
 +19      ;;The MUMPS global for this file is ^SCE.
 +20      ;;
 +21      ;;
 +22      ;;Also, as part of the check out process, questions regarding
 +23      ;;whether the encounter was related to a service connected disability,
 +24      ;;agent orange, ionization or environmental contaminants from the
 +25      ;;Persian Gulf war, will be asked when appropriate.
 +26      ;;
 +27      ;;This data will be stored in the new OUTPATIENT CLASSIFICATION(#409.42)
 +28      ;;file in the ^SDD(409.42) global.
 +29      ;;
 +30      ;;
 +31      ;;The purpose of this utility is the following:
 +32      ;;             1. estimate a one year rate of growth for
 +33      ;;                ^SCE using as a base the encounter data
 +34      ;;                for the previous 365 days
 +35      ;;
 +36      ;;             2. estimate a one year rate of growth for
 +37      ;;                ^SDD(409.42) using as a base the encounter data
 +38      ;;                for the previous 365 and the patient demographic
 +39      ;;                information
 +40      ;;
 +41      ;;Using these estimates, you can make a better determination
 +42      ;;as to where to place this new ^SCE global and how large the
 +43      ;;existing ^SDD global will grow.
 +44      ;;
 +45      ;;
 +46      ;;
 +47      ;;Algorithms:
 +48      ;;-----------
 +49      ;;1. Outpatient Encounters - ^SCE:
 +50      ;;
 +51      ;;This utility will scan your site's encounter database for
 +52      ;;the previous 365 days. It will count the number of appointments,
 +53      ;;add/edits and dispositions.
 +54      ;;
 +55      ;;Appointments that were cancelled or no-showed are not included
 +56      ;;in the calculations. Dispositions with a status of 'APPLICATION
 +57      ;;WITHOUT EXAM' are also not included.
 +58      ;;
 +59      ;;After obtaining these counts, they will be applied against
 +60      ;;the estimated block size needed for each type of encounter.
 +61      ;;Each type of encounter is estimated to use .16 1K blocks.
 +62      ;;
 +63      ;;
 +64      ;;2. Outpatient Classifications - ^SDD(409.42):
 +65      ;;The classifications estimate looks at the patient's demographic
 +66      ;;data as it scans the outpatient encounter database in #1 above.
 +67      ;;If the demographic data indicates a classification question
 +68      ;;would have been required for the encounter then a counter for the
 +69      ;;specific classification is incremented.
 +70      ;;
 +71      ;;For example, if the patient is a service connected veteran, the
 +72      ;;SC counter will be incremented.
 +73      ;;
 +74      ;;After obtaining these counts, they will be applied against
 +75      ;;the estimated block size needed for each type of classification.
 +76      ;;Each type of classification is estimated to use .08 1K blocks.
 +77      ;;
 +78      ;;NOTE: Encounters with stop codes 104 thru 170 do not, at this time,
 +79      ;;      require any classification questions to be asked. As a result,
 +80      ;;      they are not included in the classification counts.
 +81      ;;
 +82      ;;
 +83      ;;3. The estimation algorithm takes into account the following factors:
 +84      ;;         o pointer blocks needed
 +85      ;;         o blocks needed for actual data
 +86      ;;         o blocks needed for cross references
 +87      ;;
 +88      ;;   Also, the algorithm is based on a global efficiency of 74%.
 +89      ;;
 +90      ;;
 +91      ;;
 +92      ;;Results Reporting:
 +93      ;;------------------
 +94      ;;After the estimations are calculated, the results will be
 +95      ;;reported to the user via a MailMan message.
 +96      ;;END