Module: Renalware::LowClearance::MDMPatientsQuery::NamedFilterScopes

Defined in:
app/models/renalware/low_clearance/mdm_patients_query.rb

Instance Method Summary collapse

Instance Method Details

#hgb_highObject



58
59
60
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 58

def hgb_high
  where("cast(values->'HGB'->>'result' as float) > 130.0")
end

#hgb_lowObject



54
55
56
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 54

def hgb_low
  where("cast(values->'HGB'->>'result' as float) < 100.0")
end

#noneObject



38
39
40
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 38

def none
  self # NOOP
end

#on_worryboardObject



42
43
44
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 42

def on_worryboard
  joins("RIGHT OUTER JOIN patient_worries ON patient_worries.patient_id = patients.id")
end

#tx_candidatesObject



46
47
48
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 46

def tx_candidates
  self
end

#ureaObject



50
51
52
# File 'app/models/renalware/low_clearance/mdm_patients_query.rb', line 50

def urea
  where("cast(values->'URE'->>'result' as float) >= 30.0")
end