class CancerRegistryReportingTestKit::HDEAV100::CcrrContentBundleParseAndValidationTest
def add_ms_resources_to_scratch(reports)
def add_ms_resources_to_scratch(reports) reports.each_with_index do |bundle, index| parsed_bundle = parse_bundle(FHIR.from_contents(bundle.to_json), index).first next unless parsed_bundle.present? report_hash = url_keys_to_group_keys(parsed_bundle) report_hash.each do |group, resources| next unless resources.present? scratch[group] ||= {} scratch[group][:all] ||= [] scratch[group][:all].concat(resources) end end end
def resource_type
def resource_type 'Bundle' end
def scratch_resources
def scratch_resources scratch[:ccrr_content_bundle_resources] ||= {} end
def url_keys_to_group_keys(report_hash)
def url_keys_to_group_keys(report_hash) report_hash.transform_keys { |key| :"#{HdeaGenerator::Naming.snake_case_for_url(key)}" } end