Module: Inferno::DSL::FHIRResourceValidation

Included in:
Entities::TestSuite
Defined in:
lib/inferno/dsl/fhir_resource_validation.rb

Overview

This module contains the methods needed to configure a validator to perform validation of FHIR resources. The actual validation is performed by an external FHIR validation service. Tests will typically rely on ‘assert_valid_resource` for validation rather than directly calling methods on a validator.

Examples:


validator do
  url 'http://example.com/validator'
  exclude_message { |message| message.type == 'info' }
  perform_additional_validation do |resource, profile_url|
    if something_is_wrong
      { type: 'error', message: 'something is wrong' }
    else
      { type: 'info', message: 'everything is ok' }
    end
  end
end

Defined Under Namespace

Modules: ClassMethods Classes: CliContext, Validator

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



24
25
26
# File 'lib/inferno/dsl/fhir_resource_validation.rb', line 24

def self.included(klass)
  klass.extend ClassMethods
end