Class: Renalware::Patients::SummaryPart
Constant Summary
Constants inherited
from SummaryPart
SummaryPart::DATE_FORMAT
Instance Method Summary
collapse
Methods inherited from SummaryPart
#cache?, #cache_key, #render?
Instance Method Details
#bookmark ⇒ Object
28
29
30
31
32
|
# File 'app/presenters/renalware/patients/summary_part.rb', line 28
def bookmark
return if current_user.blank?
patients_user.bookmark_for_patient(patient)
end
|
#bookmark_notes ⇒ Object
24
25
26
|
# File 'app/presenters/renalware/patients/summary_part.rb', line 24
def bookmark_notes
bookmark&.notes
end
|
38
39
40
41
42
43
44
45
46
47
48
|
# File 'app/presenters/renalware/patients/summary_part.rb', line 38
def bookmark_tags
return [] if bookmark.blank?
return [] if bookmark.tags.blank?
bookmark
.tags
.split(",")
.reject(&:blank?)
.map(&:strip)
.uniq
end
|
#bookmarked? ⇒ Boolean
20
21
22
|
# File 'app/presenters/renalware/patients/summary_part.rb', line 20
def bookmarked?
bookmark.present?
end
|
#on_worryboard? ⇒ Boolean
12
13
14
|
# File 'app/presenters/renalware/patients/summary_part.rb', line 12
def on_worryboard?
worry.present?
end
|
#patients_user ⇒ Object
34
35
36
|
# File 'app/presenters/renalware/patients/summary_part.rb', line 34
def patients_user
Patients.cast_user(current_user)
end
|
#to_partial_path ⇒ Object
8
9
10
|
# File 'app/presenters/renalware/patients/summary_part.rb', line 8
def to_partial_path
"renalware/patients/summary_part"
end
|
#worryboard_notes ⇒ Object
16
17
18
|
# File 'app/presenters/renalware/patients/summary_part.rb', line 16
def worryboard_notes
worry&.notes
end
|