Class: Renalware::Pathology::Requests::HighRiskAlgorithm
- Inherits:
-
Object
- Object
- Renalware::Pathology::Requests::HighRiskAlgorithm
- Defined in:
- app/models/renalware/pathology/requests/high_risk_algorithm.rb
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(patient) ⇒ HighRiskAlgorithm
constructor
A new instance of HighRiskAlgorithm.
- #patient_is_high_risk? ⇒ Boolean
Constructor Details
#initialize(patient) ⇒ HighRiskAlgorithm
Returns a new instance of HighRiskAlgorithm.
9 10 11 |
# File 'app/models/renalware/pathology/requests/high_risk_algorithm.rb', line 9 def initialize(patient) @patient = patient end |
Instance Method Details
#id ⇒ Object
19 20 21 |
# File 'app/models/renalware/pathology/requests/high_risk_algorithm.rb', line 19 def id nil end |
#patient_is_high_risk? ⇒ Boolean
13 14 15 16 17 |
# File 'app/models/renalware/pathology/requests/high_risk_algorithm.rb', line 13 def patient_is_high_risk? rules .map { |rule| rule.observation_required_for_patient?(@patient, Date.current) } .any? end |