openehr 2.3.2 → 2.4.0
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d4cd8f720ac22f26e89145ebfd23cb474b2ad3e900c97fd6ff01c20a90bf638
|
|
4
|
+
data.tar.gz: ac478e309b65a00d314d3bf425b8d3ce25a7f07dd196e76c223508eca7410619
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4f72f3492c23d458ed840da441359318e03a58c4bc55ee2d35df060ff635f4ab98e9be5aafafd126d149d81dcc355620a5931f65b05ff6d9dee65666df371a62
|
|
7
|
+
data.tar.gz: d4ca02374caaf65f3d6a29087fa788f4a6c57c9415d5c5ac576f9e746d56f4a6d25c4ef95fa3b2b56d905823f2ff7c08cb6bdb2f2f92944ab04d3b4f0734b97a
|
data/lib/openehr/rm/factory.rb
CHANGED
|
@@ -20,6 +20,8 @@ module OpenEHR
|
|
|
20
20
|
terminology_id: 'TERMINOLOGY_ID'
|
|
21
21
|
}.freeze
|
|
22
22
|
|
|
23
|
+
KNOWN_DERIVED_CACHE_TYPES = %w[TIMEZONE UID VERSION_TREE_ID].freeze
|
|
24
|
+
|
|
23
25
|
def initialize(cobject)
|
|
24
26
|
@cobject = cobject
|
|
25
27
|
end
|
|
@@ -80,6 +82,11 @@ module OpenEHR
|
|
|
80
82
|
"and #{key.inspect} is not a known non-polymorphic attribute (keys: #{value.keys.inspect})"
|
|
81
83
|
end
|
|
82
84
|
Factory.create(type, **value)
|
|
85
|
+
rescue NameError
|
|
86
|
+
return nil if KNOWN_DERIVED_CACHE_TYPES.include?(type)
|
|
87
|
+
|
|
88
|
+
warn "openehr factory: unknown type \"#{type}\" for attribute #{key.inspect}; ignoring"
|
|
89
|
+
nil
|
|
83
90
|
end
|
|
84
91
|
end
|
|
85
92
|
|
|
@@ -610,4 +617,3 @@ module OpenEHR
|
|
|
610
617
|
end
|
|
611
618
|
end
|
|
612
619
|
|
|
613
|
-
|
|
@@ -249,6 +249,7 @@ module OpenEHR
|
|
|
249
249
|
self.objectid = UID.new(:value => $1)
|
|
250
250
|
self.creating_system_id = UID.new(:value => $2)
|
|
251
251
|
self.version_tree_id = VersionTreeID.new(:value => $3)
|
|
252
|
+
@value = value
|
|
252
253
|
@root = @oid
|
|
253
254
|
@extension = @creating_system_id.value + '::' + @version_tree_id.value
|
|
254
255
|
else
|
|
@@ -10,7 +10,22 @@ module OpenEHR
|
|
|
10
10
|
# which would otherwise make every subtree cyclic). A defensive
|
|
11
11
|
# visited-object guard covers any other unexpected back-reference.
|
|
12
12
|
class RMJSONSerializer
|
|
13
|
-
|
|
13
|
+
# Instance variables that value=-style setters derive and cache from a
|
|
14
|
+
# single canonical attribute (e.g. `value`), but which are not part of
|
|
15
|
+
# openEHR ITS-JSON canonical form and have no corresponding
|
|
16
|
+
# OpenEHR::RM::Factory::<Type>Factory to reconstruct them on read - see
|
|
17
|
+
# docs/design/fix-rmjson-roundtrip-plan.md for the full inventory and
|
|
18
|
+
# how each was found (DvDate/DvTime/DvDateTime's value= in
|
|
19
|
+
# lib/openehr/rm/data_types/quantity/date_time.rb; UIDBasedID/
|
|
20
|
+
# ObjectVersionID's value= in lib/openehr/rm/support/identification.rb).
|
|
21
|
+
EXCLUDED_IVARS = [
|
|
22
|
+
:@parent,
|
|
23
|
+
:@year, :@month, :@day, # DvDate, DvDateTime
|
|
24
|
+
:@hour, :@minute, :@second, :@fractional_second, # DvTime, DvDateTime
|
|
25
|
+
:@timezone, # DvTime (String), DvDateTime (Timezone)
|
|
26
|
+
:@root, :@extension, # UIDBasedID, HierObjectID, ObjectVersionID
|
|
27
|
+
:@oid, :@creating_system_id, :@version_tree_id # ObjectVersionID
|
|
28
|
+
].freeze
|
|
14
29
|
|
|
15
30
|
def initialize(rm_instance)
|
|
16
31
|
@rm_instance = rm_instance
|
data/lib/openehr/version.rb
CHANGED