class ChangeHealth::Models::EligibilityBenefit
Constants
- CHILD
- CODES
- COINSURANCE
- COPAYMENT
- COVERAGES
- DAY
- DEDUCTIBLE
- EMPLOYEE
- EMPLOYEE_AND_CHILD
- EMPLOYEE_AND_SPOUSE
- FAMILY
- HELPERS
- INDIVIDUAL
- MEDICARE
- NON_COVERED
- OUT_OF_POCKET
- REMAINING
- SERVICE_YEAR
- TIMEFRAMES
- VISIT
- YEAR
- YTD
Public Instance Methods
amount()
click to toggle source
# File lib/change_health/models/eligibility_benefit.rb, line 98 def amount self.coinsurance? ? self.benefitPercent : self.benefitAmount end
descriptions()
click to toggle source
# File lib/change_health/models/eligibility_benefit.rb, line 86 def descriptions data = self.additionalInformation || [] data.map {|info| info['description'] }.compact end
in_plan_network?()
click to toggle source
# File lib/change_health/models/eligibility_benefit.rb, line 92 def in_plan_network? return 'Y' == self[:inPlanNetworkIndicatorCode] || self[:inPlanNetworkIndicatorCode].nil? && self.medicare? end
Also aliased as: in_plan?, in_network?
medicare?()
click to toggle source
# File lib/change_health/models/eligibility_benefit.rb, line 66 def medicare? MEDICARE.values.include?(self.insuranceTypeCode) end
plan_date_range()
click to toggle source
# File lib/change_health/models/eligibility_benefit.rb, line 117 def plan_date_range pd = self.date_info&.dig('plan') || '' pd.split('-') end
plan_date_range_end()
click to toggle source
# File lib/change_health/models/eligibility_benefit.rb, line 126 def plan_date_range_end ChangeHealth::Models::EligibilityData::PARSE_DATE.call(self.plan_date_range[1]) end
plan_date_range_start()
click to toggle source
# File lib/change_health/models/eligibility_benefit.rb, line 122 def plan_date_range_start ChangeHealth::Models::EligibilityData::PARSE_DATE.call(self.plan_date_range[0]) end
services()
click to toggle source
# File lib/change_health/models/eligibility_benefit.rb, line 102 def services self['serviceTypeCodes']&.each_with_index&.map {|stc, i| [stc, self['serviceTypes']&.at(i)]} || [] end
Private Instance Methods
format_amount(key)
click to toggle source
# File lib/change_health/models/eligibility_benefit.rb, line 131 def format_amount(key) amt = self[key] amt = amt.to_f unless amt.nil? end