openehr 1.2.1 → 1.2.2

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.2.2
2
+ Removed autoload and replaced them to require
3
+
1
4
  === 1.2.1
2
5
  Fixed bug and merged pull request from caron10
3
6
 
data/lib/openehr.rb CHANGED
@@ -2,9 +2,9 @@ $:.unshift(File.dirname(__FILE__))
2
2
  require 'openehr/version'
3
3
 
4
4
  module OpenEHR
5
- autoload :AssumedLibraryTypes, 'openehr/assumed_library_types'
6
- autoload :RM, 'openehr/rm'
7
- autoload :AM, 'openehr/am'
8
- autoload :Parser, 'openehr/parser'
9
- autoload :Serializer, 'openehr/serializer'
5
+ require 'openehr/assumed_library_types'
6
+ require 'openehr/rm'
7
+ require 'openehr/am'
8
+ require 'openehr/parser'
9
+ require 'openehr/serializer'
10
10
  end
data/lib/openehr/am.rb CHANGED
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__))
2
2
 
3
3
  module OpenEHR
4
4
  module AM
5
- autoload :Archetype, 'am/archetype'
6
- autoload :OpenEHRProfile, 'am/openehr_profile'
5
+ require 'am/archetype'
6
+ require 'am/openehr_profile'
7
7
  end
8
8
  end
@@ -4,9 +4,9 @@ include OpenEHR::RM::Common::Resource
4
4
  module OpenEHR
5
5
  module AM
6
6
  module Archetype
7
- autoload :Assertion, 'archetype/assertion'
8
- autoload :ConstraintModel, 'archetype/constraint_model'
9
- autoload :Ontology, 'archetype/ontology'
7
+ require 'archetype/assertion'
8
+ require 'archetype/constraint_model'
9
+ require 'archetype/ontology'
10
10
 
11
11
  module ADLDefinition
12
12
  CURRENT_ADL_VERSION = "1.4"
@@ -66,7 +66,7 @@ module OpenEHR
66
66
  end
67
67
 
68
68
  def concept_name(a_lang)
69
- return @ontology.term_definition(:lang => a_lang, :code => @concept).items[:text]
69
+ return @ontology.term_definition(:lang => a_lang, :code => @concept).items['text']
70
70
  end
71
71
 
72
72
  def constraint_references_valid?
@@ -4,7 +4,7 @@ module OpenEHR
4
4
  module Archetype
5
5
  module ConstraintModel
6
6
 
7
- autoload :Primitive, 'constraint_model/primitive'
7
+ require 'constraint_model/primitive'
8
8
 
9
9
  class ArchetypeConstraint
10
10
  attr_reader :path
@@ -3,7 +3,7 @@ $:.unshift(File.dirname(__FILE__))
3
3
  module OpenEHR
4
4
  module AM
5
5
  module OpenEHRProfile
6
- autoload :DataTypes, 'openehr_profile/data_types'
6
+ require 'openehr_profile/data_types'
7
7
  end
8
8
  end
9
9
  end
@@ -4,9 +4,9 @@ module OpenEHR
4
4
  module AM
5
5
  module OpenEHRProfile
6
6
  module DataTypes
7
- autoload :Text, 'data_types/text'
8
- autoload :Quantity, 'data_types/quantity'
9
- autoload :Basic, 'data_types/basic'
7
+ require 'data_types/text'
8
+ require 'data_types/quantity'
9
+ require 'data_types/basic'
10
10
  end
11
11
  end
12
12
  end
@@ -14,10 +14,10 @@ module OpenEHR
14
14
  end
15
15
  end
16
16
 
17
- autoload :ADLParser, 'parser/adl_parser'
18
- # autoload :CADLParser, 'parser/adl_parser'
19
- # autoload :XMLParser, 'parser/xml_perser'
20
- # autoload :Exception, 'parser/exception'
21
- # autoload :Scanner, 'parser/scanner'
17
+ require 'parser/adl_parser'
18
+ # require 'parser/adl_parser'
19
+ # require 'parser/xml_perser'
20
+ # require 'parser/exception'
21
+ # require 'parser/scanner'
22
22
  end
23
23
  end
data/lib/openehr/rm.rb CHANGED
@@ -2,15 +2,15 @@ $:.unshift(File.dirname(__FILE__))
2
2
 
3
3
  module OpenEHR
4
4
  module RM
5
- autoload :Common, 'rm/common'
6
- autoload :Composition, 'rm/composition'
7
- autoload :DataStructures, 'rm/data_structures'
8
- autoload :DataTypes, 'rm/data_types'
9
- autoload :Demographic, 'rm/demographic'
10
- autoload :EHR, 'rm/ehr'
11
- autoload :Integration, 'rm/integration'
12
- autoload :Security, 'rm/security'
13
- autoload :Support, 'rm/support'
14
- autoload :Factory, 'rm/factory'
5
+ require 'rm/support'
6
+ require 'rm/data_types'
7
+ require 'rm/common'
8
+ require 'rm/composition'
9
+ require 'rm/data_structures'
10
+ require 'rm/demographic'
11
+ require 'rm/security'
12
+ require 'rm/ehr'
13
+ require 'rm/integration'
14
+ require 'rm/factory'
15
15
  end
16
16
  end
@@ -4,11 +4,11 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  module OpenEHR
5
5
  module RM
6
6
  module Common
7
- autoload :Archetyped, 'common/archetyped'
8
- autoload :ChangeControl, 'common/change_control'
9
- autoload :Directory, 'common/directory'
10
- autoload :Generic, 'common/generic.rb'
11
- autoload :Resource, 'common/resource'
7
+ require 'common/archetyped'
8
+ require 'common/generic'
9
+ require 'common/change_control'
10
+ require 'common/directory'
11
+ require 'common/resource'
12
12
  end
13
13
  end
14
14
  end
@@ -2,6 +2,7 @@
2
2
  # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109326589721_134411_997Report.html
3
3
  # Ticket refs #64
4
4
  include OpenEHR::RM::Common::Generic
5
+
5
6
  module OpenEHR
6
7
  module RM
7
8
  module Common
@@ -96,7 +96,7 @@ module OpenEHR
96
96
  end
97
97
  end
98
98
 
99
- autoload :Content, 'composition/content'
99
+ require 'composition/content'
100
100
 
101
101
  end # end of Composition
102
102
  end # end of RM
@@ -10,12 +10,14 @@ module OpenEHR
10
10
  module RM
11
11
  module Composition
12
12
  module Content
13
- autoload :Navigation, 'content/navigation'
14
- autoload :Entry, 'content/entry'
15
13
 
16
14
  class ContentItem < Locatable
17
15
 
18
16
  end
17
+
18
+ require 'content/navigation'
19
+ require 'content/entry'
20
+
19
21
  end # end of Content
20
22
  end # end of Composition
21
23
  end # end of RM
@@ -8,8 +8,6 @@ $:.unshift(File.dirname(__FILE__)) unless
8
8
  module OpenEHR
9
9
  module RM
10
10
  module DataStructures
11
- autoload :ItemStructure, 'data_structures/item_structure'
12
- autoload :History, 'data_structures/history'
13
11
 
14
12
  class DataStructure < OpenEHR::RM::Common::Archetyped::Locatable
15
13
  def initialize(args = { })
@@ -20,6 +18,9 @@ module OpenEHR
20
18
  raise NotImplementedError, "as_hirarchy must be implemented"
21
19
  end
22
20
  end
21
+
22
+ require 'data_structures/item_structure'
23
+ require 'data_structures/history'
23
24
  end # of Data_Structures
24
25
  end # of RM
25
26
  end # of OpenEHR
@@ -11,11 +11,12 @@ module OpenEHR
11
11
  module DataStructures
12
12
  module ItemStructure
13
13
 
14
- autoload :Representation, 'item_structure/representation'
14
+ require 'item_structure/representation'
15
15
 
16
16
  class ItemStructure < DataStructure
17
17
  end
18
18
 
