class ChangeHealthcare::Eligibility::SwaggerClient::RequestDependent

Loop: 2000D, Notes: Dependent Detail

Attributes

additional_identification[RW]

Loop: 2100, Segment: REF Notes: Additional Identification

address[RW]

Loop: 2100, Segment: N3 and N4, Notes: Address

beginning_card_issue_date[RW]

Loop: 2110, Segment: DTP, Element: DTP03, Notes: DTP01=102, DTP02=RD8 Retired

beginning_plan_issue_date[RW]

Loop: 2110, Segment: DTP, Element: DTP03, Notes: DTP01=291, DTP02=RD8 Retired

birth_sequence_number[RW]

Loop: 2100D Segment: INS, Element: INS17, Notes: Birth Sequence Number - must be exactly 9 positive unsigned numeric characters.

date_of_birth[RW]

Loop: 2100, Segment: DMG, Element: DMG02, Notes: date of birth in CCYYMMDD

eligibility_category[RW]

Loop: 2100D Segment: REF, Element: REF02, Notes: REF01=MRC Eligibility Category

end_card_issue_date[RW]

Loop: 2110, Segment: DTP, Element: DTP03, Notes: DTP01=102, DTP02=RD8 Retired

end_plan_issue_date[RW]

Loop: 2110, Segment: DTP, Element: DTP03, Notes: DTP01=291, DTP02=RD8 Retired

first_name[RW]

Loop: 2100, Segment: MN1, Element: NM104, Notes: firstName 1-35 alphanumberic characters

gender[RW]

Loop: 2100, Segment: DMG, Element: DMG03, Notes: gender 1 character 'M' or 'F'

group_number[RW]

Loop: 2100, Segment: REF, Element: REF02, Notes: REF01=6P Group Number

health_care_code_information[RW]

Loop: 2100, Segment: HI, Element: HI01-1 HI01-2, Notes: Health Care Diagnosis

id_card[RW]

Loop: 2100, Segment: REF, Element: REF02, Notes: REF01=HJ Identity Card Number

id_card_issue_date[RW]

Loop: 2110, Segment: DTP, Element: DTP03, Notes: DTP01=102, DTP02=D8 Retired

individual_relationship_code[RW]

Loop: 2100D Segment: INS, Element: INS02, Notes: Individual Relationship Code 01 - Spouse, 19 - Child, 34 Other Adult

issue_number[RW]

Loop: 2100D Segment: REF, Element: REF02, Notes: REF01=IF Issue Number

last_name[RW]

Loop: 2100, Segment: MN1, Element: NM103, Notes: lastName 1-60 alphanumberic characters

member_id[RW]

Loop: 2100 Segment: MN1, Element: NM109, Notes: NM108=MI, memberId 2-80 alphanumberic characters

middle_name[RW]

Loop: 2100, Segment: MN1, Element: NM105, Notes: middleName 1-25 alphanumberic characters

plan_issue_date[RW]

Loop: 2110, Segment: DTP, Element: DTP03, Notes: DTP01=291, DTP02=D8 Retired

provider_code[RW]

Loop: 2100, Segment: PRV, Element: PRV01, Notes: Provider Code

provider_identifier[RW]

Loop: 2100, Segment: PRV, Element: PRV03, Notes: Provider Identifier

reference_identification_qualifier[RW]

Loop: 2100, Segment: PRV, Element: PRV02, Notes: Reference Identification Qualifier

ssn[RW]

Loop: 2100, Segment: REF, Element: REF02, Notes: REF01=SY Social Security Number

suffix[RW]

Loop: 2100, Segment: MN1, Element: NM107, Notes: lastName 1-10 alphanumberic characters

Public Class Methods

attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 118
def self.attribute_map
  {
    'additional_identification': :additionalIdentification,
    'address': :address,
    'beginning_card_issue_date': :beginningCardIssueDate,
    'beginning_plan_issue_date': :beginningPlanIssueDate,
    'birth_sequence_number': :birthSequenceNumber,
    'date_of_birth': :dateOfBirth,
    'eligibility_category': :eligibilityCategory,
    'end_card_issue_date': :endCardIssueDate,
    'end_plan_issue_date': :endPlanIssueDate,
    'first_name': :firstName,
    'gender': :gender,
    'group_number': :groupNumber,
    'health_care_code_information': :healthCareCodeInformation,
    'id_card': :idCard,
    'id_card_issue_date': :idCardIssueDate,
    'individual_relationship_code': :individualRelationshipCode,
    'issue_number': :issueNumber,
    'last_name': :lastName,
    'member_id': :memberId,
    'middle_name': :middleName,
    'plan_issue_date': :planIssueDate,
    'provider_code': :providerCode,
    'provider_identifier': :providerIdentifier,
    'reference_identification_qualifier': :referenceIdentificationQualifier,
    'ssn': :ssn,
    'suffix': :suffix
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 183
def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.transform_keys(&:to_sym)

  self.additional_identification = attributes[:additionalIdentification] if attributes.key?(:additionalIdentification)

  self.address = attributes[:address] if attributes.key?(:address)

  self.beginning_card_issue_date = attributes[:beginningCardIssueDate] if attributes.key?(:beginningCardIssueDate)

  self.beginning_plan_issue_date = attributes[:beginningPlanIssueDate] if attributes.key?(:beginningPlanIssueDate)

  self.birth_sequence_number = attributes[:birthSequenceNumber] if attributes.key?(:birthSequenceNumber)

  self.date_of_birth = attributes[:dateOfBirth] if attributes.key?(:dateOfBirth)

  self.eligibility_category = attributes[:eligibilityCategory] if attributes.key?(:eligibilityCategory)

  self.end_card_issue_date = attributes[:endCardIssueDate] if attributes.key?(:endCardIssueDate)

  self.end_plan_issue_date = attributes[:endPlanIssueDate] if attributes.key?(:endPlanIssueDate)

  self.first_name = attributes[:firstName] if attributes.key?(:firstName)

  self.gender = attributes[:gender] if attributes.key?(:gender)

  self.group_number = attributes[:groupNumber] if attributes.key?(:groupNumber)

  if attributes.key?(:healthCareCodeInformation)
    if (value = attributes[:healthCareCodeInformation]).is_a?(Array)
      self.health_care_code_information = value
    end
  end

  self.id_card = attributes[:idCard] if attributes.key?(:idCard)

  self.id_card_issue_date = attributes[:idCardIssueDate] if attributes.key?(:idCardIssueDate)

  self.individual_relationship_code = attributes[:individualRelationshipCode] if attributes.key?(:individualRelationshipCode)

  self.issue_number = attributes[:issueNumber] if attributes.key?(:issueNumber)

  self.last_name = attributes[:lastName] if attributes.key?(:lastName)

  self.member_id = attributes[:memberId] if attributes.key?(:memberId)

  self.middle_name = attributes[:middleName] if attributes.key?(:middleName)

  self.plan_issue_date = attributes[:planIssueDate] if attributes.key?(:planIssueDate)

  self.provider_code = attributes[:providerCode] if attributes.key?(:providerCode)

  self.provider_identifier = attributes[:providerIdentifier] if attributes.key?(:providerIdentifier)

  self.reference_identification_qualifier = attributes[:referenceIdentificationQualifier] if attributes.key?(:referenceIdentificationQualifier)

  self.ssn = attributes[:ssn] if attributes.key?(:ssn)

  self.suffix = attributes[:suffix] if attributes.key?(:suffix)
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 150
def self.swagger_types
  {
    'additional_identification': :AdditionalIdentification,
    'address': :Address,
    'beginning_card_issue_date': :String,
    'beginning_plan_issue_date': :String,
    'birth_sequence_number': :String,
    'date_of_birth': :String,
    'eligibility_category': :String,
    'end_card_issue_date': :String,
    'end_plan_issue_date': :String,
    'first_name': :String,
    'gender': :String,
    'group_number': :String,
    'health_care_code_information': :'Array<HealthCareInformation>',
    'id_card': :String,
    'id_card_issue_date': :String,
    'individual_relationship_code': :String,
    'issue_number': :String,
    'last_name': :String,
    'member_id': :String,
    'middle_name': :String,
    'plan_issue_date': :String,
    'provider_code': :String,
    'provider_identifier': :String,
    'reference_identification_qualifier': :String,
    'ssn': :String,
    'suffix': :String
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 300
def ==(o)
  return true if equal?(o)

  self.class == o.class &&
    additional_identification == o.additional_identification &&
    address == o.address &&
    beginning_card_issue_date == o.beginning_card_issue_date &&
    beginning_plan_issue_date == o.beginning_plan_issue_date &&
    birth_sequence_number == o.birth_sequence_number &&
    date_of_birth == o.date_of_birth &&
    eligibility_category == o.eligibility_category &&
    end_card_issue_date == o.end_card_issue_date &&
    end_plan_issue_date == o.end_plan_issue_date &&
    first_name == o.first_name &&
    gender == o.gender &&
    group_number == o.group_number &&
    health_care_code_information == o.health_care_code_information &&
    id_card == o.id_card &&
    id_card_issue_date == o.id_card_issue_date &&
    individual_relationship_code == o.individual_relationship_code &&
    issue_number == o.issue_number &&
    last_name == o.last_name &&
    member_id == o.member_id &&
    middle_name == o.middle_name &&
    plan_issue_date == o.plan_issue_date &&
    provider_code == o.provider_code &&
    provider_identifier == o.provider_identifier &&
    reference_identification_qualifier == o.reference_identification_qualifier &&
    ssn == o.ssn &&
    suffix == o.suffix
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 369
def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = SwaggerClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
end
_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 436
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 347
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(Regexp.last_match(1), v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end
eql?(o) click to toggle source

@see the `==` method @param [Object] Object to be compared

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 334
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 340
def hash
  [additional_identification, address, beginning_card_issue_date, beginning_plan_issue_date, birth_sequence_number, date_of_birth, eligibility_category, end_card_issue_date, end_plan_issue_date, first_name, gender, group_number, health_care_code_information, id_card, id_card_issue_date, individual_relationship_code, issue_number, last_name, member_id, middle_name, plan_issue_date, provider_code, provider_identifier, reference_identification_qualifier, ssn, suffix].hash
end
individual_relationship_code=(individual_relationship_code) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] individual_relationship_code Object to be assigned

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 269
def individual_relationship_code=(individual_relationship_code)
  validator = EnumAttributeValidator.new('String', %w[01 19 34])
  unless validator.valid?(individual_relationship_code)
    raise ArgumentError, %(invalid value for "individual_relationship_code", must be one of #{validator.allowable_values}.)
  end

  @individual_relationship_code = individual_relationship_code
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 248
def list_invalid_properties
  []
end
provider_code=(provider_code) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] provider_code Object to be assigned

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 280
def provider_code=(provider_code)
  validator = EnumAttributeValidator.new('String', %w[AD AT BI CO CV H HH LA OT P1 P2 PC PE R RF SK SU])
  raise ArgumentError, %(invalid value for "provider_code", must be one of #{validator.allowable_values}.) unless validator.valid?(provider_code)

  @provider_code = provider_code
end
reference_identification_qualifier=(reference_identification_qualifier) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] reference_identification_qualifier Object to be assigned

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 289
def reference_identification_qualifier=(reference_identification_qualifier)
  validator = EnumAttributeValidator.new('String', %w[9K D3 EI HPI PXC SY TJ])
  unless validator.valid?(reference_identification_qualifier)
    raise ArgumentError, %(invalid value for "reference_identification_qualifier", must be one of #{validator.allowable_values}.)
  end

  @reference_identification_qualifier = reference_identification_qualifier
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 415
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 421
def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = send(attr)
    next if value.nil?

    hash[param] = _to_hash(value)
  end
  hash
end
to_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 409
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb, line 254
def valid?
  individual_relationship_code_validator = EnumAttributeValidator.new('String', %w[01 19 34])
  return false unless individual_relationship_code_validator.valid?(@individual_relationship_code)

  provider_code_validator = EnumAttributeValidator.new('String', %w[AD AT BI CO CV H HH LA OT P1 P2 PC PE R RF SK SU])
  return false unless provider_code_validator.valid?(@provider_code)

  reference_identification_qualifier_validator = EnumAttributeValidator.new('String', %w[9K D3 EI HPI PXC SY TJ])
  return false unless reference_identification_qualifier_validator.valid?(@reference_identification_qualifier)

  true
end