STANDARD DATA DICTIONARY #799.6 -- ROR HISTORICAL DATA EXTRACTION FILE                                            3/24/25    PAGE 1
STORED IN ^RORDATA(799.6,  (5 ENTRIES)   SITE: WWW.BMIRWIN.COM   UCI: VISTA,VISTA                                  (VERSION 1.5)   

DATA          NAME                  GLOBAL        DATA
ELEMENT       TITLE                 LOCATION      TYPE
-----------------------------------------------------------------------------------------------------------------------------------
Records of this file store parameters of the historical data extractions (backpulls) performed on the registries and reflect status
of these data extractions.  
 
Records of the file are uniquely identified by the historical data extraction name (the "A" primary key and the uniqueness index
"B" are used for that purpose).  


              DD ACCESS: @
              RD ACCESS: 
              WR ACCESS: @
             DEL ACCESS: @
           LAYGO ACCESS: @
           AUDIT ACCESS: @

SECONDARY KEY:      A (#66)
  Uniqueness Index: B (#633)
       File, Field: 1) NAME (799.6,.01)

POINTED TO BY: AUTOMATIC BACKPULL field (#21.01) of the ROR REGISTRY PARAMETERS File (#798.1) 
               


INDEXED BY:    ACTIVATION DATE & NAME & TYPE & ACTIVATION DATE (ADNAUTO), NAME (B)




799.6,.01     NAME                   0;1 FREE TEXT (Required) (Key field)

              INPUT TRANSFORM:  Q:$$VAEDT^RORDD(799.6,$G(DA))  K:$L(X)>30!(X?.N)!($L(X)<3)!'(X'?1P.E) X
              LAST EDITED:      NOV 01, 2005 
              HELP-PROMPT:      Enter the unique data extraction name (3-30 characters). 
              DESCRIPTION:      YOU MUST NOT EDIT THIS FIELD IF IT IS PART OF A NATIONAL HISTORICAL DATA EXTRACTION DEFINITION! 
                                 
                                This field stores the unique name of the historical data extraction. If an extraction is initiated
                                by a patch, it is a good idea to include the patch number.  

              DELETE TEST:      1,0)= I $$VADEL^RORDD(799.6,$G(DA))

              DELETE AUTHORITY: @
              WRITE AUTHORITY:  @
              GROUP:            DEFINITION
              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

              CROSS-REFERENCE:  ^^TRIGGER^799.6^.07 
                                K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^RORDATA(799.6,D0,0)):^(0),1:"") S X=$P(Y(1),U,
                                7)'>0 I X S X=DIV S Y(1)=$S($D(^RORDATA(799.6,D0,0)):^(0),1:"") S X=$P(Y(1),U,7),X=X S DIU=X K Y S 
                                X=DIV N %I,%H,% D NOW^%DTC X ^DD(799.6,.01,1,2,1.4)

                                1.4)= S DIH=$G(^RORDATA(799.6,DIV(0),0)),DIV=X S $P(^(0),U,7)=DIV,DIH=799.6,DIG=.07 D ^DICR

                                2)= Q
                                3)= Do not delete!
                                CREATE CONDITION)= ACTIVATION DATE'>0
                                CREATE VALUE)= TODAY
                                DELETE VALUE)= NO EFFECT
                                FIELD)= ACTIVATION DATE
                                If the ACTIVATION DATE field (.07) is empty, then this trigger populates it with the current date 
                                when the package is installed.  
                                 
                                Thus the historical data extraction parameters become active and will be processed by the next run
                                of the nightly task.  


              FIELD INDEX:      B (#633)    REGULAR    IR    LOOKUP & SORTING
                   Unique for:  Key A (#66), File #799.6
                  Short Descr:  Uniqueness Index for Key 'A' of File #799.6
                    Set Logic:  S ^RORDATA(799.6,"B",X,DA)=""
                   Kill Logic:  K ^RORDATA(799.6,"B",X,DA)
                   Whole Kill:  K ^RORDATA(799.6,"B")
                         X(1):  NAME  (799.6,.01)  (Subscr 1)

              RECORD INDEXES:   ADNAUTO (#632)

799.6,.02     TYPE                   0;2 SET (Required)

                                '1' FOR Auto (HL7 messages); 
                                '2' FOR Manual (host files); 
              INPUT TRANSFORM:  Q:$$VAEDT^RORDD(799.6,$G(DA))
              LAST EDITED:      OCT 31, 2005 
              DESCRIPTION:      YOU MUST NOT EDIT THIS FIELD IF IT IS PART OF A NATIONAL HISTORICAL DATA EXTRACTION DEFINITION! 
                                 
                                This field defines the type of data extraction.  
                                 
                                Automatic data extractions are initiated by the CCR patches. Data is extracted by the nightly task 
                                and sent via regular batch HL7 messages.  
                                 
                                Manual data extractions are initiated by the users using the options from the maintenance menu.
                                They schedule the data extraction tasks and verify their completion. Data is written to host files, 
                                which are transferred to the AAC via FTP or any other means.  

              DELETE TEST:      1,0)= I $$VADEL^RORDD(799.6,$G(DA))

              DELETE AUTHORITY: @
              WRITE AUTHORITY:  @
              GROUP:            DEFINITION
              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

              RECORD INDEXES:   ADNAUTO (#632)

799.6,.03     START DATE             0;3 DATE (Required)

              INPUT TRANSFORM:  Q:$$VAEDT^RORDD(799.6,$G(DA))  S %DT="EX" D ^%DT S X=Y K:Y<1 X
              LAST EDITED:      NOV 01, 2005 
              DESCRIPTION:      YOU MUST NOT EDIT THIS FIELD IF IT IS PART OF A NATIONAL HISTORICAL DATA EXTRACTION DEFINITION! 
                                 
                                This field indicates the start date for the historical data extraction.  

              DELETE TEST:      1,0)= I $$VADEL^RORDD(799.6,$G(DA))

              DELETE AUTHORITY: @
              WRITE AUTHORITY:  @
              GROUP:            DEFINITION
              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

              CROSS-REFERENCE:  ^^TRIGGER^799.6^.04 
                                K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^RORDATA(799.6,D0,0)):^(0),1:"") S X=$P(Y(1),U,
                                4)'>0 I X S X=DIV S Y(1)=$S($D(^RORDATA(799.6,D0,0)):^(0),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y S 
                                X=DIV N %I,%H,% D NOW^%DTC X ^DD(799.6,.03,1,1,1.4)

                                1.4)= S DIH=$G(^RORDATA(799.6,DIV(0),0)),DIV=X S $P(^(0),U,4)=DIV,DIH=799.6,DIG=.04 D ^DICR

                                2)= Q
                                3)= Do not delete!
                                CREATE CONDITION)= END DATE'>0
                                CREATE VALUE)= TODAY
                                DELETE VALUE)= NO EFFECT
                                FIELD)= END DATE
                                If the END DATE field (.04) is empty, then this trigger populates it with the current date when the
                                package is installed.  



