Class: Faker::Patient

Inherits:
Object
  • Object
show all
Defined in:
lib/faker_patient.rb

Class Method Summary collapse

Class Method Details

.dobObject



30
31
32
33
# File 'lib/faker_patient.rb', line 30

def dob  
  Time.random(:year_range => 80)
  #Date.parse("#{rand(12) + 1}/#{rand(27) + 1}/19#{format("%02d", rand(99))}" )
end

.genderObject

English social security number has the format xxx-xx-xxxx



25
26
27
28
# File 'lib/faker_patient.rb', line 25

def gender
  gender = ['M','F']
  gender[rand(2)]
end

.phone_numberObject



35
36
37
# File 'lib/faker_patient.rb', line 35

def phone_number
  Faker::Base.numerify("###-###-####")
end