Class: Trizetto::Api::Eligibility::WebService::Patient

Inherits:
Node
  • Object
show all
Defined in:
lib/trizetto/api/eligibility/web_service/patient.rb

Overview

A Patient is either a Subscriber or Depedent. This is the common attributes between the two

Direct Known Subclasses

Dependent, Subscriber

Constant Summary collapse

KEY_CLEANUP =
{
  :patientid => :id
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_hash = {}) ⇒ Patient

Returns a new instance of Patient.



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/trizetto/api/eligibility/web_service/patient.rb', line 21

def initialize(raw_hash = {})
  super(raw_hash)
  self.name = PatientName.new(raw_hash[:patientname]) if raw_hash.has_key?(:patientname)

  benefits_xml = raw_hash[:benefit] || []
  benefits_xml = [benefits_xml] if benefits_xml.is_a?(Hash)

  self.benefits = benefits_xml.map do |benefit_xml|
    Benefit.new(benefit_xml)
  end
end

Instance Attribute Details

#benefitsObject

The benefits this patient has.



15
16
17
# File 'lib/trizetto/api/eligibility/web_service/patient.rb', line 15

def benefits
  @benefits
end

#nameObject



11
12
13
# File 'lib/trizetto/api/eligibility/web_service/patient.rb', line 11

def name
  @name
end