Class: Medreg::Person
- Inherits:
-
Object
- Object
- Medreg::Person
- Defined in:
- lib/medreg/person.rb
Instance Attribute Summary collapse
-
#addresses ⇒ Object
Returns the value of attribute addresses.
-
#capabilities ⇒ Object
Returns the value of attribute capabilities.
-
#dummy_id ⇒ Object
Returns the value of attribute dummy_id.
-
#ean13 ⇒ Object
Returns the value of attribute ean13.
-
#email ⇒ Object
Returns the value of attribute email.
-
#exam ⇒ Object
Returns the value of attribute exam.
-
#experiences ⇒ Object
Returns the value of attribute experiences.
-
#firstname ⇒ Object
(also: #name_first)
Returns the value of attribute firstname.
-
#language ⇒ Object
(also: #correspondence)
Returns the value of attribute language.
-
#may_dispense_narcotics ⇒ Object
Returns the value of attribute may_dispense_narcotics.
-
#may_sell_drugs ⇒ Object
Returns the value of attribute may_sell_drugs.
-
#member ⇒ Object
Returns the value of attribute member.
-
#name ⇒ Object
Returns the value of attribute name.
-
#origin_db ⇒ Object
Returns the value of attribute origin_db.
-
#origin_id ⇒ Object
Returns the value of attribute origin_id.
-
#praxis ⇒ Object
Returns the value of attribute praxis.
-
#remark_sell_drugs ⇒ Object
Returns the value of attribute remark_sell_drugs.
-
#salutation ⇒ Object
Returns the value of attribute salutation.
-
#specialities ⇒ Object
Returns the value of attribute specialities.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
-
.all_doctors ⇒ Object
just for debugging when running unit tests.
Instance Method Summary collapse
- #fullname ⇒ Object
-
#initialize ⇒ Person
constructor
A new instance of Person.
- #praxis_address ⇒ Object
- #praxis_addresses ⇒ Object
- #work_addresses ⇒ Object
Constructor Details
#initialize ⇒ Person
Returns a new instance of Person.
22 23 24 25 |
# File 'lib/medreg/person.rb', line 22 def initialize @addresses = [] @experiences = [] end |
Instance Attribute Details
#addresses ⇒ Object
Returns the value of attribute addresses.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def addresses @addresses end |
#capabilities ⇒ Object
Returns the value of attribute capabilities.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def capabilities @capabilities end |
#dummy_id ⇒ Object
Returns the value of attribute dummy_id.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def dummy_id @dummy_id end |
#ean13 ⇒ Object
Returns the value of attribute ean13.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def ean13 @ean13 end |
#email ⇒ Object
Returns the value of attribute email.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def email @email end |
#exam ⇒ Object
Returns the value of attribute exam.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def exam @exam end |
#experiences ⇒ Object
Returns the value of attribute experiences.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def experiences @experiences end |
#firstname ⇒ Object Also known as: name_first
Returns the value of attribute firstname.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def firstname @firstname end |
#language ⇒ Object Also known as: correspondence
Returns the value of attribute language.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def language @language end |
#may_dispense_narcotics ⇒ Object
Returns the value of attribute may_dispense_narcotics.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def may_dispense_narcotics @may_dispense_narcotics end |
#may_sell_drugs ⇒ Object
Returns the value of attribute may_sell_drugs.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def may_sell_drugs @may_sell_drugs end |
#member ⇒ Object
Returns the value of attribute member.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def member @member end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def name @name end |
#origin_db ⇒ Object
Returns the value of attribute origin_db.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def origin_db @origin_db end |
#origin_id ⇒ Object
Returns the value of attribute origin_id.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def origin_id @origin_id end |
#praxis ⇒ Object
Returns the value of attribute praxis.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def praxis @praxis end |
#remark_sell_drugs ⇒ Object
Returns the value of attribute remark_sell_drugs.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def remark_sell_drugs @remark_sell_drugs end |
#salutation ⇒ Object
Returns the value of attribute salutation.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def salutation @salutation end |
#specialities ⇒ Object
Returns the value of attribute specialities.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def specialities @specialities end |
#title ⇒ Object
Returns the value of attribute title.
10 11 12 |
# File 'lib/medreg/person.rb', line 10 def title @title end |
Class Method Details
.all_doctors ⇒ Object
just for debugging when running unit tests
452 453 454 |
# File 'lib/medreg/person_importer.rb', line 452 def Person.all_doctors @@all_doctors end |
Instance Method Details
#fullname ⇒ Object
26 27 28 |
# File 'lib/medreg/person.rb', line 26 def fullname [@firstname, @name].join(' ') end |
#praxis_address ⇒ Object
29 30 31 32 33 |
# File 'lib/medreg/person.rb', line 29 def praxis_address @addresses.find { |addr| addr.type == 'at_praxis' } end |
#praxis_addresses ⇒ Object
34 35 36 37 38 |
# File 'lib/medreg/person.rb', line 34 def praxis_addresses @addresses.select { |addr| addr.type == 'at_praxis' } end |
#work_addresses ⇒ Object
39 40 41 42 43 |
# File 'lib/medreg/person.rb', line 39 def work_addresses @addresses.select { |addr| addr.type == 'at_work' } end |