Sha256: 7b20fad2cf84ba17c56bb782e99627ce43084c13b33c617f8d8d67ef30901d1b

Contents?: true

Size: 1.02 KB

Versions: 9

Compression:

Stored size: 1.02 KB

Contents

require 'json'
require_relative './version'

module UDSPlusTestKit
    class ValidateDiagnosisTest < Inferno::Test
        id :uds_plus_validate_diagnosis_test
        title 'Validate UDS+ Diagnosis Data'
        description %(
            Test takes the Diagnosis 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['Condition'] ||= []
        end

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

            profile_definition = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-diagnosis'
            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

9 entries across 9 versions & 1 rubygems

Version Path
uds_plus_test_kit-1.0.6 lib/uds_plus_test_kit/validate_diagnosis_test.rb
uds_plus_test_kit-1.0.5 lib/uds_plus_test_kit/validate_diagnosis_test.rb
uds_plus_test_kit-1.0.4 lib/uds_plus_test_kit/validate_diagnosis_test.rb
uds_plus_test_kit-1.0.3 lib/uds_plus_test_kit/validate_diagnosis_test.rb
uds_plus_test_kit-1.0.2 lib/uds_plus_test_kit/validate_diagnosis_test.rb
uds_plus_test_kit-1.0.1 lib/uds_plus_test_kit/validate_diagnosis_test.rb
uds_plus_test_kit-1.0.0 lib/uds_plus_test_kit/validate_diagnosis_test.rb
uds_plus_test_kit-0.9.1 lib/uds_plus_test_kit/validate_diagnosis_test.rb
uds_plus_test_kit-0.9.0 lib/uds_plus_test_kit/validate_diagnosis_test.rb