Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FI-3079 Combine general filter and version specific filter #202

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/us_core_test_kit/generated/v3.1.1/us_core_test_suite.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions lib/us_core_test_kit/generated/v4.0.0/us_core_test_suite.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions lib/us_core_test_kit/generated/v5.0.1/us_core_test_suite.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions lib/us_core_test_kit/generated/v6.1.0/us_core_test_suite.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions lib/us_core_test_kit/generated/v7.0.0/us_core_test_suite.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions lib/us_core_test_kit/generator/suite_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def version_specific_message_filters
case ig_metadata.reformatted_version
when 'v610'
[
%r{Observation\.effective\.ofType\(Period\):.*http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus},
%r{Observation: Slice 'Observation\.effective\[x\]:effectiveDateTime':.*http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus},
%r{Observation\.effective\.ofType\(Period\).*This element is not allowed by the profile http://hl7.org/fhir/StructureDefinition/dateTime}
%r{Observation\.effective\.ofType\(Period\):.*http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus|6.1.0},
%r{Observation: Slice 'Observation\.effective\[x\]:effectiveDateTime':.*http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus|6.1.0},
%r{Observation\.effective\.ofType\(Period\)\.end: This element is not allowed by the profile http://hl7.org/fhir/StructureDefinition/dateTime}
]
else
[]
Expand Down
6 changes: 4 additions & 2 deletions lib/us_core_test_kit/generator/templates/suite.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module USCoreTestKit
)
version VERSION

VALIDATION_MESSAGE_FILTERS = [
GENERAL_MESSAGE_FILTERS = [
%r{Sub-extension url 'introspect' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris},
%r{Sub-extension url 'revoke' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris},
/Observation\.effective\.ofType\(Period\): .*vs-1:/, # Invalid invariant in FHIR v4.0.1
Expand All @@ -50,6 +50,8 @@ module USCoreTestKit
<%= version_specific_message_filters.map { |filter| "%r{#{filter.source}}" }.join(",\n ") %>
].freeze
<% end %>
VALIDATION_MESSAGE_FILTERS = GENERAL_MESSAGE_FILTERS + VERSION_SPECIFIC_MESSAGE_FILTERS

def self.metadata
@metadata ||= YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)[:groups].map do |raw_metadata|
Generator::GroupMetadata.new(raw_metadata)
Expand All @@ -60,7 +62,7 @@ module USCoreTestKit

fhir_resource_validator do
igs '<%= ig_identifier %>'
message_filters = VALIDATION_MESSAGE_FILTERS + VERSION_SPECIFIC_MESSAGE_FILTERS
message_filters = VALIDATION_MESSAGE_FILTERS

exclude_message do |message|

Expand Down
Loading