Class: Renalware::Pathology::Requests::GlobalAlgorithm
- Inherits:
-
Object
- Object
- Renalware::Pathology::Requests::GlobalAlgorithm
- Defined in:
- app/models/renalware/pathology/requests/global_algorithm.rb
Instance Method Summary collapse
- #determine_required_request_descriptions ⇒ Object
-
#initialize(patient, clinic, date: Date.current) ⇒ GlobalAlgorithm
constructor
A new instance of GlobalAlgorithm.
Constructor Details
#initialize(patient, clinic, date: Date.current) ⇒ GlobalAlgorithm
Returns a new instance of GlobalAlgorithm.
9 10 11 12 13 |
# File 'app/models/renalware/pathology/requests/global_algorithm.rb', line 9 def initialize(patient, clinic, date: Date.current) @patient = patient @clinic = clinic @date = date end |
Instance Method Details
#determine_required_request_descriptions ⇒ Object
15 16 17 18 19 20 |
# File 'app/models/renalware/pathology/requests/global_algorithm.rb', line 15 def determine_required_request_descriptions rule_sets .select { |rule_set| rule_set.observation_required_for_patient?(@patient, @date) } .map(&:request_description) .uniq end |