Sha256: 89af3614bc0dc9301a9a8881aa0526b0070847e0ef96829c40783c92153ef4e1

Contents?: true

Size: 1.56 KB

Versions: 15

Compression:

Stored size: 1.56 KB

Contents

module HealthDataStandards
  module Export
    module Helper
      module HTMLViewHelper
        include HealthDataStandards::Export::Helper::ScoopedViewHelper

        def decode_hqmf_section(section, oid)
          if oid
            definition = HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid)
            definition ||= HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid, 'r2')
            definition['definition'].pluralize.to_sym
          else
            section
          end
        end

        def decode_hqmf_status(status, oid)
          if oid
            definition = HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid)
            definition ||= HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid, 'r2')
            definition['status']
          else
            status
          end
        end

        def decode_hqmf_description(description, oid)
          if oid
            definition = HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid)
            definition ||= HealthDataStandards::Util::HQMFTemplateHelper.definition_for_template_id(oid, 'r2')
            definition_text = definition['definition']
            status_text = definition['status']
            unless status.blank?
              "#{definition_text.titleize}, #{status_text.titleize}".to_sym
            else
              "#{definition_text.titleize}".to_sym
            end
          else
            description
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
health-data-standards-4.3.5 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.3.4 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.3.3 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.3.2 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.3.1 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.3.0 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.2.0 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.1.0 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.0.6 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.0.5 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.0.4 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.0.3 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.0.2 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.0.1 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-4.0.0 lib/health-data-standards/export/helper/html_view_helper.rb