Sha256: 06557f0d214ddda87a870ea73beef9c3c3e192c5bd4b6a97ba306512c818129a

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

require 'json'
require_relative './version'

module UDSPlusTestKit
    class ValidateAdverseEventTest < Inferno::Test
        id :uds_plus_validate_adverse_event_test
        title 'Validate UDS+ Adverse Event Data'
        description %(
            Test takes the Adverse Event resources identified 
            by the import manifest, and validates whether they conform 
            to their UDS+ Structure Definitions.
        )

        def data_scratch
            scratch[:data_resources] ||= {}
        end

        def data_to_test
            data_scratch['AdverseEvent'] ||= []
        end

        run do
            omit_if data_to_test.empty?, "No data of this type was identified."

            profile_definition = 'http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-adverseevent'
            profile_with_version = "#{profile_definition}|#{UDS_PLUS_VERSION}"

            data_to_test.each do |resource|
                assert_valid_resource(resource: resource, profile_url: profile_with_version)
            end
        end
    end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
uds_plus_test_kit-1.1.2 lib/uds_plus_test_kit/validate_adverse_event_test.rb
uds_plus_test_kit-1.1.1 lib/uds_plus_test_kit/validate_adverse_event_test.rb
uds_plus_test_kit-1.1.0 lib/uds_plus_test_kit/validate_adverse_event_test.rb
uds_plus_test_kit-1.0.7 lib/uds_plus_test_kit/validate_adverse_event_test.rb