Class: Renalware::Pathology::Patient
- Inherits:
-
Object
- Object
- Renalware::Pathology::Patient
- Defined in:
- app/models/renalware/pathology/patient.rb
Instance Method Summary collapse
- #fetch_current_observation_set ⇒ Object
- #high_risk? ⇒ Boolean
- #last_request_for_patient_rule(patient_rule) ⇒ Object
- #required_observation_requests(clinic) ⇒ Object
- #required_patient_pathology ⇒ Object
Instance Method Details
#fetch_current_observation_set ⇒ Object
39 40 41 |
# File 'app/models/renalware/pathology/patient.rb', line 39 def fetch_current_observation_set current_observation_set || build_current_observation_set end |
#high_risk? ⇒ Boolean
35 36 37 |
# File 'app/models/renalware/pathology/patient.rb', line 35 def high_risk? Requests::HighRiskAlgorithm.new(self).patient_is_high_risk? end |
#last_request_for_patient_rule(patient_rule) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/models/renalware/pathology/patient.rb', line 14 def last_request_for_patient_rule(patient_rule) requests .includes(:patient_rules) .where( pathology_requests_patient_rules: { id: [patient_rule] } ) .first end |
#required_observation_requests(clinic) ⇒ Object
23 24 25 26 27 |
# File 'app/models/renalware/pathology/patient.rb', line 23 def required_observation_requests(clinic) Requests::GlobalAlgorithm.new( self, clinic, date: date_for_algorithms ).determine_required_request_descriptions end |
#required_patient_pathology ⇒ Object
29 30 31 32 33 |
# File 'app/models/renalware/pathology/patient.rb', line 29 def required_patient_pathology Requests::PatientAlgorithm.new( self, date: date_for_algorithms ).determine_required_tests end |