Sha256: c8f05e115b259aa627d7e9bcad984a33ccf02330618c68a2d9d2977394c007b2

Contents?: true

Size: 1.17 KB

Versions: 8

Compression:

Stored size: 1.17 KB

Contents

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

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

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

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
health-data-standards-3.6.1 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-3.5.3 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-3.5.2 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-3.5.1 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-3.5.0 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-3.4.6 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-3.4.5 lib/health-data-standards/export/helper/html_view_helper.rb
health-data-standards-3.4.4 lib/health-data-standards/export/helper/html_view_helper.rb