change_healthcare-eligibility 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.rubocop.yml +130 -0
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +59 -0
- data/LICENSE.txt +21 -0
- data/README.md +64 -0
- data/Rakefile +6 -0
- data/bin/console +11 -0
- data/bin/rspec +29 -0
- data/bin/setup +8 -0
- data/change_healthcare-eligibility.gemspec +44 -0
- data/lib/change_healthcare/eligibility.rb +13 -0
- data/lib/change_healthcare/eligibility/inspector.rb +82 -0
- data/lib/change_healthcare/eligibility/swagger_client.rb +81 -0
- data/lib/change_healthcare/eligibility/swagger_client/api_client.rb +388 -0
- data/lib/change_healthcare/eligibility/swagger_client/api_error.rb +40 -0
- data/lib/change_healthcare/eligibility/swagger_client/configuration.rb +202 -0
- data/lib/change_healthcare/eligibility/swagger_client/eligibility_api.rb +198 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/additional_identification.rb +266 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/additional_information.rb +185 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/address.rb +218 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/benefits_additional_information.rb +376 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/benefits_date_information.rb +340 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/benefits_information.rb +338 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/benefits_related_entity.rb +240 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/benefits_service_delivery.rb +220 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/composite_medical_procedure_identifier.rb +218 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/eligibility_additional_information.rb +200 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/encounter.rb +359 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/error.rb +205 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/health_care_diagnosis_code.rb +190 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/health_care_information.rb +229 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/health_check.rb +190 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/information_receiver_name.rb +303 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/loop_2000_cd2100_cd_segment_nm1_ref_dmg_ins_mpi_prv_notes_response_member.rb +429 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/loop_2100_a_segments_nm1_and_per_notes_information_source_name.rb +293 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/loop_2100_a_segments_per_element_per03_8_notes_communication.rb +194 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/loop_2100_a_segments_per_notes_information_source_contact_information.rb +198 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/loop_2100_bcd_segment_nm1_prv_notes_provider.rb +322 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/loop_2100_cd_segment_trn_notes_subscriber_trace_numbers.rb +218 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/loop_2110_cd_segments_ref_notes_subscriber_dependent_additional_identification.rb +488 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/medical_eligibility.rb +272 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/medical_procedure.rb +254 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb +340 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/plan_status.rb +204 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/provider.rb +304 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/provider_information.rb +190 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/raw_x12_request.rb +190 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/request_dependent.rb +452 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/request_subscriber.rb +456 -0
- data/lib/change_healthcare/eligibility/swagger_client/models/response.rb +322 -0
- data/lib/change_healthcare/eligibility/swagger_client/version.rb +17 -0
- data/lib/change_healthcare/eligibility/version.rb +5 -0
- data/lib/change_healthcare/eligibility/wrapper.rb +124 -0
- metadata +214 -0
@@ -0,0 +1,194 @@
|
|
1
|
+
# #Eligibility
|
2
|
+
#
|
3
|
+
# Reference for developers
|
4
|
+
#
|
5
|
+
# OpenAPI spec version: v3
|
6
|
+
#
|
7
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
8
|
+
# Swagger Codegen version: 2.4.17
|
9
|
+
#
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
module ChangeHealthcare
|
14
|
+
module Eligibility
|
15
|
+
module SwaggerClient
|
16
|
+
class Loop2100ASegmentsPERElementPER038NotesCommunication
|
17
|
+
# Loop: 2100A, Segments: PER, Element:PER03-8 Notes: Communication Number Qualifier
|
18
|
+
attr_accessor :communication_mode
|
19
|
+
|
20
|
+
# Loop: 2100A, Segments: PER, Element:PER03-8 Notes: Communication Number
|
21
|
+
attr_accessor :communication_number
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
'communication_mode': :communicationMode,
|
27
|
+
'communication_number': :communicationNumber
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
'communication_mode': :String,
|
35
|
+
'communication_number': :String
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
return unless attributes.is_a?(Hash)
|
43
|
+
|
44
|
+
# convert string to symbol for hash key
|
45
|
+
attributes = attributes.transform_keys(&:to_sym)
|
46
|
+
|
47
|
+
self.communication_mode = attributes[:communicationMode] if attributes.key?(:communicationMode)
|
48
|
+
|
49
|
+
self.communication_number = attributes[:communicationNumber] if attributes.key?(:communicationNumber)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
53
|
+
# @return Array for valid properties with the reasons
|
54
|
+
def list_invalid_properties
|
55
|
+
[]
|
56
|
+
end
|
57
|
+
|
58
|
+
# Check to see if the all the properties in the model are valid
|
59
|
+
# @return true if the model is valid
|
60
|
+
def valid?
|
61
|
+
true
|
62
|
+
end
|
63
|
+
|
64
|
+
# Checks equality by comparing each attribute.
|
65
|
+
# @param [Object] Object to be compared
|
66
|
+
def ==(o)
|
67
|
+
return true if equal?(o)
|
68
|
+
|
69
|
+
self.class == o.class &&
|
70
|
+
communication_mode == o.communication_mode &&
|
71
|
+
communication_number == o.communication_number
|
72
|
+
end
|
73
|
+
|
74
|
+
# @see the `==` method
|
75
|
+
# @param [Object] Object to be compared
|
76
|
+
def eql?(o)
|
77
|
+
self == o
|
78
|
+
end
|
79
|
+
|
80
|
+
# Calculates hash code according to all attributes.
|
81
|
+
# @return [Fixnum] Hash code
|
82
|
+
def hash
|
83
|
+
[communication_mode, communication_number].hash
|
84
|
+
end
|
85
|
+
|
86
|
+
# Builds the object from hash
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
88
|
+
# @return [Object] Returns the model itself
|
89
|
+
def build_from_hash(attributes)
|
90
|
+
return nil unless attributes.is_a?(Hash)
|
91
|
+
|
92
|
+
self.class.swagger_types.each_pair do |key, type|
|
93
|
+
if type =~ /\AArray<(.*)>/i
|
94
|
+
# check to ensure the input is an array given that the attribute
|
95
|
+
# is documented as an array but the input is not
|
96
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
97
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(Regexp.last_match(1), v) })
|
98
|
+
end
|
99
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
100
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
101
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
102
|
+
end
|
103
|
+
|
104
|
+
self
|
105
|
+
end
|
106
|
+
|
107
|
+
# Deserializes the data based on type
|
108
|
+
# @param string type Data type
|
109
|
+
# @param string value Value to be deserialized
|
110
|
+
# @return [Object] Deserialized data
|
111
|
+
def _deserialize(type, value)
|
112
|
+
case type.to_sym
|
113
|
+
when :DateTime
|
114
|
+
DateTime.parse(value)
|
115
|
+
when :Date
|
116
|
+
Date.parse(value)
|
117
|
+
when :String
|
118
|
+
value.to_s
|
119
|
+
when :Integer
|
120
|
+
value.to_i
|
121
|
+
when :Float
|
122
|
+
value.to_f
|
123
|
+
when :BOOLEAN
|
124
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
125
|
+
true
|
126
|
+
else
|
127
|
+
false
|
128
|
+
end
|
129
|
+
when :Object
|
130
|
+
# generic object (usually a Hash), return directly
|
131
|
+
value
|
132
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
133
|
+
inner_type = Regexp.last_match[:inner_type]
|
134
|
+
value.map { |v| _deserialize(inner_type, v) }
|
135
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
136
|
+
k_type = Regexp.last_match[:k_type]
|
137
|
+
v_type = Regexp.last_match[:v_type]
|
138
|
+
{}.tap do |hash|
|
139
|
+
value.each do |k, v|
|
140
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
else # model
|
144
|
+
temp_model = SwaggerClient.const_get(type).new
|
145
|
+
temp_model.build_from_hash(value)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# Returns the string representation of the object
|
150
|
+
# @return [String] String presentation of the object
|
151
|
+
def to_s
|
152
|
+
to_hash.to_s
|
153
|
+
end
|
154
|
+
|
155
|
+
# to_body is an alias to to_hash (backward compatibility)
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
157
|
+
def to_body
|
158
|
+
to_hash
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the object in the form of hash
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
163
|
+
def to_hash
|
164
|
+
hash = {}
|
165
|
+
self.class.attribute_map.each_pair do |attr, param|
|
166
|
+
value = send(attr)
|
167
|
+
next if value.nil?
|
168
|
+
|
169
|
+
hash[param] = _to_hash(value)
|
170
|
+
end
|
171
|
+
hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Outputs non-array value in the form of hash
|
175
|
+
# For object, use to_hash. Otherwise, just return the value
|
176
|
+
# @param [Object] value Any valid value
|
177
|
+
# @return [Hash] Returns the value in the form of hash
|
178
|
+
def _to_hash(value)
|
179
|
+
if value.is_a?(Array)
|
180
|
+
value.compact.map { |v| _to_hash(v) }
|
181
|
+
elsif value.is_a?(Hash)
|
182
|
+
{}.tap do |hash|
|
183
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
184
|
+
end
|
185
|
+
elsif value.respond_to? :to_hash
|
186
|
+
value.to_hash
|
187
|
+
else
|
188
|
+
value
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
@@ -0,0 +1,198 @@
|
|
1
|
+
# #Eligibility
|
2
|
+
#
|
3
|
+
# Reference for developers
|
4
|
+
#
|
5
|
+
# OpenAPI spec version: v3
|
6
|
+
#
|
7
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
8
|
+
# Swagger Codegen version: 2.4.17
|
9
|
+
#
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
module ChangeHealthcare
|
14
|
+
module Eligibility
|
15
|
+
module SwaggerClient
|
16
|
+
class Loop2100ASegmentsPERNotesInformationSourceContactInformation
|
17
|
+
# Loop: 2100A, Segments: PER, Element:PER03-8 Notes: Communication
|
18
|
+
attr_accessor :contacts
|
19
|
+
|
20
|
+
# Loop: 2100A, Segments: PER, Element:PER02 Notes: Name
|
21
|
+
attr_accessor :name
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
'contacts': :contacts,
|
27
|
+
'name': :name
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
'contacts': :'Array<Loop2100ASegmentsPERElementPER038NotesCommunication>',
|
35
|
+
'name': :String
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
return unless attributes.is_a?(Hash)
|
43
|
+
|
44
|
+
# convert string to symbol for hash key
|
45
|
+
attributes = attributes.transform_keys(&:to_sym)
|
46
|
+
|
47
|
+
if attributes.key?(:contacts)
|
48
|
+
if (value = attributes[:contacts]).is_a?(Array)
|
49
|
+
self.contacts = value
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
self.name = attributes[:name] if attributes.key?(:name)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
57
|
+
# @return Array for valid properties with the reasons
|
58
|
+
def list_invalid_properties
|
59
|
+
[]
|
60
|
+
end
|
61
|
+
|
62
|
+
# Check to see if the all the properties in the model are valid
|
63
|
+
# @return true if the model is valid
|
64
|
+
def valid?
|
65
|
+
true
|
66
|
+
end
|
67
|
+
|
68
|
+
# Checks equality by comparing each attribute.
|
69
|
+
# @param [Object] Object to be compared
|
70
|
+
def ==(o)
|
71
|
+
return true if equal?(o)
|
72
|
+
|
73
|
+
self.class == o.class &&
|
74
|
+
contacts == o.contacts &&
|
75
|
+
name == o.name
|
76
|
+
end
|
77
|
+
|
78
|
+
# @see the `==` method
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def eql?(o)
|
81
|
+
self == o
|
82
|
+
end
|
83
|
+
|
84
|
+
# Calculates hash code according to all attributes.
|
85
|
+
# @return [Fixnum] Hash code
|
86
|
+
def hash
|
87
|
+
[contacts, name].hash
|
88
|
+
end
|
89
|
+
|
90
|
+
# Builds the object from hash
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
92
|
+
# @return [Object] Returns the model itself
|
93
|
+
def build_from_hash(attributes)
|
94
|
+
return nil unless attributes.is_a?(Hash)
|
95
|
+
|
96
|
+
self.class.swagger_types.each_pair do |key, type|
|
97
|
+
if type =~ /\AArray<(.*)>/i
|
98
|
+
# check to ensure the input is an array given that the attribute
|
99
|
+
# is documented as an array but the input is not
|
100
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
101
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(Regexp.last_match(1), v) })
|
102
|
+
end
|
103
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
104
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
105
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
106
|
+
end
|
107
|
+
|
108
|
+
self
|
109
|
+
end
|
110
|
+
|
111
|
+
# Deserializes the data based on type
|
112
|
+
# @param string type Data type
|
113
|
+
# @param string value Value to be deserialized
|
114
|
+
# @return [Object] Deserialized data
|
115
|
+
def _deserialize(type, value)
|
116
|
+
case type.to_sym
|
117
|
+
when :DateTime
|
118
|
+
DateTime.parse(value)
|
119
|
+
when :Date
|
120
|
+
Date.parse(value)
|
121
|
+
when :String
|
122
|
+
value.to_s
|
123
|
+
when :Integer
|
124
|
+
value.to_i
|
125
|
+
when :Float
|
126
|
+
value.to_f
|
127
|
+
when :BOOLEAN
|
128
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
129
|
+
true
|
130
|
+
else
|
131
|
+
false
|
132
|
+
end
|
133
|
+
when :Object
|
134
|
+
# generic object (usually a Hash), return directly
|
135
|
+
value
|
136
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
137
|
+
inner_type = Regexp.last_match[:inner_type]
|
138
|
+
value.map { |v| _deserialize(inner_type, v) }
|
139
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
140
|
+
k_type = Regexp.last_match[:k_type]
|
141
|
+
v_type = Regexp.last_match[:v_type]
|
142
|
+
{}.tap do |hash|
|
143
|
+
value.each do |k, v|
|
144
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
else # model
|
148
|
+
temp_model = SwaggerClient.const_get(type).new
|
149
|
+
temp_model.build_from_hash(value)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# Returns the string representation of the object
|
154
|
+
# @return [String] String presentation of the object
|
155
|
+
def to_s
|
156
|
+
to_hash.to_s
|
157
|
+
end
|
158
|
+
|
159
|
+
# to_body is an alias to to_hash (backward compatibility)
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
161
|
+
def to_body
|
162
|
+
to_hash
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns the object in the form of hash
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
167
|
+
def to_hash
|
168
|
+
hash = {}
|
169
|
+
self.class.attribute_map.each_pair do |attr, param|
|
170
|
+
value = send(attr)
|
171
|
+
next if value.nil?
|
172
|
+
|
173
|
+
hash[param] = _to_hash(value)
|
174
|
+
end
|
175
|
+
hash
|
176
|
+
end
|
177
|
+
|
178
|
+
# Outputs non-array value in the form of hash
|
179
|
+
# For object, use to_hash. Otherwise, just return the value
|
180
|
+
# @param [Object] value Any valid value
|
181
|
+
# @return [Hash] Returns the value in the form of hash
|
182
|
+
def _to_hash(value)
|
183
|
+
if value.is_a?(Array)
|
184
|
+
value.compact.map { |v| _to_hash(v) }
|
185
|
+
elsif value.is_a?(Hash)
|
186
|
+
{}.tap do |hash|
|
187
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
188
|
+
end
|
189
|
+
elsif value.respond_to? :to_hash
|
190
|
+
value.to_hash
|
191
|
+
else
|
192
|
+
value
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
@@ -0,0 +1,322 @@
|
|
1
|
+
# #Eligibility
|
2
|
+
#
|
3
|
+
# Reference for developers
|
4
|
+
#
|
5
|
+
# OpenAPI spec version: v3
|
6
|
+
#
|
7
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
8
|
+
# Swagger Codegen version: 2.4.17
|
9
|
+
#
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
module ChangeHealthcare
|
14
|
+
module Eligibility
|
15
|
+
module SwaggerClient
|
16
|
+
class Loop2100BCDSegmentNM1PRVNotesProvider
|
17
|
+
# Loop: 2100B, Segment: N3 and N4, Notes: Provider Address
|
18
|
+
attr_accessor :address
|
19
|
+
|
20
|
+
# Loop: 2100B, Segment: NM1, Element: NM109 Notes: NM108=24 Employer’s Identification Number
|
21
|
+
attr_accessor :employers_id
|
22
|
+
|
23
|
+
# Loop: 2100B, Segment: NM1, Element: NM101 Notes: Entity Identifier Code
|
24
|
+
attr_accessor :entity_identifier
|
25
|
+
|
26
|
+
# Loop: 2100B, Segment: NM1, Element: NM102 Notes: Entity Type Qualifier
|
27
|
+
attr_accessor :entity_type
|
28
|
+
|
29
|
+
# Loop: 2100B, Segment: NM1, Element: NM109 Notes: NM108=FI Federal Taxpayer’s Identification Number
|
30
|
+
attr_accessor :federal_taxpayers_id_number
|
31
|
+
|
32
|
+
# Loop: 2100B, Segment: NM1, Element: NM105 Notes: Name Middle
|
33
|
+
attr_accessor :middle_name
|
34
|
+
|
35
|
+
# Loop: 2100B, Segment: NM1, Element: NM109 Notes: NM108=XX Centers for Medicare and Medicaid Services National Provider Identifier
|
36
|
+
attr_accessor :npi
|
37
|
+
|
38
|
+
# Loop: 2100B, Segment: NM1, Element: NM109 Notes: NM108=PI Payor Identification
|
39
|
+
attr_accessor :payor_identification
|
40
|
+
|
41
|
+
# Loop: 2100B, Segment: NM1, Element: NM109 Notes: NM108=PP Pharmacy Processor Number
|
42
|
+
attr_accessor :pharmacy_processor_number
|
43
|
+
|
44
|
+
# Loop: 2100[B|C|D], Segment: PRV, Element: PRV01 Notes: Provider Code
|
45
|
+
attr_accessor :provider_code
|
46
|
+
|
47
|
+
# Loop: 2100B, Segment: NM1, Element: NM104 Notes: Name First
|
48
|
+
attr_accessor :provider_first_name
|
49
|
+
|
50
|
+
# Loop: 2100B, Segment: NM1, Element: NM103 Notes: Name Last
|
51
|
+
attr_accessor :provider_name
|
52
|
+
|
53
|
+
# Loop: 2100B, Segment: NM1, Element: NM103 Notes: Organization Name
|
54
|
+
attr_accessor :provider_org_name
|
55
|
+
|
56
|
+
# Loop: 2100[B|C|D], Segment: PRV, Element: PRV03 Notes: PRV02=PXC Reference Identification
|
57
|
+
attr_accessor :reference_identification
|
58
|
+
|
59
|
+
# Loop: 2100B, Segment: NM1, Element: NM109 Notes: NM108=SV Service Provider Number
|
60
|
+
attr_accessor :service_provider_number
|
61
|
+
|
62
|
+
# Loop: 2100B, Segment: NM1, Element: NM109 Notes: NM108=XV Centers for Medicare and Medicaid Services PlanID
|
63
|
+
attr_accessor :services_plan_id
|
64
|
+
|
65
|
+
# Loop: 2100B, Segment: NM1, Element: NM109 Notes: NM108=34 Social Security Number
|
66
|
+
attr_accessor :ssn
|
67
|
+
|
68
|
+
# Loop: 2100B, Segment: NM1, Element: NM107 Notes: suffix
|
69
|
+
attr_accessor :suffix
|
70
|
+
|
71
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
72
|
+
def self.attribute_map
|
73
|
+
{
|
74
|
+
'address': :address,
|
75
|
+
'employers_id': :employersId,
|
76
|
+
'entity_identifier': :entityIdentifier,
|
77
|
+
'entity_type': :entityType,
|
78
|
+
'federal_taxpayers_id_number': :federalTaxpayersIdNumber,
|
79
|
+
'middle_name': :middleName,
|
80
|
+
'npi': :npi,
|
81
|
+
'payor_identification': :payorIdentification,
|
82
|
+
'pharmacy_processor_number': :pharmacyProcessorNumber,
|
83
|
+
'provider_code': :providerCode,
|
84
|
+
'provider_first_name': :providerFirstName,
|
85
|
+
'provider_name': :providerName,
|
86
|
+
'provider_org_name': :providerOrgName,
|
87
|
+
'reference_identification': :referenceIdentification,
|
88
|
+
'service_provider_number': :serviceProviderNumber,
|
89
|
+
'services_plan_id': :servicesPlanID,
|
90
|
+
'ssn': :ssn,
|
91
|
+
'suffix': :suffix
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
# Attribute type mapping.
|
96
|
+
def self.swagger_types
|
97
|
+
{
|
98
|
+
'address': :Address,
|
99
|
+
'employers_id': :String,
|
100
|
+
'entity_identifier': :String,
|
101
|
+
'entity_type': :String,
|
102
|
+
'federal_taxpayers_id_number': :String,
|
103
|
+
'middle_name': :String,
|
104
|
+
'npi': :String,
|
105
|
+
'payor_identification': :String,
|
106
|
+
'pharmacy_processor_number': :String,
|
107
|
+
'provider_code': :String,
|
108
|
+
'provider_first_name': :String,
|
109
|
+
'provider_name': :String,
|
110
|
+
'provider_org_name': :String,
|
111
|
+
'reference_identification': :String,
|
112
|
+
'service_provider_number': :String,
|
113
|
+
'services_plan_id': :String,
|
114
|
+
'ssn': :String,
|
115
|
+
'suffix': :String
|
116
|
+
}
|
117
|
+
end
|
118
|
+
|
119
|
+
# Initializes the object
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
121
|
+
def initialize(attributes = {})
|
122
|
+
return unless attributes.is_a?(Hash)
|
123
|
+
|
124
|
+
# convert string to symbol for hash key
|
125
|
+
attributes = attributes.transform_keys(&:to_sym)
|
126
|
+
|
127
|
+
self.address = attributes[:address] if attributes.key?(:address)
|
128
|
+
|
129
|
+
self.employers_id = attributes[:employersId] if attributes.key?(:employersId)
|
130
|
+
|
131
|
+
self.entity_identifier = attributes[:entityIdentifier] if attributes.key?(:entityIdentifier)
|
132
|
+
|
133
|
+
self.entity_type = attributes[:entityType] if attributes.key?(:entityType)
|
134
|
+
|
135
|
+
self.federal_taxpayers_id_number = attributes[:federalTaxpayersIdNumber] if attributes.key?(:federalTaxpayersIdNumber)
|
136
|
+
|
137
|
+
self.middle_name = attributes[:middleName] if attributes.key?(:middleName)
|
138
|
+
|
139
|
+
self.npi = attributes[:npi] if attributes.key?(:npi)
|
140
|
+
|
141
|
+
self.payor_identification = attributes[:payorIdentification] if attributes.key?(:payorIdentification)
|
142
|
+
|
143
|
+
self.pharmacy_processor_number = attributes[:pharmacyProcessorNumber] if attributes.key?(:pharmacyProcessorNumber)
|
144
|
+
|
145
|
+
self.provider_code = attributes[:providerCode] if attributes.key?(:providerCode)
|
146
|
+
|
147
|
+
self.provider_first_name = attributes[:providerFirstName] if attributes.key?(:providerFirstName)
|
148
|
+
|
149
|
+
self.provider_name = attributes[:providerName] if attributes.key?(:providerName)
|
150
|
+
|
151
|
+
self.provider_org_name = attributes[:providerOrgName] if attributes.key?(:providerOrgName)
|
152
|
+
|
153
|
+
self.reference_identification = attributes[:referenceIdentification] if attributes.key?(:referenceIdentification)
|
154
|
+
|
155
|
+
self.service_provider_number = attributes[:serviceProviderNumber] if attributes.key?(:serviceProviderNumber)
|
156
|
+
|
157
|
+
self.services_plan_id = attributes[:servicesPlanID] if attributes.key?(:servicesPlanID)
|
158
|
+
|
159
|
+
self.ssn = attributes[:ssn] if attributes.key?(:ssn)
|
160
|
+
|
161
|
+
self.suffix = attributes[:suffix] if attributes.key?(:suffix)
|
162
|
+
end
|
163
|
+
|
164
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
165
|
+
# @return Array for valid properties with the reasons
|
166
|
+
def list_invalid_properties
|
167
|
+
[]
|
168
|
+
end
|
169
|
+
|
170
|
+
# Check to see if the all the properties in the model are valid
|
171
|
+
# @return true if the model is valid
|
172
|
+
def valid?
|
173
|
+
true
|
174
|
+
end
|
175
|
+
|
176
|
+
# Checks equality by comparing each attribute.
|
177
|
+
# @param [Object] Object to be compared
|
178
|
+
def ==(o)
|
179
|
+
return true if equal?(o)
|
180
|
+
|
181
|
+
self.class == o.class &&
|
182
|
+
address == o.address &&
|
183
|
+
employers_id == o.employers_id &&
|
184
|
+
entity_identifier == o.entity_identifier &&
|
185
|
+
entity_type == o.entity_type &&
|
186
|
+
federal_taxpayers_id_number == o.federal_taxpayers_id_number &&
|
187
|
+
middle_name == o.middle_name &&
|
188
|
+
npi == o.npi &&
|
189
|
+
payor_identification == o.payor_identification &&
|
190
|
+
pharmacy_processor_number == o.pharmacy_processor_number &&
|
191
|
+
provider_code == o.provider_code &&
|
192
|
+
provider_first_name == o.provider_first_name &&
|
193
|
+
provider_name == o.provider_name &&
|
194
|
+
provider_org_name == o.provider_org_name &&
|
195
|
+
reference_identification == o.reference_identification &&
|
196
|
+
service_provider_number == o.service_provider_number &&
|
197
|
+
services_plan_id == o.services_plan_id &&
|
198
|
+
ssn == o.ssn &&
|
199
|
+
suffix == o.suffix
|
200
|
+
end
|
201
|
+
|
202
|
+
# @see the `==` method
|
203
|
+
# @param [Object] Object to be compared
|
204
|
+
def eql?(o)
|
205
|
+
self == o
|
206
|
+
end
|
207
|
+
|
208
|
+
# Calculates hash code according to all attributes.
|
209
|
+
# @return [Fixnum] Hash code
|
210
|
+
def hash
|
211
|
+
[address, employers_id, entity_identifier, entity_type, federal_taxpayers_id_number, middle_name, npi, payor_identification, pharmacy_processor_number, provider_code, provider_first_name, provider_name, provider_org_name, reference_identification, service_provider_number, services_plan_id, ssn, suffix].hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Builds the object from hash
|
215
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
216
|
+
# @return [Object] Returns the model itself
|
217
|
+
def build_from_hash(attributes)
|
218
|
+
return nil unless attributes.is_a?(Hash)
|
219
|
+
|
220
|
+
self.class.swagger_types.each_pair do |key, type|
|
221
|
+
if type =~ /\AArray<(.*)>/i
|
222
|
+
# check to ensure the input is an array given that the attribute
|
223
|
+
# is documented as an array but the input is not
|
224
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
225
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(Regexp.last_match(1), v) })
|
226
|
+
end
|
227
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
228
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
229
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
230
|
+
end
|
231
|
+
|
232
|
+
self
|
233
|
+
end
|
234
|
+
|
235
|
+
# Deserializes the data based on type
|
236
|
+
# @param string type Data type
|
237
|
+
# @param string value Value to be deserialized
|
238
|
+
# @return [Object] Deserialized data
|
239
|
+
def _deserialize(type, value)
|
240
|
+
case type.to_sym
|
241
|
+
when :DateTime
|
242
|
+
DateTime.parse(value)
|
243
|
+
when :Date
|
244
|
+
Date.parse(value)
|
245
|
+
when :String
|
246
|
+
value.to_s
|
247
|
+
when :Integer
|
248
|
+
value.to_i
|
249
|
+
when :Float
|
250
|
+
value.to_f
|
251
|
+
when :BOOLEAN
|
252
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
253
|
+
true
|
254
|
+
else
|
255
|
+
false
|
256
|
+
end
|
257
|
+
when :Object
|
258
|
+
# generic object (usually a Hash), return directly
|
259
|
+
value
|
260
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
261
|
+
inner_type = Regexp.last_match[:inner_type]
|
262
|
+
value.map { |v| _deserialize(inner_type, v) }
|
263
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
264
|
+
k_type = Regexp.last_match[:k_type]
|
265
|
+
v_type = Regexp.last_match[:v_type]
|
266
|
+
{}.tap do |hash|
|
267
|
+
value.each do |k, v|
|
268
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
269
|
+
end
|
270
|
+
end
|
271
|
+
else # model
|
272
|
+
temp_model = SwaggerClient.const_get(type).new
|
273
|
+
temp_model.build_from_hash(value)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
# Returns the string representation of the object
|
278
|
+
# @return [String] String presentation of the object
|
279
|
+
def to_s
|
280
|
+
to_hash.to_s
|
281
|
+
end
|
282
|
+
|
283
|
+
# to_body is an alias to to_hash (backward compatibility)
|
284
|
+
# @return [Hash] Returns the object in the form of hash
|
285
|
+
def to_body
|
286
|
+
to_hash
|
287
|
+
end
|
288
|
+
|
289
|
+
# Returns the object in the form of hash
|
290
|
+
# @return [Hash] Returns the object in the form of hash
|
291
|
+
def to_hash
|
292
|
+
hash = {}
|
293
|
+
self.class.attribute_map.each_pair do |attr, param|
|
294
|
+
value = send(attr)
|
295
|
+
next if value.nil?
|
296
|
+
|
297
|
+
hash[param] = _to_hash(value)
|
298
|
+
end
|
299
|
+
hash
|
300
|
+
end
|
301
|
+
|
302
|
+
# Outputs non-array value in the form of hash
|
303
|
+
# For object, use to_hash. Otherwise, just return the value
|
304
|
+
# @param [Object] value Any valid value
|
305
|
+
# @return [Hash] Returns the value in the form of hash
|
306
|
+
def _to_hash(value)
|
307
|
+
if value.is_a?(Array)
|
308
|
+
value.compact.map { |v| _to_hash(v) }
|
309
|
+
elsif value.is_a?(Hash)
|
310
|
+
{}.tap do |hash|
|
311
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
312
|
+
end
|
313
|
+
elsif value.respond_to? :to_hash
|
314
|
+
value.to_hash
|
315
|
+
else
|
316
|
+
value
|
317
|
+
end
|
318
|
+
end
|
319
|
+
end
|
320
|
+
end
|
321
|
+
end
|
322
|
+
end
|