Module: Renalware::LowClearance::MDMPatientsQuery::NamedFilterScopes
- Defined in:
- app/models/renalware/low_clearance/mdm_patients_query.rb
Overview
rubocop:enable Metrics/MethodLength
Instance Method Summary collapse
- #hgb_high ⇒ Object
- #hgb_low ⇒ Object
- #none ⇒ Object
- #on_worryboard ⇒ Object
- #supportive_care ⇒ Object
- #tx_candidates ⇒ Object
- #urea ⇒ Object
Instance Method Details
#hgb_high ⇒ Object
67 68 69 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 67 def hgb_high where("convert_to_float(values->'HGB'->>'result') > 130.0") end |
#hgb_low ⇒ Object
63 64 65 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 63 def hgb_low where("convert_to_float(values->'HGB'->>'result') < 100.0") end |
#none ⇒ Object
42 43 44 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 42 def none self # NOOP end |
#on_worryboard ⇒ Object
51 52 53 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 51 def on_worryboard joins("RIGHT OUTER JOIN patient_worries ON patient_worries.patient_id = patients.id") end |
#supportive_care ⇒ Object
46 47 48 49 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 46 def supportive_care joins(:profile) .where("low_clearance_profiles.document ->> 'dialysis_plan' LIKE 'not_for_dial%'") end |
#tx_candidates ⇒ Object
55 56 57 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 55 def tx_candidates where("transplant_registration_status_descriptions.code not ilike '%permanent'") end |
#urea ⇒ Object
59 60 61 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 59 def urea where("convert_to_float(values->'URE'->>'result') >= 30.0") end |