Skip to content

Commit

Permalink
Make ADLChecker use BMM models
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterbos committed Feb 1, 2018
1 parent 5a1a96b commit 00cf74e
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
1 change: 1 addition & 0 deletions adlchecker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
archetypes/
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import net.sourceforge.argparse4j.inf.ArgumentParser;
import net.sourceforge.argparse4j.inf.ArgumentParserException;
import net.sourceforge.argparse4j.inf.Namespace;
import org.openehr.referencemodels.BuiltinReferenceModels;

import java.io.File;
import java.io.FileInputStream;
Expand Down Expand Up @@ -65,11 +66,8 @@ private static void validateArchetypes(List<String> directories, boolean printFl
e.printStackTrace();
}
}
ReferenceModels referenceModels = new ReferenceModels();
referenceModels.registerModel(ArchieRMInfoLookup.getInstance());
referenceModels.registerModel(com.nedap.archie.openehrtestrm.TestRMInfoLookup.getInstance());

repository.compile(referenceModels);
repository.compile(BuiltinReferenceModels.getMetaModels());

System.out.println("step 2: validations");

Expand Down
49 changes: 49 additions & 0 deletions adlchecker/testadl
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
archetype (adl_version=2.0.5; rm_release=1.0.2)
openEHR-EHR-SECTION.slot_parent.v1.0.0

language
original_language = <[ISO_639-1::en]>

description
original_author = <
["name"] = <"Thomas Beale">
["organisation"] = <"Ocean Informatics">
["email"] = <"[email protected]">
["date"] = <"14/03/2010">
>
details = <
["en"] = <
language = <[ISO_639-1::en]>
purpose = <"Test slot archetype for testing redefnitions and filling">
>
>
lifecycle_state = <"unmanaged">
other_details = <
["regression"] = <"PASS">
>

definition
SECTION[id1] matches { -- Slot section
items cardinality matches {1..*; unordered} matches {
allow_archetype OBSERVATION[id2] occurrences matches {0..1} matches { -- Vital signs
include
archetype_id/value matches {/openEHR-EHR-OBSERVATION\.redefine([a-zA-Z0-9_]+)*\.v1/}
exclude
archetype_id/value matches {/.*/}
}
}
}

terminology
term_definitions = <
["en"] = <
["id1"] = <
text = <"Slot section">
description = <"Slot section">
>
["id2"] = <
text = <"Vital signs">
description = <"Vital signs observations.">
>
>
>

0 comments on commit 00cf74e

Please sign in to comment.