fhir_models 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{test/simplecov.rb → .simplecov} +0 -0
- data/Gemfile +2 -2
- data/fhir_models.gemspec +1 -1
- data/lib/bootstrap/model.rb +12 -3
- data/test/test_helper.rb +10 -0
- data/test/unit/contents_test.rb +1 -8
- data/test/unit/equality_test.rb +1 -8
- data/test/unit/expansions_test.rb +1 -8
- data/test/unit/extension_by_name_test.rb +1 -8
- data/test/unit/fluentpath/and_or_not_test.rb +1 -8
- data/test/unit/fluentpath/convert_to_boolean_test.rb +1 -8
- data/test/unit/fluentpath/existence_test.rb +1 -8
- data/test/unit/fluentpath/extension_test.rb +1 -8
- data/test/unit/fluentpath/fluent_equality_test.rb +1 -8
- data/test/unit/fluentpath/invariants_test.rb +1 -8
- data/test/unit/fluentpath/math_test.rb +1 -8
- data/test/unit/fluentpath/path_test.rb +1 -8
- data/test/unit/fluentpath/string_test.rb +1 -8
- data/test/unit/json_format_test.rb +1 -8
- data/test/unit/json_validation_test.rb +1 -8
- data/test/unit/multiple_types_test.rb +1 -8
- data/test/unit/profile_validation_test.rb +1 -8
- data/test/unit/xml_format_test.rb +1 -9
- data/test/unit/xml_schema_validation_test.rb +1 -9
- data/test/unit/xml_validation_test.rb +1 -8
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bee3770940059e03438d83d5796331896b4b00ba
|
4
|
+
data.tar.gz: 2d3d96330595dcc6811da5f9a1f78bdd43af90e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8de95c1ddc6a7e064cab82c31226fe2c39027bca2385cabf0fc7251b76b5ba22435da6e60d739f1ab32c4b34c5e0ae1e40ceecae4134d6a5217c2977a7e4c65b
|
7
|
+
data.tar.gz: ce89ad4aca54dc75637f58184ea36bd8baebdef0396f0ee809a9f09ba07b7a8082d87b01df3cb73296dde40a56aa5cd43bfb8cf5e85624d44c62dbb0315d58a6
|
File without changes
|
data/Gemfile
CHANGED
data/fhir_models.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.email = "jwalonoski@mitre.org"
|
8
8
|
s.homepage = "https://github.com/fhir-crucible/fhir_models"
|
9
9
|
s.authors = ["Jason Walonoski", "Andre Quina", "Michael O'Keefe"]
|
10
|
-
s.version = '1.6.
|
10
|
+
s.version = '1.6.2'
|
11
11
|
s.files = s.files = `git ls-files`.split("\n")
|
12
12
|
s.add_development_dependency 'pry'
|
13
13
|
s.add_dependency 'rake', '>= 0.8.7'
|
data/lib/bootstrap/model.rb
CHANGED
@@ -132,12 +132,21 @@ module FHIR
|
|
132
132
|
multiple_types = self.class::MULTIPLE_TYPES rescue {}
|
133
133
|
multiple_types.each do |prefix,suffixes|
|
134
134
|
count = 0
|
135
|
+
present = []
|
135
136
|
suffixes.each do |suffix|
|
136
|
-
|
137
|
-
|
137
|
+
typename = "#{prefix}#{suffix[0].upcase}#{suffix[1..-1]}"
|
138
|
+
count += 1 if errors[typename]
|
139
|
+
# check which multiple data types are actually present, not just errors
|
138
140
|
# actually, this might be allowed depending on cardinality
|
141
|
+
value = self.instance_variable_get("@#{typename}")
|
142
|
+
present << typename if !value.nil? || (value.is_a?(Array) && !value.empty?)
|
139
143
|
end
|
140
144
|
errors[prefix] = ["#{prefix}[x]: more than one type present."] if(count > 1)
|
145
|
+
# remove errors for suffixes that are not present
|
146
|
+
suffixes.each do |suffix|
|
147
|
+
typename = "#{prefix}#{suffix[0].upcase}#{suffix[1..-1]}"
|
148
|
+
errors.delete(typename) if !present.include?(typename)
|
149
|
+
end
|
141
150
|
end
|
142
151
|
errors.keep_if{|k,v|(v && !v.empty?)}
|
143
152
|
end
|
@@ -245,7 +254,7 @@ module FHIR
|
|
245
254
|
end
|
246
255
|
end
|
247
256
|
end # value.each
|
248
|
-
errors.delete(field) if
|
257
|
+
errors.delete(field) if errors[field].empty?
|
249
258
|
end
|
250
259
|
|
251
260
|
def is_primitive?(datatype,value)
|
data/test/test_helper.rb
ADDED
data/test/unit/contents_test.rb
CHANGED
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../test_helper'
|
9
2
|
|
10
3
|
class ContentsTest < Test::Unit::TestCase
|
11
4
|
|
data/test/unit/equality_test.rb
CHANGED
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../test_helper'
|
9
2
|
|
10
3
|
class EqualityTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../test_helper'
|
9
2
|
|
10
3
|
class ExpansionsTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../test_helper'
|
9
2
|
|
10
3
|
class ExtensionByNameTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../../test_helper'
|
9
2
|
|
10
3
|
class AndOrNotTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../../test_helper'
|
9
2
|
|
10
3
|
class ConvertToBooleanTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../../test_helper'
|
9
2
|
|
10
3
|
class ExistenceTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../../test_helper'
|
9
2
|
|
10
3
|
class ExtensionTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../../test_helper'
|
9
2
|
|
10
3
|
class FluentEqualityTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../../test_helper'
|
9
2
|
|
10
3
|
class InvariantsTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../../test_helper'
|
9
2
|
|
10
3
|
class MathTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../../test_helper'
|
9
2
|
|
10
3
|
class PathTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../../test_helper'
|
9
2
|
|
10
3
|
class StringTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../test_helper'
|
9
2
|
|
10
3
|
class JsonFormatTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../test_helper'
|
9
2
|
|
10
3
|
class JsonValidationTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../test_helper'
|
9
2
|
|
10
3
|
class MultipleTypesTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../test_helper'
|
9
2
|
|
10
3
|
class ProfileValidationTest < Test::Unit::TestCase
|
11
4
|
|
@@ -1,12 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'nokogiri/diff'
|
7
|
-
require 'minitest/autorun'
|
8
|
-
require 'bundler/setup'
|
9
|
-
require 'test/unit'
|
1
|
+
require_relative '../test_helper'
|
10
2
|
|
11
3
|
class XmlFormatTest < Test::Unit::TestCase
|
12
4
|
|
@@ -1,12 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'nokogiri/diff'
|
7
|
-
require 'minitest/autorun'
|
8
|
-
require 'bundler/setup'
|
9
|
-
require 'test/unit'
|
1
|
+
require_relative '../test_helper'
|
10
2
|
|
11
3
|
class XmlSchemaValidationTest < Test::Unit::TestCase
|
12
4
|
|
@@ -1,11 +1,4 @@
|
|
1
|
-
require_relative
|
2
|
-
require_relative '../../lib/fhir_models'
|
3
|
-
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pry'
|
6
|
-
require 'minitest/autorun'
|
7
|
-
require 'bundler/setup'
|
8
|
-
require 'test/unit'
|
1
|
+
require_relative '../test_helper'
|
9
2
|
|
10
3
|
class XmlValidationTest < Test::Unit::TestCase
|
11
4
|
|
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: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Walonoski
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-08-
|
13
|
+
date: 2016-08-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: pry
|
@@ -109,6 +109,7 @@ extensions: []
|
|
109
109
|
extra_rdoc_files: []
|
110
110
|
files:
|
111
111
|
- .gitignore
|
112
|
+
- .simplecov
|
112
113
|
- .travis.yml
|
113
114
|
- Gemfile
|
114
115
|
- Gemfile.lock
|
@@ -1210,7 +1211,7 @@ files:
|
|
1210
1211
|
- lib/fluentpath/expression.rb
|
1211
1212
|
- lib/fluentpath/parse.rb
|
1212
1213
|
- lib/tasks/tasks.rake
|
1213
|
-
- test/
|
1214
|
+
- test/test_helper.rb
|
1214
1215
|
- test/unit/contents_test.rb
|
1215
1216
|
- test/unit/equality_test.rb
|
1216
1217
|
- test/unit/expansions_test.rb
|