Class: Crucible::Tests::ConnectathonAttachmentTrackTest

Inherits:
BaseSuite show all
Defined in:
lib/tests/suites/connectathon_attachment_track_test.rb

Constant Summary

Constants inherited from BaseSuite

BaseSuite::EXCLUDED_RESOURCES

Constants inherited from BaseTest

BaseTest::BASE_SPEC_LINK, BaseTest::JSON_FIELDS, BaseTest::METADATA_FIELDS, BaseTest::REST_SPEC_LINK, BaseTest::STATUS

Instance Attribute Summary collapse

Attributes inherited from BaseTest

#category, #tags, #tests_subset, #warnings

Instance Method Summary collapse

Methods inherited from BaseSuite

#build_messages, #collect_metadata, fhir_resources, #links, #metadata, #parse_operation_outcome, #requires, #resource_category, test, #title, #validates

Methods inherited from BaseTest

#author, #details, #execute, #execute_test_method, #execute_test_methods, #ignore_client_exception, #multiserver, #requires_authorization, #tests, #warning

Methods included from Assertions

#assert, #assert_bundle_entry_count, #assert_bundle_response, #assert_bundle_transactions_okay, #assert_equal, #assert_etag_present, #assert_last_modified_present, #assert_minimum, #assert_navigation_links, #assert_operator, #assert_resource_content_type, #assert_resource_type, #assert_response_bad, #assert_response_code, #assert_response_conflict, #assert_response_created, #assert_response_gone, #assert_response_not_found, #assert_response_ok, #assert_valid_content_location_present, #assert_valid_profile, #assert_valid_resource_content_type_present, #assertion_negated, #skip

Constructor Details

#initialize(client1, client2 = nil) ⇒ ConnectathonAttachmentTrackTest

Returns a new instance of ConnectathonAttachmentTrackTest.



16
17
18
19
20
# File 'lib/tests/suites/connectathon_attachment_track_test.rb', line 16

def initialize(client1, client2=nil)
  super(client1, client2)
  @tags.append('connectathon')
  @category = {id: 'connectathon', title: 'Connectathon'}
end

Instance Attribute Details

#attachmentsObject

Returns the value of attribute attachments.



6
7
8
# File 'lib/tests/suites/connectathon_attachment_track_test.rb', line 6

def attachments
  @attachments
end

Instance Method Details

#descriptionObject



12
13
14
# File 'lib/tests/suites/connectathon_attachment_track_test.rb', line 12

def description
  'Test support for using FHIR-based messaging for exchanging attachments, particularly for claims processing/payer provider interactions.'
end

#idObject



8
9
10
# File 'lib/tests/suites/connectathon_attachment_track_test.rb', line 8

def id
  'ConnectathonAttachmentTrackTest'
end

#setupObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/tests/suites/connectathon_attachment_track_test.rb', line 22

def setup
  @attachments = {}
  @mime_types = {}
  @records = {}
  @attachments["pdf"] = 'ccda_pdf.pdf'
  @attachments["structured"] = 'ccda_structured.xml'
  @attachments["unstructured"] = 'ccda_unstructured.xml'

  @mime_types["pdf"] = "application/pdf"
  @mime_types["structured"] = "application/xml"
  @mime_types["unstructured"] = "application/xml"

  @resources = Crucible::Generator::Resources.new

  patient = @resources.load_fixture("patient/patient-register-create.xml")
  practitioner = @resources.load_fixture("practitioner/practitioner-register-create.xml")


  create_object(patient, :patient)
  create_object(practitioner, :practitioner)
end

#teardownObject



44
45
46
47
48
# File 'lib/tests/suites/connectathon_attachment_track_test.rb', line 44

def teardown
  @records.each_value do |value|
    @client.destroy(value.class, value.id)
  end
end