Sha256: 56adf2e87f3f99819733b0b061ebd3b8eb6881cf3eb33a2de6d37dfd8dcaca25

Contents?: true

Size: 1.04 KB

Versions: 16

Compression:

Stored size: 1.04 KB

Contents

module Qrda
  module Export
    module Helper
      module PatientViewHelper
        def provider
          JSON.parse(@provider.to_json) if @provider
        end

        def patient
          JSON.parse(@patient.to_json)
        end

        def provider_street
          self['street'].join('')
        end

        def provider_npi
          return nil unless self['ids']
          self['ids'].map { |id| id if id['namingSystem'] == '2.16.840.1.113883.4.6' }.compact
        end

        def provider_tin
          return nil unless self['ids']
          self['ids'].map { |id| id if id['namingSystem'] == '2.16.840.1.113883.4.2' }.compact
        end

        def provider_ccn
          return nil unless self['ids']
          self['ids'].map { |id| id if id['namingSystem'] == '2.16.840.1.113883.4.336' }.compact
        end

        def provider_type_code
          self['specialty']
        end

        def mrn
          @patient.id.to_s
        end

        def given_name
          self['givenNames'].join(' ')
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
cqm-reports-2.1.1 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-2.1.0 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-3.0.1 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-3.0.0 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-2.0.8 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-2.0.7 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-2.0.6 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-2.0.5 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-3.0.0.pre.alpha.2 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-2.0.4 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-2.0.3 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-3.0.0.pre.alpha.1 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-2.0.2 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-2.0.1 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-2.0.0 lib/qrda-export/helper/patient_view_helper.rb
cqm-reports-1.0.0.0 lib/qrda-export/helper/patient_view_helper.rb