19
+
19
20
  class ItemSingle < ItemStructure
20
21
  attr_reader :item
21
22
 
@@ -3,12 +3,13 @@ $:.unshift(File.dirname(__FILE__))
3
3
  module OpenEHR
4
4
  module RM
5
5
  module DataTypes
6
- autoload :Basic, 'data_types/basic'
7
- autoload :Encapsulated, 'data_types/encapsulated'
8
- autoload :Quantity, 'data_types/quantity'
9
- autoload :Text, 'data_types/text'
10
- autoload :TimeSpecification, 'data_types/time_specification'
11
- autoload :URI, 'data_types/uri'
6
+ require 'data_types/basic'
7
+ require 'data_types/encapsulated'
8
+ require 'data_types/quantity'
9
+ require 'data_types/quantity/date_time'
10
+ require 'data_types/text'
11
+ require 'data_types/time_specification'
12
+ require 'data_types/uri'
12
13
  end
13
14
  end
14
15
  end
@@ -9,7 +9,6 @@ module OpenEHR
9
9
  module RM
10
10
  module DataTypes
11
11
  module Quantity
12
- autoload :DateTime, 'quantity/date_time'
13
12
 
14
13
  class DvOrdered < OpenEHR::RM::DataTypes::Basic::DataValue
15
14
  include Comparable
@@ -1,9 +1,7 @@
1
1
  # This module is implementation of the UML:
2
2
  # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109696321450_28117_5362Report.html
3
3
  # Ticket refs #49
4
- require 'openehr/assumed_library_types'
5
4
  require 'date'
6
- require 'openehr/rm/data_types/quantity'
7
5
 
8
6
  module OpenEHR
9
7
  module RM
@@ -4,7 +4,7 @@ module OpenEHR
4
4
  module RM
5
5
  module DataTypes
6
6
  module TimeSpecification
7
- class DvTimeSpecification < OpenEhr::RM::DataTypes::Basic::DataValue
7
+ class DvTimeSpecification < OpenEHR::RM::DataTypes::Basic::DataValue
8
8
  attr_reader :value
9
9
 
10
10
  def initialize(value)
@@ -4,10 +4,10 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  module OpenEHR
5
5
  module RM
6
6
  module Support
7
- autoload :AssumedTypes, 'support/assumed_types'
8
- autoload :Definition, 'support/definition'
9
- autoload :Identification, 'support/identification'
10
- autoload :Measurement, 'support/measurement'
7
+ # require 'support/assumed_types'
8
+ require 'support/definition'
9
+ require 'support/identification'
10
+ require 'support/measurement'
11
11
  end
12
12
  end
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module OpenEHR
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
@@ -12,7 +12,7 @@ describe Archetype do
12
12
  original_language = stub(CodePhrase, :code_string => 'ja')
13
13
  archetype_id = ArchetypeID.new(:value => 'openEHR-EHR-SECTION.physical_examination-prenatal.v2')
14
14
  definition = stub(CComplexObject, :rm_type_name => 'SECTION')
15
- items = {:text => 'Physical examination'}
15
+ items = {'text' => 'Physical examination'}
16
16
  term1 = ArchetypeTerm.new(:code => 'at0000', :items => items)
17
17
  ontology = ArchetypeOntology.new(:specialisation_depth => 1, :term_definitions => {'ja' => {'at0000' =>term1}})
18
18
  uid = HierObjectID.new(:value => 'ABCD::1')
@@ -3,7 +3,7 @@ include OpenEHR::AM::Archetype::Ontology
3
3
 
4
4
  describe ArchetypeTerm do
5
5
  before(:each) do
6
- items = {:text => 'text', :desc => 'description'}
6
+ items = {'text' => 'text', 'description' => '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[:text].should == 'text'
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[:text, :desc]
36
+ @archetype_term.keys.should == Set['text', 'description']
37
37
  end
38
38
 
39
39
  it 'keys should be empty if items are nil' do
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.2.1
4
+ version: 1.2.2
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: 2013-03-01 00:00:00.000000000 Z
13
+ date: 2013-03-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake