Module: Renalware::HD

Defined in:
app/models/renalware/hd.rb,
app/models/renalware/hd/diary.rb,
app/models/renalware/hd/patient.rb,
app/models/renalware/hd/profile.rb,
app/models/renalware/hd/session.rb,
app/models/renalware/hd/station.rb,
app/models/renalware/hd/version.rb,
app/models/renalware/hd/dialyser.rb,
app/models/renalware/hd/provider.rb,
app/models/renalware/hd/dialysate.rb,
app/models/renalware/hd/diary_slot.rb,
app/models/renalware/hd/session/dna.rb,
app/models/renalware/hd/master_diary.rb,
app/models/renalware/hd/session/open.rb,
app/models/renalware/hd/weekly_diary.rb,
app/models/renalware/hd/provider_unit.rb,
app/presenters/renalware/hd/null_slot.rb,
app/models/renalware/hd/preference_set.rb,
app/models/renalware/hd/session/closed.rb,
app/policies/renalware/hd/diary_policy.rb,
app/models/renalware/hd/session_factory.rb,
app/models/renalware/hd/cannulation_type.rb,
app/models/renalware/hd/patient_listener.rb,
app/models/renalware/hd/station_location.rb,
app/models/renalware/hd/transmission_log.rb,
app/policies/renalware/hd/session_policy.rb,
app/policies/renalware/hd/station_policy.rb,
app/models/renalware/hd/mdm_patients_form.rb,
app/models/renalware/hd/revise_hd_profile.rb,
app/presenters/renalware/hd/mdm_presenter.rb,
app/models/renalware/hd/mdm_patients_query.rb,
app/models/renalware/hd/patient_statistics.rb,
app/policies/renalware/hd/dialysate_policy.rb,
app/controllers/renalware/hd/mdm_controller.rb,
app/documents/renalware/hd/profile_document.rb,
app/documents/renalware/hd/session_document.rb,
app/models/renalware/hd/diurnal_period_code.rb,
app/models/renalware/hd/schedule_definition.rb,
app/presenters/renalware/hd/diary_presenter.rb,
app/controllers/renalware/hd/base_controller.rb,
app/models/renalware/hd/modality_description.rb,
app/policies/renalware/hd/dna_session_policy.rb,
app/models/renalware/hd/sessions/save_session.rb,
app/policies/renalware/hd/open_session_policy.rb,
app/presenters/renalware/hd/patient_presenter.rb,
app/presenters/renalware/hd/profile_presenter.rb,
app/presenters/renalware/hd/session_presenter.rb,
app/presenters/renalware/hd/station_presenter.rb,
app/models/renalware/hd/sessions/ongoing_query.rb,
app/models/renalware/hd/sessions/patient_query.rb,
app/presenters/renalware/hd/protocol_presenter.rb,
app/controllers/renalware/hd/diaries_controller.rb,
app/models/concerns/renalware/hd/session_scopes.rb,
app/policies/renalware/hd/closed_session_policy.rb,
app/presenters/renalware/hd/dashboard_presenter.rb,
app/controllers/renalware/hd/patients_controller.rb,
app/controllers/renalware/hd/sessions_controller.rb,
app/controllers/renalware/hd/stations_controller.rb,
app/presenters/renalware/hd/diary_slot_presenter.rb,
app/controllers/renalware/hd/dialysers_controller.rb,
app/controllers/renalware/hd/protocols_controller.rb,
app/jobs/renalware/hd/generate_monthly_statistics.rb,
app/presenters/renalware/hd/mdm_patient_presenter.rb,
app/controllers/renalware/hd/dashboards_controller.rb,
app/controllers/renalware/hd/dialysates_controller.rb,
app/models/renalware/hd/schedule_definition_filter.rb,
app/models/renalware/hd/sessions/auditable_session.rb,
app/controllers/renalware/hd/diary_slots_controller.rb,
app/models/renalware/hd/find_or_create_master_diary.rb,
app/models/renalware/hd/prescription_administration.rb,
app/controllers/renalware/hd/mdm_patients_controller.rb,
app/models/renalware/hd/archive_yesterdays_slots_job.rb,
app/presenters/renalware/hd/session_access_presenter.rb,
app/presenters/renalware/hd/profile_document_presenter.rb,
app/presenters/renalware/hd/protocol/session_presenter.rb,
app/controllers/renalware/hd/current_profile_controller.rb,
app/controllers/renalware/hd/preference_sets_controller.rb,
app/models/renalware/hd/patients_dialysing_by_day_query.rb,
app/presenters/renalware/hd/unmet_preferences_presenter.rb,
app/controllers/renalware/hd/ongoing_sessions_controller.rb,
app/models/renalware/hd/sessions/protocol_sessions_query.rb,
app/controllers/renalware/hd/cannulation_types_controller.rb,
app/controllers/renalware/hd/transmission_logs_controller.rb,
app/controllers/renalware/hd/unmet_preferences_controller.rb,
app/models/renalware/hd/update_rolling_patient_statistics.rb,
app/models/renalware/hd/find_or_create_diary_by_week_query.rb,
app/models/renalware/hd/sessions/close_stale_open_sessions.rb,
app/controllers/renalware/hd/historical_profiles_controller.rb,
app/jobs/renalware/hd/update_rolling_patient_statistics_job.rb,
app/models/renalware/hd/patients_dialysing_by_schedule_query.rb,
app/models/renalware/hd/patients_with_unmet_preferences_query.rb,
app/models/renalware/hd/sessions/auditable_session_collection.rb,
app/models/renalware/hd/sessions/latest_patient_sessions_query.rb,
app/models/renalware/hd/generate_monthly_statistics_for_patient.rb,
app/jobs/renalware/hd/generate_monthly_statistics_for_patient_job.rb,
app/models/renalware/hd/patients_dialysing_by_day_and_period_query.rb,
app/models/renalware/hd/sessions/auditable_patients_in_period_query.rb,
app/models/renalware/hd/sessions/auditable_patient_sessions_in_period_query.rb

