Sha256: 95fec10fcb2810416d83fd7954249eeb334fbb152cbbac7d3ffc2a3f6d58dd87

Contents?: true

Size: 1.21 KB

Versions: 19

Compression:

Stored size: 1.21 KB

Contents

module <%= module_name %>
  class PatientGroup < Inferno::TestGroup
    title 'Patient Tests'
    description 'Verify that the server makes Patient resources available'
    id :patient_group

    test do
      title 'Server returns requested Patient resource from the Patient read interaction'
      description %(
        Verify that Patient resources can be read from the server.
      )

      input :patient_id,
            title: 'Patient ID'

      # Named requests can be used by other tests
      makes_request :patient

      run do
        fhir_read(:patient, patient_id, name: :patient)

        assert_response_status(200)
        assert_resource_type(:patient)
        assert resource.id == patient_id,
               "Requested resource with id #{patient_id}, received resource with id #{resource.id}"
      end
    end

    test do
      title 'Patient resource is valid'
      description %(
        Verify that the Patient resource returned from the server is a valid FHIR resource.
      )
      # This test will use the response from the :patient request in the
      # previous test
      uses_request :patient

      run do
        assert_resource_type(:patient)
        assert_valid_resource
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
inferno_core-0.6.1 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.6.0 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.5.4 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.5.3 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.5.2 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.5.1 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.5.0 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.44 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.43 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.42 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.41 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.40 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.39 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.38 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.35 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.34 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.33 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.32 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
inferno_core-0.4.31 lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt