Class: Renalware::Pathology::Requests::GlobalRuleSet::PatientRuleSetDecision
- Inherits:
-
Object
- Object
- Renalware::Pathology::Requests::GlobalRuleSet::PatientRuleSetDecision
- Defined in:
- app/models/renalware/pathology/requests/global_rule_set/patient_rule_set_decision.rb
Constant Summary collapse
- OBSERVATION_REQUIRED =
true
- OBSERVATION_NOT_REQUIRED =
false
Instance Method Summary collapse
-
#call ⇒ Object
NOTE: Decide if a rule_set applies to a patient.
Instance Method Details
#call ⇒ Object
NOTE: Decide if a rule_set applies to a patient
13 14 15 16 17 18 19 20 21 22 |
# File 'app/models/renalware/pathology/requests/global_rule_set/patient_rule_set_decision.rb', line 13 def call return OBSERVATION_NOT_REQUIRED if last_observation_too_recent? return OBSERVATION_NOT_REQUIRED if last_request_still_being_processed? if required_from_rules? OBSERVATION_REQUIRED else OBSERVATION_NOT_REQUIRED end end |