# User Interface
Experienced Eclipse users should feel right at home with the ArdenSuite IDE, since project management, IDE preferences, and editor handling overall follows standard Eclipse behavior. We describe below those features that were added to the standard Eclipse IDE to support Arden Syntax MLM (medical logic module) development.
NOTE
To get started with MLM development, read our instruction manual How to compile, test, and deploy MLMs with the ArdenSuite - SIRS Notification as an Example for a practical guide on how to use the ArdenSuite IDE. Find more how-to instruction manuals as well as the files to accompany the manuals in our Learning Center.
The two main features you will find in the ArdenSuite IDE's user interface is
an option for compiling an .mlm
file that
you have written in Arden Syntax and after that debugging the
compiled MLM (.mlmobj.gz
file). Successfully compiled .mlmobj.gz
files can then be uploaded to the ArdenSuite Server.
Learn how to write Arden Syntax MLMs using the instruction manual referred to in the note above as well as the Arden Syntax specification. Our instruction manual shows the entire process using a specific clinical example (SIRS Notification)— thus you can also see by following this example how an MLM can be written in Arden Syntax.
# Navigation
In order to enable Arden Syntax MLM development, the following additions were made to the standard Eclipse platform's menus, toolbar, and context menus.
# Toolbar
The toolbar (1) includes two buttons. The orange button is used to
compile the currently active (open) MLM (.mlm
). The green button is
used to debug and test the currently active (open) compiled MLM
(.mlmobj.gz
). Use these buttons if the file you want to compile or
debug is currently open in the editor.
# Main Menu
The main menu (2) includes a new entry: ArdenSuite
. You can use the
Compile MLM
and Debug MLM
options the same way as the orange and
green buttons in the toolbar (that is to compile or debug files that are
currently open in the editor pane). Additionally, there is an option to
view and modify your ArdenSuite IDE license under View License
(View more information on license activation).
If you have purchased a license including the
ArdenML Transformer, there is an ArdenML Transformation
option
here where you can transform .mlm
files to .xml
(ArdenML). The ArdenML feature is meant to reduce the transformation time
from one format to the other. Generated files may still have to be
adapted to get valid syntax.
If you have purchased a license including the PMML Transformer,
there is a PMML Transformation
option here where your can transform .pmml
files
to .mlm
. Generated MLMs may still have to be adapted to get valid syntax.
# Project Explorer
MLMs may also be compiled by right-clicking on an .mlm
file in the
project explorer. A context menu (3) will appear where the menu item
Compile MLM
can be found. Click Compile MLM
to compile the currently
selected file.
MLMs may also be debugged and tested by right-clicking on an
.mlmobj.gz
file in the project explorer. A context menu (4) will
appear where the menu item Debug MLM
can be found. Click to open an
input dialog where you can specify the input arguments with which the
MLM will be executed
(Find more information on debugging/testing here.).
After successfully compiling an .mlm
file, the compiled MLM file will
appear in the project explorer next to the .mlm
file. The compiled MLM
has the extension .mlmobj.gz
and can then be debugged.
# Editor
Another way to compile an open .mlm
file is to right-click the active
MLM in the editor, opening a context menu (5) where the Compile MLM
command can be found.
# Syntax Highlighting
The ArdenSuite IDE highlights those parts of the source code which are reserved tokens according to the Arden Syntax specification.
We have, however, disabled the syntax highlighting in some slots where highlighting reserved tokens would not be helpful but rather bothersome (e.g., in free text slots like purpose
or explanation
). The syntax highlighting was disabled in the following slots (sorted by category):
# Maintenance
- Title
- MLMName
- Arden
- Version
- Institution
- Author
- Specialist
- Validation
# Library
- Purpose
- Explanation
- Keywords
- Citations
- Links (except the type of the link)
The ArdenSuite IDE also highlights incomplete or incorrect parts of the
code so the user can correct the mistake. Using the keyboard shortcut
CTRL + SPACE
a list of Arden Syntax autocomplete suggestions pop up.
These suggestions are valid for the current mouse cursor position.
Find the complete Arden Syntax specification including all reserved tokens here.
# Outline
The outline view allows to quickly navigate an open MLM (.mlm
).
Clicking any element in the outline view results into jumping to the
according MLM slot in the editor view. E.g., clicking on LOGIC in the
outline view will show the source code part containing the logic slot
and will put the cursor at the appropriate position in the editor.
# Debugging
Another feature of our ArdenSuite IDE
is the debug/test mode for compiled MLMs (.mlmobj.gz
). This allows to
execute compiled MLMs and to analyze them at runtime.
NOTE
In the ArdenSuite IDE, only debugging of a single MLM is supported. Any calls to other MLMs or external data sources yield a return value "NULL". A possible workaround is described below:
As a workaround in order to be able to test complex MLMs locally, you could simulate MLM calls by e.g., assigning the demo data you expect to retrieve to the respective variables. Likewise, you could provide demo data to simulate external data retrieval, as you can see in the following example:
// read patient data
PatientList := READ{fhir:};
// PatientList would be empty or an empty list in debug mode
// create demo data to be able to test the MLM
patient := object [id, name, age, address, phone];
singlePatient := new diagnosis with "1", "patient name", "18", "Street 1", "123456778";
PatientList := , singlePatient;
# Debug Mode
NOTE
The debug option of the IDE is not connected to a running instance of the ArdenSuite Server in any way and can be seen as a completely separate tool. Currently, it is not possible to debug the MLMs on the ArdenSuite Server via the IDE.
Selecting Debug MLM
(in any of the ways shown above) will open a
dialog, enabling the user to specify MLM input arguments in JSON format.
Clicking the debug
button (1) will execute the MLM and print debug
information to the console. If the MLM is executed successfully, the
return value will be printed at the bottom of the console. Here e.g.,
MLM returned: (Medication1, Medication2)
If an error has to be tracked down, the printed debug information may be helpful. Step-by-step, the process of running an MLM gets printed to the console. The output may seem complicated and little intuitive at first, but with a little bit of practice, a user will be able to conclude why an MLM is not running successfully or why the output is different than expected.
If an error occurs during the runtime of an MLM, the console output stops at the operation where the error occurs, since the engine will also stop processing the MLM at that point (thus the error should be easy to find, namely at the bottom of the console).
# Simple Debugging Example
Create a new Arden Syntax project (as shown in First Steps)
and compile the automatically created template.mlm
. Choose this
compiled MLM (.mlmobj.gz
file) and select Debug MLM
. The following
is sample JSON input that could be entered in the input field:
{
"type": "list",
"primaryTime": null,
"applicability": 1,
"values": [
{
"type": "string",
"primaryTime": null,
"applicability": 1,
"value": "Medication1"
},
{
"type": "string",
"primaryTime": null,
"applicability": 1,
"value": "Medication2"
}
]
}
See the screenshot above for the information that will be printed to the console. Here is an example on how to read this information:
start ASSIGNMENT
start ARGUMENT
end ARGUMENT := ("Medication1","Medication2") medexter.arden.lang.op.vc.statement.OpArgument
end ASSIGNMENT allValues
Explanation: The engine starts an assignment operation
(start Assignment
). Nested within this operation, an argument operator
is executed. In this case, a JSON string was used to pass the two string
parameters "Medication1"
and "Medication2"
to the MLM as input.
These two parameters are assigned to the variable named allValues
at
the end of the assignment operation—therefore the variable allValues
is effectively a list.
# Transformer
In order to support the integration of ArdenSuite components into the infrastructure of an existing institution, the ArdenSuite IDE provides transformers aiming to facilitate the transformation of knowledge that might be available in other formats into Arden Syntax MLMs (or the other way around).
# PMML Transformer
The predictive model markup language (PMML) is an XML-based predictive model interchange format used to describe and exchange predictive models produced by data mining and machine learning algorithms. At the moment, the ArdenSuite PMML Transformer supports TreeModels only and allows to transform a PMML XML into an Arden Syntax MLM.
To transform a PMML file, simply open it using the ArdenSuite
IDE, then go to Menu
-> ArdenSuite
-> PMML Transformation
. The
resulting .mlm
file is generated and stored in the same folder where
the original PMML file is stored.
Each MLM file contains one TreeModel, therefore, if a PMML has multiple TreeModels in one file, a MLM will be created for each TreeModel as well as one "starter" MLM.
NOTE
The modelName specified in the TreeModel element is used as file name for the resulting MLM file. If you transform multiple PMML files containing the same modelName in the same folder, already transformed MLM files (with the modelName as file name) will be replaced. This is also true for multiple TreeModels with the same modelName inside one PMML file. If you transform a PMML file containing a TreeModel without a specified modelName (as is allowed in PMML), the transformed MLM file will be named "unnamed.mlm".
Due to the scope of the PMML specification, there are still some unsupported PMML elements, which will be supported with later versions of this PMML transformer.
The following built-in functions are not supported inside the DataDictionary:
- exp, pow, threshold, floor, ceil
- equal, notEqual, lessThan, lessOrEqual, greaterThan, greaterOrEqual
- isNotIn
- normalCDF, stdNormalCDF, stdNormalPDF, erf, normalIDF, stdNormalIDF
- The Local Transformation "Aggregate" is not supported
- The PMML element Target is not fully supported
- The Outputfield feature Decision is not supported
- The function NormContinuous within the Output is not supported
- The missingValueStrategy aggregateNodes is not supported
NOTE
The PMML might not provide all the information needed to fill all required slots within the MLM. Make sure to add the required information before compiling the MLM.
# ArdenML Transformer
ArdenML is an XML representation of the Arden Syntax. The ArdenML
transformer allows to transform Arden Syntax to ArdenML format. To transform an MLM file, simply open it using the
ArdenSuite IDE, then go to Menu
-> ArdenSuite
-> ArdenML Transformation
. The
resulting .xml
file is generated and stored in the same
folder where the original MLM file is stored.
Due to the nature of XML files, not every Arden Syntax statement can be transformed to ArdenML (e.g., the it operator):
- Fuzzified by statements:
var := today fuzzified by 1 day
; - Arden version hast to be written with capital V: Version 2.9
- it operator does not work: e.g., read where it occurred minimum using it maximum using it earliest using it latest using it
- New Statement with Named Initializer
- time of identifier is transformed to identifier without time tag
Some statements are transformed in a certain way, even if the original Arden Syntax statement was different and could be represented in ArdenML, e.g.:
- AttributeFrom statements like:
medication_name := attribute dose_attributes[1] from dose;
are transformed tomedication_name := dose.attribute dose_attributes[1];
- Value with otype 'number' and time units (e.g., years) will always be transformed to otype duration
- EvokeTime - MondayAt 13:00:00 is transformed to EvokeTime - Value otype day of week
- list variables with a single element are transformed to a simple variable assignment
← Setup System Basics →