open_ehr 0.6.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +10 -2
- data/Gemfile.lock +58 -18
- data/Guardfile +2 -1
- data/History.txt +10 -3
- data/Manifest.txt +3 -5
- data/README.rdoc +36 -32
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bin/adl_validator.rb +84 -0
- data/lib/open_ehr/am/archetype/constraint_model/primitive.rb +11 -7
- data/lib/open_ehr/am/archetype/constraint_model.rb +4 -16
- data/lib/open_ehr/am/archetype/ontology.rb +37 -6
- data/lib/open_ehr/am/archetype.rb +6 -7
- data/lib/open_ehr/am/open_ehr_profile/data_types/text.rb +5 -2
- data/lib/open_ehr/parser/adl.rb +19 -0
- data/lib/open_ehr/parser/adl_grammar.tt +155 -0
- data/lib/open_ehr/parser/adl_parser.rb +48 -0
- data/lib/open_ehr/parser/cadl_grammar.tt +803 -0
- data/lib/open_ehr/parser/dadl.rb +13 -0
- data/lib/open_ehr/parser/dadl_grammar.tt +358 -0
- data/lib/open_ehr/parser/exception.rb +68 -0
- data/lib/open_ehr/parser/scanner/adl_scanner.rb +819 -0
- data/lib/open_ehr/parser/shared_token_grammar.tt +1200 -0
- data/lib/open_ehr/parser/validator.rb +20 -0
- data/lib/open_ehr/parser.rb +16 -12
- data/lib/open_ehr.rb +1 -0
- data/open_ehr.gemspec +364 -0
- data/spec/lib/open_ehr/am/archetype/archetype_spec.rb +7 -2
- data/spec/lib/open_ehr/am/archetype/constraint_model/c_multiple_attribute_spec.rb +0 -6
- data/spec/lib/open_ehr/am/archetype/constraint_model/c_object_spec.rb +10 -10
- data/spec/lib/open_ehr/am/archetype/constraint_model/c_single_attribute_spec.rb +0 -6
- data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_boolean_spec.rb +5 -0
- data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_date_time_spec.rb +5 -0
- data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_duration_spec.rb +5 -0
- data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_integer_spec.rb +5 -0
- data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_primitive_spec.rb +8 -6
- data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_real_spec.rb +7 -2
- data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_string_spec.rb +5 -0
- data/spec/lib/open_ehr/am/archetype/constraint_model/primitive/c_time_spec.rb +5 -0
- data/spec/lib/open_ehr/am/archetype/ontology/archetype_ontology_spec.rb +27 -7
- data/spec/lib/open_ehr/am/archetype/ontology/archetype_term_spec.rb +3 -3
- data/spec/lib/open_ehr/parser/adl/adl-test-ENTRY.assumed_types.v1.adl +88 -0
- data/spec/lib/open_ehr/parser/adl/adl-test-ENTRY.basic_types.v1.adl +143 -0
- data/spec/lib/open_ehr/parser/adl/adl-test-ENTRY.basic_types_fail.v1.adl +50 -0
- data/spec/lib/open_ehr/parser/adl/adl-test-ENTRY.most_minimal.v1.adl +27 -0
- data/spec/lib/open_ehr/parser/adl/adl-test-ENTRY.structure_test1.v1.adl +46 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-ACTION.imaging.v1.adl +275 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-ACTION.referral.v1.adl +351 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.auscultation-chest.v1.adl +765 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.auscultation.v1.adl +217 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.dimensions-circumference.v1.adl +134 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.dimensions.v1.adl +241 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.exam-abdomen.v1.adl +321 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.exam-chest.v1.adl +379 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.exam-fetus.v1.adl +577 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.exam-generic-joint.v1.adl +146 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1.adl +176 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.exam-generic-mass.v1.adl +221 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.exam-generic.v1.adl +139 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl +116 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl +420 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-CLUSTER.exam-uterus.v1.adl +293 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-COMPOSITION.discharge.v1draft.adl +53 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-COMPOSITION.encounter.v1draft.adl +45 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-EVALUATION.adverse.v1.adl +411 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-INSTRUCTION.medication.v1.adl +88 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-INSTRUCTION.referral.v1.adl +84 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-ITEM_TREE.Laboratory_request.v1.adl +492 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-ITEM_TREE.follow_up.v1draft.adl +94 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-ITEM_TREE.imaging.v1.adl +127 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-ITEM_TREE.medication-formulation.v1.adl +457 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-ITEM_TREE.medication.v1.adl +869 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-ITEM_TREE.referral.v1.adl +494 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-OBSERVATION.apgar.v1.adl +545 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-OBSERVATION.blood_pressure.v1.adl +673 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-OBSERVATION.body_mass_index.v1.adl +166 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-SECTION.findings.v1.adl +47 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-SECTION.reason_for_encounter.v1.adl +51 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-SECTION.summary.v1.adl +52 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-SECTION.vital_signs.v1.adl +54 -0
- data/spec/lib/open_ehr/parser/adl/openEHR-EHR-cadl_sample.v1.adl +9 -0
- data/spec/lib/open_ehr/parser/adl_parser_spec.rb +210 -0
- data/spec/lib/open_ehr/parser/base_spec.rb +19 -0
- data/spec/spec.opts +2 -1
- data/spec/spec_helper.rb +3 -0
- metadata +166 -52
- data/doc/README_rdoc.html +0 -148
- data/doc/created.rid +0 -2
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +0 -54
- data/doc/js/darkfish.js +0 -116
- data/doc/js/jquery.js +0 -32
- data/doc/js/quicksearch.js +0 -114
- data/doc/js/thickbox-compressed.js +0 -10
- data/doc/rdoc.css +0 -706
- data/lib/#open_ehr.rb# +0 -11
|
@@ -6,6 +6,7 @@ describe CString do
|
|
|
6
6
|
before(:each) do
|
|
7
7
|
@default_value = DvText.new(:value => 'default')
|
|
8
8
|
@c_string = CString.new(:default_value => @default_value,
|
|
9
|
+
:type => 'Boolean',
|
|
9
10
|
:assumed_value => 'assumed',
|
|
10
11
|
:pattern => 't[a-z]st')
|
|
11
12
|
end
|
|
@@ -14,6 +15,10 @@ describe CString do
|
|
|
14
15
|
@c_string.should be_an_instance_of CString
|
|
15
16
|
end
|
|
16
17
|
|
|
18
|
+
it 'type is DvText' do
|
|
19
|
+
@c_string.type.should == 'Boolean'
|
|
20
|
+
end
|
|
21
|
+
|
|
17
22
|
it 'default should be assigned properly' do
|
|
18
23
|
@c_string.default_value.value.should == 'default'
|
|
19
24
|
end
|
|
@@ -11,6 +11,7 @@ describe CTime do
|
|
|
11
11
|
:upper => ISO8601Time.new('23:55:59'))
|
|
12
12
|
@c_time = CTime.new(:default_value => default_value,
|
|
13
13
|
:assumed_value => assumed_value,
|
|
14
|
+
:type => 'Boolean',
|
|
14
15
|
:range => range,
|
|
15
16
|
:minute_validity => ValidityKind::MANDATORY,
|
|
16
17
|
:second_validity => ValidityKind::OPTIONAL,
|
|
@@ -21,6 +22,10 @@ describe CTime do
|
|
|
21
22
|
@c_time.should be_an_instance_of CTime
|
|
22
23
|
end
|
|
23
24
|
|
|
25
|
+
it 'type is DvTime' do
|
|
26
|
+
@c_time.type.should == 'Boolean'
|
|
27
|
+
end
|
|
28
|
+
|
|
24
29
|
it 'minute_validity should be assigned' do
|
|
25
30
|
@c_time.minute_validity.should be_equal ValidityKind::MANDATORY
|
|
26
31
|
end
|
|
@@ -4,12 +4,12 @@ include OpenEHR::RM::DataTypes::Text
|
|
|
4
4
|
|
|
5
5
|
describe ArchetypeOntology do
|
|
6
6
|
before(:each) do
|
|
7
|
-
items = {
|
|
7
|
+
items = {:text => 'Archetype Concept', :desc => 'concept description'}
|
|
8
8
|
term1 = ArchetypeTerm.new(:code => 'at0000', :items => items)
|
|
9
|
-
items = {
|
|
9
|
+
items = {:text => 'Blood pressure'}
|
|
10
10
|
term2 = ArchetypeTerm.new(:code => 'at0001', :items => items)
|
|
11
|
-
term_definitions = {'ja' => [term1, term2]}
|
|
12
|
-
items = {
|
|
11
|
+
term_definitions = {'ja' => [term1, term2], 'en' => [term1]}
|
|
12
|
+
items = {:text => 'test', :description => 'test item'}
|
|
13
13
|
term3 = ArchetypeTerm.new(:code => 'ac0000', :items => items)
|
|
14
14
|
constraint_definitions = {'ja' => [term3]}
|
|
15
15
|
code_phrase = stub(CodePhrase, :code_string => '163020007')
|
|
@@ -30,8 +30,8 @@ describe ArchetypeOntology do
|
|
|
30
30
|
@archetype_ontology.specialisation_depth.should be_equal 0
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
it '
|
|
34
|
-
@archetype_ontology.
|
|
33
|
+
it 'term_definition should be assigned properly' do
|
|
34
|
+
@archetype_ontology.term_definition(:lang => 'ja', :code => 'at0000')[:text].should == 'Archetype Concept'
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
it 'term_codes should returnd all at codes' do
|
|
@@ -39,7 +39,7 @@ describe ArchetypeOntology do
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
it 'constraint_definitions should be assigned properly' do
|
|
42
|
-
@archetype_ontology.
|
|
42
|
+
@archetype_ontology.constraint_definition(:lang => 'ja', :code => 'ac0000')[:text].
|
|
43
43
|
should == 'test'
|
|
44
44
|
end
|
|
45
45
|
|
|
@@ -55,5 +55,25 @@ describe ArchetypeOntology do
|
|
|
55
55
|
it 'terminologies_available should return available terminology' do
|
|
56
56
|
@archetype_ontology.terminologies_available.should == ['SNOMED-CT(2003)']
|
|
57
57
|
end
|
|
58
|
+
|
|
59
|
+
it 'has language ja' do
|
|
60
|
+
@archetype_ontology.should have_language 'ja'
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
it 'has language en' do
|
|
64
|
+
@archetype_ontology.should have_language 'en'
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
it 'does not have language es' do
|
|
68
|
+
@archetype_ontology.should_not have_language 'es'
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
it 'has terminology SNOMED-CT(2003)' do
|
|
72
|
+
@archetype_ontology.should have_terminology 'SNOMED-CT(2003)'
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
it 'does not have MHLW code' do
|
|
76
|
+
@archetype_ontology.should_not have_terminology 'MHLW'
|
|
77
|
+
end
|
|
58
78
|
end
|
|
59
79
|
|
|
@@ -3,7 +3,7 @@ include OpenEHR::AM::Archetype::Ontology
|
|
|
3
3
|
|
|
4
4
|
describe ArchetypeTerm do
|
|
5
5
|
before(:each) do
|
|
6
|
-
items = {
|
|
6
|
+
items = {:text => 'text', :desc => 'description'}
|
|
7
7
|
@archetype_term = ArchetypeTerm.new(:code => 'at0001',
|
|
8
8
|
:items => items)
|
|
9
9
|
end
|
|
@@ -29,11 +29,11 @@ describe ArchetypeTerm do
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
it 'items should be assigned properly' do
|
|
32
|
-
@archetype_term.items[
|
|
32
|
+
@archetype_term.items[:text].should == 'text'
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
it 'keys should be a set of keys of item' do
|
|
36
|
-
@archetype_term.keys.should == Set[
|
|
36
|
+
@archetype_term.keys.should == Set[:text, :desc]
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
it 'keys should be empty if items are nil' do
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
archetype (adl_version=1.4)
|
|
2
|
+
adl-test-ENTRY.assumed_types.v1
|
|
3
|
+
|
|
4
|
+
concept
|
|
5
|
+
[at0000] -- test entry
|
|
6
|
+
language
|
|
7
|
+
original_language = <[ISO_639-1::en]>
|
|
8
|
+
description
|
|
9
|
+
original_author = <
|
|
10
|
+
["name"] = <"Thomas Beale">
|
|
11
|
+
>
|
|
12
|
+
details = <
|
|
13
|
+
["en"] = <
|
|
14
|
+
language = <[ISO_639-1::en]>
|
|
15
|
+
purpose = <"test assumed types">
|
|
16
|
+
keywords = <"ADL", "assumed types", "test">
|
|
17
|
+
copyright = <"copyright (c) 2004 The openEHR Foundation">
|
|
18
|
+
>
|
|
19
|
+
>
|
|
20
|
+
lifecycle_state = <"draft">
|
|
21
|
+
|
|
22
|
+
definition
|
|
23
|
+
ENTRY[at0000] matches { -- test entry
|
|
24
|
+
string_attr1 matches {"something", "something else"; "something else"}
|
|
25
|
+
string_attr2 matches {/this|that|something else/; "this"}
|
|
26
|
+
string_attr3 matches {/cardio.*/; "cardiology examination"}
|
|
27
|
+
boolean_attr1 matches {True}
|
|
28
|
+
boolean_attr2 matches {False}
|
|
29
|
+
boolean_attr3 matches {True, False; True}
|
|
30
|
+
integer_attr1 matches {|55|}
|
|
31
|
+
integer_attr2 matches {10, 20, 30; 10}
|
|
32
|
+
integer_attr3 matches {|0..100|; 10}
|
|
33
|
+
integer_attr4 matches {|>10|; 11}
|
|
34
|
+
integer_attr5 matches {|<10|; 9}
|
|
35
|
+
integer_attr6 matches {|>=10|; 10}
|
|
36
|
+
integer_attr7 matches {|<=10|; 5}
|
|
37
|
+
integer_attr8 matches {|-10..-5|; -8}
|
|
38
|
+
integer_attr9 matches {|10|}
|
|
39
|
+
real_attr1 matches {|100.0|}
|
|
40
|
+
real_attr2 matches {10.0, 20.0, 30.0; 20.0}
|
|
41
|
+
real_attr3 matches {|0.0..100.0|; 20.4}
|
|
42
|
+
real_attr4 matches {|>=10.0|; 20.0}
|
|
43
|
+
real_attr5 matches {|<=10.0|; 9.5}
|
|
44
|
+
real_attr6 matches {|>=10.0|; 20.3}
|
|
45
|
+
real_attr7 matches {|<=10.0|; 8.0}
|
|
46
|
+
real_attr8 matches {|-10.0..-5.0|; -9.8}
|
|
47
|
+
real_attr9 matches {|10.0|}
|
|
48
|
+
date_attr1 matches {yyyy-mm-dd; 1995-03-17}
|
|
49
|
+
date_attr2 matches {yyyy-??-??; 1995-03-17}
|
|
50
|
+
date_attr3 matches {yyyy-mm-??; 1995-03-17}
|
|
51
|
+
date_attr4 matches {yyyy-??-XX; 1995-03}
|
|
52
|
+
date_attr5 matches {|1983-12-25|}
|
|
53
|
+
date_attr6 matches {|2000-01-01|}
|
|
54
|
+
time_attr1 matches {hh:mm:ss; 12:01:30}
|
|
55
|
+
time_attr2 matches {hh:mm:XX; 12:01}
|
|
56
|
+
time_attr3 matches {hh:??:XX; 12:00}
|
|
57
|
+
time_attr4 matches {hh:??:??; 12:00}
|
|
58
|
+
time_attr5 matches {|22:00:05,0|}
|
|
59
|
+
time_attr6 matches {|00:00:59,0|}
|
|
60
|
+
time_attr7 matches {|00:00:59,0|}
|
|
61
|
+
date_time_attr1 matches {yyyy-mm-ddThh:mm:ss; 1995-03-17T12:01:30}
|
|
62
|
+
date_time_attr2 matches {yyyy-mm-ddThh:mm:??; 1995-03-17T12:01}
|
|
63
|
+
date_time_attr3 matches {yyyy-mm-ddThh:mm:XX; 1995-03-17T12:01}
|
|
64
|
+
date_time_attr4 matches {yyyy-mm-ddThh:??:XX; 1995-03-17T12:01}
|
|
65
|
+
date_time_attr5 matches {yyyy-??-??T??:??:??; 1995-03-17T12:01}
|
|
66
|
+
date_time_attr6 matches {|1983-12-25T22:00:05,0|}
|
|
67
|
+
date_time_attr7 matches {|2000-01-01T00:00:59,0|}
|
|
68
|
+
date_time_attr8 matches {|2000-01-01T00:00:59,0|}
|
|
69
|
+
duration_attr1 matches {|PT0S|}
|
|
70
|
+
duration_attr2 matches {|P1D|}
|
|
71
|
+
duration_attr3 matches {|PT2H5M|}
|
|
72
|
+
duration_attr4 matches {|PT1H55M|}
|
|
73
|
+
duration_attr5 matches {|<=PT1H|; PT30M}
|
|
74
|
+
duration_attr6 matches {|PT1H30M|}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
ontology
|
|
78
|
+
terminologies_available = <"adl_test", ...>
|
|
79
|
+
term_definitions = <
|
|
80
|
+
["en"] = <
|
|
81
|
+
items = <
|
|
82
|
+
["at0000"] = <
|
|
83
|
+
description = <"test entry">
|
|
84
|
+
text = <"test entry">
|
|
85
|
+
>
|
|
86
|
+
>
|
|
87
|
+
>
|
|
88
|
+
>
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
archetype (adl_version=1.4)
|
|
2
|
+
adl-test-ENTRY.basic_types.v1
|
|
3
|
+
|
|
4
|
+
concept
|
|
5
|
+
[at0000] -- test entry
|
|
6
|
+
language
|
|
7
|
+
original_language = <[ISO_639-1::en]>
|
|
8
|
+
description
|
|
9
|
+
original_author = <
|
|
10
|
+
["name"] = <"Thomas Beale">
|
|
11
|
+
>
|
|
12
|
+
details = <
|
|
13
|
+
["en"] = <
|
|
14
|
+
language = <[ISO_639-1::en]>
|
|
15
|
+
purpose = <"test structure">
|
|
16
|
+
keywords = <"ADL", "test">
|
|
17
|
+
copyright = <"copyright (c) 2004 The openEHR Foundation">
|
|
18
|
+
>
|
|
19
|
+
>
|
|
20
|
+
lifecycle_state = <"draft">
|
|
21
|
+
|
|
22
|
+
definition
|
|
23
|
+
ENTRY[at0000] matches { -- test entry
|
|
24
|
+
string_attr1 matches {"something"}
|
|
25
|
+
string_attr2 matches {/this|that|something else/}
|
|
26
|
+
string_attr3 matches {/cardio.*/}
|
|
27
|
+
string_attr4 matches {*}
|
|
28
|
+
string_attr5 matches {"and", "something", "else"}
|
|
29
|
+
boolean_attr1 matches {True}
|
|
30
|
+
boolean_attr2 matches {False}
|
|
31
|
+
boolean_attr3 matches {True, False}
|
|
32
|
+
boolean_attr4 matches {*}
|
|
33
|
+
integer_attr1 matches {|55|}
|
|
34
|
+
integer_attr2 matches {10, 20, 30}
|
|
35
|
+
integer_attr3 matches {|0..100|}
|
|
36
|
+
integer_attr3a matches {|>0..100|}
|
|
37
|
+
integer_attr3b matches {|0..<100|}
|
|
38
|
+
integer_attr3c matches {|>0..<100|}
|
|
39
|
+
integer_attr4 matches {|>10|}
|
|
40
|
+
integer_attr5 matches {|<10|}
|
|
41
|
+
integer_attr6 matches {|>=10|}
|
|
42
|
+
integer_attr7 matches {|<=10|}
|
|
43
|
+
integer_attr8 matches {|-10..-5|}
|
|
44
|
+
integer_attr9 matches {|10|}
|
|
45
|
+
integer_attr10 matches {*}
|
|
46
|
+
real_attr1 matches {|100.0|}
|
|
47
|
+
real_attr2 matches {10.0, 20.0, 30.0}
|
|
48
|
+
real_attr3 matches {|0.0..100.0|}
|
|
49
|
+
real_attr3a matches {|>0.0..100.0|}
|
|
50
|
+
real_attr3b matches {|0.0..<100.0|}
|
|
51
|
+
real_attr3c matches {|>0.0..<100.0|}
|
|
52
|
+
real_attr4 matches {|>=10.0|}
|
|
53
|
+
real_attr5 matches {|<=10.0|}
|
|
54
|
+
real_attr6 matches {|>=10.0|}
|
|
55
|
+
real_attr7 matches {|<=10.0|}
|
|
56
|
+
real_attr8 matches {|-10.0..-5.0|}
|
|
57
|
+
real_attr9 matches {|10.0|}
|
|
58
|
+
real_attr10 matches {*}
|
|
59
|
+
date_attr1 matches {yyyy-mm-dd}
|
|
60
|
+
date_attr2 matches {yyyy-??-??}
|
|
61
|
+
date_attr3 matches {yyyy-mm-??}
|
|
62
|
+
date_attr4 matches {yyyy-??-XX}
|
|
63
|
+
date_attr5 matches {|1983-12-25|}
|
|
64
|
+
date_attr6 matches {|2000-01-01|}
|
|
65
|
+
date_attr7 matches {|2000-01-01|}
|
|
66
|
+
date_attr8 matches {|2000-01-01..2000-02-01|}
|
|
67
|
+
date_attr8a matches {|>2000-01-01..2000-02-01|}
|
|
68
|
+
date_attr8b matches {|2000-01-01..<2000-02-01|}
|
|
69
|
+
date_attr8c matches {|>2000-01-01..<2000-02-01|}
|
|
70
|
+
time_attr1 matches {hh:mm:ss}
|
|
71
|
+
time_attr2 matches {hh:mm:??}
|
|
72
|
+
time_attr3 matches {hh:mm:XX}
|
|
73
|
+
time_attr4 matches {hh:??:??}
|
|
74
|
+
time_attr5 matches {hh:??:XX}
|
|
75
|
+
time_attr6 matches {|22:00:05,0|}
|
|
76
|
+
time_attr7 matches {|00:00:59,0|}
|
|
77
|
+
time_attr8 matches {|00:00:59,0|}
|
|
78
|
+
time_attr9 matches {|01:00:00..02:00:00|}
|
|
79
|
+
time_attr9a matches {|>01:00:00..02:00:00|}
|
|
80
|
+
time_attr9b matches {|01:00:00..<02:00:00|}
|
|
81
|
+
time_attr9c matches {|>01:00:00..<02:00:00|}
|
|
82
|
+
date_time_attr1 matches {yyyy-mm-ddThh:mm:ss}
|
|
83
|
+
date_time_attr2 matches {yyyy-mm-ddThh:mm:??}
|
|
84
|
+
date_time_attr3 matches {yyyy-mm-ddThh:mm:XX}
|
|
85
|
+
date_time_attr4 matches {yyyy-mm-ddThh:??:??}
|
|
86
|
+
date_time_attr5 matches {yyyy-mm-ddThh:??:XX}
|
|
87
|
+
date_time_attr6 matches {yyyy-??-??T??:??:??}
|
|
88
|
+
date_time_attr7a matches {|1983-12-25T22:00:05,0|}
|
|
89
|
+
date_time_attr7b matches {|2000-01-01T00:00:59,0|}
|
|
90
|
+
date_time_attr7c matches {|2000-01-01T00:00:59,0|}
|
|
91
|
+
date_time_attr9a matches {|2000-01-01T01:00:00..2000-01-01T02:00:00|}
|
|
92
|
+
date_time_attr9b matches {|>2000-01-01T01:00:00..2000-01-01T02:00:00|}
|
|
93
|
+
date_time_attr9c matches {|2000-01-01T01:00:00..<2000-01-01T02:00:00|}
|
|
94
|
+
date_time_attr9d matches {|>2000-01-01T01:00:00..<2000-01-01T02:00:00|}
|
|
95
|
+
duration_attr1 matches {Pw}
|
|
96
|
+
duration_attr2 matches {Pmw}
|
|
97
|
+
duration_attr3 matches {PWD}
|
|
98
|
+
duration_attr3a matches {PD}
|
|
99
|
+
duration_attr4 matches {Pym}
|
|
100
|
+
duration_attr5 matches {PdThms}
|
|
101
|
+
duration_attr6 matches {PTs}
|
|
102
|
+
duration_attr7 matches {PThm}
|
|
103
|
+
duration_attr8 matches {|PT0S|}
|
|
104
|
+
duration_attr8a matches {|PT0.004S|}
|
|
105
|
+
duration_attr9 matches {|P1D|}
|
|
106
|
+
duration_attr10 matches {|P38W..P39W4D|}
|
|
107
|
+
duration_attr10a matches {|>P38W..P39W4D|}
|
|
108
|
+
duration_attr10b matches {|P38W..<P39W4D|}
|
|
109
|
+
duration_attr10c matches {|>P38W..<P39W4D|}
|
|
110
|
+
duration_attr11 matches {|PT2H5M|}
|
|
111
|
+
duration_attr12 matches {|PT1H55M|}
|
|
112
|
+
duration_attr13 matches {|<=PT1H|}
|
|
113
|
+
duration_attr14 matches {|PT1H30M|}
|
|
114
|
+
duration_attr101 matches {Pw/|PT0S|}
|
|
115
|
+
duration_attr102 matches {Pmw/|PT0S|}
|
|
116
|
+
duration_attr103 matches {PWD/|PT0S|}
|
|
117
|
+
duration_attr103a matches {PD/|PT0S|}
|
|
118
|
+
duration_attr104 matches {Pym/|PT0S|}
|
|
119
|
+
duration_attr105 matches {PdThms/|PT0S|}
|
|
120
|
+
duration_attr106 matches {PTs/|PT0S|}
|
|
121
|
+
duration_attr107 matches {PThm/|PT0S|}
|
|
122
|
+
duration_attr201 matches {Pw/|P38W..P39W4D|}
|
|
123
|
+
duration_attr202 matches {Pmw/|P38W..P39W4D|}
|
|
124
|
+
duration_attr203 matches {PWD/|P38W..P39W4D|}
|
|
125
|
+
duration_attr203a matches {PD/|P38W..P39W4D|}
|
|
126
|
+
duration_attr204 matches {Pym/|P38W..P39W4D|}
|
|
127
|
+
duration_attr205 matches {PdThms/|P38W..P39W4D|}
|
|
128
|
+
duration_attr206 matches {PTs/|P38W..P39W4D|}
|
|
129
|
+
duration_attr207 matches {PThm/|P38W..P39W4D|}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
ontology
|
|
133
|
+
terminologies_available = <"adl_test", ...>
|
|
134
|
+
term_definitions = <
|
|
135
|
+
["en"] = <
|
|
136
|
+
items = <
|
|
137
|
+
["at0000"] = <
|
|
138
|
+
description = <"test entry">
|
|
139
|
+
text = <"test entry">
|
|
140
|
+
>
|
|
141
|
+
>
|
|
142
|
+
>
|
|
143
|
+
>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
archetype
|
|
2
|
+
adl-test-ENTRY.basic_types_fail.v1
|
|
3
|
+
|
|
4
|
+
concept
|
|
5
|
+
[at0000] -- test entry
|
|
6
|
+
|
|
7
|
+
description
|
|
8
|
+
original_author = <
|
|
9
|
+
["name"] = <"Thomas Beale">
|
|
10
|
+
>
|
|
11
|
+
lifecycle_state = <"draft">
|
|
12
|
+
details = <
|
|
13
|
+
["en"] = <
|
|
14
|
+
language = <"en">
|
|
15
|
+
purpose = <"test structure">
|
|
16
|
+
keywords = <"ADL", "test">
|
|
17
|
+
copyright = <"copyright (c) 2004 The openEHR Foundation">
|
|
18
|
+
>
|
|
19
|
+
>
|
|
20
|
+
|
|
21
|
+
definition
|
|
22
|
+
ENTRY[at0000] matches { -- test entry
|
|
23
|
+
-- string_attr3 matches {/cardio.*//}
|
|
24
|
+
string_attr5 matches {"and", "something", "else" "ERROR"}
|
|
25
|
+
boolean_attr3 matches {True, False, False}
|
|
26
|
+
integer_attr1 matches {55 !}
|
|
27
|
+
integer_attr2 matches {10 20, 30}
|
|
28
|
+
integer_attr4 matches {> 10|}
|
|
29
|
+
date_attr1 matches {pyyyy-mm-dd}
|
|
30
|
+
date_attr2 matches {yyyy-Q?--??}
|
|
31
|
+
date_attr5 matches {1983-0012-25}
|
|
32
|
+
date_attr6 matches {2000-0101}
|
|
33
|
+
time_attr2 matches {Ph:Tm:XX}
|
|
34
|
+
time_attr3 matches {hh:??XX}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
ontology
|
|
38
|
+
primary_language = <"en">
|
|
39
|
+
languages_available = <"en", ...>
|
|
40
|
+
terminologies_available = <"adl_test", ...>
|
|
41
|
+
term_definitions = <
|
|
42
|
+
["en"] = <
|
|
43
|
+
items = <
|
|
44
|
+
["at0000"] = <
|
|
45
|
+
description = <"test entry">
|
|
46
|
+
text = <"test entry">
|
|
47
|
+
>
|
|
48
|
+
>
|
|
49
|
+
>
|
|
50
|
+
>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
archetype (adl_version=1.4)
|
|
2
|
+
adl-test-ENTRY.most_minimal.v1
|
|
3
|
+
|
|
4
|
+
concept
|
|
5
|
+
[at0000] -- most minimal
|
|
6
|
+
language
|
|
7
|
+
original_language = <[ISO_639-1::en]>
|
|
8
|
+
description
|
|
9
|
+
original_author = <
|
|
10
|
+
["name"] = <"unknown">
|
|
11
|
+
>
|
|
12
|
+
lifecycle_state = <>
|
|
13
|
+
|
|
14
|
+
definition
|
|
15
|
+
ENTRY[at0000] matches {*}
|
|
16
|
+
|
|
17
|
+
ontology
|
|
18
|
+
term_definitions = <
|
|
19
|
+
["en"] = <
|
|
20
|
+
items = <
|
|
21
|
+
["at0000"] = <
|
|
22
|
+
description = <"most minimal">
|
|
23
|
+
text = <"most minimal">
|
|
24
|
+
>
|
|
25
|
+
>
|
|
26
|
+
>
|
|
27
|
+
>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
archetype (adl_version=1.4)
|
|
2
|
+
adl-test-ENTRY.structure_test1.v1
|
|
3
|
+
|
|
4
|
+
concept
|
|
5
|
+
[at0000] -- test entry
|
|
6
|
+
language
|
|
7
|
+
original_language = <[ISO_639-1::en]>
|
|
8
|
+
description
|
|
9
|
+
original_author = <
|
|
10
|
+
["name"] = <"Thomas Beale">
|
|
11
|
+
>
|
|
12
|
+
details = <
|
|
13
|
+
["en"] = <
|
|
14
|
+
language = <[ISO_639-1::en]>
|
|
15
|
+
purpose = <"Test basic structure hierarchy">
|
|
16
|
+
keywords = <"ADL", "structure", "test">
|
|
17
|
+
copyright = <"copyright (c) 2004 The openEHR Foundation">
|
|
18
|
+
>
|
|
19
|
+
>
|
|
20
|
+
lifecycle_state = <"draft">
|
|
21
|
+
|
|
22
|
+
definition
|
|
23
|
+
ENTRY[at0000] matches { -- test entry
|
|
24
|
+
subject_relationship matches {
|
|
25
|
+
RELATED_PARTY matches {
|
|
26
|
+
relationship matches {
|
|
27
|
+
TEXT matches {
|
|
28
|
+
value matches {"self"}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
ontology
|
|
36
|
+
terminologies_available = <"adl_test", ...>
|
|
37
|
+
term_definitions = <
|
|
38
|
+
["en"] = <
|
|
39
|
+
items = <
|
|
40
|
+
["at0000"] = <
|
|
41
|
+
description = <"test entry">
|
|
42
|
+
text = <"test entry">
|
|
43
|
+
>
|
|
44
|
+
>
|
|
45
|
+
>
|
|
46
|
+
>
|