Module: Renalware::LowClearance::MDMPatientsQuery::NamedFilterScopes
- Defined in:
- app/models/renalware/low_clearance/mdm_patients_query.rb
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
65 66 67 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 65 def hgb_high where("cast(values->'HGB'->>'result' as float) > 130.0") end |
#hgb_low ⇒ Object
61 62 63 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 61 def hgb_low where("cast(values->'HGB'->>'result' as float) < 100.0") end |
#none ⇒ Object
40 41 42 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 40 def none self # NOOP end |
#on_worryboard ⇒ Object
49 50 51 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 49 def on_worryboard joins("RIGHT OUTER JOIN patient_worries ON patient_worries.patient_id = patients.id") end |
#supportive_care ⇒ Object
44 45 46 47 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 44 def supportive_care joins(:profile) .where("low_clearance_profiles.document ->> 'dialysis_plan' LIKE 'not_for_dial%'") end |
#tx_candidates ⇒ Object
53 54 55 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 53 def tx_candidates self end |
#urea ⇒ Object
57 58 59 |
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 57 def urea where("cast(values->'URE'->>'result' as float) >= 30.0") end |