ROR LIST PATIENTS (1785)    REMOTE PROCEDURE (8994)

Name Value
NAME ROR LIST PATIENTS
TAG PTLIST
ROUTINE RORRP019
RETURN VALUE TYPE GLOBAL ARRAY
AVAILABILITY RESTRICTED
WORD WRAP ON TRUE
VERSION 1
DESCRIPTION
The ROR LIST PATIENTS remote procedure returns either a list patients from
the PATIENT file (#2) or a list of registry patients who conform the
provided criteria.
INPUT PARAMETER
  • REGIEN
    PARAMETER TYPE:   LITERAL
    REQUIRED:   YES
    SEQUENCE NUMBER:   1
    DESCRIPTION:   
    The REGIEN parameter should contain a valid registry IEN (IEN of the
    registry parameters record in the ROR REGISTRY PARAMETERS file #798.1).
    
  • DATE
    PARAMETER TYPE:   LITERAL
    SEQUENCE NUMBER:   2
    DESCRIPTION:   
    Patients who were confirmed in the registry before the date defined by the
    DATE parameter will be skipped by the query (if the FLAGS parameter
    contains the 'C' flag).
    
  • PART
    PARAMETER TYPE:   LITERAL
    MAXIMUM DATA LENGTH:   30
    SEQUENCE NUMBER:   3
    DESCRIPTION:   
    The PART parameter defines the search pattern. It can contain last 4 
     
    If this parameter is a number preceded by the '`' then a list containing
    only the patient with this IEN is compiled.
    digits of the patient's SSN, the first letter of the patient's last name
    and last four digits of the SSN, the full SSN, the beginning of the
    patient name, or the '#' character followed by the coded SSN (11 digits
    and optional 'P' character).
                                          
    If the 'P' flag is defined (see the FLAGS parameter), the PART parameter
    should contain either the beginning of the patient name or an empty
    string.
    
  • FLAGS
    PARAMETER TYPE:   LITERAL
    SEQUENCE NUMBER:   4
    DESCRIPTION:   
    Flags that control the execution (can be combined):
     
      D  Ignore those patients who were added to the
         registry before the date defined by the DATE
         parameter.
     
      O  Return values of the optional fields
     
      P  Include only pending patients
     
      P  Include only pending patients
      
      2  Search in the PATIENT file. By default, the     
         ROR LOCAL REGISTRY and ROR PATIENT files are
         queried. This flag overrides the 'D' and 'P'
         flags.
     
      B  Backwards. Traverses the index in the opposite
         direction of normal traversal.
    
  • NUMBER
    PARAMETER TYPE:   LITERAL
    SEQUENCE NUMBER:   5
    DESCRIPTION:   
    Maximum number of entries to return. A value of "*" or no value in this 
    parameter designates all entries that conform the criteria.
    
  • FROM
    PARAMETER TYPE:   LITERAL
    SEQUENCE NUMBER:   6
    DESCRIPTION:   
    The index entry(s) from which to begin the list. Use the pieces of the
    Results[0] (starting from the second one) to continue the listing in the
    subsequent procedure calls.
     
    NOTE: The FROM value itself is not included in the
          resulting list.
     
    See description of the LIST^DIC for more details about the PART, NUMBER
    and FROM parameters.
    
RETURN PARAMETER DESCRIPTION
A negative value of the first "^"-piece of the Results[0] indicates that 
   Results[i]            Error Descriptor
  The Results array will contain something like this (see the Results[0]-
  not all records have been loaded):
 
  Results[0] = '2'
  Results[1] = '38^BARNEY,PURPLE^2450000^332456754^^M'
  Results[2] = 'O^3040729.151905^3^1^0^3041027^3041222^3040725^3040729
               ^PALO ALTO^HepC Ab test positive^^^CDE'
  Results[3] = '127^BROWNING,CHARLES^2671227^601122767P^^M'
  Results[4] = 'O^3030716.152528^3^1^0^3040929^3040929^3030921^^^ICD-9 
               codes in inpatient file^^^CDE'
                           ^01: Error code
  Results[1] = '1^TEST,A^2610400^107040061P^2931021.08^M'
  Results[2] = 'O^3021025.131352^1^1^0^^3030314'
  Results[3] = '2^TEST,B^2180000^222222222^2940719.135645^M'
  Results[4] = 'O^3021025.131414^1^0^0^^2940819^2940819.135645^^'
  Results[5] = '3^TEST,C^2340701^333333333^2981028.115324^M'
  Results[6] = 'O^3021025.131537^1^0^0^^2981128^2981128.115324^^'
                           ^02: Message
                           ^03: Place of the error
 
Otherwise, number of patients and the value of the FROM parameter for the
next procedure call are returned in the Results[0] and the subsequent
nodes of the Results array contain the patients.
  
  Results[0]            Result Descriptor
an error occurred during the execution of the remote procedure. In this 
                          ^01: Number of patients
                          ^02: Values that comprise the FROM parameter
                          ^nn: for the subsequent call of the procedure
 
  Results[i]            Patient
                          ^01: IEN (DFN)
                          ^02: Name
                          ^03: Date of Birth (FileMan)
                          ^04: SSN
                          ^05: Date of Death (FileMan)
case, the second piece of the Results[0] will contain number of the error
                          ^06: Sex (internal)
 
  Results[i+1]          Optional Fields (these nodes are created only
                        if the FLAGS parameter contains the 'O' flag)
                          ^01: "O" (letter O)
                          ^02: Date Entered (FileMan)
                          ^03: Status (internal)
                          ^04: Active (0/1)
                          ^05: Do not Send (0/1)
                          ^06: Data Acknowledged Until (FileMan)
descriptors returned in the subsequent nodes of the Results array:
                          ^07: Data Extracted Until (FileMan)
                          ^08: Date Selected (FileMan)
                          ^09: Date Confirmed (FileMan)
                          ^10: Location Selected
                          ^11: Selection Rule Description
                          ^12: reserved
                          ^13: reserved
                          ^14: Action Flags (see the description below)
 
                        The Status field can have the following values
   
                        (see description of the STATUS field of the
                        ROR REGISTRY RECORD file for more details):
                            0  Active
                            4  Pending
                            5  Deleted
 
                        The Action Flags field indicates the actions that
                        can be performed on the patient's record:
                            C  CDC form can be edited/printed
                            D  The record can be deleted
   Results[0]            Result Descriptor
                            E  The record can be edited
                            O  Read-only mode
 
Example #1 (search the PATIENT file):
 
  with RPCBroker do
    begin
      Param[0].Value := '2';      // Registry IEN
      Param[0].PType := literal;
      Param[1].Value := '';       // Date
                           ^01: The last error code
      Param[1].PType := literal;
      Param[2].Value := '3456';   // Last four digits of the SSN
      Param[2].PType := literal;
      Param[3].Value := '2';      // Flags
      Param[3].PType := literal;
      Call;
    end;
 
  The Results array will contain something like this:
 
                           ^02: Number of the error descriptors
  Results[0] = '1'
  Results[1] = '162^ATTENDING,PATIENT^3000617^321233456^^M'
 
Example 2 (query the registry):
 
  with RPCBroker do
    begin
      Param[0].Value := '2';      // Registry IEN
      Param[0].PType := literal;
      Param[1].Value := '';       // Date
    
      Param[1].PType := literal;
      Param[2].Value := 'B';      // Partial match
      Param[2].PType := literal;
      Param[3].Value := 'O';      // Flags
      Param[3].PType := literal;
      Param[4].Value := '3';      // Number
      Param[4].PType := literal;
      Call;
    end;