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.144 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.143 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.142 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.141 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.140 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.139 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.138 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.137 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.136 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.135 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.134 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.133 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.132 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.131 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.130 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.129 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.128 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.127 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.126 app/presenters/renalware/virology/dashboard_presenter.rb
renalware-core-2.0.125 app/presenters/renalware/virology/dashboard_presenter.rb