VA FileMan V. 22.0 Getting Started HTML Manual Banner


 

Main Chapter Getting Started Manual Programmer Manual

Relational Navigation


Backward Extended Pointer

Simple extended pointers let you retrieve information from an entry in another file that the current entry explicitly points to through a POINTER TO A FILE field. What if you wanted to go the other way -- retrieve information from an entry in another file that points to (not from) the current entry?

Example of Simple Extended Pointers.

Suppose you've selected the PATIENT file and you want to list dates of radiology exams for certain patients. If the pointer is from the RADIOLOGY EXAM file to the PATIENT file (not the other way around), you can list the radiology exam dates using a Backward Extended Pointer.

In the file that contains the POINTER TO A FILE field, one of the following three conditions must be true:

  1. Either a New-Style or Traditional cross-reference on the field exists. If the POINTER TO A FILE field is in a subfile Multiple, the whole file must be cross-referenced. Compound cross-references may be used as long as the first subscript in the cross-reference is the pointer value with no transforms. The use of a compound cross-reference may result in "navigation" to only a subset of the pointing entries. Even though a record may have a valid POINTER TO A FILE field, unless all the other fields that make up subscripts on the compound index are also non-null, there won't be an entry in the index for that record.

  2. The .001 field of the file is the pointing field.

  3. The .01 field of the pointing file is the pointing field, and there is a "DINUM" condition on the field.

To use a Backward Extended Pointer, you must make a relational jump from the current file to the file in question (enter the name of the file pointing to the current file, followed by a colon). Once you make the relational jump to the backwards-pointer-linked file, specify which fields/elements to access in that file.

Returning to the situation mentioned above, within the RADIOLOGY EXAM file there is a field called EXAMINEE pointing back to our PATIENT file. That EXAMINEE pointer field is cross-referenced. You want to list the EXAM DATE field from the RADIOLOGY EXAM file entries that point back to a patient. From the PATIENT file, enter:

FIRST PRINT FIELD:  NAME;N;S1
THEN PRINT FIELD:  RADIOLOGY EXAM:      <-- Relational Jump!
   By 'RADIOLOGY EXAM', do you mean the RADIOLOGY EXAM File,
       pointing via its 'EXAMINEE' Field? YES//   (YES)
  THEN PRINT RADIOLOGY EXAM FIELD: EXAM DATE 
  THEN PRINT RADIOLOGY EXAM FIELD: 
THEN PRINT FIELD: 

As indicated by this example, you did not have to specify the EXAMINEE field. That field was identified because it is a field in the RADIOLOGY EXAM file that points back to the current file. Following is the output produced by these print specifications:

PATIENT LIST                          OCT  1,1996  15:12    PAGE 1

NAME                            EXAM DATE
-------------------------------------------------------------------

FRANKLIN,BEN                     DEC 22,1995
                                   
FRANKLIN,BENJAMIN,JR.
                              
MILLER,GORMAN                    1995
                                 1993
                              
SMITH,JOHN                       SEP 29,1995            
                                 JUN 22,1996

The resulting output is a two-column report containing names from the PATIENT file and corresponding examination dates from the RADIOLOGY EXAM file. Since there may be several RADIOLOGY EXAM file entries for a given patient, this report is an example of a Multiple-valued (Multiline) result being returned.

NOTE: For more information on Multiline results being returned, please refer to the "Multiline Return Values" topic in this chapter.

You can use Backwards Extended Pointers in the following places in VA FileMan:

 


Reviewed/Updated: March 4, 2007