Sha256: 844e9db7b92710ba083246874665eefacd018bb51f9483387867acfcc27febce

Contents?: true

Size: 845 Bytes

Versions: 53

Compression:

Stored size: 845 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/virology"

module Renalware
  module Virology
    class DashboardPresenter
      include PresenterHelper

      attr_reader_initialize :patient

      def latest_hep_b_antibody_statuses
        @latest_hep_b_antibody_statuses ||= begin
          observation_descriptions = Renalware::Pathology::ObservationDescription.for(Array("BHBS"))
          Renalware::Pathology::CreateObservationsGroupedByDateTable.new(
            patient: patient,
            observation_descriptions: observation_descriptions,
            page: 1,
            per_page: 5
          ).call
        end
      end

      def latest_hep_b_antibody_statuses?
        latest_hep_b_antibody_statuses.rows.any?
      end

      def vaccinations
        Vaccination.for_patient(patient)
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
renalware-core-2.0.166 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.165 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.164 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.163 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.162 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.161 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.160 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.159 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.158 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.157 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.156 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.155 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.153 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.152 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.151 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.149 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.148 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.147 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.146 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.145 app/presenters/renalware/virology/dashboard_presenter.rb