us_core_test_kit 0.9.3 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/inferno_reference_server_311_preset.json +66 -0
  3. data/config/presets/inferno_reference_server_400_preset.json +66 -0
  4. data/config/presets/inferno_reference_server_501_preset.json +66 -0
  5. data/config/presets/inferno_reference_server_610_preset.json +66 -0
  6. data/config/presets/inferno_reference_server_700_preset.json +66 -0
  7. data/lib/us_core_test_kit/generated/v3.1.1/us_core_test_suite.rb +18 -1
  8. data/lib/us_core_test_kit/generated/v4.0.0/us_core_test_suite.rb +18 -1
  9. data/lib/us_core_test_kit/generated/v5.0.1/us_core_test_suite.rb +18 -1
  10. data/lib/us_core_test_kit/generated/v6.1.0/us_core_test_suite.rb +18 -1
  11. data/lib/us_core_test_kit/generated/v7.0.0/us_core_test_suite.rb +18 -1
  12. data/lib/us_core_test_kit/generator/templates/granular_scope_group.rb.erb +41 -0
  13. data/lib/us_core_test_kit/generator/templates/granular_scope_read_test.rb.erb +29 -0
  14. data/lib/us_core_test_kit/generator/templates/granular_scope_resource_type_group.rb.erb +19 -0
  15. data/lib/us_core_test_kit/generator/templates/granular_scope_test.rb.erb +38 -0
  16. data/lib/us_core_test_kit/generator/templates/group.rb.erb +24 -0
  17. data/lib/us_core_test_kit/generator/templates/must_support.rb.erb +41 -0
  18. data/lib/us_core_test_kit/generator/templates/practitioner_address_test.rb.erb +32 -0
  19. data/lib/us_core_test_kit/generator/templates/provenance_revinclude_search.rb.erb +50 -0
  20. data/lib/us_core_test_kit/generator/templates/read.rb.erb +26 -0
  21. data/lib/us_core_test_kit/generator/templates/reference_resolution.rb.erb +40 -0
  22. data/lib/us_core_test_kit/generator/templates/search.rb.erb +46 -0
  23. data/lib/us_core_test_kit/generator/templates/suite.rb.erb +160 -0
  24. data/lib/us_core_test_kit/generator/templates/validation.rb.erb +31 -0
  25. data/lib/us_core_test_kit/igs/README.md +21 -0
  26. data/lib/us_core_test_kit/metadata.rb +70 -0
  27. data/lib/us_core_test_kit/reference_resolution_test.rb +1 -16
  28. data/lib/us_core_test_kit/version.rb +2 -1
  29. data/lib/us_core_test_kit.rb +1 -0
  30. metadata +31 -10
@@ -0,0 +1,41 @@
1
+ require_relative '../../../must_support_test'
2
+
3
+ module USCoreTestKit
4
+ module <%= module_name %>
5
+ class <%= class_name %> < Inferno::Test
6
+ include USCoreTestKit::MustSupportTest
7
+
8
+ title 'All must support elements are provided in the <%= resource_type %> resources returned'
9
+ description %(
10
+ US Core Responders SHALL be capable of populating all data elements as
11
+ part of the query results as specified by the US Core Server Capability
12
+ Statement. This test will look through the <%= resource_type %> resources
13
+ found previously for the following must support elements:
14
+
15
+ <%= must_support_list_string %><% if uscdi_list_string.present? %>
16
+
17
+ For ONC USCDI requirements, each <%= resource_type %> must support the following additional elements:
18
+
19
+ <%= uscdi_list_string %><% end %>
20
+ )
21
+
22
+ id :<%= test_id %>
23
+
24
+ def resource_type
25
+ '<%= resource_type %>'
26
+ end
27
+
28
+ def self.metadata
29
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
30
+ end
31
+
32
+ def scratch_resources
33
+ scratch[:<%= profile_identifier %>_resources] ||= {}
34
+ end
35
+
36
+ run do
37
+ perform_must_support_test(<%= resource_collection_string %>)
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,32 @@
1
+ require_relative '../../../practitioner_address_test'
2
+
3
+ module USCoreTestKit
4
+ module <%= module_name %>
5
+ class <%= class_name %> < Inferno::Test
6
+ include USCoreTestKit::PractitionerAddressTest
7
+
8
+ title 'Server support either Practitioner.address or PractitionerRole'
9
+ description %(
10
+ US Core Responders SHALL support either US Core PractitionerRole Profile or
11
+ these data elements in US Core Practitioner Profile
12
+
13
+ * Practitioner.address
14
+ * Practitioner.address.city
15
+ * Practitioner.address.country
16
+ * Practitioner.address.line
17
+ * Practitioner.address.postalCode
18
+ * Practitioner.address.state
19
+ )
20
+
21
+ id :<%= test_id %>
22
+
23
+ def self.metadata
24
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
25
+ end
26
+
27
+ run do
28
+ verify_practitioner_address
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,50 @@
1
+ require_relative '../../../search_test'
2
+ require_relative '../../../generator/group_metadata'
3
+
4
+ module USCoreTestKit
5
+ module <%= module_name %>
6
+ class <%= class_name %> < Inferno::Test
7
+ include USCoreTestKit::SearchTest
8
+
9
+ title 'Server returns Provenance resources from <%= resource_type %> search by <%= search_param_name_string %>'
10
+ description %(
11
+ A server SHALL be capable of supporting _revIncludes:Provenance:target.
12
+
13
+ This test will perform a search by <%= search_param_name_string %> and
14
+ will pass if a Provenance resource is found in the response.
15
+ %)
16
+
17
+ id :<%= test_id %>
18
+ <% if needs_patient_id? %>
19
+ input :patient_ids,
20
+ title: 'Patient IDs',
21
+ description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
22
+ <% end %>
23
+ def properties
24
+ @properties ||= SearchTestProperties.new(
25
+ <%= search_test_properties_string %>
26
+ )
27
+ end
28
+
29
+ def self.metadata
30
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
31
+ end
32
+
33
+ def self.provenance_metadata
34
+ @provenance_metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, '..', 'provenance', 'metadata.yml'), aliases: true))
35
+ end
36
+
37
+ def scratch_resources
38
+ scratch[:<%= profile_identifier %>_resources] ||= {}
39
+ end
40
+
41
+ def scratch_provenance_resources
42
+ scratch[:provenance_resources] ||= {}
43
+ end
44
+
45
+ run do
46
+ run_provenance_revinclude_search_test
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,26 @@
1
+ require_relative '../../../read_test'
2
+
3
+ module USCoreTestKit
4
+ module <%= module_name %>
5
+ class <%= class_name %> < Inferno::Test
6
+ include USCoreTestKit::ReadTest
7
+
8
+ title 'Server returns correct <%= resource_type %> resource from <%= resource_type %> read interaction'
9
+ description 'A server <%= conformance_expectation %> support the <%= resource_type %> read interaction.'
10
+
11
+ id :<%= test_id %>
12
+
13
+ def resource_type
14
+ '<%= resource_type %>'
15
+ end
16
+
17
+ def scratch_resources
18
+ scratch[:<%= profile_identifier %>_resources] ||= {}
19
+ end
20
+
21
+ run do
22
+ perform_read_test(<%= resource_collection_string %>)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,40 @@
1
+ require_relative '../../../reference_resolution_test'
2
+
3
+ module USCoreTestKit
4
+ module <%= module_name %>
5
+ class <%= class_name %> < Inferno::Test
6
+ include USCoreTestKit::ReferenceResolutionTest
7
+
8
+ title 'MustSupport references within <%= resource_type %> resources are valid'
9
+ description %(
10
+ This test will attempt to read external references provided within elements
11
+ marked as 'MustSupport', if any are available.
12
+
13
+ It verifies that at least one external reference for each MustSupport Reference element
14
+ can be accessed by the test client, and conforms to corresponding US Core profile.
15
+
16
+ Elements which may provide external references include:
17
+
18
+ <%= must_support_reference_list_string %>
19
+ )
20
+
21
+ id :<%= test_id %>
22
+
23
+ def resource_type
24
+ '<%= resource_type %>'
25
+ end
26
+
27
+ def self.metadata
28
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
29
+ end
30
+
31
+ def scratch_resources
32
+ scratch[:<%= profile_identifier %>_resources] ||= {}
33
+ end
34
+
35
+ run do
36
+ perform_reference_resolution_test(<%= resource_collection_string %>)
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,46 @@
1
+ require_relative '../../../search_test'
2
+ require_relative '../../../generator/group_metadata'
3
+
4
+ module USCoreTestKit
5
+ module <%= module_name %>
6
+ class <%= class_name %> < Inferno::Test
7
+ include USCoreTestKit::SearchTest
8
+
9
+ title 'Server returns valid results for <%= resource_type %> search by <%= search_param_name_string %>'
10
+ description %(
11
+ <%= description %>
12
+ )
13
+
14
+ id :<%= test_id %><% if optional? %>
15
+ optional
16
+ <% end %><% if needs_patient_id? %>
17
+ input :patient_ids,
18
+ title: 'Patient IDs',
19
+ description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
20
+ <% end %><% if resource_type == 'Device' %>
21
+ input :implantable_device_codes,
22
+ title: 'Implantable Device Type Code',
23
+ description: 'Enter the code for an Implantable Device type, or multiple codes separated by commas. '\
24
+ 'If blank, Inferno will validate all Device resources against the Implantable Device profile',
25
+ optional: true
26
+ <% end %>
27
+ def self.properties
28
+ @properties ||= SearchTestProperties.new(
29
+ <%= search_test_properties_string %>
30
+ )
31
+ end
32
+
33
+ def self.metadata
34
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
35
+ end
36
+
37
+ def scratch_resources
38
+ scratch[:<%= profile_identifier %>_resources] ||= {}
39
+ end
40
+
41
+ run do
42
+ run_search_test
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,160 @@
1
+ require 'inferno/dsl/oauth_credentials'
2
+ require_relative '../../version'
3
+ require_relative '<%= capability_statement_file_name %>'
4
+ require_relative '<%= clinical_notes_guidance_file_name %>'
5
+ require_relative '../../custom_groups/data_absent_reason_group'
6
+ require_relative '../../custom_groups/smart_app_launch_group'<% if us_core_6_and_above? %>
7
+ require_relative '<%= granular_scopes_file_name %>'
8
+ require_relative '<%= screening_assessment_file_name %>'<% end %>
9
+ require_relative '../../provenance_validator'
10
+ require_relative '../../us_core_options'<% if us_core_7_and_above? %>
11
+ require_relative '<%= smart_app_launch_file_name %>'
12
+ require_relative '<%= stu2_2_smart_app_launch_file_name %>'<% end %>
13
+
14
+ <% group_file_list.each do |file_name| %>require_relative '<%= file_name %>'
15
+ <% end %>
16
+ module USCoreTestKit
17
+ module <%= module_name %>
18
+ class <%= class_name %> < Inferno::TestSuite
19
+ title '<%= title %>'
20
+ description %(
21
+ The US Core Test Kit tests systems for their conformance to the [US Core
22
+ Implementation Guide](<%=ig_link %>).
23
+
24
+ HL7® FHIR® resources are validated with the Java validator using
25
+ `tx.fhir.org` as the terminology server. Users should note that the
26
+ although the ONC Certification (g)(10) Standardized API Test Suite
27
+ includes tests from this suite, [it uses a different method to perform
28
+ terminology
29
+ validation](https://github.com/onc-healthit/onc-certification-g10-test-kit/wiki/FAQ#q-why-do-some-resources-fail-in-us-core-test-kit-with-terminology-validation-errors).
30
+ As a result, resource validation results may not be consistent between
31
+ the US Core Test Suite and the ONC Certification (g)(10) Standardized
32
+ API Test Suite.
33
+ )
34
+
35
+ GENERAL_MESSAGE_FILTERS = [
36
+ %r{Sub-extension url 'introspect' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris},
37
+ %r{Sub-extension url 'revoke' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris},
38
+ /Observation\.effective\.ofType\(Period\): .*vs-1:/, # Invalid invariant in FHIR v4.0.1
39
+ /Observation\.effective\.ofType\(Period\): .*us-core-1:/, # Invalid invariant in US Core v3.1.1
40
+ /Provenance.agent\[\d*\]: Constraint failed: provenance-1/, #Invalid invariant in US Core v5.0.1
41
+ %r{Unknown Code System 'http://hl7.org/fhir/us/core/CodeSystem/us-core-tags'}, # Validator has an issue with this US Core 5 code system in US Core 6 resource
42
+ %r{URL value 'http://hl7.org/fhir/us/core/CodeSystem/us-core-tags' does not resolve}, # Validator has an issue with this US Core 5 code system in US Core 6 resource
43
+ /\A\S+: \S+: URL value '.*' does not resolve/,
44
+ %r{Observation.component\[\d+\].value.ofType\(Quantity\): The code provided \(http://unitsofmeasure.org#L/min\) was not found in the value set 'Vital Signs Units'} # Known issue with the Pulse Oximetry Profile
45
+ ].freeze
46
+ <% if version_specific_message_filters.empty? %>
47
+ VERSION_SPECIFIC_MESSAGE_FILTERS = [].freeze
48
+ <% else %>
49
+ VERSION_SPECIFIC_MESSAGE_FILTERS = [
50
+ <%= version_specific_message_filters.map { |filter| "%r{#{filter.source}}" }.join(",\n ") %>
51
+ ].freeze
52
+ <% end %>
53
+ VALIDATION_MESSAGE_FILTERS = GENERAL_MESSAGE_FILTERS + VERSION_SPECIFIC_MESSAGE_FILTERS
54
+
55
+ def self.metadata
56
+ @metadata ||= YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)[:groups].map do |raw_metadata|
57
+ Generator::GroupMetadata.new(raw_metadata)
58
+ end
59
+ end
60
+
61
+ id :<%= suite_id %>
62
+
63
+ fhir_resource_validator do
64
+ igs '<%= ig_identifier %>'
65
+ message_filters = VALIDATION_MESSAGE_FILTERS
66
+
67
+ exclude_message do |message|
68
+
69
+ message_filters.any? { |filter| filter.match? message.message }
70
+ end
71
+
72
+ perform_additional_validation do |resource, profile_url|
73
+ ProvenanceValidator.validate(resource) if resource.instance_of?(FHIR::Provenance)
74
+ end
75
+ end
76
+
77
+ input :url,
78
+ title: 'FHIR Endpoint',
79
+ description: 'URL of the FHIR endpoint'
80
+
81
+ suite_option :smart_app_launch_version,
82
+ title: 'SMART App Launch Version',
83
+ list_options: [
84
+ {
85
+ label: 'SMART App Launch 1.0.0',
86
+ value: USCoreOptions::SMART_1
87
+ },
88
+ {
89
+ label: 'SMART App Launch 2.0.0',
90
+ value: USCoreOptions::SMART_2
91
+ },
92
+ {
93
+ label: 'SMART App Launch 2.2.0',
94
+ value: USCoreOptions::SMART_2_2
95
+ }
96
+ ]
97
+
98
+ group from: :<%= smart_app_launch_id %><% if us_core_7_and_above? %>,
99
+ required_suite_options: USCoreOptions::SMART_1_REQUIREMENT
100
+ group from: :<%= smart_app_launch_id %>,
101
+ required_suite_options: USCoreOptions::SMART_2_REQUIREMENT,
102
+ id: :<%= smart_app_launch_id %>_stu2
103
+ group from: :<%= smart_app_launch_id %>_stu2_2,
104
+ required_suite_options: USCoreOptions::SMART_2_2_REQUIREMENT<% end %>
105
+
106
+ group do
107
+ input :smart_credentials,
108
+ title: 'OAuth Credentials',
109
+ type: :oauth_credentials,
110
+ optional: true
111
+
112
+ fhir_client do
113
+ url :url
114
+ oauth_credentials :smart_credentials
115
+ end
116
+
117
+ title 'US Core FHIR API'
118
+ id :<%= fhir_api_group_id %><% if us_core_6_and_above? %>
119
+
120
+ config(
121
+ options: {
122
+ tag_requests: true
123
+ }
124
+ )<% end %>
125
+
126
+ group from: :<%= capability_statement_group_id %>
127
+ <% group_id_list.each do |id| %>
128
+ group from: :<%= id %><% end %>
129
+ group from: :<%= clinical_notes_guidance_group_id %><%if us_core_6_and_above? %>
130
+ group from: :<%= screening_assessment_id %><% end %>
131
+ group from: :us_core_311_data_absent_reason
132
+ end<% if us_core_6_and_above? %>
133
+
134
+ group from: :<%= granular_scopes_id %>,
135
+ required_suite_options: USCoreOptions::SMART_2_REQUIREMENT
136
+ group from: :<%= granular_scopes_id %>,
137
+ id: :<%= granular_scopes_id %>_stu2_2,
138
+ required_suite_options: USCoreOptions::SMART_2_2_REQUIREMENT
139
+ <% end %>
140
+
141
+ links [
142
+ {
143
+ type: 'report_issue',
144
+ label: 'Report Issue',
145
+ url: 'https://github.com/inferno-framework/us-core-test-kit/issues/'
146
+ },
147
+ {
148
+ type: 'source_code',
149
+ label: 'Open Source',
150
+ url: 'https://github.com/inferno-framework/us-core-test-kit/'
151
+ },
152
+ {
153
+ type: 'download',
154
+ label: 'Download',
155
+ url: 'https://github.com/inferno-framework/us-core-test-kit/releases/'
156
+ }
157
+ ]
158
+ end
159
+ end
160
+ end
@@ -0,0 +1,31 @@
1
+ require_relative '../../../validation_test'
2
+
3
+ module USCoreTestKit
4
+ module <%= module_name %>
5
+ class <%= class_name %> < Inferno::Test
6
+ include USCoreTestKit::ValidationTest
7
+
8
+ id :<%= test_id %>
9
+ title '<%= resource_type %> resources returned during previous tests conform to the <%= profile_name %>'
10
+ description %(
11
+ <%= description %>
12
+ )
13
+ output :dar_code_found, :dar_extension_found
14
+
15
+ def resource_type
16
+ '<%= resource_type %>'
17
+ end
18
+
19
+ def scratch_resources
20
+ scratch[:<%= profile_identifier %>_resources] ||= {}
21
+ end
22
+
23
+ run do
24
+ perform_validation_test(scratch_resources[:all] || [],
25
+ '<%= profile_url %>',
26
+ '<%= profile_version %>',
27
+ skip_if_empty: <%= skip_if_empty %>)
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,21 @@
1
+ # Note on this IGs folder
2
+
3
+ There are three reasons why it would be necessary to put an IG package.tgz in this folder. If none of these apply, you do not need to put any files here, or can consider removing any existing files to make it clear they are unused.
4
+
5
+ ## 1. Generated Test Suites
6
+ Some test kits use a "generator" to automatically generate the contents of a test suite for an IG. The IG files are required every time the test suites need to be regenerated. Examples of test kits that use this approach are the US Core Test Kit and CARIN IG for Blue Button® Test Kit.
7
+
8
+
9
+ ## 2. Non-published IG
10
+ If your IG, or the specific version of the IG you want to test against, is not published, then the validator service needs to load the IG from file in order to be able to validate resources with it. The IG must be referenced in the `fhir_resource_validator` block in the test suite definition by filename, ie:
11
+
12
+ ```ruby
13
+ fhir_resource_validator do
14
+ igs 'igs/filename.tgz'
15
+
16
+ ...
17
+ end
18
+ ```
19
+
20
+ ## 3. Inferno Validator UI
21
+ The Inferno Validator UI is configured to auto-load any IGs present in the igs folder and include them in all validations. The Inferno Validator UI is currently disabled by default, so this is only relevant if you choose to re-enable it. In general, the Inferno team is currently leaving IGs in this folder even if not otherwise necessary to make it easy to re-enable the validator UI.
@@ -0,0 +1,70 @@
1
+ require_relative 'version'
2
+
3
+ module USCoreTestKit
4
+ class Metadata < Inferno::TestKit
5
+ id :us_core_test_kit
6
+ title 'US Core Test Kit'
7
+ description <<~DESCRIPTION
8
+ The US Core Test Kit validates the conformance of a server implementation to a specific
9
+ version of the [US Core IG](http://hl7.org/fhir/us/core). Currently, Inferno can test
10
+ against implementations of following versions of the US Core IG:
11
+ [v3.1.1](http://hl7.org/fhir/us/core/STU3.1.1/),
12
+ [v4.0.0](http://hl7.org/fhir/us/core/STU4/),
13
+ [v5.0.1](http://hl7.org/fhir/us/core/STU5.0.1/),
14
+ [v6.1.0](https://hl7.org/fhir/us/core/STU6.1/),
15
+ and
16
+ [v7.0.0](https://hl7.org/fhir/us/core/STU7/).
17
+ <!-- break -->
18
+
19
+ This test kit is [open source](https://github.com/inferno-framework/us-core-test-kit#license)
20
+ and freely available for use or adoption by the health IT community including EHR vendors,
21
+ health app developers, and testing labs. It is built using the
22
+ [Inferno Framework](https://inferno-framework.github.io/inferno-core/).
23
+ The Inferno Framework is designed for reuse and aims to make it easier to build test kits
24
+ for any FHIR-based data exchange.
25
+
26
+ ## Status
27
+
28
+ The US Core Test Kit is actively developed and regularly updated. Starting with STU3,
29
+ each STU sequence is kept up-to-date with the latest version.
30
+
31
+ The test kit currently tests the following requirements:
32
+
33
+ - Support for Capability Statement
34
+ - Support for all US Core Profiles
35
+ - Searches required for each resource
36
+ - Support for Must Support Elements
37
+ - Profile Validation
38
+ - Reference Validation
39
+ - Clinical Notes Guidance
40
+ - Missing Data Guidance
41
+
42
+ See the test descriptions within the test kit for detail on the specific validations
43
+ performed as part of testing these requirements.
44
+
45
+ ## Repository
46
+
47
+ The US Core Test Kit GitHub repository can be [found here](https://github.com/inferno-framework/us-core-test-kit).
48
+
49
+ ## Providing Feedback and Reporting Issues
50
+
51
+ We welcome feedback on the tests, including but not limited to the following areas:
52
+
53
+ - Validation logic, such as potential bugs, lax checks, and unexpected failures.
54
+ - Requirements coverage, such as requirements that have been missed, tests that necessitate
55
+ features that the IG does not require, or other issues with the interpretation of the IG’s requirements.
56
+ - User experience, such as confusing or missing information in the test UI.
57
+
58
+ Please report any issues with this set of tests in the
59
+ [issues section](https://github.com/inferno-framework/us-core-test-kit/issues)
60
+ of the repository.
61
+ DESCRIPTION
62
+ suite_ids [:us_core_v311, :us_core_v400, :us_core_v501, :us_core_v610, :us_core_v700]
63
+ tags ['SMART App Launch', 'US Core']
64
+ last_updated LAST_UPDATED
65
+ version VERSION
66
+ maturity 'High'
67
+ authors ['Stephen MacVicar', 'Yunwei Wang']
68
+ repo 'https://github.com/inferno-framework/us-core-test-kit'
69
+ end
70
+ end
@@ -167,22 +167,7 @@ module USCoreTestKit
167
167
  def resource_is_valid_with_target_profile?(resource, target_profile)
168
168
  return true if target_profile.blank?
169
169
 
170
- # Only need to know if the resource is valid.
171
- # Calling resource_is_valid? causes validation errors to be logged.
172
- validator = find_validator(:default)
173
-
174
- target_profile_with_version = target_profile.include?('|') ? target_profile : "#{target_profile}|#{metadata.profile_version}"
175
-
176
- validator_response = validator.validate(resource, target_profile_with_version)
177
- outcome = validator.operation_outcome_from_hl7_wrapped_response(validator_response)
178
-
179
- message_hashes = outcome.issue&.map { |issue| validator.message_hash_from_issue(issue, resource) } || []
180
-
181
- message_hashes.concat(validator.additional_validation_messages(resource, target_profile_with_version))
182
-
183
- validator.filter_messages(message_hashes)
184
-
185
- message_hashes.none? { |message_hash| message_hash[:type] == 'error' }
170
+ resource_is_valid?(resource:, profile_url: target_profile, add_messages_to_runnable: false)
186
171
  end
187
172
  end
188
173
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module USCoreTestKit
4
- VERSION = '0.9.3'
4
+ VERSION = '0.10.0'
5
+ LAST_UPDATED = '2024-02-10'
5
6
  end
@@ -1,3 +1,4 @@
1
+ require_relative 'us_core_test_kit/metadata'
1
2
  require_relative 'us_core_test_kit/generated/v3.1.1/us_core_test_suite'
2
3
  require_relative 'us_core_test_kit/generated/v4.0.0/us_core_test_suite'
3
4
  require_relative 'us_core_test_kit/generated/v5.0.1/us_core_test_suite'