|Contents:||Main||Chapter||See Also:||Getting Started Manual||Programmer Manual|
You can make the editing process quicker, easier, and more accurate by "stuffing" field values, when appropriate. The amount of data that needs to be entered from the keyboard can be reduced by providing responses that can be verified by pressing the Enter/Return key or that are automatically put into the file.
You can require a particular field to default to a certain data value by answering the "EDIT WHICH FIELD:" prompt with the name of the field followed with two slashes ("//") and the default value.
For example, if you enter:
EDIT WHICH FIELD: SEX//MALE
In this example, every time you get to the SEX field prompt for an entry in which sex has not yet been recorded, MALE will be prompted as the default value of the SEX field.
VA FileMan offers a way to force a value to be inserted into the database, even if a different value is already on file (i.e., "stuff"). You simply use three slashes ("///") instead of two:
EDIT WHICH FIELD: SEX///MALE
No terminal dialogue occurs when such mandatory defaults are inserted.
If you want to force the value of SEX to be deleted, you would respond as follows:
EDIT WHICH FIELD: SEX///@
After entering the at-sign ("@"), you would see the message:
WARNING: THIS MEANS AUTOMATIC DELETION!!
The three-slash default's value must contain the external value of the field. The value is validated (using the INPUT transform) just as a user-supplied response is validated.
If you have programmer access, you can define a default that does not go through the INPUT transform by using four slashes ("////"). If you use this kind of default, you must show the internally stored value of the field.
For example, since SEX is a SET OF CODES DATA TYPE where "m" stands for MALE, you could define a four-slash stuff like this:
EDIT WHICH FIELD: SEX////m
An even more powerful kind of default is the variable default. In this mode, you specify, not a literal value like the word MALE, but rather a field name from which to calculate the default value for each entry being edited.
One example of the usefulness of this kind of default is a case where you are editing two fields that usually have the same value. Suppose that, for a set of patients, you want to enter a NEXT OF KIN field, followed by a BENEFICIARY field. Once you have typed a patient's NEXT OF KIN, you want to see that particular answer as the default value of BENEFICIARY.
The process would look like this:
INPUT TO WHAT FILE: PATIENT EDIT WHICH FIELD: ALL// NEXT OF KIN THEN EDIT FIELD: BENEFICIARY//NEXT OF KIN DO YOU MEAN 'NEXT OF KIN' AS A VARIABLE? YES// THEN EDIT FIELD: Select PATIENT NAME: BROWN,JOE NEXT OF KIN: MRS SARAH BROWN BENEFICIARY: MRS SARAH BROWN// Select PATIENT NAME: CAPLAN, IRVING NEXT OF KIN: MR BILL CAPLAN BENEFICIARY: MR BILL CAPLAN// MISS JULIE CAPLAN
Here, Mrs. Sarah Brown ends up as both the NEXT OF KIN and BENEFICIARY for Joe Brown, while Irving Caplan's NEXT OF KIN and BENEFICIARY are two distinct people.
A variable default value can be any computed expression -- such as LAST VISIT DATE+365 (see the "Computed Expressions" chapter).
The effect of stuffing values in a WORD-PROCESSING DATA TYPE field is similar to defaults for other fields: the default value becomes the first line of the WORD-PROCESSING text. Also, you can stuff many lines of text into a WORD-PROCESSING DATA TYPE by use of a computed expression that has a Multiline value (e.g., another WORD-PROCESSING-type field).
Alternatively, you can automatically append data to a WORD-PROCESSING DATA TYPE field by following the "//" or "///" with a "+" sign. This means add on the following text to whatever may already be on file. Let's take the example of our WORD-PROCESSING-type HISTORY field data in the PATIENT file:
EDIT WHICH FIELD: DIAGNOSIS EDIT WHICH DIAGNOSIS SUB-FIELD: HISTORY//+ This case is essentially normal
The text string following the "//+" is appended automatically to any HISTORY field text that already exists for the chosen patient and diagnosis. If no HISTORY field text existed, the string would become Line 1 of the HISTORY field text.
When editing the entry, you see the text with the addition and can edit it in the usual way. If you use three slashes ("///") instead of two, the addition is made, and you are not presented with the text to edit.
The Enter or Edit File Entries option allows you to loop through a group of entries, without having to select each entry individually. After choosing the fields to edit, enter the entire word ^LOOP in upper- or lowercase. Then, you can choose which entries to loop through by responding to the "EDIT ENTRIES BY:" and "START WITH ... GO TO" prompts. Answer these prompts in the same way that you respond to the "SORT BY:" and "START WITH ... GO TO" prompts in the Print File Entries option. (See the "Specifying SORT BY Fields" topic in the "Print: How to Print Reports from Files" chapter of the "VA FileMan Getting Started Manual" for details.)
In the example below, all entries would be looped through.
NOTE: You can enter a SORT template at the "EDIT ENTRIES BY:" prompt.
EDIT WHICH FIELD: NAME THEN EDIT FIELD: DATE OF BIRTH THEN EDIT FIELD: Select PATIENT NAME: ^LOOP EDIT ENTRIES BY: NAME// START WITH NAME: FIRST// ADAMS,JOHN NAME: ADAMS,JOHN// ADAMS,JACK DATE OF BIRTH: APR 1, 1923// BROWN,JOE NAME: BROWN,JOE// DATE OF BIRTH: FEB 27, 1939// JAN 27, 1939 :
This ^LOOP feature, in combination with the ///-stuff convention, makes it easy to load data values into newly created fields. Use caution with the automatic loading and automatic deleting features of VA FileMan, since these features loop through entries and make changes without stopping for verification.
For example, suppose we have a patient database to which a new field called FOLLOW-UP DATE has been added. We want to create values for this field for all patients who have LAST VISIT DATEs earlier than 1977 on file. For all such patients, we want FOLLOW-UP DATE set equal to JUNE 1, 1982. Use the Enter or Edit File Entries option as follows:
EDIT WHICH FIELD: FOLLOW-UP DATE///JUNE 1, 1982 THEN EDIT FIELD: Select PATIENT NAME: ^LOOP EDIT ENTRIES BY: NAME// LAST VISIT DATE START WITH LAST VISIT DATE: FIRST// 1900 GO TO LAST VISIT DATE: LAST// DEC 31, 1976 WITHIN LAST VISIT DATE, EDIT ENTRIES BY: ...HOLD ON, PLEASE... JONES,SAM SMITH,SALLY JOHNSON,BILL :
Now, without keyboard input, the system automatically loads the June 1, 1982 data value into each entry's new FOLLOW-UP DATE field while looping through LAST VISIT DATEs up to 1977.
Suppose you wanted to undo the work done in the previous example, that is, you want to delete all these FOLLOW-UP DATEs:
EDIT WHICH FIELD: FOLLOW-UP DATE/// @ WARNING-THIS MEANS AUTOMATIC DELETION! THEN EDIT FIELD: Select PATIENT NAME: ^LOOP EDIT ENTRIES BY: NAME// LAST VISIT DATE START WITH LAST VISIT DATE: FIRST// 1900 GO TO LAST VISIT DATE: LAST// 12 31 76 WITHIN LAST VISIT DATE, EDIT ENTRIES BY: ...JUST A MOMENT, PLEASE... JONES, SAM SMITH, SALLY :
Just as you can store complex output specification in a PRINT or a SORT template for later use, you can store a long list of edit fields in an INPUT template. If you answer the "EDIT WHICH FIELD:" prompt at least five different times, or if you answer it with a right bracket ("]"), you will be prompted for a template name. The following is an example:
Select OPTION: ENTER OR EDIT FILE ENTRIES INPUT TO WHAT FILE: PATIENT EDIT WHICH FIELD: ALL// NAME THEN EDIT FIELD: DATE OF BIRTH THEN EDIT FIELD: ] THEN EDIT FIELD: STORE THESE FIELDS IN TEMPLATE: UPDATE
UPDATE is the name of the template. You'll notice that brackets were not included.
When stored in a template, the input specifications can be easily recalled in the future without retyping them. The template name must be from 2 to 30 characters in length; do not begin the template name with a bracket. Any field numbers (with their defaults and other qualifications, if you have specified any) are stored. When you return to this option, you can edit the same fields again in the same way by answering the "EDIT WHICH FIELD:" prompt with the name of the template enclosed in brackets, (e.g., [UPDATE]).
When you return to use an INPUT template in this way, you will be asked if you wish to edit its field specifications. If you answer YES, you will first see the template name, which you can then edit. Entering an at-sign ("@") at the "NAME:" prompt will delete the entire INPUT template.
You can then edit the security codes for READ and WRITE access, and then the original answers to the "EDIT WHICH FIELD:" prompts.
If your previous answer is less than 20 characters, it is followed by two slashes ("//"), after which you can re-enter the line. Longer answers are followed by "Replace" and are edited with the "Replace With" syntax. Deleting with the at-sign ("@") works in either case.
NOTE: The "Replace With" syntax is described in the "Longer Default Responses and the "Replace With" Editor" topic in the "VA FileMan Prompts" chapter of the "VA FileMan Getting Started Manual."
To insert a new field ahead of the field being displayed, precede your line with an up-arrow ("^"). When you have finished, you can save your edited INPUT template under the same name (use <Spacebar><Return>) or a new one.
You can create a special INPUT template by entering the right bracket ("]") at the "EDIT WHICH FIELD: ALL//" prompt. This template will contain all the fields currently in the file and will update the template when new fields are added to the file.
EDIT WHICH FIELD: ALL// ] EDIT WHICH FIELD: ALL// STORE THESE FIELDS IN TEMPLATE: EVERY FIELD
Sometimes, you want to dynamically control editing based on the responses given for a particular entry or on other aspects of the editing session. By using a technique called branching, the designer of an INPUT template can make the presentation of certain fields conditional based on the values of other fields. You must have programmer access to set up branching. With programmer access, any executable M code can be put into an INPUT template.
You can branch either to a field prompt elsewhere in the template or to a predefined place holder. The place holder is identified by @n, where "n" is an integer (e.g., @1).
To branch within an INPUT template, you enter M code at one of the "EDIT FIELD:" prompts. You set the variable Y to the branch destination. Y can be given the value of a field label, a field number, or a place holder. If Y is set to zero and editing is being done at the top level of a file, the template is exited. If Y is set to zero and a Multiple is being edited, the Multiple is exited.
The variable X will contain the updated, internal value of the field edited at the previous prompt. Thus, you can check X to determine if you want to set Y to branch or not. For example, suppose you had a file called ADMISSIONS. Some of the fields are concerned only with the discharge of a patient. You want to branch around those fields, if the DATE OF DISCHARGE is empty in the database and no date is given in the current editing session. Your template could be defined like this:
Select OPTION: ENTER OR EDIT FILE ENTRIES INPUT TO WHAT FILE: ADMISSIONS EDIT WHICH FIELD: ALL// NAME THEN EDIT FIELD: DIAGNOSIS THEN EDIT FIELD: ADMITTING PHYSICIAN THEN EDIT FIELD: DATE OF DISCHARGE THEN EDIT FIELD: S:X="" Y="@1" THEN EDIT FIELD: DISCHARGING PHYSICIAN THEN EDIT FIELD: FOLLOW-UP DATE THEN EDIT FIELD: @1 THEN EDIT FIELD: BILLING METHOD THEN EDIT FIELD: STORE THESE FIELDS IN TEMPLATE: EDIT ADMISSION Are you adding 'EDIT ADMISSION' as a new INPUT TEMPLATE? Y (YES)
This template will branch around the discharge related questions, if the DATE OF DISCHARGE is null.
If you wanted to further enhance the template to ask for MEDICARE NUMBER only if BILLING METHOD is "M" (for Medicare), you could change the template like this:
INPUT TO WHAT FILE: ADMISSIONS// EDIT WHICH FIELD: ALL// [EDIT ADMISSION] (OCT 31, 1991@14:17) USER #2 FILE #16155 WANT TO EDIT 'EDIT ADMISSION' INPUT TEMPLATE? NO// Y (YES) NAME: EDIT ADMISSION// READ ACCESS: @// WRITE ACCESS: @// EDIT WHICH FIELD: .01// NAME THEN EDIT FIELD: 1// DIAGNOSIS THEN EDIT FIELD: 2// ADMITTING PHYSICIAN THEN EDIT FIELD: 3// DATE OF DISCHARGE THEN EDIT FIELD: S:X="" Y="@1"// THEN EDIT FIELD: 4// DISCHARGING PHYSICIAN THEN EDIT FIELD: 5// FOLLOW-UP DATE THEN EDIT FIELD: @1// THEN EDIT FIELD: 6// BILLING METHOD THEN EDIT FIELD: 7// S:X="M" Y="MEDICARE NUMBER" THEN EDIT FIELD: S Y=0 THEN EDIT FIELD: MEDICARE NUMBER THEN EDIT FIELD: STORE THESE FIELDS IN TEMPLATE: <Space> EDIT ADMISSION (OCT 31, 1991@14:17) USER #2 FILE #16155 EDIT ADMISSION TEMPLATE ALREADY EXISTS.... OK TO REPLACE? Y (YES)
After the BILLING METHOD field is edited, a test is made of its contents. It is a SET OF CODES DATA TYPE; thus, the test is for the letter "M" alone (the internal value of the field). If it is equal to "M", the template branches to the MEDICARE NUMBER field. If it is not equal to "M", the template proceeds to the next prompt where Y is set unconditionally to zero. The template is exited here so that the MEDICARE NUMBER prompt is not shown when it is not needed.
An editing session using this template to add a new admission might look like this:
Select ADMISSIONS NAME: KEETON,KAREN Are you adding 'KEETON,KAREN' as a new ADMISSIONS (the 4TH)? No// Y (Yes) DIAGNOSIS: MEASLES ADMITTING PHYSICIAN: MERCHANT,JEAN DATE OF DISCHARGE: BILLING METHOD: M MEDICARE MEDICARE NUMBER: 3093-0393
The discharge related questions were skipped, and the "MEDICARE NUMBER:" prompt was given. A future editing of this record upon patient discharge could look like this:
Select ADMISSIONS NAME: KEETON,KAREN ...OK? YES// (YES) NAME: KEETON,KAREN// ^DATE OF DISCHARGE DATE OF DISCHARGE: 5/9/90 (MAY 09, 1990) DISCHARGING PHYSICIAN: MERCHANT,JEAN FOLLOW-UP DATE: 6/1/90 (JUN 01, 1990) BILLING METHOD: MEDICARE// MEDICARE NUMBER: 3093-0393//
There is a potential hazard in using branching. In this example, suppose the BILLING METHOD were changed to "P" (for private insurance). The simple branching logic used would not show you the MEDICARE NUMBER field to edit or delete. You must ensure that your template can handle this kind of situation. In this example, if you have programmer access to do so, you might add M code to delete the MEDICARE NUMBER, if BILLING METHOD were not equal to "M".
When creating an INPUT template, there are several ways you can control the editing session to display customized prompts, to enable the duplication of data by pressing the Spacebar and the Enter/Return keys (<Space>), and to make a field required.
The following table summarizes the edit qualifiers you can use to accomplish these results. They are described in more detail in the next three sections. Enter these qualifiers in conjunction with fields at the "EDIT FIELD:" prompt.
|field;"xxx"||Replace the field's label with a literal string during an editing session (see "Forcing Special Prompts" below).|
|field;T||Replace a field's label with its title during an editing session (see "Forcing Special Prompts" below).|
|field;DUP||Save responses for later use with <Space> and allow their recall (see "Duplicating Input Values" below).|
|field;REQ||Require a response to a field that is usually not required (see "Forcing Required Input" below).|
You can combine specifiers as long as you separate them with semicolons (e.g., DATE OF BIRTH;T;REQ).
Normally, the standard label or name of a field is used to ask the user for the input value of that field. You can customize the prompt for a field by answering the "EDIT WHICH FIELD:" prompt with the label, followed by a semi-colon (";") and the desired prompt in quotation marks. Thus:
EDIT WHICH FIELD: DATE OF BIRTH;"DOB"
Causes the DATE OF BIRTH field to be presented in the form:
or in the form:
DOB: APR 1, 1923//
To use the field's title instead of its label as the input prompt, follow the field name (or number) with ;T. Thus, when editing the PATIENT file, you can enter:
EDIT WHICH FIELD: .01 NAME THEN EDIT FIELD: SSN;T THEN EDIT FIELD:
If you enter these specifications and if this field's title is defined as "Social Security Number," the user will encounter the "Social Security Number:" prompt instead of the "SSN:" prompt.
Sometimes many entries will need the same data value input for a particular field. If you follow a field label with ;DUP when selecting the field for editing, VA FileMan will use the data value that was just input for the prior entry, if you enter a single space character (<Spacebar><Return>) at the field prompt. For example:
EDIT WHICH FIELD: SEX;DUP
NOTE: If all entries have the same data value, you may instead want to use the ^LOOP facility described earlier in this chapter.
When creating an INPUT template, VA FileMan allows you to designate fields as required. Designating a field as required means that the user must enter data in that field. To do this, follow the field name with ;REQ. The required specification looks like this:
EDIT WHICH FIELD: NAME;REQ
Adding ;REQ does not permanently affect the definition of the field. It is only effective for the current input session or for the specific INPUT template. To permanently make a field mandatory, use the Modify File Attributes option.
Word wrapping is performed when a WORD-PROCESSING-type field is printed. Two functions occur as part of word wrapping during prints: lines are "filled" to the right margin and lines are "broken" only at word breaks.
If word wrap is on (a data dictionary setting for the WORD-PROCESSING-type field in question), you can override the word wrapping function and force a line to be printed as it appears in the editor by doing one of the following with the line:
Lines that contain only punctuation are always printed as is. Thus, if you put a single space on a line, the previous line will not be filled and the subsequent line will begin in column one.
NOTE: The editor's line numbers are meaningful only when editing. Since word processing data is usually printed in a wraparound mode, what is internally line three might be printed as lines five and six.
Tabs can be meaningful wherever they occur in a line.
NOTE: If you insert a tab by typing the special Tab key on the keyboard (or <Ctrl-I> on terminals without a Tab key), a |Tab| will be inserted in the text instead. When editing, a tab is recognized as |Tab|, not as five blank spaces.
Expressions framed by vertical bars ("| |") are known as word processing windows or frames, and are evaluated as computed expression at print-time and will be printed as evaluated. (MailMan does not typically evaluate expressions within vertical bars, neither does the Inquire to File Entries option or the CAPTIONED PRINT template.) For example, |TODAY+1| will print out tomorrow's date.
You can use word processing windows to insert one of the following into the text of a WORD-PROCESSING-type field when that WORD-PROCESSING-type field is printed:
The "Computed Expressions" chapter contains details of how to compose and use computed expressions.
The following is the list of recognized special text formatting functions that you can use within word-processing windows. Most of these functions can be used in other contexts -- for example, at the "PRINT FIELD:" prompt. See the "Computed Expressions" chapter for additional information about functions.
|Text Format Expression||Description|
||RIGHT-JUSTIFY|||Causes the text that follows it to be padded with spaces between words, so the right margin is even.|
||DOUBLE-SPACE|||Causes the text that follows it to be printed with blank lines inserted every other line.|
||SINGLE-SPACE|||Turns off double-spacing for the text that follows it.|
||TOP|||Causes a page break to occur at this point.|
||NOBLANKLINE|||If nothing will be printed on the line, this causes the line to be suppressed so that a blank line is not output. It is useful if the line contains only a computed expression that might evaluate to null.|
||PAGEFEED(arg)|||Causes page breaks to occur in the text that follows it, whenever fewer than arg number lines remain on the current page.|
||PAGESTART(arg)|||Causes the text on the following pages to begin at line # arg of the page.|
||SETPAGE(arg)|||Resets page numbering, so that the page number that follows it will be arg+1.|
||BLANK(arg)|||Causes arg number of blank lines to be inserted at this point in the text.|
||INDENT(arg)|||Causes the text that follows it to be indented arg number of spaces from the left margin.|
||SETTAB(arg1,arg2,arg3..)|||Sets tab positions for the text that follows it. In subsequent lines, the first |TAB| encountered will cause indentation to column position arg1 characters from the left margin. The second |TAB| encountered will cause indentation to column position arg2, and so on. If any SETTAB arg is negative, the text following the corresponding |TAB| will be right justified so that the rightmost column of that text will fall in the column number that is the absolute value of the SETTAB arg. If a SETTAB arg is the literal "C" (i.e., |SETTAB("C")|), the text following the corresponding tab setting will be centered.|
||CENTER(arg)|||Causes the arg to be centered.|
||TAB|||Causes the text to start printing at predetermined indents. The default column settings are 5,10,15,20,..., which can be reset with SETTAB. |TAB| at the end of a line causes that line to be printed as is (no word wrapping).|
||TAB n|||Overrides any SETTAB specification for the text that follows it and causes tabbing to the nth column over from the left margin. Output is right justified on the nth column, if "n" is negative. For example, the text following |TAB 12| will begin at column 12; the text following |TAB "C"| will be centered.|
||WIDTH(arg)|||Specifies that the text that follows it will always be
printed in a column arg characters wide. (Arg, in other words, is
the difference between the left margin position and the right margin position,
NOTE: In the absence of a WIDTH specification, the output column width is determined by the user (or defaulted by the system) at print time.
||NOWRAP|||Causes the text that follows it to be printed line-for-line (without wraparound). This eliminates the need to end each line with a tab or start the line with a space to force the line to be printed as it stands.|
||WRAP|||Causes the text that follows it to be printed in wraparound mode. This is the default setting.|
||UNDERLINE(arg)|||Causes the arg to be underlined.|
||_|||Starts underlining. Underlining continues until a second |_| is encountered. This only works on printers that underline.|
NOTE: In order to print a "|" character, you must enter it as "||". Likewise, to print "||" enter "||||".
Reviewed/Updated: March 4, 2007