Class: ChangeHealthcare::Eligibility::SwaggerClient::RequestSubscriber

Inherits:
Object
  • Object
show all
Defined in:
lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb

Overview

Loop: 2100C, Notes: Subscriber Detail

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ RequestSubscriber

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 193

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.case_number = attributes[:caseNumber] if attributes.key?(:caseNumber)

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

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

  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.last_name = attributes[:lastName] if attributes.key?(:lastName)

  if attributes.key?(:medicaidRecipientIdentificationNumber)
    self.medicaid_recipient_identification_number = attributes[:medicaidRecipientIdentificationNumber]
  end

  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.spend_down_amount = attributes[:spendDownAmount] if attributes.key?(:spendDownAmount)

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

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

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

Instance Attribute Details

#additional_identificationObject

Loop: 2100, Segment: REF Notes: Additional Identification



19
20
21
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 19

def additional_identification
  @additional_identification
end

#addressObject

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



22
23
24
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 22

def address
  @address
end

#beginning_card_issue_dateObject

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



25
26
27
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 25

def beginning_card_issue_date
  @beginning_card_issue_date
end

#beginning_plan_issue_dateObject

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



28
29
30
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 28

def beginning_plan_issue_date
  @beginning_plan_issue_date
end

#birth_sequence_numberObject

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



31
32
33
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 31

def birth_sequence_number
  @birth_sequence_number
end

#case_numberObject

Loop: 2100C Segment: REF, Element: REF02, Notes: REF01=3H Case Number



34
35
36
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 34

def case_number
  @case_number
end

#coverage_level_codeObject

Loop: 2110C Segment: EQ, Element: EQ03, Notes: Retired, Not Used



37
38
39
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 37

def coverage_level_code
  @coverage_level_code
end

#date_of_birthObject

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



40
41
42
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 40

def date_of_birth
  @date_of_birth
end

#end_card_issue_dateObject

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



43
44
45
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 43

def end_card_issue_date
  @end_card_issue_date
end

#end_plan_issue_dateObject

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



46
47
48
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 46

def end_plan_issue_date
  @end_plan_issue_date
end

#first_nameObject

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



49
50
51
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 49

def first_name
  @first_name
end

#genderObject

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



52
53
54
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 52

def gender
  @gender
end

#group_numberObject

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



55
56
57
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 55

def group_number
  @group_number
end

#health_care_code_informationObject

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



58
59
60
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 58

def health_care_code_information
  @health_care_code_information
end

#id_cardObject

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



61
62
63
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 61

def id_card
  @id_card
end

#id_card_issue_dateObject

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



64
65
66
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 64

def id_card_issue_date
  @id_card_issue_date
end

#last_nameObject

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



67
68
69
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 67

def last_name
  @last_name
end

#medicaid_recipient_identification_numberObject

Loop: 2110C Segment: REF, Element: REF02, Notes: REF01=NQ Medicaid Recipient Identification Number



70
71
72
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 70

def medicaid_recipient_identification_number
  @medicaid_recipient_identification_number
end

#member_idObject

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



73
74
75
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 73

def member_id
  @member_id
end

#middle_nameObject

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



76
77
78
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 76

def middle_name
  @middle_name
end

#plan_issue_dateObject

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



79
80
81
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 79

def plan_issue_date
  @plan_issue_date
end

#provider_codeObject

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



82
83
84
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 82

def provider_code
  @provider_code
end

#provider_identifierObject

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



85
86
87
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 85

def provider_identifier
  @provider_identifier
end

#reference_identification_qualifierObject

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



88
89
90
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 88

def reference_identification_qualifier
  @reference_identification_qualifier
end

#spend_down_amountObject

Loop: 2110C Segment: ATM, Element: ATM02, Notes: ATM01=R Spend Down



91
92
93
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 91

def spend_down_amount
  @spend_down_amount
end

#spend_down_total_billed_amountObject

Loop: 2110C Segment: ATM, Element: ATM02, Notes: ATM01=PB Billed Amount



94
95
96
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 94

def spend_down_total_billed_amount
  @spend_down_total_billed_amount
end

#ssnObject

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



97
98
99
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 97

def ssn
  @ssn
end

#suffixObject

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



100
101
102
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 100

def suffix
  @suffix
end

Class Method Details

.attribute_mapObject

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



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 124

def self.attribute_map
  {
    'additional_identification': :additionalIdentification,
    'address': :address,
    'beginning_card_issue_date': :beginningCardIssueDate,
    'beginning_plan_issue_date': :beginningPlanIssueDate,
    'birth_sequence_number': :birthSequenceNumber,
    'case_number': :caseNumber,
    'coverage_level_code': :coverageLevelCode,
    'date_of_birth': :dateOfBirth,
    '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,
    'last_name': :lastName,
    'medicaid_recipient_identification_number': :medicaidRecipientIdentificationNumber,
    'member_id': :memberId,
    'middle_name': :middleName,
    'plan_issue_date': :planIssueDate,
    'provider_code': :providerCode,
    'provider_identifier': :providerIdentifier,
    'reference_identification_qualifier': :referenceIdentificationQualifier,
    'spend_down_amount': :spendDownAmount,
    'spend_down_total_billed_amount': :spendDownTotalBilledAmount,
    'ssn': :ssn,
    'suffix': :suffix
  }
end

.swagger_typesObject

Attribute type mapping.



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 158

def self.swagger_types
  {
    'additional_identification': :AdditionalIdentification,
    'address': :Address,
    'beginning_card_issue_date': :String,
    'beginning_plan_issue_date': :String,
    'birth_sequence_number': :String,
    'case_number': :String,
    'coverage_level_code': :String,
    'date_of_birth': :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,
    'last_name': :String,
    'medicaid_recipient_identification_number': :String,
    'member_id': :String,
    'middle_name': :String,
    'plan_issue_date': :String,
    'provider_code': :String,
    'provider_identifier': :String,
    'reference_identification_qualifier': :String,
    'spend_down_amount': :String,
    'spend_down_total_billed_amount': :String,
    'ssn': :String,
    'suffix': :String
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 302

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 &&
    case_number == o.case_number &&
    coverage_level_code == o.coverage_level_code &&
    date_of_birth == o.date_of_birth &&
    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 &&
    last_name == o.last_name &&
    medicaid_recipient_identification_number == o.medicaid_recipient_identification_number &&
    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 &&
    spend_down_amount == o.spend_down_amount &&
    spend_down_total_billed_amount == o.spend_down_total_billed_amount &&
    ssn == o.ssn &&
    suffix == o.suffix
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 373

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) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 440

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) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 351

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) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


338
339
340
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 338

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



344
345
346
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 344

def hash
  [additional_identification, address, beginning_card_issue_date, beginning_plan_issue_date, birth_sequence_number, case_number, coverage_level_code, date_of_birth, end_card_issue_date, end_plan_issue_date, first_name, gender, group_number, health_care_code_information, id_card, id_card_issue_date, last_name, medicaid_recipient_identification_number, member_id, middle_name, plan_issue_date, provider_code, provider_identifier, reference_identification_qualifier, spend_down_amount, spend_down_total_billed_amount, ssn, suffix].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



264
265
266
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 264

def list_invalid_properties
  []
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



419
420
421
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 419

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



425
426
427
428
429
430
431
432
433
434
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 425

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



413
414
415
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 413

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



270
271
272
273
274
275
276
277
278
# File 'lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb', line 270

def valid?
  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