class Note
Schema Information
Table name: notes
id :bigint not null, primary key body :text not null created_at :datetime not null updated_at :datetime not null created_by_user_id :bigint not null patient_id :bigint not null session_id :bigint not null
Indexes
index_notes_on_created_by_user_id (created_by_user_id) index_notes_on_patient_id (patient_id) index_notes_on_session_id (session_id)
Foreign Keys
fk_rails_... (created_by_user_id => users.id) fk_rails_... (patient_id => patients.id) fk_rails_... (session_id => sessions.id)
Public Instance Methods
Source
# File app/models/note.rb, line 42 def academic_year = created_at.to_date.academic_year def year_group = patient.year_group(academic_year:)
Source
# File app/models/note.rb, line 38 def programmes = session.programmes_for(year_group:) private def academic_year = created_at.to_date.academic_year def year_group = patient.year_group(
Source
# File app/models/note.rb, line 44 def year_group = patient.year_group(academic_year:) end