Difference between revisions of "Arden Syntax:Implementation Guide:Syntax Description"
Karstenf77 (talk | contribs) |
Karstenf77 (talk | contribs) (changed header) |
||
Line 1: | Line 1: | ||
− | + | == Fundamentals == | |
− | |||
− | |||
Medical knowledge in Arden Syntax is arranged within Medical Logic | Medical knowledge in Arden Syntax is arranged within Medical Logic | ||
Line 52: | Line 50: | ||
* Version | * Version | ||
− | + | == Language Concepts == | |
− | + | === Data Types === | |
The basic function of an MLM is to retrieve patient data, manipulate the data, come to some decision, and possibly perform an action. Data may come from various sources, such as a direct query to the patient database, a constant in the MLM, or the result of an operation on other data. | The basic function of an MLM is to retrieve patient data, manipulate the data, come to some decision, and possibly perform an action. Data may come from various sources, such as a direct query to the patient database, a constant in the MLM, or the result of an operation on other data. | ||
Line 61: | Line 59: | ||
Every data item consists of a value part, a primary time part (e.g: time of data retrieval) and the applicability. | Every data item consists of a value part, a primary time part (e.g: time of data retrieval) and the applicability. | ||
− | + | === Statements === | |
Structured slots in Arden Syntax are composed of a set of statements. Each statement specifies a logical constraint or an | Structured slots in Arden Syntax are composed of a set of statements. Each statement specifies a logical constraint or an | ||
action to be performed. In general, statements are carried out sequentially in the order that they appear. | action to be performed. In general, statements are carried out sequentially in the order that they appear. | ||
Line 83: | Line 81: | ||
* Trigger: evoke slot statements that define how an MLM may be triggered | * Trigger: evoke slot statements that define how an MLM may be triggered | ||
− | + | === Expressions === | |
Statements are composed of reserved words, special symbols, and expressions. Expressions may contain any of | Statements are composed of reserved words, special symbols, and expressions. Expressions may contain any of | ||
the following: | the following: | ||
Line 92: | Line 90: | ||
TODO: Special Case: Curly Brace expressions | TODO: Special Case: Curly Brace expressions | ||
− | + | === Operators === | |
Operators are used in expressions to manipulate data. They accept one or more arguments (data values) and | Operators are used in expressions to manipulate data. They accept one or more arguments (data values) and | ||
they produce a result (a new data value). | they produce a result (a new data value). |
Latest revision as of 21:33, 16 October 2013
Contents
Fundamentals
Medical knowledge in Arden Syntax is arranged within Medical Logic Modules (MLMs) where each MLM represents sufficient knowledge to make a single decision. Each such an MLM is well organized and structured into categories and slots with specific content.
maintenance: title: ;; mlmname: ;; arden: ;; version: ;; institution: ;; author: ;; specialist: ;; date: ;; validation: ;; library: purpose: ;; explanation: ;; keywords: ;; citations: ;; links: ;; knowledge: type: ;; data: ;; priority: ;; evoke: ;; logic: ;; action: ;; urgency: ;; resources: default: ;; language: ;; end:
An MLM is composed of slots grouped into 4 required categories: maintenance, library, knowledge, and resources. A category starts with its name followed immediately by a colon (e.g., maintenance:) and the categories must appear in the correct order. Within each category is a set of slots which also must appear in the correct order.
The maintenance category contains information unrelated to the MLM’s health knowledge and is used for MLM knowledge base maintenance and change control. The library category provides health personnel with explanatory information as well as links to relevant health literature related to the MLM’s health knowledge. The resources category specifies localized textual resources that can be used within the knowledge category. The knowledge category actually defines the MLM’s action, data access, and logic.
An MLM is identified by using the following 3 pieces of information:
- Name
- Institution
- Version
Language Concepts
Data Types
The basic function of an MLM is to retrieve patient data, manipulate the data, come to some decision, and possibly perform an action. Data may come from various sources, such as a direct query to the patient database, a constant in the MLM, or the result of an operation on other data. Available data types within the Arden Syntax are: Null, Boolean, Truth Value, Number, Time, Duration, String, List, Object and Fuzzy Sets. Every data item consists of a value part, a primary time part (e.g: time of data retrieval) and the applicability.
Statements
Structured slots in Arden Syntax are composed of a set of statements. Each statement specifies a logical constraint or an action to be performed. In general, statements are carried out sequentially in the order that they appear. All statements except for the last statement in a slot must end with a semicolon (;). Special statements are:
- Read statement: read data from external resources
- Event statement: assigns an institution-specific event definition to a variable
- Message statement: assigns an institution-specific message (for example, an alert) to a variable
- Destination statement: assigns an institution-specific destination to a variable
- Interface statement: assigns an institution-specific foreign function interface definition to a variable
- Assignment statement: places the value of an expression into a variable
- Write statement: sends a text or coded message to a destination
- Include statement: indicates an external MLM may be consulted for object, MLM, event, interface variable and resource definitions
- Conclude statement: ends execution in the logic slot
- Argument statement: access the passed arguments
- Return statement: returns a result back
- Loops: while and for loops
- If-then-else: permits conditional execution based upon the value of an expression
- Object statement: assigns object declaration to a variable
- Call statements (MLM, Event, Interface): permits an MLM to call other MLMs, Events or external interfaces
- Trigger: evoke slot statements that define how an MLM may be triggered
Expressions
Statements are composed of reserved words, special symbols, and expressions. Expressions may contain any of the following:
- Constant: data value that is explicitly represented
- Variable: a placeholder for a data value or special constructs (e.g. an event, MLM, message, or destination) and represents this value in any subsequent expressions. An assignment statement is used to assign a value to a variable
- Operator and Arguments
TODO: Special Case: Curly Brace expressions
Operators
Operators are used in expressions to manipulate data. They accept one or more arguments (data values) and they produce a result (a new data value).
- List operators
- Logical operators
- Comparison operators
- String operators
- Arithmetic operators
- Temporal operators
- Aggregation operators
- Time operators
- Object operators