Class: Crucible::Tests::ConnectathonLabOrderTrackTest
Constant Summary
Constants inherited from BaseSuite
Constants inherited from BaseTest
BaseTest::BASE_SPEC_LINK, BaseTest::JSON_FIELDS, BaseTest::METADATA_FIELDS, BaseTest::REST_SPEC_LINK, BaseTest::STATUS
Instance Attribute Summary
Attributes inherited from BaseTest
#category, #tags, #tests_subset, #warnings
Instance Method Summary collapse
- #description ⇒ Object
- #id ⇒ Object
-
#initialize(client1, client2 = nil) ⇒ ConnectathonLabOrderTrackTest
constructor
A new instance of ConnectathonLabOrderTrackTest.
- #setup ⇒ Object
- #teardown ⇒ Object
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) ⇒ ConnectathonLabOrderTrackTest
Returns a new instance of ConnectathonLabOrderTrackTest.
13 14 15 16 17 |
# File 'lib/tests/suites/connectathon_lab_order_track.rb', line 13 def initialize(client1, client2=nil) super(client1, client2) # @tags.append('connectathon') @category = {id: 'connectathon', title: 'Connectathon'} end |
Instance Method Details
#description ⇒ Object
9 10 11 |
# File 'lib/tests/suites/connectathon_lab_order_track.rb', line 9 def description 'Connectathon Lab Order Track focuses on DiagnosticRequest, Order, Observation and Specimen.' end |
#id ⇒ Object
5 6 7 |
# File 'lib/tests/suites/connectathon_lab_order_track.rb', line 5 def id 'ConnectathonLabOrderTrackTest' end |
#setup ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/tests/suites/connectathon_lab_order_track.rb', line 19 def setup @resources = Crucible::Generator::Resources.new @records = {} patient = @resources.load_fixture('patient/patient-uslab-example1.xml') provider = @resources.load_fixture('practitioner/pract-uslab-example1.xml') performer = @resources.load_fixture('practitioner/pract-uslab-example3.xml') organization = @resources.load_fixture('organization/org-uslab-example3.xml') specimen_100 = @resources.load_fixture('specimen/spec-100.xml') specimen_400 = @resources.load_fixture('specimen/spec-400.xml') specimen_uslab = @resources.load_fixture('specimen/spec-400.xml') # Create our reference patient create_object(patient, :patient) # Create our reference provider (Order Orderer) create_object(provider, :provider) # Create our reference performer (Order performer) create_object(performer, :performer) # Create the Organization all of these belong to create_object(organization, :organization) specimen_100.subject = @records[:patient].to_reference create_object(specimen_100, :spec_100) specimen_400.subject = @records[:patient].to_reference create_object(specimen_400, :spec_400) specimen_uslab.subject = @records[:patient].to_reference create_object(specimen_uslab, :spec_uslab) end |
#teardown ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'lib/tests/suites/connectathon_lab_order_track.rb', line 55 def teardown resourceType = ['DiagnosticReport','DiagnosticRequest','Observation','Specimen','Practitioner','Patient','Organization'] resourceType.each do |type| @records.each_value do |value| @client.destroy(value.class, value.id) if value.resourceType==type end end end |