openehr 1.2.7 → 1.2.8
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.
- checksums.yaml +4 -4
- data/lib/openehr/am/archetype/constraint_model.rb +4 -3
- data/lib/openehr/am/archetype.rb +7 -3
- data/lib/openehr/am.rb +4 -3
- data/lib/openehr/parser/adl_grammar.tt +1 -1
- data/lib/openehr/parser/adl_parser.rb +7 -11
- data/lib/openehr/parser.rb +2 -7
- data/lib/openehr/rm/common.rb +10 -5
- data/lib/openehr/rm/composition/content/entry.rb +5 -5
- data/lib/openehr/rm/composition/content/navigation.rb +3 -2
- data/lib/openehr/rm/composition/content.rb +4 -5
- data/lib/openehr/rm/composition.rb +7 -6
- data/lib/openehr/rm/data_structures/item_structure.rb +6 -7
- data/lib/openehr/rm/data_structures.rb +6 -6
- data/lib/openehr/rm/data_types.rb +14 -7
- data/lib/openehr/rm/support.rb +7 -4
- data/lib/openehr/rm.rb +19 -11
- data/lib/openehr/version.rb +1 -1
- data/lib/openehr.rb +7 -2
- data/spec/lib/openehr/parser/adl_parser_spec.rb +13 -18
- data/spec/lib/openehr/rm/composition/content/entry/entry_spec.rb +14 -17
- data/spec/lib/openehr/rm/composition/content/navigation/section_spec.rb +6 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28564c1ae91970a32375da714bd53949824ea83f
|
4
|
+
data.tar.gz: fe7c87002da639f8216fd4fb3465718bc2102c62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0986f32e43a4d18b6a323f0319fdc3962af9a6d09236d3643513e73398f78e33ed92d083d556d5248eead2ab6130ac3cadea38c95238aeacad1f416b8d50b1f4
|
7
|
+
data.tar.gz: eea1117fb74deebd63b7b16de3644305de46e1f68f85094022a23023062c89d18ca26bd5959c99750a8fd62eb80517638d43ff0659cdd9b18f7b613d288250a0
|
@@ -1,11 +1,10 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__))
|
2
|
+
require 'constraint_model/primitive'
|
3
|
+
|
2
4
|
module OpenEHR
|
3
5
|
module AM
|
4
6
|
module Archetype
|
5
7
|
module ConstraintModel
|
6
|
-
|
7
|
-
require 'constraint_model/primitive'
|
8
|
-
|
9
8
|
class ArchetypeConstraint
|
10
9
|
attr_reader :path
|
11
10
|
attr_accessor :parent
|
@@ -336,6 +335,8 @@ module OpenEHR
|
|
336
335
|
self.cardinality = args[:cardinality]
|
337
336
|
end
|
338
337
|
end
|
338
|
+
|
339
|
+
include Primitive
|
339
340
|
end # of ConstraintModel
|
340
341
|
end # of Archetype
|
341
342
|
end # of AM
|
data/lib/openehr/am/archetype.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__))
|
2
2
|
include OpenEHR::RM::Common::Resource
|
3
|
+
require 'archetype/assertion'
|
4
|
+
require 'archetype/constraint_model'
|
5
|
+
require 'archetype/ontology'
|
3
6
|
|
4
7
|
module OpenEHR
|
5
8
|
module AM
|
6
9
|
module Archetype
|
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"
|
@@ -126,6 +126,10 @@ module OpenEHR
|
|
126
126
|
@value = value
|
127
127
|
end
|
128
128
|
end
|
129
|
+
|
130
|
+
include Assertion
|
131
|
+
include ConstraintModel
|
132
|
+
include Ontology
|
129
133
|
end # of Archetype
|
130
134
|
end # of AM
|
131
135
|
end # of OpenEHR
|
data/lib/openehr/am.rb
CHANGED
@@ -3,7 +3,7 @@ require 'openehr/rm/data_types/quantity'
|
|
3
3
|
require 'openehr/am/archetype/constraint_model'
|
4
4
|
require 'openehr/am/openehr_profile/data_types/text'
|
5
5
|
require 'openehr/am/openehr_profile/data_types/quantity'
|
6
|
-
require 'adl_helper'
|
6
|
+
require 'openehr/parser/adl_helper'
|
7
7
|
|
8
8
|
module OpenEHR
|
9
9
|
module Parser
|
@@ -1,15 +1,11 @@
|
|
1
|
-
$:.unshift(File.dirname(__FILE__)) unless
|
2
|
-
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
1
|
require 'treetop'
|
4
2
|
require 'polyglot'
|
5
|
-
|
6
|
-
include OpenEHR::AM::Archetype
|
7
|
-
include OpenEHR::RM::Support::Identification
|
8
|
-
include OpenEHR::RM::DataTypes::Text
|
3
|
+
require 'openehr/parser'
|
9
4
|
|
10
5
|
module OpenEHR
|
11
6
|
module Parser
|
12
|
-
|
7
|
+
|
8
|
+
class ADLParser < ::OpenEHR::Parser::Base
|
13
9
|
Treetop.load(File.dirname(__FILE__)+'/adl_grammar.tt')
|
14
10
|
|
15
11
|
def initialize(filename)
|
@@ -27,18 +23,18 @@ module OpenEHR
|
|
27
23
|
end
|
28
24
|
|
29
25
|
def parse
|
30
|
-
archetype_id = ArchetypeID.new(:value => @result.archetype_id)
|
26
|
+
archetype_id = OpenEHR::RM::Support::Identification::ArchetypeID.new(:value => @result.archetype_id)
|
31
27
|
definition = @result.definition
|
32
28
|
ontology = @result.ontology
|
33
29
|
original_language = nil
|
34
30
|
if @result.original_language
|
35
31
|
original_language = @result.original_language
|
36
32
|
else
|
37
|
-
terminology_id = TerminologyID.new(:value => 'ISO639-1')
|
38
|
-
original_language = CodePhrase.new(:terminology_id => terminology_id,
|
33
|
+
terminology_id = OpenEHR::RM::Support::Identification::TerminologyID.new(:value => 'ISO639-1')
|
34
|
+
original_language = OpenEHR::RM::DataTypes::Text::CodePhrase.new(:terminology_id => terminology_id,
|
39
35
|
:code_string =>ontology.primary_language)
|
40
36
|
end
|
41
|
-
archetype = Archetype.new(:archetype_id => archetype_id,
|
37
|
+
archetype = OpenEHR::AM::Archetype::Archetype.new(:archetype_id => archetype_id,
|
42
38
|
:adl_version => @result.adl_version,
|
43
39
|
:concept => @result.concept,
|
44
40
|
:original_language => original_language,
|
data/lib/openehr/parser.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
$:.unshift(File.dirname(__FILE__)) unless
|
2
|
-
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
1
|
module OpenEHR
|
4
2
|
module Parser
|
5
3
|
class Base
|
@@ -14,10 +12,7 @@ module OpenEHR
|
|
14
12
|
end
|
15
13
|
end
|
16
14
|
|
17
|
-
require 'parser/adl_parser'
|
18
|
-
#
|
19
|
-
# require 'parser/xml_perser'
|
20
|
-
# require 'parser/exception'
|
21
|
-
# require 'parser/scanner'
|
15
|
+
require 'openehr/parser/adl_parser'
|
16
|
+
# require 'parser/xml_perser'
|
22
17
|
end
|
23
18
|
end
|
data/lib/openehr/rm/common.rb
CHANGED
@@ -1,14 +1,19 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__)) unless
|
2
2
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
|
+
require 'common/archetyped'
|
4
|
+
require 'common/generic'
|
5
|
+
require 'common/change_control'
|
6
|
+
require 'common/directory'
|
7
|
+
require 'common/resource'
|
3
8
|
|
4
9
|
module OpenEHR
|
5
10
|
module RM
|
6
11
|
module Common
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
+
include Archetyped
|
13
|
+
include Generic
|
14
|
+
include ChangeControl
|
15
|
+
include Directory
|
16
|
+
include Resource
|
12
17
|
end
|
13
18
|
end
|
14
19
|
end
|
@@ -2,7 +2,6 @@
|
|
2
2
|
# entry module
|
3
3
|
# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109264528523_312165_346Report.html
|
4
4
|
# refs #56
|
5
|
-
include OpenEHR::RM::Composition::Content
|
6
5
|
require 'locale/info'
|
7
6
|
|
8
7
|
module OpenEHR
|
@@ -10,9 +9,10 @@ module OpenEHR
|
|
10
9
|
module Composition
|
11
10
|
module Content
|
12
11
|
module Entry
|
13
|
-
class Entry < ContentItem
|
12
|
+
class Entry < ::OpenEHR::RM::Composition::Content::ContentItem
|
14
13
|
attr_reader :language, :encoding, :subject
|
15
14
|
attr_accessor :provider, :other_participations, :workflow_id
|
15
|
+
|
16
16
|
def initialize(args = { })
|
17
17
|
super(args)
|
18
18
|
self.language = args[:language]
|
@@ -129,7 +129,7 @@ module OpenEHR
|
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
132
|
-
class Activity < Locatable
|
132
|
+
class Activity < OpenEHR::RM::Common::Archetyped::Locatable
|
133
133
|
attr_reader :description, :timing, :action_archetype_id
|
134
134
|
|
135
135
|
def initialize(args = { })
|
@@ -195,7 +195,7 @@ module OpenEHR
|
|
195
195
|
end
|
196
196
|
end
|
197
197
|
|
198
|
-
class InstructionDetails < Pathable
|
198
|
+
class InstructionDetails < OpenEHR::RM::Common::Archetyped::Pathable
|
199
199
|
attr_reader :instruction_id, :activity_id
|
200
200
|
attr_accessor :wf_details
|
201
201
|
|
@@ -221,7 +221,7 @@ module OpenEHR
|
|
221
221
|
end
|
222
222
|
end
|
223
223
|
|
224
|
-
class IsmTransition < Pathable
|
224
|
+
class IsmTransition < OpenEHR::RM::Common::Archetyped::Pathable
|
225
225
|
attr_reader :current_state, :transition
|
226
226
|
attr_accessor :careflow_step
|
227
227
|
|
@@ -2,14 +2,15 @@
|
|
2
2
|
# navigation module
|
3
3
|
# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109264528523_312165_346Report.html
|
4
4
|
# refs #56
|
5
|
-
|
5
|
+
|
6
|
+
require 'openehr/rm/composition/content'
|
6
7
|
|
7
8
|
module OpenEHR
|
8
9
|
module RM
|
9
10
|
module Composition
|
10
11
|
module Content
|
11
12
|
module Navigation
|
12
|
-
class Section < ContentItem
|
13
|
+
class Section < ::OpenEHR::RM::Composition::Content::ContentItem
|
13
14
|
attr_reader :items
|
14
15
|
|
15
16
|
def initialize(args = { })
|
@@ -1,23 +1,22 @@
|
|
1
|
-
$:.unshift(File.dirname(__FILE__))
|
2
|
-
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
1
|
+
$:.unshift(File.dirname(__FILE__))
|
3
2
|
# rm::composition::content
|
4
3
|
# content module
|
5
4
|
# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1140524925046_706492_3290Report.html
|
6
5
|
# refs #58
|
7
|
-
include OpenEHR::RM::Common::Archetyped
|
8
6
|
|
9
7
|
module OpenEHR
|
10
8
|
module RM
|
11
9
|
module Composition
|
12
10
|
module Content
|
13
|
-
|
14
|
-
class ContentItem < Locatable
|
11
|
+
class ContentItem < OpenEHR::RM::Common::Archetyped::Locatable
|
15
12
|
|
16
13
|
end
|
17
14
|
|
18
15
|
require 'content/navigation'
|
19
16
|
require 'content/entry'
|
20
17
|
|
18
|
+
include Navigation
|
19
|
+
include Entry
|
21
20
|
end # end of Content
|
22
21
|
end # end of Composition
|
23
22
|
end # end of RM
|
@@ -2,11 +2,15 @@
|
|
2
2
|
# composition module
|
3
3
|
# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109005072243_448526_217Report.html
|
4
4
|
# refs #79
|
5
|
-
|
5
|
+
$:.unshift(File.dirname(__FILE__))
|
6
|
+
require 'composition/content'
|
7
|
+
|
6
8
|
module OpenEHR
|
7
9
|
module RM
|
8
10
|
module Composition
|
9
|
-
|
11
|
+
include OpenEHR::RM::Composition::Content
|
12
|
+
|
13
|
+
class Composition < OpenEHR::RM::Common::Archetyped::Locatable
|
10
14
|
attr_reader :language, :category, :territory, :composer
|
11
15
|
attr_accessor :content, :context
|
12
16
|
|
@@ -53,7 +57,7 @@ module OpenEHR
|
|
53
57
|
end
|
54
58
|
end
|
55
59
|
|
56
|
-
class EventContext < Pathable
|
60
|
+
class EventContext < OpenEHR::RM::Common::Archetyped::Pathable
|
57
61
|
attr_reader :start_time, :setting, :participations, :location
|
58
62
|
attr_accessor :end_time, :other_context
|
59
63
|
|
@@ -95,9 +99,6 @@ module OpenEHR
|
|
95
99
|
@location = location
|
96
100
|
end
|
97
101
|
end
|
98
|
-
|
99
|
-
require 'composition/content'
|
100
|
-
|
101
102
|
end # end of Composition
|
102
103
|
end # end of RM
|
103
104
|
end # end of OpenEHR
|
@@ -2,21 +2,18 @@
|
|
2
2
|
# ItemStructure module
|
3
3
|
# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109346709572_859750_3810Report.html
|
4
4
|
# refs #54
|
5
|
-
$:.unshift(File.dirname(__FILE__))
|
6
|
-
|
7
5
|
require 'set'
|
8
|
-
|
6
|
+
require 'openehr/rm/data_structures'
|
7
|
+
require 'openehr/rm/data_structures/item_structure/representation'
|
8
|
+
|
9
9
|
module OpenEHR
|
10
10
|
module RM
|
11
11
|
module DataStructures
|
12
12
|
module ItemStructure
|
13
|
+
class ItemStructure < ::OpenEHR::RM::DataStructures::DataStructure
|
13
14
|
|
14
|
-
require 'item_structure/representation'
|
15
|
-
|
16
|
-
class ItemStructure < DataStructure
|
17
15
|
end
|
18
16
|
|
19
|
-
|
20
17
|
class ItemSingle < ItemStructure
|
21
18
|
attr_reader :item
|
22
19
|
|
@@ -213,6 +210,8 @@ module OpenEHR
|
|
213
210
|
:items => @items)
|
214
211
|
end
|
215
212
|
end
|
213
|
+
|
214
|
+
include Representation
|
216
215
|
end # of ItemStructure
|
217
216
|
end # of DataStructures
|
218
217
|
end # of RM
|
@@ -1,5 +1,3 @@
|
|
1
|
-
$:.unshift(File.dirname(__FILE__)) unless
|
2
|
-
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
1
|
# rm::data_structures
|
4
2
|
# class DATA_STRUCTURE
|
5
3
|
# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1140447518205_872539_864Report.html
|
@@ -8,8 +6,7 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
8
6
|
module OpenEHR
|
9
7
|
module RM
|
10
8
|
module DataStructures
|
11
|
-
|
12
|
-
class DataStructure < OpenEHR::RM::Common::Archetyped::Locatable
|
9
|
+
class DataStructure < ::OpenEHR::RM::Common::Archetyped::Locatable
|
13
10
|
def initialize(args = { })
|
14
11
|
super(args)
|
15
12
|
end
|
@@ -19,8 +16,11 @@ module OpenEHR
|
|
19
16
|
end
|
20
17
|
end
|
21
18
|
|
22
|
-
require 'data_structures/item_structure'
|
23
|
-
|
19
|
+
require 'openehr/rm/data_structures/item_structure'
|
20
|
+
include OpenEHR::RM::DataStructures::ItemStructure
|
21
|
+
|
22
|
+
require 'openehr/rm/data_structures/history'
|
23
|
+
include History
|
24
24
|
end # of Data_Structures
|
25
25
|
end # of RM
|
26
26
|
end # of OpenEHR
|
@@ -1,15 +1,22 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__))
|
2
|
+
require 'data_types/basic'
|
3
|
+
require 'data_types/encapsulated'
|
4
|
+
require 'data_types/quantity'
|
5
|
+
require 'data_types/quantity/date_time'
|
6
|
+
require 'data_types/text'
|
7
|
+
require 'data_types/time_specification'
|
8
|
+
require 'data_types/uri'
|
2
9
|
|
3
10
|
module OpenEHR
|
4
11
|
module RM
|
5
12
|
module DataTypes
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
+
include Basic
|
14
|
+
include Encapsulated
|
15
|
+
include Quantity
|
16
|
+
include Quantity::DateTime
|
17
|
+
include Text
|
18
|
+
include TimeSpecification
|
19
|
+
include URI
|
13
20
|
end
|
14
21
|
end
|
15
22
|
end
|
data/lib/openehr/rm/support.rb
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__)) unless
|
2
2
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
|
+
require 'support/definition'
|
4
|
+
require 'support/identification'
|
5
|
+
require 'support/measurement'
|
6
|
+
# require 'support/assumed_types'
|
3
7
|
|
4
8
|
module OpenEHR
|
5
9
|
module RM
|
6
10
|
module Support
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
require 'support/measurement'
|
11
|
+
include Definition
|
12
|
+
include Identification
|
13
|
+
include Measurement
|
11
14
|
end
|
12
15
|
end
|
13
16
|
end
|
data/lib/openehr/rm.rb
CHANGED
@@ -1,16 +1,24 @@
|
|
1
|
-
|
1
|
+
require 'openehr/rm/support'
|
2
|
+
require 'openehr/rm/data_types'
|
3
|
+
require 'openehr/rm/common'
|
4
|
+
require 'openehr/rm/composition'
|
5
|
+
require 'openehr/rm/data_structures'
|
6
|
+
require 'openehr/rm/demographic'
|
7
|
+
require 'openehr/rm/security'
|
8
|
+
require 'openehr/rm/ehr'
|
9
|
+
require 'openehr/rm/integration'
|
10
|
+
require 'openehr/rm/factory'
|
2
11
|
|
3
12
|
module OpenEHR
|
4
13
|
module RM
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
require 'rm/factory'
|
14
|
+
include Support
|
15
|
+
include DataTypes
|
16
|
+
include Common
|
17
|
+
include Composition
|
18
|
+
include DataStructures
|
19
|
+
include Demographic
|
20
|
+
include Security
|
21
|
+
include EHR
|
22
|
+
include Integration
|
15
23
|
end
|
16
24
|
end
|
data/lib/openehr/version.rb
CHANGED
data/lib/openehr.rb
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
-
$:.unshift(File.dirname(__FILE__))
|
2
1
|
require 'openehr/version'
|
3
|
-
|
4
2
|
require 'openehr/assumed_library_types'
|
5
3
|
require 'openehr/rm'
|
6
4
|
require 'openehr/am'
|
7
5
|
require 'openehr/parser'
|
8
6
|
require 'openehr/serializer'
|
9
7
|
|
8
|
+
module OpenEHR
|
9
|
+
include AssumedLibraryTypes
|
10
|
+
include RM
|
11
|
+
include AM
|
12
|
+
include Parser
|
13
|
+
include Serializer
|
14
|
+
end
|
@@ -1,11 +1,6 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../../../spec_helper'
|
2
|
-
include OpenEHR::Parser
|
3
|
-
include OpenEHR::AM::Archetype
|
4
|
-
include OpenEHR::AM::Archetype::ConstraintModel
|
5
|
-
include OpenEHR::AM::Archetype::Assertion
|
6
|
-
include OpenEHR::AM::Archetype::Ontology
|
7
2
|
|
8
|
-
describe ADLParser do
|
3
|
+
describe OpenEHR::Parser::ADLParser do
|
9
4
|
|
10
5
|
before (:all) do
|
11
6
|
@adl_dir = File.dirname(__FILE__) + '/adl14/'
|
@@ -13,11 +8,11 @@ describe ADLParser do
|
|
13
8
|
|
14
9
|
context 'openEHR-EHR-SECTION-summary.v1.adl' do
|
15
10
|
before(:all) do
|
16
|
-
@ap = ADLParser.new(@adl_dir + 'openEHR-EHR-SECTION.summary.v1.adl')
|
11
|
+
@ap = OpenEHR::Parser::ADLParser.new(@adl_dir + 'openEHR-EHR-SECTION.summary.v1.adl')
|
17
12
|
end
|
18
13
|
|
19
14
|
it 'is an instance fo ADLParser' do
|
20
|
-
@ap.should be_an_instance_of ADLParser
|
15
|
+
@ap.should be_an_instance_of OpenEHR::Parser::ADLParser
|
21
16
|
end
|
22
17
|
|
23
18
|
context 'openEHR-EHR-SECTION.summary.v1 parse' do
|
@@ -27,7 +22,7 @@ describe ADLParser do
|
|
27
22
|
end
|
28
23
|
|
29
24
|
it 'archetype is an instance of Archetype' do
|
30
|
-
@archetype.should be_an_instance_of Archetype
|
25
|
+
@archetype.should be_an_instance_of OpenEHR::AM::Archetype::Archetype
|
31
26
|
end
|
32
27
|
|
33
28
|
it 'archetype_id should be openEHR-EHR-SECTION-summary' do
|
@@ -142,7 +137,7 @@ describe ADLParser do
|
|
142
137
|
end
|
143
138
|
|
144
139
|
it 'attribute is instance of CMultipleAttribute' do
|
145
|
-
@attribute.should be_an_instance_of CMultipleAttribute
|
140
|
+
@attribute.should be_an_instance_of OpenEHR::AM::Archetype::ConstraintModel::CMultipleAttribute
|
146
141
|
end
|
147
142
|
|
148
143
|
it 'rm_attribute_name is items' do
|
@@ -170,7 +165,7 @@ describe ADLParser do
|
|
170
165
|
end
|
171
166
|
|
172
167
|
it 'is an instance of ArchetypeSlot' do
|
173
|
-
@archetype_slot.should be_an_instance_of ArchetypeSlot
|
168
|
+
@archetype_slot.should be_an_instance_of OpenEHR::AM::Archetype::ConstraintModel::ArchetypeSlot
|
174
169
|
end
|
175
170
|
|
176
171
|
it 's rm type name is EVALUATION' do
|
@@ -196,7 +191,7 @@ describe ADLParser do
|
|
196
191
|
end
|
197
192
|
|
198
193
|
it 'assertion0 should be an instance of Assertion' do
|
199
|
-
@assertion0.should be_an_instance_of Assertion
|
194
|
+
@assertion0.should be_an_instance_of OpenEHR::AM::Archetype::Assertion::Assertion
|
200
195
|
end
|
201
196
|
|
202
197
|
it 'expression type of assertion0 is Boolean' do
|
@@ -214,7 +209,7 @@ describe ADLParser do
|
|
214
209
|
end
|
215
210
|
|
216
211
|
it 'assertion1 is an instanse of Assertion' do
|
217
|
-
@assertion1.should be_an_instance_of Assertion
|
212
|
+
@assertion1.should be_an_instance_of OpenEHR::AM::Archetype::Assertion::Assertion
|
218
213
|
end
|
219
214
|
|
220
215
|
it 'Assertion1 type is Boolean' do
|
@@ -233,7 +228,7 @@ describe ADLParser do
|
|
233
228
|
end
|
234
229
|
|
235
230
|
it 'assertion2 is an instanse of Assertion' do
|
236
|
-
@assertion2.should be_an_instance_of Assertion
|
231
|
+
@assertion2.should be_an_instance_of OpenEHR::AM::Archetype::Assertion::Assertion
|
237
232
|
end
|
238
233
|
|
239
234
|
it 'Assertion2 type is Boolean' do
|
@@ -252,7 +247,7 @@ describe ADLParser do
|
|
252
247
|
end
|
253
248
|
|
254
249
|
it 'assertion3 is an instanse of Assertion' do
|
255
|
-
@assertion3.should be_an_instance_of Assertion
|
250
|
+
@assertion3.should be_an_instance_of OpenEHR::AM::Archetype::Assertion::Assertion
|
256
251
|
end
|
257
252
|
|
258
253
|
it 'Assertion3 type is Boolean' do
|
@@ -271,7 +266,7 @@ describe ADLParser do
|
|
271
266
|
end
|
272
267
|
|
273
268
|
it 'assertion4 is an instanse of Assertion' do
|
274
|
-
@assertion4.should be_an_instance_of Assertion
|
269
|
+
@assertion4.should be_an_instance_of OpenEHR::AM::Archetype::Assertion::Assertion
|
275
270
|
end
|
276
271
|
|
277
272
|
it 'Assertion4 type is Boolean' do
|
@@ -290,7 +285,7 @@ describe ADLParser do
|
|
290
285
|
end
|
291
286
|
|
292
287
|
it 'assertion5 is an instanse of Assertion' do
|
293
|
-
@assertion5.should be_an_instance_of Assertion
|
288
|
+
@assertion5.should be_an_instance_of OpenEHR::AM::Archetype::Assertion::Assertion
|
294
289
|
end
|
295
290
|
|
296
291
|
it 'Assertion5 type is Boolean' do
|
@@ -319,7 +314,7 @@ describe ADLParser do
|
|
319
314
|
end
|
320
315
|
|
321
316
|
it 'is an ArchtypeOntology instance' do
|
322
|
-
@archetype_ontology.should be_an_instance_of ArchetypeOntology
|
317
|
+
@archetype_ontology.should be_an_instance_of OpenEHR::AM::Archetype::Ontology::ArchetypeOntology
|
323
318
|
end
|
324
319
|
|
325
320
|
it 'term_definitions parsed and assigned properly' do
|
@@ -1,23 +1,20 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../../../../../../spec_helper'
|
2
|
-
include OpenEHR::RM::Composition::Content::Entry
|
3
|
-
include OpenEHR::RM::DataTypes::Text
|
4
|
-
include OpenEHR::RM::Common::Generic
|
5
2
|
|
6
|
-
describe Entry do
|
3
|
+
describe OpenEHR::RM::Composition::Content::Entry::Entry do
|
7
4
|
|
8
|
-
let(:name) {DvText.new(:value => 'entry package')}
|
5
|
+
let(:name) {OpenEHR::RM::DataTypes::Text::DvText.new(:value => 'entry package')}
|
9
6
|
let(:language) { double('language',:code_string => 'ja')}
|
10
7
|
let(:encoding) { double('encoding', :code_string => 'UTF-8')}
|
11
8
|
let(:subject) { double('PartyProxy')}
|
12
9
|
|
13
10
|
before(:each) do
|
14
|
-
external_ref = stub(PartyRef, :type => 'entry')
|
15
|
-
subject = PartyProxy.new(:external_ref => external_ref)
|
16
|
-
provider_external_ref = stub(PartyRef, :type => 'provider')
|
17
|
-
provider = PartyProxy.new(:external_ref => provider_external_ref)
|
11
|
+
external_ref = stub(OpenEHR::RM::Support::Identification::PartyRef, :type => 'entry')
|
12
|
+
subject = OpenEHR::RM::Common::Generic::PartyProxy.new(:external_ref => external_ref)
|
13
|
+
provider_external_ref = stub(OpenEHR::RM::Support::Identification::PartyRef, :type => 'provider')
|
14
|
+
provider = OpenEHR::RM::Common::Generic::PartyProxy.new(:external_ref => provider_external_ref)
|
18
15
|
other_participations = stub(Array, :size => 3, :empty? => false)
|
19
|
-
workflow_id = stub(ObjectRef, :type => 'workflow')
|
20
|
-
@entry = Entry.new(:archetype_node_id => 'at0001',
|
16
|
+
workflow_id = stub(OpenEHR::RM::Support::Identification::ObjectRef, :type => 'workflow')
|
17
|
+
@entry = OpenEHR::RM::Composition::Content::Entry::Entry.new(:archetype_node_id => 'at0001',
|
21
18
|
:name => DvText.new(:value => 'entry test'),
|
22
19
|
:language => language,
|
23
20
|
:encoding => encoding,
|
@@ -28,7 +25,7 @@ describe Entry do
|
|
28
25
|
end
|
29
26
|
|
30
27
|
it 'should be an instance of Entry' do
|
31
|
-
@entry.should be_an_instance_of Entry
|
28
|
+
@entry.should be_an_instance_of OpenEHR::RM::Composition::Content::Entry::Entry
|
32
29
|
end
|
33
30
|
|
34
31
|
it 'language should be assigned properly' do
|
@@ -42,8 +39,8 @@ describe Entry do
|
|
42
39
|
end
|
43
40
|
|
44
41
|
it 'should raise ArgumentError with invalid language code' do
|
45
|
-
terminology_id = TerminologyID.new(:value => 'ISO639-1')
|
46
|
-
invalid_language = CodePhrase.new(:code_string => 'jj',
|
42
|
+
terminology_id = OpenEHR::RM::Support::Identification::TerminologyID.new(:value => 'ISO639-1')
|
43
|
+
invalid_language = OpenEHR::RM::DataTypes::Text::CodePhrase.new(:code_string => 'jj',
|
47
44
|
:terminology_id => terminology_id)
|
48
45
|
expect {@entry.language = invalid_language}.to raise_error ArgumentError
|
49
46
|
end
|
@@ -59,8 +56,8 @@ describe Entry do
|
|
59
56
|
end
|
60
57
|
|
61
58
|
it 'should raise ArgumentError with invalid encoding' do
|
62
|
-
terminology_id = TerminologyID.new(:value => 'ISO639-1')
|
63
|
-
invalid_encoding = CodePhrase.new(:terminology_id => terminology_id,
|
59
|
+
terminology_id = OpenEHR::RM::Support::Identification::TerminologyID.new(:value => 'ISO639-1')
|
60
|
+
invalid_encoding = OpenEHR::RM::DataTypes::Text::CodePhrase.new(:terminology_id => terminology_id,
|
64
61
|
:code_string => 'inv-19')
|
65
62
|
expect {@entry.encoding = invalid_encoding}.to raise_error ArgumentError
|
66
63
|
end
|
@@ -92,7 +89,7 @@ describe Entry do
|
|
92
89
|
end
|
93
90
|
|
94
91
|
it 'subject_is_self? should be true when subject is instance of PartySelf' do
|
95
|
-
@entry.subject = PartySelf.new
|
92
|
+
@entry.subject = OpenEHR::RM::Common::Generic::PartySelf.new
|
96
93
|
@entry.subject_is_self?.should be_true
|
97
94
|
end
|
98
95
|
end
|
@@ -1,11 +1,13 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../../../../../../spec_helper'
|
2
|
-
|
1
|
+
#require File.dirname(__FILE__) + '/../../../../../../spec_helper'
|
2
|
+
require 'spec_helper'
|
3
|
+
#include
|
3
4
|
include OpenEHR::RM::DataTypes::Text
|
4
5
|
|
5
|
-
describe Section do
|
6
|
+
describe OpenEHR::RM::Composition::Content::Navigation::Section do
|
6
7
|
before(:each) do
|
7
8
|
items = stub(Array, :empty? => false, :size => 10)
|
8
|
-
@section = Section.new(
|
9
|
+
@section = OpenEHR::RM::Composition::Content::Navigation::Section.new(
|
10
|
+
:archetype_node_id => 'at0001',
|
9
11
|
:name => DvText.new(:value => 'section'),
|
10
12
|
:items => items)
|
11
13
|
end
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shinji KOBAYASHI
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-04-
|
15
|
+
date: 2013-04-15 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rake
|