Class: Renalware::Pathology::Requests::PatientAlgorithm

Inherits:
Object
  • Object
show all
Defined in:
app/models/renalware/pathology/requests/patient_algorithm.rb

Instance Method Summary collapse

Constructor Details

#initialize(patient, date: Date.current) ⇒ PatientAlgorithm

Returns a new instance of PatientAlgorithm.



9
10
11
12
# File 'app/models/renalware/pathology/requests/patient_algorithm.rb', line 9

def initialize(patient, date: Date.current)
  @patient = patient
  @date = date
end

Instance Method Details

#determine_required_testsObject



14
15
16
# File 'app/models/renalware/pathology/requests/patient_algorithm.rb', line 14

def determine_required_tests
  @patient.rules.select { |rule| rule.required?(@date) }
end