Class: Roqua::Healthy::A19::CorrectPatientCheck
- Inherits:
-
Object
- Object
- Roqua::Healthy::A19::CorrectPatientCheck
- Defined in:
- lib/roqua/healthy/a19/correct_patient_check.rb
Instance Attribute Summary collapse
-
#patient_id ⇒ Object
readonly
Returns the value of attribute patient_id.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(patient_id, record) ⇒ CorrectPatientCheck
constructor
A new instance of CorrectPatientCheck.
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_id ⇒ Object (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 |
#record ⇒ Object (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
#check ⇒ Object
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 |