fhir_models 5.0.0 → 5.1.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 +4 -4
- data/lib/fhir_models/bootstrap/model.rb +4 -4
- data/lib/fhir_models/bootstrap/preprocess.rb +1 -1
- data/lib/fhir_models/fhir.rb +1 -1
- data/lib/fhir_models/fhir_ext/common_structure_definition.rb +2 -2
- data/lib/fhir_models/fhir_ext/common_structure_definition_compare.rb +4 -4
- data/lib/fhir_models/fhirpath/parse.rb +1 -1
- data/lib/fhir_models/generator/class_generator.rb +1 -1
- data/lib/fhir_models/generator/ig_resources.rb +1 -1
- data/lib/fhir_models/version.rb +1 -1
- metadata +8 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32202872dab20b7533c553224bce8149bb4af4c0e8af22601f20d28d54f59bec
|
|
4
|
+
data.tar.gz: 066e410fb892368aa261f43c361a59c28b78df2a3b74116782da693383ef3347
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81f1e76c332fccac2734bc4b5d5d7a1c1f972aef6c1e72444632bd9d505ef0ff5b944df8665d8dc852ff8caea97b6e857d9e42bbd1ca7d09f79bb0c26336f1cd
|
|
7
|
+
data.tar.gz: bcc22960acd62ab7fb26b1df2b0ad0b73d907d15929df5e053b0a87d15cb346be34e3e02d572b93540197479f7a8ec569ece3a50ed6c54ba7305616ffc0cbc57
|
|
@@ -163,7 +163,7 @@ module FHIR
|
|
|
163
163
|
errors.delete(typename) unless present.include?(typename)
|
|
164
164
|
end
|
|
165
165
|
end
|
|
166
|
-
errors.keep_if { |_k, v|
|
|
166
|
+
errors.keep_if { |_k, v| v && !v.empty? }
|
|
167
167
|
end
|
|
168
168
|
|
|
169
169
|
# ----- validate a field -----
|
|
@@ -232,7 +232,7 @@ module FHIR
|
|
|
232
232
|
end
|
|
233
233
|
has_valid_code = false
|
|
234
234
|
if meta['valid_codes']
|
|
235
|
-
meta['valid_codes'].
|
|
235
|
+
meta['valid_codes'].each_value do |codes|
|
|
236
236
|
has_valid_code = true unless (codes & the_codes).empty?
|
|
237
237
|
break if has_valid_code
|
|
238
238
|
end
|
|
@@ -287,7 +287,7 @@ module FHIR
|
|
|
287
287
|
def check_binding_uri(uri, value)
|
|
288
288
|
valid = false
|
|
289
289
|
# Strip off the |4.0.0 or |4.0.1 or |2014-03-26 or similar from the ends of URLs
|
|
290
|
-
uri&.gsub!(/\|[A-Za-z0-9
|
|
290
|
+
uri&.gsub!(/\|[A-Za-z0-9.-]*/, '')
|
|
291
291
|
valueset = versioned_fhir_module::Definitions.get_codes(uri)
|
|
292
292
|
|
|
293
293
|
if ['http://hl7.org/fhir/ValueSet/mimetypes', 'http://www.rfc-editor.org/bcp/bcp13.txt'].include?(uri)
|
|
@@ -332,7 +332,7 @@ module FHIR
|
|
|
332
332
|
extension_source.select do |extension|
|
|
333
333
|
name = extension.url.tr('-', '_').split('/').last
|
|
334
334
|
anchor = name.split('#').last
|
|
335
|
-
|
|
335
|
+
[name, anchor].include?(method_name.to_s)
|
|
336
336
|
end
|
|
337
337
|
end
|
|
338
338
|
|
data/lib/fhir_models/fhir.rb
CHANGED
|
@@ -74,7 +74,7 @@ module FHIR
|
|
|
74
74
|
!(value.to_s =~ /\A[A-Za-z0-9\-.]{1,64}\Z/).nil?
|
|
75
75
|
when 'xhtml'
|
|
76
76
|
fragment = Nokogiri::HTML::DocumentFragment.parse(value)
|
|
77
|
-
value.is_a?(String) && fragment.errors.
|
|
77
|
+
value.is_a?(String) && fragment.errors.empty?
|
|
78
78
|
when 'unsignedint'
|
|
79
79
|
!(value.to_s =~ /\A(0|([1-9][0-9]*))\Z/).nil?
|
|
80
80
|
when 'positiveint'
|
|
@@ -78,7 +78,7 @@ module FHIR
|
|
|
78
78
|
verify_element(element, json)
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
@errors.
|
|
81
|
+
@errors.empty?
|
|
82
82
|
end
|
|
83
83
|
deprecate :is_valid_json?, :valid_json?
|
|
84
84
|
|
|
@@ -410,7 +410,7 @@ module FHIR
|
|
|
410
410
|
if ['http://hl7.org/fhir/ValueSet/mimetypes', 'http://www.rfc-editor.org/bcp/bcp13.txt'].include?(vs_uri)
|
|
411
411
|
matches = MIME::Types[value]
|
|
412
412
|
known_weird = ['text/cql', 'application/cql+text', 'application/hl7-v2'].include?(value)
|
|
413
|
-
if (matches.nil? || matches.
|
|
413
|
+
if (matches.nil? || matches.empty? || known_weird) && !some_type_of_xml_or_json?(value)
|
|
414
414
|
@errors << "#{element.path} has invalid mime-type: '#{value}'"
|
|
415
415
|
matching_type -= 1 if element.binding.strength == 'required'
|
|
416
416
|
end
|
|
@@ -140,7 +140,7 @@ module FHIR
|
|
|
140
140
|
end
|
|
141
141
|
@errors.flatten!
|
|
142
142
|
@warnings.flatten!
|
|
143
|
-
@errors.
|
|
143
|
+
@errors.empty?
|
|
144
144
|
end
|
|
145
145
|
deprecate :is_compatible?, :compatible?
|
|
146
146
|
|
|
@@ -225,7 +225,7 @@ module FHIR
|
|
|
225
225
|
x_only = x_profiles - y_profiles
|
|
226
226
|
shared = x_profiles - x_only
|
|
227
227
|
|
|
228
|
-
if !shared.nil? && shared.
|
|
228
|
+
if !shared.nil? && shared.empty?
|
|
229
229
|
# same name, but different profiles
|
|
230
230
|
# maybe the profiles are the same, just with different URLs...
|
|
231
231
|
# ... so we have to compare them, if we can.
|
|
@@ -269,7 +269,7 @@ module FHIR
|
|
|
269
269
|
y_only = y_types - x_types
|
|
270
270
|
shared = x_types - x_only
|
|
271
271
|
|
|
272
|
-
if !shared.nil? && shared.
|
|
272
|
+
if !shared.nil? && shared.empty? && !x_types.empty? && !y_types.empty? && !x.constraint.empty? && !y.constraint.empty?
|
|
273
273
|
@errors << @finding.error(x.path.to_s, 'type.code', 'Incompatible data types', x_types.to_s, y_types.to_s)
|
|
274
274
|
end
|
|
275
275
|
if !x_only.nil? && !x_only.empty?
|
|
@@ -359,7 +359,7 @@ module FHIR
|
|
|
359
359
|
y_only = y_constraints - x_constraints
|
|
360
360
|
shared = x_constraints - x_only
|
|
361
361
|
|
|
362
|
-
if !shared.nil? && shared.
|
|
362
|
+
if !shared.nil? && shared.empty? && !x.constraint.empty? && !y.constraint.empty?
|
|
363
363
|
@errors << @finding.error(x.path.to_s, 'constraint.xpath', 'Incompatible constraints', x_constraints.map { |z| z.tr(',', ';') }.join(' && ').to_s, y_constraints.map { |z| z.tr(',', ';') }.join(' && ').to_s)
|
|
364
364
|
end
|
|
365
365
|
if !x_only.nil? && !x_only.empty?
|
|
@@ -36,7 +36,7 @@ module FHIRPath
|
|
|
36
36
|
end
|
|
37
37
|
# we may need to reassemble quoted strings again
|
|
38
38
|
reassemble_strings(tokens)
|
|
39
|
-
tokens.delete_if { |token|
|
|
39
|
+
tokens.delete_if { |token| token.empty? || (token.is_a?(String) && token.match(/\S/).nil?) }
|
|
40
40
|
FHIR.logger.debug "TOKENS: #{tokens}"
|
|
41
41
|
tokens
|
|
42
42
|
end
|
|
@@ -96,7 +96,7 @@ module FHIR
|
|
|
96
96
|
if !element['type'].nil?
|
|
97
97
|
# profiles contains a list of profiles if the datatype is Reference or Extension
|
|
98
98
|
profiles = []
|
|
99
|
-
element['type'].select { |t|
|
|
99
|
+
element['type'].select { |t| ['Reference', 'Extension'].include?(t['code']) }.each do |data_type|
|
|
100
100
|
profiles << data_type['targetProfile']
|
|
101
101
|
end
|
|
102
102
|
profiles.reject!(&:nil?)
|
data/lib/fhir_models/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fhir_models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Walonoski
|
|
@@ -9,10 +9,10 @@ authors:
|
|
|
9
9
|
- Michael O'Keefe
|
|
10
10
|
- Robert Scanlon
|
|
11
11
|
- Reece Adamson
|
|
12
|
-
autorequire:
|
|
12
|
+
autorequire:
|
|
13
13
|
bindir: exe
|
|
14
14
|
cert_chain: []
|
|
15
|
-
date:
|
|
15
|
+
date: 2026-04-30 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: nokogiri
|
|
@@ -20,14 +20,14 @@ dependencies:
|
|
|
20
20
|
requirements:
|
|
21
21
|
- - ">="
|
|
22
22
|
- !ruby/object:Gem::Version
|
|
23
|
-
version: 1.
|
|
23
|
+
version: 1.19.1
|
|
24
24
|
type: :runtime
|
|
25
25
|
prerelease: false
|
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
|
27
27
|
requirements:
|
|
28
28
|
- - ">="
|
|
29
29
|
- !ruby/object:Gem::Version
|
|
30
|
-
version: 1.
|
|
30
|
+
version: 1.19.1
|
|
31
31
|
- !ruby/object:Gem::Dependency
|
|
32
32
|
name: date_time_precision
|
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -182,20 +182,6 @@ dependencies:
|
|
|
182
182
|
- - ">="
|
|
183
183
|
- !ruby/object:Gem::Version
|
|
184
184
|
version: '0'
|
|
185
|
-
- !ruby/object:Gem::Dependency
|
|
186
|
-
name: rubocop
|
|
187
|
-
requirement: !ruby/object:Gem::Requirement
|
|
188
|
-
requirements:
|
|
189
|
-
- - '='
|
|
190
|
-
- !ruby/object:Gem::Version
|
|
191
|
-
version: 1.23.0
|
|
192
|
-
type: :development
|
|
193
|
-
prerelease: false
|
|
194
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
195
|
-
requirements:
|
|
196
|
-
- - '='
|
|
197
|
-
- !ruby/object:Gem::Version
|
|
198
|
-
version: 1.23.0
|
|
199
185
|
- !ruby/object:Gem::Dependency
|
|
200
186
|
name: guard-rspec
|
|
201
187
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -880,7 +866,7 @@ homepage: https://github.com/fhir-crucible/fhir_models
|
|
|
880
866
|
licenses:
|
|
881
867
|
- Apache-2.0
|
|
882
868
|
metadata: {}
|
|
883
|
-
post_install_message:
|
|
869
|
+
post_install_message:
|
|
884
870
|
rdoc_options: []
|
|
885
871
|
require_paths:
|
|
886
872
|
- lib
|
|
@@ -895,8 +881,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
895
881
|
- !ruby/object:Gem::Version
|
|
896
882
|
version: '0'
|
|
897
883
|
requirements: []
|
|
898
|
-
rubygems_version: 3.
|
|
899
|
-
signing_key:
|
|
884
|
+
rubygems_version: 3.5.22
|
|
885
|
+
signing_key:
|
|
900
886
|
specification_version: 4
|
|
901
887
|
summary: A Gem for handling FHIR models in ruby
|
|
902
888
|
test_files: []
|