Class: DaVinciCRDTestKit::V201::ClientCardMustSupportExternalReferenceTest

Inherits:
Inferno::Test
  • Object
show all
Includes:
CardsIdentification
Defined in:
lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_external_reference.rb

Constant Summary collapse

ALL_HOOKS =
[
  APPOINTMENT_BOOK_TAG,
  ENCOUNTER_START_TAG,
  ENCOUNTER_DISCHARGE_TAG,
  ORDER_DISPATCH_TAG,
  ORDER_SELECT_TAG,
  ORDER_SIGN_TAG
].freeze

Constants included from CardsIdentification

CardsIdentification::ADDITIONAL_ORDERS_EXPECTED_RESOURCE_TYPES, CardsIdentification::ADDITIONAL_ORDERS_RESPONSE_TYPE, CardsIdentification::COVERAGE_INFORMATION_RESPONSE_TYPE, CardsIdentification::COVERAGE_INFO_CONFIGURATION_CODE, CardsIdentification::COVERAGE_INFO_EXPECTED_RESOURCE_TYPES, CardsIdentification::COVERAGE_INFO_EXT_URL, CardsIdentification::CREATE_OR_UPDATE_COVERAGE_RESPONSE_TYPE, CardsIdentification::EXTERNAL_REFERENCE_RESPONSE_TYPE, CardsIdentification::FORM_COMPLETION_RESPONSE_TYPE, CardsIdentification::INSTRUCTIONS_RESPONSE_TYPE, CardsIdentification::LAUNCH_SMART_APP_RESPONSE_TYPE, CardsIdentification::PROPOSE_ALTERNATIVE_REQUEST_EXPECTED_RESOURCE_TYPES, CardsIdentification::PROPOSE_ALTERNATIVE_REQUEST_RESPONSE_TYPE

Constants included from ProfilesAndResourceTypes

ProfilesAndResourceTypes::ORDER_OR_ENCOUNTER_RESOURCE_CLASSES, ProfilesAndResourceTypes::ORDER_RESOURCE_CLASSES, ProfilesAndResourceTypes::ORDER_RESOURCE_TYPES

Constants included from RequestsLogicalModelValidation

RequestsLogicalModelValidation::CRD_CDS_HOOK_REQUEST_MODEL_URL, RequestsLogicalModelValidation::PERFORMER_ALLOWED_RESOURCE_TYPES, RequestsLogicalModelValidation::USER_ID_ALLOWED_RESOURCE_TYPES

Instance Method Summary collapse

Methods included from CardsIdentification

#additional_orders_response_type?, #cache_sorted_cards, #check_action_type, #coverage_info_card_type?, #coverage_info_configuration_disabled?, #coverage_info_content, #coverage_info_response?, #coverage_info_system_action_type?, #coverage_information_response_type?, #create_or_update_coverage_action_response_type?, #create_or_update_coverage_card_response_type?, #create_questionnaire_action_response_type?, #disable_coverage_info_configuration!, #extension_url, #external_reference_response_type?, #extract_coverage_information_extensions, #form_completion_action_response_type?, #form_completion_card_response_type?, #form_completion_task_questionnaire?, #hook_instances_from_requests, #identify_action_type, #identify_card_type, #initialize_sorted_cards_hash, #instructions_response_type?, #launch_smart_app_response_type?, #list_card_types_in_requests, #propose_alternative_request_response_type?, #sort_card_types_from_request, #sorted_cards_cached?, #sorted_cards_from_cache, #sorted_cards_from_requests

Methods included from HookRequestFieldValidation

#hook_request_context_check, #hook_request_optional_fields_check, #hook_request_prefetch_check, #hook_request_required_fields_check, #json_parse, #no_error_validation

Methods included from ProfilesAndResourceTypes

#structure_definition_map, #structure_definition_map_v201, #structure_definition_map_v221

Methods included from ServerBaseURLs

#client_fhir_base_url, #fhir_url, #instance_url, #search_url

Methods included from BaseURLs

#inferno_base_url, #resume_fail_url, #resume_pass_url

Methods included from RequestsLogicalModelValidation

#validate_request_against_logical_model

Methods included from LogicalModelsOverrideHelper

#allowed_resource_type?, #check_appointment_conformance, #check_order_like_resource_conformance, #check_resource_conformance_to_coverage_profile, #check_resource_conformance_to_order_or_encounter_profile, #check_resource_conformance_to_order_profile, #check_resource_conformance_to_questionnaire_task_profile, #check_resource_type_and_validate, #local_reference?, #manually_check_appointment_validation_errors, #parse_action_resource, #primary_performer_type?, #referenced_resource_present_in_bundle?, #reject_resource_issues, #resolved_participant_patient_slice_issue?, #resolved_participant_primary_performer_slice_issue?

Methods included from SuggestionActionsValidation

#action_fields_validation, #action_resource_type_check, #actions_check

Instance Method Details

#configured_hook_nameObject



27
28
29
# File 'lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_external_reference.rb', line 27

def configured_hook_name
  config.options[:hook_name]
end

#crd_test_groupObject



31
32
33
# File 'lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_external_reference.rb', line 31

def crd_test_group
  config.options[:crd_test_group]
end

#load_requests_for_tags(tags_to_load) ⇒ Object



49
50
51
# File 'lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_external_reference.rb', line 49

def load_requests_for_tags(tags_to_load)
  load_tagged_requests(*tags_to_load)
end

#requests_to_analyzeObject



39
40
41
42
43
44
45
46
47
# File 'lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_external_reference.rb', line 39

def requests_to_analyze
  if configured_hook_name.present?
    load_requests_for_tags(tags_to_load(configured_hook_name))
  else
    ALL_HOOKS.each_with_object([]) do |hook_name, request_list|
      request_list.concat(load_requests_for_tags(tags_to_load(hook_name)))
    end
  end
end

#tags_to_load(hook_name) ⇒ Object



35
36
37
# File 'lib/davinci_crd_test_kit/client/v2.0.1/must_support/client_card_must_support_external_reference.rb', line 35

def tags_to_load(hook_name)
  crd_test_group.present? ? [hook_name, crd_test_group] : [hook_name]
end