Module: Inferno::DSL::FHIRValidation Deprecated
- Included in:
- Entities::TestGroup, Entities::TestSuite
- Defined in:
- lib/inferno/dsl/fhir_validation.rb
Overview
Deprecated.
Use FHIRResourceValidation instead
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.
Defined Under Namespace
Modules: ClassMethods Classes: Validator
Instance Method Summary collapse
-
#find_validator(validator_name) ⇒ Object
Find a particular validator.
-
#resource_is_valid?(resource: self.resource, profile_url: nil, validator: :default, add_messages_to_runnable: true, validator_response_details: nil) ⇒ Boolean
Perform validation, and add validation messages to the runnable.
Instance Method Details
#find_validator(validator_name) ⇒ Object
Find a particular validator. Looks through a runnable’s parents up to the suite to find a validator with a particular name
50 51 52 |
# File 'lib/inferno/dsl/fhir_validation.rb', line 50 def find_validator(validator_name) self.class.find_validator(validator_name, ) end |
#resource_is_valid?(resource: self.resource, profile_url: nil, validator: :default, add_messages_to_runnable: true, validator_response_details: nil) ⇒ Boolean
Perform validation, and add validation messages to the runnable
38 39 40 41 42 43 44 45 46 |
# File 'lib/inferno/dsl/fhir_validation.rb', line 38 def resource_is_valid?( resource: self.resource, profile_url: nil, validator: :default, add_messages_to_runnable: true, validator_response_details: nil ) find_validator(validator).resource_is_valid?(resource, profile_url, self, add_messages_to_runnable:, validator_response_details:) end |