Contents: | Main | Chapter | See Also: | Getting Started Manual | Programmer Manual |
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?
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:
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