openehr 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/lib/openehr/parser/adl_grammar.tt +2 -1
- data/lib/openehr/parser/{xml_perser.rb → xml_parser.rb} +0 -0
- data/openehr.gemspec +3 -3
- data/spec/lib/openehr/am/openehr_profile/data_types/quantity/c_quantity_item_spec.rb +1 -1
- data/spec/lib/openehr/parser/adl14/adl-test-entry.durations.test.adl +3 -0
- data/spec/lib/openehr/parser/duration_spec.rb +26 -0
- data/spec/lib/openehr/parser/empty_use_spec.rb +10 -22
- data/spec/lib/openehr/rm/support/terminology_service_spec.rb +1 -3
- metadata +4 -4
data/History.txt
CHANGED
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.4
|
@@ -975,7 +975,8 @@ module OpenEHR
|
|
975
975
|
rule c_duration_constraint
|
976
976
|
duration_pattern '/' duration_interval_value '' {
|
977
977
|
def value
|
978
|
-
{:pattern => duration_pattern.value
|
978
|
+
{:pattern => duration_pattern.value,
|
979
|
+
:range => duration_interval_value.value}
|
979
980
|
end
|
980
981
|
}
|
981
982
|
/ duration_pattern '' {
|
File without changes
|
data/openehr.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "openehr"
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Shinji KOBAYASHI", "Akimichi Tatsukawa"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-07-31"
|
13
13
|
s.description = "This project is an implementation of the openEHR specification on Ruby."
|
14
14
|
s.email = "skoba@moss.gr.jp"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -46,7 +46,7 @@ Gem::Specification.new do |s|
|
|
46
46
|
"lib/openehr/parser/adl_parser.rb",
|
47
47
|
"lib/openehr/parser/exception.rb",
|
48
48
|
"lib/openehr/parser/validator.rb",
|
49
|
-
"lib/openehr/parser/
|
49
|
+
"lib/openehr/parser/xml_parser.rb",
|
50
50
|
"lib/openehr/rm.rb",
|
51
51
|
"lib/openehr/rm/common.rb",
|
52
52
|
"lib/openehr/rm/common/archetyped.rb",
|
@@ -53,6 +53,9 @@ definition
|
|
53
53
|
}
|
54
54
|
ELEMENT[at1013] matches { -- duration with fractional seconds
|
55
55
|
value matches {|PT1.1s|}
|
56
|
+
}
|
57
|
+
ELEMENT[at1014] matches { -- duration with fractional seconds
|
58
|
+
value matches {PTMS/|>=PT0S|}
|
56
59
|
}
|
57
60
|
-- matches {PT30s, PT45s, PT1m0s, PT2m0s} -- Not currently in ADL syntax
|
58
61
|
-- matches {|P1d +/PT4h|}
|
@@ -304,6 +304,32 @@ describe ADLParser do
|
|
304
304
|
@at.range.should be_lower_included
|
305
305
|
end
|
306
306
|
end
|
307
|
+
|
308
|
+
context '15th attribute' do
|
309
|
+
before(:all) do
|
310
|
+
@at = attr(15)
|
311
|
+
end
|
312
|
+
|
313
|
+
it 'has PTMS pattern' do
|
314
|
+
@at.pattern.should == 'PTMS'
|
315
|
+
end
|
316
|
+
|
317
|
+
it 'range is lower included' do
|
318
|
+
@at.range.should be_lower_included
|
319
|
+
end
|
320
|
+
|
321
|
+
it 'lower range is PT0S' do
|
322
|
+
@at.range.lower.value.should == 'PT0S'
|
323
|
+
end
|
324
|
+
|
325
|
+
it 'lower range second is 0' do
|
326
|
+
@at.range.lower.seconds.should == 0
|
327
|
+
end
|
328
|
+
|
329
|
+
it 'is not upper included' do
|
330
|
+
@at.range.should_not be_upper_included
|
331
|
+
end
|
332
|
+
end
|
307
333
|
end
|
308
334
|
|
309
335
|
context 'Duration with assumed value' do
|
@@ -15,27 +15,15 @@ shared_examples 'empty use archetypes' do
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
describe '
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
subject { adl14_archetype('openEHR-EHR-CLUSTER.exam-abdomen.v1.adl') }
|
25
|
-
it_should_behave_like 'empty use archetypes'
|
26
|
-
end
|
27
|
-
|
28
|
-
describe 'openEHR-EHR-OBSERVATION.uterine_contractions.v1.adl' do
|
29
|
-
subject { adl14_archetype('openEHR-EHR-OBSERVATION.uterine_contractions.v1.adl') }
|
30
|
-
it_should_behave_like 'empty use archetypes'
|
31
|
-
end
|
32
|
-
|
33
|
-
describe 'openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl' do
|
34
|
-
subject { adl14_archetype('openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl') }
|
35
|
-
it_should_behave_like 'empty use archetypes'
|
36
|
-
end
|
18
|
+
describe 'Archetypes, which has empty use' do
|
19
|
+
adls = ['openEHR-EHR-OBSERVATION.operation_record.v1.adl',
|
20
|
+
'openEHR-EHR-CLUSTER.exam-abdomen.v1.adl',
|
21
|
+
'openEHR-EHR-OBSERVATION.uterine_contractions.v1.adl',
|
22
|
+
'openEHR-EHR-CLUSTER.exam-uterine_cervix.v1.adl',
|
23
|
+
'openEHR-EHR-CLUSTER.exam-uterus.v1.adl']
|
37
24
|
|
38
|
-
|
39
|
-
|
40
|
-
|
25
|
+
adls.each do |adl|
|
26
|
+
subject { adl14_archetype(adl) }
|
27
|
+
it_should_behave_like 'empty use archetypes'
|
28
|
+
end
|
41
29
|
end
|
@@ -4,11 +4,9 @@ include OpenEHR::RM::Support::Terminology
|
|
4
4
|
describe TerminologyService do
|
5
5
|
before(:each) do
|
6
6
|
@ts ||= TerminologyService.new
|
7
|
-
@terminology_mock = mock('terminology')
|
8
7
|
end
|
9
8
|
|
10
|
-
it 'should get terminology by its name'
|
11
|
-
end
|
9
|
+
it 'should get terminology by its name'
|
12
10
|
|
13
11
|
it 'should get code_set by its name'
|
14
12
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openehr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-07-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: xml-simple
|
@@ -337,7 +337,7 @@ files:
|
|
337
337
|
- lib/openehr/parser/adl_parser.rb
|
338
338
|
- lib/openehr/parser/exception.rb
|
339
339
|
- lib/openehr/parser/validator.rb
|
340
|
-
- lib/openehr/parser/
|
340
|
+
- lib/openehr/parser/xml_parser.rb
|
341
341
|
- lib/openehr/rm.rb
|
342
342
|
- lib/openehr/rm/common.rb
|
343
343
|
- lib/openehr/rm/common/archetyped.rb
|
@@ -704,7 +704,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
704
704
|
version: '0'
|
705
705
|
segments:
|
706
706
|
- 0
|
707
|
-
hash:
|
707
|
+
hash: -3026411643743733801
|
708
708
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
709
709
|
none: false
|
710
710
|
requirements:
|