Class: Renalware::Patients::PrimaryCarePhysician
Overview
Represents a Primary Care Physician (PCP). The PCP could either be:
Defined Under Namespace
Classes: PrimaryCarePhysicianAddressAccessError
Instance Method Summary
collapse
Instance Method Details
#current_address ⇒ Object
60
61
62
63
64
65
66
67
|
# File 'app/models/renalware/patients/primary_care_physician.rb', line 60
def current_address
raise PrimaryCarePhysicianAddressAccessError,
"primary_care_physician#current_address should not be called: "\
"we always use the patient.practice.address when contacting the GP. "\
"In a sense the practice is more important that the GP, as the GP may have "\
"moved on"
end
|
#full_name ⇒ Object
29
30
31
|
# File 'app/models/renalware/patients/primary_care_physician.rb', line 29
def full_name
:name
end
|
#given_name ⇒ Object
33
34
35
|
# File 'app/models/renalware/patients/primary_care_physician.rb', line 33
def given_name
""
end
|
#practice_address ⇒ Object
69
70
71
72
73
|
# File 'app/models/renalware/patients/primary_care_physician.rb', line 69
def practice_address
address = practices.first.try(:address)
address.name = "#{title} #{name}".strip if address.present?
address
end
|
#salutation ⇒ Object
51
52
53
54
55
56
57
|
# File 'app/models/renalware/patients/primary_care_physician.rb', line 51
def salutation
[
Renalware.config.salutation_prefix,
title,
name
].compact.join(" ")
end
|
#skip_given_name_validation? ⇒ Boolean
41
42
43
|
# File 'app/models/renalware/patients/primary_care_physician.rb', line 41
def skip_given_name_validation?
true
end
|
#title ⇒ Object
47
48
49
|
# File 'app/models/renalware/patients/primary_care_physician.rb', line 47
def title
"Dr"
end
|
#to_s ⇒ Object
37
38
39
|
# File 'app/models/renalware/patients/primary_care_physician.rb', line 37
def to_s
[title, name].compact.join(" ")
end
|