Class: Roqua::Healthy::A19::CorrectPatientCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/roqua/healthy/a19/correct_patient_check.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(patient_id, record) ⇒ CorrectPatientCheck

Returns a new instance of CorrectPatientCheck.



8
9
10
11
# File 'lib/roqua/healthy/a19/correct_patient_check.rb', line 8

def initialize(patient_id, record)
  @patient_id = patient_id
  @record     = record
end

Instance Attribute Details

#patient_idObject (readonly)

Returns the value of attribute patient_id.



6
7
8
# File 'lib/roqua/healthy/a19/correct_patient_check.rb', line 6

def patient_id
  @patient_id
end

#recordObject (readonly)

Returns the value of attribute record.



6
7
8
# File 'lib/roqua/healthy/a19/correct_patient_check.rb', line 6

def record
  @record
end

Instance Method Details

#checkObject



13
14
15
# File 'lib/roqua/healthy/a19/correct_patient_check.rb', line 13

def check
  record[:identities].try(:any?) { |i| i[:ident] == patient_id }
end