Class: USCoreTestKit::ScreeningAssessmentCategoryTest
- Inherits:
-
Inferno::Test
- Object
- Inferno::Test
- USCoreTestKit::ScreeningAssessmentCategoryTest
- Includes:
- SearchTest
- Defined in:
- lib/us_core_test_kit/custom_groups/screening_assessment_category_test.rb
Constant Summary
Constants included from WellKnownCodeSystems
WellKnownCodeSystems::HL7_CODE_SYSTEMS, WellKnownCodeSystems::WELL_KNOWN_CODE_SYSTEMS
Instance Method Summary collapse
- #category_found(resource_type:, patient_id:, category_search_values:, missing_categories:) ⇒ Object
-
#tags(_params) ⇒ Object
Disable tagging requests since this test doesn’t have properties defined.
Methods included from SearchTest
#all_comparator_searches_tested?, #all_provenance_revinclude_search_params, #all_scratch_resources, #all_search_params, #all_search_params_present?, #all_search_variants_tested?, #any_valid_search_params?, #array_of_codes, #check_resource_against_params, #check_search_response, #date_comparator_value, #default_search_values, #element_has_valid_value?, #empty_search_params_message, #excluded_code?, #fetch_and_assert_all_bundled_resources, #filter_adi_document_reference, #filter_conditions, #filter_devices, #fixed_value_search_param_name, #fixed_value_search_param_values, #fixed_value_search_params, #initial_search_variant_test_records, #is_reference_match?, #no_resources_skip_message, #patient_id_list, #patient_id_param?, #patient_search?, #perform_comparator_searches, #perform_multiple_or_search_test, #perform_post_search, #perform_reference_with_type_search, #perform_search, #perform_search_with_status, #perform_search_with_system, #prefer_well_known_code_system, #references_to_save, #required_comparators, #resource_matches_param?, #run_provenance_revinclude_search_test, #run_search_test, #save_delayed_references, #save_resource_reference, #scratch_resources_for_patient, #search_and_check_response, #search_param_paths, #search_param_value, #search_params_tag, #search_params_with_values, #search_variant_test_records, #status_search_param_name, #status_search_values, #test_medication_inclusion, #unable_to_resolve_params_message, #unescape_search_value
Methods included from WellKnownCodeSystems
Methods included from ResourceSearchParamChecker
#element_has_valid_value?, #resource_matches_param?, #search_param_paths
Methods included from DateSearchValidation
#fhir_date_comparer, #get_fhir_datetime_range, #get_fhir_period_range, #is_date?, #validate_date_search, #validate_datetime_search, #validate_period_search
Instance Method Details
#category_found(resource_type:, patient_id:, category_search_values:, missing_categories:) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/us_core_test_kit/custom_groups/screening_assessment_category_test.rb', line 21 def category_found(resource_type:, patient_id:, category_search_values:, missing_categories:) search_params = { patient: patient_id } category_search_values.each do |category_search_value| search_params[:category] = category_search_value search_and_check_response(search_params, resource_type) resources = fetch_all_bundled_resources(resource_type:) .select { |resource| resource.resourceType == resource_type } resources.each do |resource| resource.category&.each do |category| category.coding&.each do |coding| missing_categories.delete_if { |item| item[:system] == coding.system && item[:code] == coding.code } end end break if missing_categories.empty? end break if missing_categories.empty? end end |
#tags(_params) ⇒ Object
Disable tagging requests since this test doesn’t have properties defined. TODO: investigate whether we need to tag these for granular scope checking.
17 18 19 |
# File 'lib/us_core_test_kit/custom_groups/screening_assessment_category_test.rb', line 17 def (_params) nil end |