Defined Under Namespace

Modules: Protocol, SessionScopes, Sessions Classes: ArchiveYesterdaysSlotsJob, BaseController, CannulationType, CannulationTypesController, ClosedSessionPolicy, CurrentProfileController, DNASessionPolicy, DashboardPresenter, DashboardsController, Dialysate, DialysatePolicy, DialysatesController, Dialyser, DialysersController, DiariesController, Diary, DiaryPolicy, DiaryPresenter, DiarySlot, DiarySlotPresenter, DiarySlotsController, DiurnalPeriodCode, FindOrCreateDiaryByWeekQuery, FindOrCreateMasterDiary, GenerateMonthlyStatistics, GenerateMonthlyStatisticsForPatient, GenerateMonthlyStatisticsForPatientJob, HistoricalProfilesController, MDMController, MDMPatientPresenter, MDMPatientsController, MDMPatientsForm, MDMPatientsQuery, MDMPresenter, MasterDiary, ModalityDescription, OngoingSessionsController, OpenSessionPolicy, Patient, PatientListener, PatientPresenter, PatientStatistics, PatientsController, PatientsDialysingByDayAndPeriodQuery, PatientsDialysingByDayQuery, PatientsDialysingByScheduleQuery, PatientsWithUnmetPreferencesQuery, PreferenceSet, PreferenceSetsController, PrescriptionAdministration, Profile, ProfileDocument, ProfileDocumentPresenter, ProfilePresenter, ProtocolPresenter, ProtocolsController, Provider, ProviderUnit, ReviseHDProfile, ScheduleDefinition, ScheduleDefinitionFilter, Session, SessionAccessPresenter, SessionDocument, SessionFactory, SessionPolicy, SessionPresenter, SessionsController, Station, StationLocation, StationPolicy, StationPresenter, StationsController, TransmissionLog, TransmissionLogsController, UnmetPreferencesController, UnmetPreferencesPresenter, UpdateRollingPatientStatistics, UpdateRollingPatientStatisticsJob, Version, WeeklyDiary

Constant Summary collapse

NullSlot =
Naught.build do |config|
  config.black_hole
  config.define_explicit_conversions
  config.predicates_return false

  attr_reader :diary_id, :diurnal_period_code_id, :station_id, :day_of_week

  def initialize(diary_id, diurnal_period_code_id, station_id, day_of_week)
    @diary_id = diary_id
    @diurnal_period_code_id = diurnal_period_code_id
    @station_id = station_id
    @day_of_week = day_of_week
  end

  def master?
    false
  end

  def cell_id
    "#{diurnal_period_code_id}-#{station_id}-#{day_of_week}"
  end

  def cache_key
    [
      self.class.name,
      diary_id,
      diurnal_period_code_id,
      station_id,
      day_of_week
    ].join("-")
  end
end
NullSessionDocument =
Naught.build do |config|
  config.black_hole
  config.define_explicit_conversions
  config.singleton
end

Class Method Summary collapse

Class Method Details

.cast_patient(patient) ⇒ Object



9
10
11
# File 'app/models/renalware/hd.rb', line 9

def self.cast_patient(patient)
  ActiveType.cast(patient, ::Renalware::HD::Patient)
end

.table_name_prefixObject



5
6
7
# File 'app/models/renalware/hd.rb', line 5

def self.table_name_prefix
  "hd_"
end