openehr 1.1.3 → 1.1.4

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/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ === 1.1.4
2
+ Parser bug fixed around DvDuration pattern/interval.
3
+
1
4
  === 1.1.3
2
5
  am/openehr_profile/quantity hierachy
3
6
 
data/README.rdoc CHANGED
@@ -5,7 +5,7 @@ Ruby openEHR implementation project.
5
5
 
6
6
  = Version
7
7
 
8
- Release-1.1.3
8
+ Release-1.1.4
9
9
 
10
10
  = Requirements
11
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.3
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.3"
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-06-27"
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/xml_perser.rb",
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",
@@ -1,5 +1,5 @@
1
1
  # ticket 203
2
- require 'openehr/am/openehr_profile/data_types/quantity'
2
+ require File.dirname(__FILE__) + '/../../../../../../spec_helper'
3
3
  include OpenEHR::AssumedLibraryTypes
4
4
  include ::OpenEHR::AM::OpenEHRProfile::DataTypes::Quantity
5
5
 
@@ -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 'openEHR-EHR-OBSERVATION.operation_record.v1.adl' do
19
- subject { adl14_archetype('openEHR-EHR-OBSERVATION.operation_record.v1.adl') }
20
- it_should_behave_like 'empty use archetypes'
21
- end
22
-
23
- describe 'openEHR-EHR-CLUSTER.exam-abdomen.v1.adl' do
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
- describe 'openEHR-EHR-CLUSTER.exam-uterus.v1.adl' do
39
- subject { adl14_archetype('openEHR-EHR-CLUSTER.exam-uterus.v1.adl') }
40
- it_should_behave_like 'empty use archetypes'
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' do
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.3
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-06-27 00:00:00.000000000 Z
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/xml_perser.rb
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: 2519081392044828336
707
+ hash: -3026411643743733801
708
708
  required_rubygems_version: !ruby/object:Gem::Requirement
709
709
  none: false
710
710
  requirements: