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 +3 -0
- data/lib/openehr.rb +5 -5
- data/lib/openehr/am.rb +2 -2
- data/lib/openehr/am/archetype.rb +4 -4
- data/lib/openehr/am/archetype/constraint_model.rb +1 -1
- data/lib/openehr/am/openehr_profile.rb +1 -1
- data/lib/openehr/am/openehr_profile/data_types.rb +3 -3
- data/lib/openehr/parser.rb +5 -5
- data/lib/openehr/rm.rb +10 -10
- data/lib/openehr/rm/common.rb +5 -5
- data/lib/openehr/rm/common/change_control.rb +1 -0
- data/lib/openehr/rm/composition.rb +1 -1
- data/lib/openehr/rm/composition/content.rb +4 -2
- data/lib/openehr/rm/data_structures.rb +3 -2
- data/lib/openehr/rm/data_structures/item_structure.rb +2 -1
- data/lib/openehr/rm/data_types.rb +7 -6
- data/lib/openehr/rm/data_types/quantity.rb +0 -1
- data/lib/openehr/rm/data_types/quantity/date_time.rb +0 -2
- data/lib/openehr/rm/data_types/time_specification.rb +1 -1
- data/lib/openehr/rm/support.rb +4 -4
- data/lib/openehr/version.rb +1 -1
- data/spec/lib/openehr/am/archetype/archetype_spec.rb +1 -1
- data/spec/lib/openehr/am/archetype/ontology/archetype_term_spec.rb +3 -3
- metadata +2 -2
data/History.txt
CHANGED
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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
data/lib/openehr/am/archetype.rb
CHANGED
@@ -4,9 +4,9 @@ include OpenEHR::RM::Common::Resource
|
|
4
4
|
module OpenEHR
|
5
5
|
module AM
|
6
6
|
module Archetype
|
7
|
-
|
8
|
-
|
9
|
-
|
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[
|
69
|
+
return @ontology.term_definition(:lang => a_lang, :code => @concept).items['text']
|
70
70
|
end
|
71
71
|
|
72
72
|
def constraint_references_valid?
|
@@ -4,9 +4,9 @@ module OpenEHR
|
|
4
4
|
module AM
|
5
5
|
module OpenEHRProfile
|
6
6
|
module DataTypes
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
require 'data_types/text'
|
8
|
+
require 'data_types/quantity'
|
9
|
+
require 'data_types/basic'
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
data/lib/openehr/parser.rb
CHANGED
@@ -14,10 +14,10 @@ module OpenEHR
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
data/lib/openehr/rm/common.rb
CHANGED
@@ -4,11 +4,11 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
4
4
|
module OpenEHR
|
5
5
|
module RM
|
6
6
|
module Common
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
@@ -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
|
-
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
@@ -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
|
data/lib/openehr/rm/support.rb
CHANGED
@@ -4,10 +4,10 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
4
4
|
module OpenEHR
|
5
5
|
module RM
|
6
6
|
module Support
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
data/lib/openehr/version.rb
CHANGED
@@ -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 = {
|
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 = {
|
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[
|
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', '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.
|
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-
|
13
|
+
date: 2013-03-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|