Interpreting Attributes
You do not need to understand the components of an attribute's code in order to use it. 
A few notes of warning though, attributes are very particular beings and "any" change 
in their format may result in the attribute not working. Even the simple space serves a function 
and extra spaces will count against you :-). Another point to note is that an attribute 
may work well in one application and not at all in another (eg OE vs NUR). 

Note: If you copy and paste attributes from the MAP page sometimes the copy picks up invisible code. If an attribute doesn't initially work. Try typing it. 
 

Symbols: &=and,   !=or,    >greater than <less than
"" -nothing , 0-anything
Does not equal   '=     equal=
^symbol that appears as a right arrow in attributes (shift F6) used to assign a string 
or number to a variable
Position the cursor: R=row,S=column               P(R,S)^#,
Allow data entry using IFE                                 1 or ""
 Send to screen                                                   ^# 
Don't stop                                                             0
Update the screen                                              /[ANS%0,Queryname]^# 
DFT="NO"   -will load "NO" if nothing entered and return is pressed  (4.6)
Temporary fields,pulls from /file                       @t.fields
Temporary fields: 
ADM= ANS%0 
 NUR=/RESP (responses entered in Process Intervention screen 
 NUR=@NUR.PC.WORK.value(/NPCWF)-is used when editing in view history 
NUR=ANS  when in  the assessment routine 
 
Permanent fields pulls from disk                       @p.fields
Types of attribute statements
    IFE-tells the system that the query should only be asked if the condition specified has been met. The system reads IFE attributes before a response has been entered. 

    FCLn-(line checks) tell the system what is acceptable input. The system reads line checks after a response has been entered. You can have multiple line checks e.g. FCL1(response),FCL1A(message based on response) , FCL2,FCL2A.Line Checks 

    REQ,REQI-tells the system that the query is required (the user cannot pass by this query) when the specified conditions are met. 

NUR temporary indexes 
Nursing uses various indexes that do not have data definitions, 
therefore, attributes for Nursing are more difficult than for other 
attributes. Nursing uses different temporary indexes when saving 
responses to queries when documenting in Process Interventions, when 
editing queries in View History, and when filling out an Assessment in 
the Assessment routine. Therefore, we must make certain the value the 
attribute defines will be stored in all of these indexes
Source: Meditech Online Attribute Handout Located on the Meditech Home Page 

FAQ/Introduction To Attributes 
What are attributes? 
Attributes are statements telling the system under what conditions you 
want a query to be asked, and how it will be asked. 
Where are they used? 
Attributes are used by programmers in several places when they are 
programming in full NPR. Customers use them when they are entering or 
editing a Customer Defined Screen (CDS). As you add (or edit) a query on 
a CDS, there is a prompt asking you if you want to edit attributes. 
Answer "Y" and you will be brought into a text editor where you can 
enter attributes. Press <F12> to save the text. A check mark will appear 
to show that an attribute has been entered. 

What attributes can I use? 
There are three basic attributes: REQ/REQI, IFE and DFT. 
Attribute 
Description 
REQ REQI    Tells the system the query is required if the condition specified is true. 
- REQ requires the user to answer the prompt priorto filing. 
- REQI requires the user to answer the prompt immediately. 
 
IFE  Tells the system the query should only be asked if the condition 
specified is true. Otherwise, skip the query. 
 
DFT             Defaults a string as the answer to a query. 

Examples of REQ or REQI: 

Example 1 
REQ=@ADM.PAT.sex="F" 
Require the query if the patient's sex is F as stored in the Admissions module. 
Example 2 
REQI=(@ADM.PAT.age<5)!(@ADM.PAT.age>20) 
Require the query immediately if the patient's age is less than 5 or 
greater than 20 as stored in the Admissions module. 
Examples of IFE: 

Example 1 
IFE=[ANS,"OEPREG"]|0="Y" 
If the answer to query OEPREG is "Y" ask the query. Otherwise, skip the 
query. 

Example 2 
IFE=@ADM.PAT.status="ADM IN" 
If the patient is an inpatient as defined in the Admissions module ask 
the query. Otherwise, skip the query. 
Examples of DFT: 
DFT="Y" 
Default in the value of Y for the answer to the query. 
DFT=@.now 
Default in the current time. 

Standard Data Fields 
As a rule of thumb, you can only use standard data fields for the 
application you are in. If you do use another application's data fields, 
you will not get flagged with an error, but the attribute will not work. 
An exception is with any application that standardly keeps a prefix 
(like a window) open to the Admissions module, such as Order Entry or 
PCS, which can use Admissions standard data fields, but Admissions can 
not use Order Entry of PCS standard data fields. 

Why isn't my attribute working? 
There is an MIS problem that affects attributes. It sometimes happens 
when you reference a system variable such as @ADM.PAT.sex. If you ever 
use such a variable in an attribute and it does not work, try prefacing 
it with a "p" (for example, @p.ADM.PAT.sex). 

Attribute does not fit on one line 
These attributes are all legal MAGIC attribute syntax: 
REQI=(@ADM.PAT.age<5)!(@ADM. 
REQI=PAT.age>20) 
REQI=(@ADM.PAT.ag 
REQI=e<5)!(@ADM.P 
REQI=AT.age>20) 

Special Keywords 
Keyword                 Description 
@.response              the user's current response to the query 
@.response.old          the user's old response to this query (only if the 
user answered the query, went down to the next query, and then moved the 
cursor back to this query) 
@.appl          the application 
@.today                 today's date in internal format (for example,19980701) 
@.now           the current time        
@.user          the user's mnemonic 
@.db            the application database's mnemonic 
@.facility              the facility mnemonic