CDS Field Attributes

advertisement
CDS Field Attributes
CDS provides users the mean to collect additional patient information that they can not
do through standard screens. Field attributes provide users the mean to validate and
manipulate these data.
There are four basic types of field attributes :
1. DFT : Default Attribute.
Provide default value for the query
Syntax: DFT = [value]
2. REQ/REQI : Required Attribute
Determine if the response to a query is required
REQ (Required) and REQI (Required Immediately)
Syntax: REQ = [expression] or REQI = [expression]
3. IFE : Conditional Attribute
Defines a requirement that must be satisfied by previously-entered
data in another response field. If the previous response DOES NOT
satisfy the condition, the cursor skips the response field
Syntax: IFE = [expression]
4. FCLn/FCLnA : Field Check Attribute
Evaluates a response (FCLn) and initiates an action (FCLnA)
such as display an error message (n is an integer, represents
the number of field check)
Syntax: FCLn = [expression]
FCLnA = [expression]
Note :
Value = number | text
Expression = Value | Magic Code
Example #1:
1. Set default as “Y”
DFT = “Y”
2. Make the query required
REQ = “Y”
Or make QUERY_TWO required if the answer to QUERY_ONE is “Y”
Place the following REQ attribute on QUERY_TWO
REQ = [ANS,QUERY_ONE]|0=”Y”
3. Skip QUERY_TWO if the answer to QUERY_ONE is “N”
Place the following IFE attribute on QUERY_TWO
IFE = [ANS,QUERY_ONE]|0=”Y”
4. Check if response to QUERY_ONE is correct, else generate an
error message
FCL1 = @.response ‘= “XYZ”
FCL1A = @W.err(“Invalid response”)
Example #2:
We have two queries :
Query Mnemonic : QRY_1
Text : Do you take vitamin ?
Response : [Y/N]
Query Mnemonic : QRY_2
Text : What type ?
Response : [FREE TEXT]
We want :
1.
2.
3.
4.
5.
Default answer for QRY_1 is “Y”
Make QRY_1 a required field
Make QRY_2 a required field ONLY if the answer to QRY_1 is “Y”
Skip QRY_2 if the answer to QRY_1 is “N”
Valid responses to QRY_1 are “N”, “Y”, “n”, “y”. Anything else
should result in an error message
Solution :
1.
2.
3.
4.
5.
Place DFT = “Y” on QRY_1
Place REQ = “Y” (or REQI = “Y”) on QRY_1
Place REQ/REQI = [ANS,QRY_1]|0=”Y” on QRY_2
Place IFE = [ANS,QRY_1]|0=”Y” on QRY_2
Place FCL1 = (@.response ‘= “n”)&(@.response’=”N”)
&(@.response’=”y”)&(@.response’=”Y”)
FCL1A = @W.err(“Invalid response. Y or N only”)
Additional Information
Magic Code:
IF loop – Syntax IF{[expression A] [expression B] ; [expression C]}
If expression A is true then execute expression B, else execute
expression C
DO loop – Syntax DO{[expression A] [expression B]}
While expression A is true, execute expression B
Macro:
@W.err – Generate a message + beep sound
@W.return – Generate a message
Keyword:
@.response - User’s current response to the query
@.response.old - 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 (i.e 19990701)
@.now - Current time
@.user - User’s mnemonic
@.db - Application database’s mnemonic
@.facility - Facility mnemonic
Download