Contents: | Main | Chapter | See Also: | Getting Started Manual | Programmer Manual |
There are seven types of Traditional cross-references and two types of New-Style cross-references available. Generally, a cross-reference in VA FileMan specifies that some action is performed when the field's value is entered, changed, or deleted. For several types of cross-references, the action consists of putting the value into a list -- an index used when looking up an entry or when sorting. The regular cross-reference is used for sorting and for lookup; you can limit it to sorting only. The KWIC, mnemonic, and SOUNDEX cross-references are also used for lookup.
You can sort a file on any field (except a WORD-PROCESSING-type field) whether or not a cross-reference exists for the field. However, sorting is done more quickly and efficiently if a regular cross-reference exists on the field.
When a file is created, a Traditional cross-reference on the NAME (#.01) field is automatically established. You can add or delete cross-references at any time using the Cross-Reference a Field or File option of the Utility Functions submenu. This option can also be used to enter a description of a cross-reference and to prevent the cross-reference from being deleted.
You can create a cross-reference on a Multiple field, a Multiple's subfields, or on any other field type except a WORD-PROCESSING-type field. For example, the PATIENT file contains the AGE AT ONSET subfield in the DIAGNOSIS Multiple. If you create a regular cross-reference for a field in a Multiple, you can choose in what context the cross-reference will be used. You might want to cross-reference the whole file by AGE AT ONSET (so that a report sorted by AGE AT ONSET could be produced efficiently). Alternately, you might want to cross-reference only an individual patient's diagnoses by onset age (so that a lookup of diagnosis could be done using AGE AT ONSET).
Cross-reference Type | Description |
REGULAR | The field value is sorted and stored in the cross-reference. The regular cross-reference is used for sorting. If you wish, it will be used when looking up entries also. The cross-reference that is automatically created on the NAME field (#.01 field) when a file is created is a regular cross-reference; this is the "B" cross-reference. |
KWIC | Key Word in Context -- each word of three or more
letters in the field value becomes a separate cross-reference. A space is
considered the primary word separator. For example, KING LEAR can be looked up
under either KING or LEAR. Uppercase or lowercase two letter words such as IN,
AN, OR, and IS are not considered key text. The words THE, AND, THEN,
FOR, FROM, OTHER, THAN, WITH, THEIR, SOME, and THIS (upper- or lowercase) are
not considered key text. Quotation marks are also not considered
key text.
You can also specify that KWIC separates words at most punctuation marks except quotation marks (e.g., KING-LEAR , KING/LEAR, etc., will be found with LEAR). A list of punctuation marks is presented for your selection. |
MNEMONIC | The field's values are cross-referenced along with the NAME (#.01) field cross-reference (so that, for example, the MAIDEN NAME field's values are found along with NAME values in any lookup). Typically, the cross-reference on the NAME field is searched first when doing a lookup. |
MUMPS | Those with programmer access can create special cross-references by putting M code into the SET and KILL logic of a cross-reference. You can use the M code entered to accomplish any task that must be done when the value in a field is entered, changed, or deleted. |
SOUNDEX | The field's value is transformed into a four-character string representing its phonetic properties. That string becomes the cross-reference. For example, soundex transformation would access GONZALEZ, GONZELES, Gonzales, and Gonsalless as equivalents; entry of any one of these forms looks up all the others automatically. |
TRIGGER | Whenever the field is updated, a different field can be automatically updated at the same time. See the "Trigger Cross-references" chapter of the "VA FileMan Programmer Manual" for more details. |
BULLETIN | Whenever a field is updated, a MailMan message is sent notifying specified users that an update has occurred. The Bulletin cross-reference is only available when VA FileMan is installed with MailMan. |
To edit a Traditional cross-reference, identify the field or subfield you wish to edit. VA FileMan will display the type of cross-references on the field and offer you the choices of Edit, Delete, or Create. Select Edit at this prompt and you will have the opportunity to edit or add a No Deletion message and to enter a description of the cross-reference.
Select OPTION: UTILITY FUNCTIONS Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE What type of cross-reference (Traditional or New)? Traditional// MODIFY WHAT FILE: TEST Select FIELD: .01 NAME CURRENT CROSS-REFERENCE IS REGULAR 'B' INDEX OF FILE Choose E (Edit)/D (Delete)/C (Create): E NO DELETION MESSAGE: NO, DON'T DELETE THIS X-REF!
This FREE TEXT message indicates that the cross-reference cannot be deleted. As long as a message is retained, the cross-reference cannot be deleted. The user will see this message whenever an attempt is made to delete the cross-reference.
DESCRIPTION: 1>Used for look-up on and sorting by name. 2>
The description appears in a standard DD listing.
NOTE: It is important to describe cross-references that are unusual or especially critical. Consider describing all MUMPS, trigger, and bulletin cross-references.
If you'd like to create a Traditional cross-reference for a field, proceed in the following manner:
Select OPTION: UTILITY FUNCTIONS Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE What type of cross-reference (Traditional or New)? Traditional// MODIFY WHAT FILE: TEST Select FIELD: 1 DATE NO CURRENT CROSS-REFERENCE WANT TO CREATE A NEW CROSS-REFERENCE FOR THIS FIELD? NO// YES CROSS-REFERENCE NUMBER: 1// Select TYPE OF INDEXING: REGULAR// WANT CROSS-REFERENCE TO BE USED FOR LOOKUP AS WELL AS FOR SORTING? YES// NO DELETION MESSAGE: DESCRIPTION: 1>Lookup and sorting can be done by date using this Regular 2>cross-reference. 3>
The following dialogue shows how to delete a Traditional cross-reference:
Select OPTION: UTILITY FUNCTIONS Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE What type of cross-reference (Traditional or New)? Traditional// MODIFY WHAT FILE: TEST Select FIELD: 1 DATE CURRENT CROSS-REFERENCE IS REGULAR 'C' INDEX OF FILE Choose E (Edit)/D (Delete)/C (Create): D Are you sure that you want to delete the CROSS-REFERENCE? NO// YES ...OK
Two types of New-Style cross-references are available: Regular and MUMPS. They are like their Traditional cross-reference counterparts, but New-Style cross-references offer some unique advantages:
^DIZ(1000,"C","DOE,JANE","A56789",14) = ^DIZ(1000,"C","SMITH,JOHN","D1234",5) =In order to create this kind of index with a Traditional cross-reference, you would have to create two MUMPS-type cross-references, one on the NAME field and one on the ID Number field. New-Style cross-references allow you to define this compound cross-reference once as a regular index that VA FileMan can use for lookup and sorting.
Array | Value in KILL Logic/KILL Condition | Value in SET Logic/SET Condition |
X(order#) | Old value | New value |
X1(order#) | Old value | Old value |
X2(order#) | New value | New value |
The variables X, X1, and X2 always equal X(1), X1(1), and X2(1), respectively.
If an order number in the cross-reference refers to the .01 field, X1(order#) is set to null when the SET logic and SET condition are executed during record creation. Similarly, X2(order#) is set to null when the KILL logic or condition are executed during record deletion.
To edit a New-Style cross-reference, identify the file or subfile you wish to edit. VA FileMan will display the cross-references on the file and offer you the choices of Edit, Delete, or Create:
Select OPTION: UTILITY FUNCTIONS Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE What type of cross-reference (Traditional or New)? Traditional// NEW MODIFY WHAT FILE: TEST Select Subfile: Current Indexes on file #16026: 75 'COMP' index 85 'XR202' index 106 'H' index 116 'AC' index 141 'C' index Choose E (Edit)/D (Delete)/C (Create): EDIT Which Index do you wish to edit? C
NOTE: The numbers displayed to the left of each cross-reference are the Internal Entry Number of the cross-reference stored in the INDEX file.
You will then be taken into a ScreenMan form where you can edit the properties of the New-Style cross-reference, as shown below:
NOTE: For additional help, enter a single question mark ("?") or two question marks ("??") at any prompt.
To create a New-Style cross-reference, proceed in the following manner:
Select OPTION: UTILITY FUNCTIONS Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE What type of cross-reference (Traditional or New)? Traditional// NEW MODIFY WHAT FILE: TEST Select Subfile: Current Indexes on file #16026: 75 'COMP' index 85 'XR202' index 106 'H' index 116 'AC' index 141 'C' index Choose E (Edit)/D (Delete)/C (Create): CREATE Want to create a new Index for this file? No// YES Type of index: REGULAR// Want index to be used for Lookup & Sorting or Sorting Only: LOOKUP & SORTING// Index Name: J//
NOTE: The numbers displayed to the left of each cross-reference are the Internal Entry Number of the cross-reference stored in the INDEX file.
You will then be taken into a ScreenMan form where you can edit the properties of the New-Style cross-reference, as shown below:
NOTE: For additional help, enter a single question mark ("?") or two question marks ("??") at any prompt.
The following dialogue shows you how to delete a New-Style cross-reference:
Select OPTION: UTILITY FUNCTIONS Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE What type of cross-reference (Traditional or New)? Traditional// NEW MODIFY WHAT FILE: TEST Select Subfile: Current Indexes on file #16026: 75 'COMP' index 85 'XR202' index 106 'H' index 116 'AC' index 141 'C' index Choose E (Edit)/D (Delete)/C (Create): DELETE Which Index do you wish to delete? 141 C Are you sure you want to delete the index definition? No// YES Index definition deleted. Do you want to delete the data in the old index now? YES// Removing old index ... DONE!
Reviewed/Updated: March 4, 2007