This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Difference between revisions of "Arden Syntax:Implementation Guide:Syntax Description"

From HL7Wiki
Jump to navigation Jump to search
(→‎Statements: added content)
(→‎Operators: added some content)
Line 87: Line 87:
  
 
==== Operators ====
 
==== 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

Revision as of 21:29, 16 October 2013


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.

GeneralMLM.png

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

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