799.6,.04     END DATE               0;4 DATE

              INPUT TRANSFORM:  Q:$$VAEDT^RORDD(799.6,$G(DA))  S %DT="EX" D ^%DT S X=Y K:Y<1 X
              LAST EDITED:      NOV 01, 2005 
              DESCRIPTION:      YOU MUST NOT EDIT THIS FIELD IF IT IS PART OF A NATIONAL HISTORICAL DATA EXTRACTION DEFINITION! 
                                 
                                This field indicates the end date for the historical data extraction.  

              DELETE TEST:      1,0)= I $$VADEL^RORDD(799.6,$G(DA))

              DELETE AUTHORITY: @
              WRITE AUTHORITY:  @
              GROUP:            DEFINITION
              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER
                                TRIGGERED by the START DATE field of the ROR HISTORICAL DATA EXTRACTION File 


799.6,.05     PATIENTS PER BATCH     0;5 NUMBER

              INPUT TRANSFORM:  Q:$$VAEDT^RORDD(799.6,$G(DA))  K:+X'=X!(X>999999999)!(X<1)!(X?.E1"."1N.N) X
              LAST EDITED:      JUL 25, 2005 
              HELP-PROMPT:      Type a Number between 1 and 999999999, 0 Decimal Digits. 
              DESCRIPTION:      YOU MUST NOT EDIT THIS FIELD IF IT IS PART OF A NATIONAL HISTORICAL DATA EXTRACTION DEFINITION! 
                                 
                                The PATIENTS PER BATCH field holds the maximum number of patients whose data is written into a 
                                single historical data extraction output file.  

              TECHNICAL DESCR:
                                This field is used only during manual historical data extractions.  

              DELETE TEST:      1,0)= I $$VADEL^RORDD(799.6,$G(DA))

              DELETE AUTHORITY: @
              WRITE AUTHORITY:  @
              GROUP:            MANUAL
              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER


799.6,.06     MAXIMUM MESSAGE SIZE   0;6 NUMBER

              INPUT TRANSFORM:  Q:$$VAEDT^RORDD(799.6,$G(DA))  K:+X'=X!(X>99)!(X<0)!(X?.E1"."2N.N) X
              LAST EDITED:      NOV 01, 2005 
              HELP-PROMPT:      Type a Number between 0 and 99, 1 Decimal Digit. 
              DESCRIPTION:      YOU MUST NOT EDIT THIS FIELD IF IT IS PART OF A NATIONAL HISTORICAL DATA EXTRACTION DEFINITION! 
                                 
                                This field stores the maximum size (in megabytes) of a batch HL7 message that can be sent to Austin 
                                Automation Center (AAC). If this field is empty or contains 0, the size is not limited.  

              TECHNICAL DESCR:  Actual size of an HL7 batch can be greater than the value of this field because the software does
                                not break in the middle of an individual HL7 message.  
                                 
                                For example, if the maximum size is 10Mb, the current size is 9Mb and 3Mb should be sent for the
                                patient being processed then the actual size of the batch will be 12Mb.  
                                 
                                This field is used only during automatic historical data extractions.  

              DELETE TEST:      1,0)= I $$VADEL^RORDD(799.6,$G(DA))

              DELETE AUTHORITY: @
              WRITE AUTHORITY:  @
              GROUP:            AUTO
              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER


799.6,.07     ACTIVATION DATE        0;7 DATE

              INPUT TRANSFORM:  S %DT="EX" D ^%DT S X=Y K:Y<1 X
              LAST EDITED:      OCT 31, 2005 
              DESCRIPTION:      This field is used only for automatic data extractions. If it is empty, then the nightly task 
                                ignores this record completely. Otherwise, the data extraction will not start before the date and 
                                time stored in this field.  

              DELETE AUTHORITY: @
              WRITE AUTHORITY:  @
              GROUP:            AUTO
              NOTES:            TRIGGERED by the NAME field of the ROR HISTORICAL DATA EXTRACTION File 

              RECORD INDEXES:   ADNAUTO (#632)

799.6,.08     BASE FILE NAME         0;8 FREE TEXT

              INPUT TRANSFORM:  K:$L(X)>15!($L(X)<1) X
              LAST EDITED:      DEC 19, 2005 
              HELP-PROMPT:      Answer must be 1-15 characters in length. 
              DESCRIPTION:      The base part for the output file names is stored in this field. It is populated either by a patch 
                                or by the user (if they are instructed to do so).  
                                 
                                The output file names will have the following structure: 
                                 
                                  BASE-SSS-TT.HDT 
                                 
                                where 'BASE' is the value of this field, 'SSS' is the site number (3 digits), and 'TT' is the 
                                sequential number of the task (2 digits).  
                                                                                     
                                If the task is restarted, the optional numeric modifier '##' (2 digits) will be added to the name 
                                so that the already extracted data will not be overwritten: 
                                                                                     
                                  BASE-SSS-TT-##.HDT 

              TECHNICAL DESCR:
                                This field is used only during manual historical data extractions.  

              DELETE AUTHORITY: @
              WRITE AUTHORITY:  @
              GROUP:            MANUAL
              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER


799.6,.09     NATIONAL               0;9 SET

                                '0' FOR NO; 
                                '1' FOR YES; 
              INPUT TRANSFORM:  Q:$$VAEDT^RORDD(799.6,,-1)
              LAST EDITED:      JUL 25, 2005 
              DESCRIPTION:      ONLY AUTHORIZED NATIONAL REGISTRY DEVELOPERS CAN EDIT THIS FIELD! 
                                 
                                National historical data extractions (backpulls) must have this field set to "YES". This prevents 
                                local editing of other fields of the definitions.  

              DELETE TEST:      1,0)= I $$VADEL^RORDD(799.6,$G(DA))

              DELETE AUTHORITY: @
              WRITE AUTHORITY:  @
              GROUP:            DEFINITION
              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER


799.6,1       DATA AREA              1;0 POINTER Multiple #799.61

              DESCRIPTION:      YOU MUST NOT EDIT THIS FIELD IF IT IS PART OF A NATIONAL HISTORICAL DATA EXTRACTION DEFINITION! 
                                 
                                This multiple lists all data areas in which the data extraction will be performed. It can also 
                                contain additional time frames for these data areas.  

              WRITE AUTHORITY:  @
              GROUP:            DEFINITION

              SECONDARY KEY:    A (#67)
              Uniqueness Index: B (#634)
                   File, Field: 1) DATA AREA (799.61,.01)

              INDEXED BY:       DATA AREA (B)

799.61,.01      DATA AREA              0;1 POINTER TO ROR DATA AREA FILE (#799.33) (Multiply asked) (Key field)

                INPUT TRANSFORM:  Q:$$VAEDT^RORDD(799.6,$G(DA(1)))
                LAST EDITED:      JUL 25, 2005 
                DESCRIPTION:      YOU MUST NOT EDIT THIS FIELD IF IT IS PART OF A NATIONAL HISTORICAL DATA EXTRACTION DEFINITION! 
                                   
                                  Select the data area where the data extraction will be performed. Data will be extracted only 
                                  from the data areas referenced by this field.  

                DELETE TEST:      1,0)= I $$VADEL^RORDD(799.6,$G(DA(1)))

                DELETE AUTHORITY: @
                WRITE AUTHORITY:  @
                NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

                FIELD INDEX:      B (#634)    REGULAR    IR    LOOKUP & SORTING
                     Unique for:  Key A (#67), File #799.61
                    Short Descr:  Uniqueness Index for Key 'A' of Subfile #799.61
                      Set Logic:  S ^RORDATA(799.6,DA(1),1,"B",X,DA)=""
                     Kill Logic:  K ^RORDATA(799.6,DA(1),1,"B",X,DA)
                     Whole Kill:  K ^RORDATA(799.6,DA(1),1,"B")
                           X(1):  DATA AREA  (799.61,.01)  (Subscr 1)


799.61,.02      START DATE             0;2 DATE

                INPUT TRANSFORM:  Q:$$VAEDT^RORDD(799.6,$G(DA(1)))  S %DT="EX" D ^%DT S X=Y K:Y<1 X
                LAST EDITED:      NOV 01, 2005 
                DESCRIPTION:      YOU MUST NOT EDIT THIS FIELD IF IT IS PART OF A NATIONAL HISTORICAL DATA EXTRACTION DEFINITION! 
                                   
                                  This field stores the start date of an additional data extraction time frame for this data area.  
                                   
                                  If this field is empty, then the data is extracted only in the main time frame defined by the 
                                  top-level fields START DATE (.03) and END DATE (.04).  

                DELETE TEST:      1,0)= I $$VADEL^RORDD(799.6,$G(DA(1)))

                DELETE AUTHORITY: @
                WRITE AUTHORITY:  @
                NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

                CROSS-REFERENCE:  ^^TRIGGER^799.61^.03 
                                1)= X ^DD(799.61,.02,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^RORDATA(799.6,D0,1,D1,0)):^(0),1:"") S X=$P
                                (Y(1),U,3),X=X S DIU=X K Y S X=DIV N %I,%H,% D NOW^%DTC X ^DD(799.61,.02,1,1,1.4)

                                1.3)= K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(0)=X S Y(1)=$S($D(^RORDATA(799.6,D0,1,D1
                                ,0)):^(0),1:"") S X=$P(Y(1),U,3)'>0

                                1.4)= S DIH=$G(^RORDATA(799.6,DIV(0),1,DIV(1),0)),DIV=X S $P(^(0),U,3)=DIV,DIH=799.61,DIG=.03 D ^DI
                                CR

                                2)= Q
                                3)= Do not delete!
                                CREATE CONDITION)= END DATE'>0
                                CREATE VALUE)= TODAY
                                DELETE VALUE)= NO EFFECT
                                FIELD)= END DATE
                                If the END DATE field (.03) is empty, then this trigger populates it with the current date when the
                                package is installed.  



799.61,.03      END DATE             0;3 DATE

                INPUT TRANSFORM:Q:$$VAEDT^RORDD(799.6,$G(DA(1)))  S %DT="EX" D ^%DT S X=Y K:Y<1 X
                LAST EDITED:    NOV 01, 2005 
                DESCRIPTION:    YOU MUST NOT EDIT THIS FIELD IF IT IS PART OF A NATIONAL HISTORICAL DATA EXTRACTION DEFINITION! 
                                 
                                This field stores the end date of an additional data extraction time frame for this data area.  
                                 
                                If this field is empty, then the data is extracted only in the main time frame defined by the 
                                top-level fields START DATE (.03) and END DATE (.04).  

                DELETE TEST:    1,0)= I $$VADEL^RORDD(799.6,$G(DA(1)))

                DELETE AUTHORITY: @
                WRITE AUTHORITY:@
                NOTES:          XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER
                                TRIGGERED by the START DATE field of the DATA AREA sub-field of the ROR HISTORICAL DATA EXTRACTION 
                                File 




799.6,2       OUTPUT DIRECTORY       2;E1,240 FREE TEXT

              INPUT TRANSFORM:  K:$L(X)>240!($L(X)<1) X
              LAST EDITED:      JUL 22, 2005 
              HELP-PROMPT:      Enter a valid name of the output directory (1-240 characters). 
              DESCRIPTION:      A directory must be created within the file system of the host operating system (VMS, Windows, 
                                etc.). Text files containing historical data in the HL7 format will be created in this directory by
                                the data extraction tasks.  
                                 
                                The full name of the directory must be entered as a value of this field. For example, the value can 
                                look something like this: 
                                 
                                   VA2$:[OUTPUT] - VAX VMS 
                                   D:\Output\    - Windows, MS-DOS 
                                 
                                Because a file name will be concatenated to the directory name, the trailing slash in the Windows 
                                directory name is required.  
                                 
                                Do not forget to enable read/write access to this directory for M processes! 

              DELETE AUTHORITY: 
              GROUP:            MANUAL

799.6,3       REGISTRY NAME          3;0 Multiple #799.63

              LAST EDITED:      OCT 31, 2005 
              DESCRIPTION:      This multiple references the registries that the data extraction will be performed for and 
                                indicates the extraction status.  

              WRITE AUTHORITY:  @

              SECONDARY KEY:    A (#68)
              Uniqueness Index: B (#636)
                   File, Field: 1) REGISTRY NAME (799.63,.01)

              INDEXED BY:       REGISTRY NAME & COMPLETION DATE/TIME (ANC), REGISTRY NAME (B)

799.63,.01      REGISTRY NAME          0;1 FREE TEXT (Required) (Multiply asked) (Key field)

                INPUT TRANSFORM:Q:$$VAEDT^RORDD(799.6,$G(DA(1)))  K:$L(X)>30!($L(X)<3) X I $D(X) K:'$D(^ROR(798.1,"B",$E(X,1,30))) 
                                X
                LAST EDITED:    OCT 31, 2005 
                HELP-PROMPT:    Enter the registry name (3-30 characters). 
                DESCRIPTION:    YOU MUST NOT EDIT THIS FIELD IF IT IS PART OF A NATIONAL HISTORICAL DATA EXTRACTION DEFINITION! 
                                 
                                Enter a name of the registry exactly as it appears in the ROR REGISTRY PARAMETERS file (#798.1).  

                TECHNICAL DESCR:Names of the registries are used here instead of pointers because the KIDS pointer resolving
                                feature does not work for .01 fields.  

                EXECUTABLE HELP:I $G(X)="??" N D,DIC,DZ S DIC="^ROR(798.1,",DIC(0)="",D="B",DZ="??" D DQ^DICQ,EN^DDIOL("",,"!")
                DELETE TEST:    1,0)= I $$VADEL^RORDD(799.6,$G(DA(1)))

                DELETE AUTHORITY: @
                WRITE AUTHORITY:@
                GROUP:          DEFINITION
                NOTES:          XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

                FIELD INDEX:    B (#636)    REGULAR    IR    LOOKUP & SORTING
                   Unique for:  Key A (#68), File #799.63
                  Short Descr:  Uniqueness Index for Key 'A' of Subfile #799.63
                    Set Logic:  S ^RORDATA(799.6,DA(1),3,"B",X,DA)=""
                   Kill Logic:  K ^RORDATA(799.6,DA(1),3,"B",X,DA)
                   Whole Kill:  K ^RORDATA(799.6,DA(1),3,"B")
                         X(1):  REGISTRY NAME  (799.63,.01)  (Subscr 1)

                RECORD INDEXES: ANC (#635)

799.63,.02      COMPLETION DATE/TIME 0;2 DATE

                INPUT TRANSFORM:S %DT="ESTX" D ^%DT S X=Y K:Y<1 X
                LAST EDITED:    OCT 31, 2005 
                DESCRIPTION:    A valid date in this field indicates that the data extraction has been successfully completed for 
                                this registry. 
                                 
                                If the data must be re-extracted, clear this field and the nightly task will repeat the historical 
                                data extraction for this registry.  

                TECHNICAL DESCR:This field is populated by the $$CHECKMSG^ROR10 function after it confirms successful transmission
                                of the HL7 messages before the next nightly data extraction.  

                DELETE AUTHORITY: @
                WRITE AUTHORITY:@
                GROUP:          STATE
                RECORD INDEXES: ANC (#635)



799.6,4       TASK                   4;0 Multiple #799.64

              WRITE AUTHORITY:  @
              GROUP:            MANUAL

              SECONDARY KEY:    A (#69)
              Uniqueness Index: B (#638)
                   File, Field: 1) START RECORD IEN (799.64,.01)

              INDEXED BY:       START RECORD IEN & STATUS (ANC), START RECORD IEN (B)

799.64,.01      START RECORD IEN       0;1 NUMBER (Multiply asked) (Key field)

                INPUT TRANSFORM:  K:+X'=X!(X>999999999999)!(X<1)!(X?.E1"."10N.N) X
                LAST EDITED:      NOV 14, 2005 
                HELP-PROMPT:      Enter a patient's IEN (DFN). 
                DESCRIPTION:      All patients of the registries are distributed between the data extraction tasks. Each task 
                                  extracts the data of the patients whose DFNs are not less than the value of this field in the
                                  task record and are less than the value of the field in the next task record.  
                                                                                       
                                  The first task always has 1 as a value in this field (just in case).  
                                                                                       
                                  The last task extracts the data of all patients whose registry records have IENs not less than
                                  the value of this field.  
                                                                                       
                                  Usually, this field should not be edited. It is populated automatically when the task is created.  

                TECHNICAL DESCR:  The value of this field is not a real pointer to the ROR REGISTRY RECORD file. There can be no
                                  record in the local registry with an IEN stored in this field.  
                                   
                                  The historical data extraction task will start processing from the registry record with an IEN
                                  that is not less than the value of this field.  

                DELETE AUTHORITY: @
                WRITE AUTHORITY:  @
                FIELD INDEX:      B (#638)    REGULAR    IR    LOOKUP & SORTING
                     Unique for:  Key A (#69), File #799.64
                    Short Descr:  Uniqueness Index for Key 'A' of Subfile #799.64
                      Set Logic:  S ^RORDATA(799.6,DA(1),4,"B",X,DA)=""
                     Kill Logic:  K ^RORDATA(799.6,DA(1),4,"B",X,DA)
                     Whole Kill:  K ^RORDATA(799.6,DA(1),4,"B")
                           X(1):  START RECORD IEN  (799.64,.01)  (Subscr 1)

                RECORD INDEXES:   ANC (#637)

799.64,.02      TASK NUMBER            0;2 NUMBER

                INPUT TRANSFORM:  K:+X'=X!(X>9899999999)!(X<1)!(X?.E1"."1N.N) X
                LAST EDITED:      JUL 25, 2005 
                HELP-PROMPT:      Type a Number between 1 and 9899999999, 0 Decimal Digits. 
                DESCRIPTION:      This field contains the number of the Taskman task (scheduled or running) that does the data 
                                  extraction.  
                                   
                                  This field cannot be edited. It is updated automatically by the data extraction task.  

                DELETE AUTHORITY: @
                WRITE AUTHORITY:  @
                                  UNEDITABLE
                CROSS-REFERENCE:  799.64^T 
                                  1)= S ^RORDATA(799.6,DA(1),4,"T",$E(X,1,30),DA)=""
                                  2)= K ^RORDATA(799.6,DA(1),4,"T",$E(X,1,30),DA)
                                  3)= Do not delete!


799.64,.03      STATUS                 0;3 SET

                                  '0' FOR Unknown; 
                                  '1' FOR Active> Pending; 
                                  '2' FOR Active> Running; 
                                  '3' FOR Inactive> Finished; 
                                  '4' FOR Inactive> Available; 
                                  '5' FOR Inactive> Interrupted; 
                                  '100' FOR Inactive> Crashed; 
                                  '101' FOR Inactive> Errors; 
                                  '102' FOR Active> Suspended; 
                                  '103' FOR Active> Stopping; 
                LAST EDITED:      NOV 14, 2005 
                DESCRIPTION:
                                  The STATUS field stores the last known task status.  

                TECHNICAL DESCR:  This field is populated with the value returned by the $$STATUS^RORTSK02 function. It will
                                  reflect the last known status of the task even after the task is deleted by the Taskman and its
                                  record is deleted from the ROR TASK file (#798.8).  
                                   
                                  Please do not get value of this field directly; use the $$STATUS^RORHDTUT function instead.  

                DELETE AUTHORITY: @
                WRITE AUTHORITY:  @
                RECORD INDEXES:   ANC (#637)

799.64,.04      NEXT PATIENT IEN       0;4 NUMBER

                INPUT TRANSFORM:  K:+X'=X!(X>999999999999)!(X<1)!(X?.E1"."10N.N) X
                LAST EDITED:      JAN 22, 2006 
                HELP-PROMPT:      Enter the next patient IEN (1-999999999999, 9 Decimal Digits). 
                DESCRIPTION:      If the data extraction task is stopped, it finishes processing the current patient and stores the
                                  IEN of the patient that should be processed next as the value of this field.  
                                   
                                  When the task is restarted, it starts from the patient IEN stored in this field.  
                                   
                                  Usually, this field should not be edited. It is updated automatically by the data extraction
                                  task.  

                TECHNICAL DESCR:  The value of this field is not a real pointer to the ROR PATIENT file. There can be no record in
                                  the file with IEN stored in this field.  
                                   
                                  The restarted historical data extraction task will continue processing from the patient with an
                                  IEN that is not less than the value of this field.  

                DELETE AUTHORITY: @
                WRITE AUTHORITY:  @

799.64,.05      FILE NAME              0;5 FREE TEXT

                INPUT TRANSFORM:  K:$L(X)>50!($L(X)<1) X
                LAST EDITED:      JUL 22, 2005 
                HELP-PROMPT:      Answer must be 1-50 characters in length. 
                DESCRIPTION:      The output file name is stored in this field. This name is generated automatically when the task
                                  is created. The name has the following structure: 
                                   
                                     BASE-SSS-TT.HDT 
                                   
                                  where 'BASE' is the base part of the file name provided by the user during creation of the task 
                                  table 'SSS' is the site number (3 digits), and 'TT' is the sequential number of the task (2 
                                  digits).  
                                   
                                  If the task is restarted, the optional numeric modifier '##' (2 digits) can be added to the name 
                                  so that the already extracted data will not be overwritten: 
                                   
                                     BASE-SSS-TT-##.HDT 
                                   
                                  Usually, this field should not be edited. It is populated automatically when the task is created 
                                  or restarted.  

                DELETE AUTHORITY: @
                WRITE AUTHORITY:  @

799.64,1        ERROR                  1;0 POINTER Multiple #799.641

                DESCRIPTION:      This multiple contains a list of registry records that were processed with errors.  
                                                                   
                                  When the data extraction task is restarted, it tries to re-extract the data for these patients.  
                                  If it succeeds, it deletes the corresponding records from the list.  
                                                                   
                                  The records of the multiple have the same IENs as the corresponding registry records in the ROR 
                                  REGISTRY RECORD file (#798).  

                WRITE AUTHORITY:  @

799.641,.01       ERROR                  0;1 POINTER TO ROR PATIENT FILE (#798.4) (Multiply asked)

                  INPUT TRANSFORM:  S:$D(X) DINUM=X
                  LAST EDITED:      JAN 22, 2006 
                  DELETE AUTHORITY: @
                  WRITE AUTHORITY:  @
                  NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER

                  CROSS-REFERENCE:  799.641^B 
                                    1)= S ^RORDATA(799.6,DA(2),4,DA(1),1,"B",$E(X,1,30),DA)=""
                                    2)= K ^RORDATA(799.6,DA(2),4,DA(1),1,"B",$E(X,1,30),DA)






799.6,5       STATUS                  ;  COMPUTED

              MUMPS CODE:       S X=$$HDESTAT^RORDD01(+$G(D0))
              ALGORITHM:        S X=$$HDESTAT^RORDD01(+$G(D0))
              LAST EDITED:      NOV 14, 2005 
              DESCRIPTION:      This field indicates a generic status of the historical data extraction: 
                                 
                                  ""  Unknown/Undefined 
                                   0  Inactive 
                                   1  Pending/Active 
                                   2  Completed 

              GROUP:            STATE


      FILES POINTED TO                      FIELDS

ROR DATA AREA (#799.33)           DATA AREA:DATA AREA (#.01)

ROR PATIENT (#798.4)              ERROR:ERROR (#.01)


File #799.6

  Record Indexes:

  ADNAUTO (#632)    RECORD    REGULAR    IR    SORTING ONLY
      Short Descr:  Activation Date & Name for automatic backpulls.
      Description:  This index references parameters of those automatic historical data extractions (TYPE = "Auto (HL7 messages)")
                    that are active (ACTIVATION DATE > 0) but have not been completed yet (some records of the REGISTRY NAME
                    multiple have no value in the COMPLETION DATE/TIME field).  
        Set Logic:  S ^RORDATA(799.6,"ADNAUTO",X(1),$E(X(2),1,30),DA)=""
         Set Cond:  S X=(X(3)=1)&(X(4)>0)&($D(^RORDATA(799.6,DA,3,"ANC"))>1)
       Kill Logic:  K ^RORDATA(799.6,"ADNAUTO",X(1),$E(X(2),1,30),DA)
       Whole Kill:  K ^RORDATA(799.6,"ADNAUTO")
             X(1):  ACTIVATION DATE  (799.6,.07)  (Subscr 1)  (forwards)
             X(2):  NAME  (799.6,.01)  (Subscr 2)  (Len 30)  (forwards)
             X(3):  TYPE  (799.6,.02)  (forwards)
             X(4):  ACTIVATION DATE  (799.6,.07)  (forwards)

Subfile #799.63

  Record Indexes:

  ANC (#635)    RECORD    MUMPS    IR    SORTING ONLY
      Short Descr:  Not completed registries
        Set Logic:  D ANC7996^RORDD01(.DA,X(1),1)
         Set Cond:  S X=(X(2)'>0)
       Kill Logic:  D ANC7996^RORDD01(.DA,X(1),0)
       Whole Kill:  K ^RORDATA(799.6,DA(1),3,"ANC")
             X(1):  REGISTRY NAME  (799.63,.01)  (Subscr 1)  (Len 30)  (forwards)
             X(2):  COMPLETION DATE/TIME  (799.63,.02)  (forwards)

Subfile #799.64

  Record Indexes:

  ANC (#637)    RECORD    REGULAR    IR    SORTING ONLY
      Short Descr:  Not completed tasks
        Set Logic:  S ^RORDATA(799.6,DA(1),4,"ANC",X(1),DA)=""
         Set Cond:  S X=(X(2)'=3)
       Kill Logic:  K ^RORDATA(799.6,DA(1),4,"ANC",X(1),DA)
       Whole Kill:  K ^RORDATA(799.6,DA(1),4,"ANC")
             X(1):  START RECORD IEN  (799.64,.01)  (Subscr 1)  (forwards)
             X(2):  STATUS  (799.64,.03)  (forwards)


INPUT TEMPLATE(S):
RORHDT EDIT EXTRACTION        DEC 20, 2005@09:41  USER #0    
RORHDT EDIT NATIONAL EXTRACT  DEC 20, 2005@09:45  USER #0    

PRINT TEMPLATE(S):

SORT TEMPLATE(S):

FORM(S)/BLOCK(S):