Difference between revisions of "Arden Syntax:Implementation Guide:MLM to MLM interaction"
Karstenf77 (talk | contribs) (added sample about importing MLMs) |
Karstenf77 (talk | contribs) |
||
Line 42: | Line 42: | ||
// include | // include | ||
include mlmImport; | include mlmImport; | ||
+ | |||
+ | In large knowledge bases it is often necessary to be able to use particular calculations or part of rules frequently. For this purpose the reusable parts of the rules can be stored in separate MLMs, which can then be accessed by all MLMs of the appropriate knowledge base. In addition, this increases the readability and maintainability of the knowledge base and allows the reuse of the outsourced parts in new knowledge bases. |
Revision as of 21:57, 14 November 2013
MLM to MLM interaction
The following examples will illustrate the interactions between MLMs: call other MLMs and import definitions from other MLMs. The first MLM contains nothing more than an object definition.
maintenance: title: showcase_spike_definition;; mlmname: showcase_spike_definition;; arden: Version 2.5;; version: 1.0;; institution: medexter;; author: Karsten Fehre;; specialist: ;; date: 2011-06-22;; validation: testing;; library: purpose: ;; explanation: ;; keywords: ;; citations: ;; links: ;; knowledge: type: data_driven;; data: guidResult := object [ // result object: result of guidline query compliance, // the compliance of the patient to this guidline eOfIntervention, // the "ease of intervention" text]; // the text ;; priority: ;; evoke: ;; logic: ;; action: ;; urgency: ;; end:
Using the following two lines in the data slot in an MLM will import the above object definition into this MLM and allows the usage of this object definition within this MLM. This will allow large knowledge bases to share common definitions across all involved MLMs.
// MLM mlmImport := mlm 'showcase_spike_definition' from institution "medexter"; // include include mlmImport;
In large knowledge bases it is often necessary to be able to use particular calculations or part of rules frequently. For this purpose the reusable parts of the rules can be stored in separate MLMs, which can then be accessed by all MLMs of the appropriate knowledge base. In addition, this increases the readability and maintainability of the knowledge base and allows the reuse of the outsourced parts in new knowledge bases.