Class: ChangeHealthcare::Eligibility::SwaggerClient::Provider
- Inherits:
-
Object
- Object
- ChangeHealthcare::Eligibility::SwaggerClient::Provider
- Defined in:
- lib/change_healthcare/eligibility/swagger_client/models/provider.rb
Overview
Loop: 2100B, Segment: NM1, Notes: Information Receiver
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#first_name ⇒ Object
Loop: 2100B Segment: MN1, Element: NM104, Notes: NM101=PR when providerType=‘payer’ && payerId is present otherwise 1P for Provider, NM102=1 Person, firstName 1-35 alphanumberic characters.
-
#last_name ⇒ Object
Loop: 2100B Segment: MN1, Element: NM103, Notes: NM101=PR when providerType=‘payer’ && payerId is present otherwise 1P for Provider, NM102=1 Person, lastName 1-60 alphanumberic characters.
-
#name ⇒ Object
Returns the value of attribute name.
-
#npi ⇒ Object
Loop: 2100B Segment: MN1, Element: NM109, Notes: NM108=XX Centers for Medicare and Medicaid Services National Provider Identifier 2-80 alphanumberic characters.
-
#organization_name ⇒ Object
Loop: 2100B Segment: MN1, Element: NM103, Notes: NM101=PR when providerType=‘payer’ && payerId is present otherwise 1P for Provider, NM102=2 Non-Person Entity, organizationName 1-60 alphanumberic characters.
-
#payor_id ⇒ Object
Loop: 2100B Segment: MN1, Element: NM109, Notes: NM101=PR when providerType=‘payer’ && payerId is present otherwise 1P for Provider, NM108=PI Payor Identification 2-80 alphanumberic characters.
-
#person ⇒ Object
Returns the value of attribute person.
-
#provider_code ⇒ Object
Loop: 2100B Segment: PRV, Element: PRV01, Notes: PRV02=PXC Allowed Values are: ‘AD’ Admitting, ‘AT’ Attending, ‘BI’ Billing, ‘CO’ Consulting, ‘CV’ Covering, ‘H’ Hospital, ‘HH’ Home Health Care, ‘LA’ Laboratory, ‘OT’ Other Physician, ‘P1’ Pharmacist, ‘P2’ Pharmacy, ‘PC’ Primary Care Physician, ‘PE’ Performing, ‘R’ Rural Health Clinic, ‘RF’ Referring, ‘SB’ Submitting, ‘SK’ Skilled Nursing Facility, ‘SU’ Supervising.
-
#provider_type ⇒ Object
Loop: 2100B Segment: MN1, Notes: NM101=PR when providerType=‘payer’ && payerId is present otherwise 1P for Provider.
-
#reference_identification ⇒ Object
Loop: 2100B Segment: PRV, Element: PRV03, Notes: PRV02=PXC referenceIdentification and controlNumber into PRV03.
-
#service_provider_number ⇒ Object
Loop: 2100B Segment: MN1, Element: NM109, Notes: NM108=SV Service Provider Number 2-80 alphanumberic characters.
-
#tax_id ⇒ Object
Loop: 2100B Segment: MN1, Element: NM109, Notes: NM108=FI Federal Taxpayer’s Identification Number 2-80 alphanumberic characters.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Provider
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Provider
Initializes the object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 109 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.transform_keys(&:to_sym) self.first_name = attributes[:firstName] if attributes.key?(:firstName) self.last_name = attributes[:lastName] if attributes.key?(:lastName) self.name = attributes[:name] if attributes.key?(:name) self.npi = attributes[:npi] if attributes.key?(:npi) self.organization_name = attributes[:organizationName] if attributes.key?(:organizationName) self.payor_id = attributes[:payorId] if attributes.key?(:payorId) self.person = attributes[:person] if attributes.key?(:person) self.provider_code = attributes[:providerCode] if attributes.key?(:providerCode) self.provider_type = attributes[:providerType] if attributes.key?(:providerType) self.reference_identification = attributes[:referenceIdentification] if attributes.key?(:referenceIdentification) self.service_provider_number = attributes[:serviceProviderNumber] if attributes.key?(:serviceProviderNumber) self.tax_id = attributes[:taxId] if attributes.key?(:taxId) end |
Instance Attribute Details
#first_name ⇒ Object
Loop: 2100B Segment: MN1, Element: NM104, Notes: NM101=PR when providerType=‘payer’ && payerId is present otherwise 1P for Provider, NM102=1 Person, firstName 1-35 alphanumberic characters
19 20 21 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 19 def first_name @first_name end |
#last_name ⇒ Object
Loop: 2100B Segment: MN1, Element: NM103, Notes: NM101=PR when providerType=‘payer’ && payerId is present otherwise 1P for Provider, NM102=1 Person, lastName 1-60 alphanumberic characters
22 23 24 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 22 def last_name @last_name end |
#name ⇒ Object
Returns the value of attribute name.
24 25 26 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 24 def name @name end |
#npi ⇒ Object
Loop: 2100B Segment: MN1, Element: NM109, Notes: NM108=XX Centers for Medicare and Medicaid Services National Provider Identifier 2-80 alphanumberic characters
27 28 29 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 27 def npi @npi end |
#organization_name ⇒ Object
Loop: 2100B Segment: MN1, Element: NM103, Notes: NM101=PR when providerType=‘payer’ && payerId is present otherwise 1P for Provider, NM102=2 Non-Person Entity, organizationName 1-60 alphanumberic characters
30 31 32 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 30 def organization_name @organization_name end |
#payor_id ⇒ Object
Loop: 2100B Segment: MN1, Element: NM109, Notes: NM101=PR when providerType=‘payer’ && payerId is present otherwise 1P for Provider, NM108=PI Payor Identification 2-80 alphanumberic characters
33 34 35 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 33 def payor_id @payor_id end |
#person ⇒ Object
Returns the value of attribute person.
24 25 26 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 24 def person @person end |
#provider_code ⇒ Object
Loop: 2100B Segment: PRV, Element: PRV01, Notes: PRV02=PXC Allowed Values are: ‘AD’ Admitting, ‘AT’ Attending, ‘BI’ Billing, ‘CO’ Consulting, ‘CV’ Covering, ‘H’ Hospital, ‘HH’ Home Health Care, ‘LA’ Laboratory, ‘OT’ Other Physician, ‘P1’ Pharmacist, ‘P2’ Pharmacy, ‘PC’ Primary Care Physician, ‘PE’ Performing, ‘R’ Rural Health Clinic, ‘RF’ Referring, ‘SB’ Submitting, ‘SK’ Skilled Nursing Facility, ‘SU’ Supervising
36 37 38 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 36 def provider_code @provider_code end |
#provider_type ⇒ Object
Loop: 2100B Segment: MN1, Notes: NM101=PR when providerType=‘payer’ && payerId is present otherwise 1P for Provider
39 40 41 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 39 def provider_type @provider_type end |
#reference_identification ⇒ Object
Loop: 2100B Segment: PRV, Element: PRV03, Notes: PRV02=PXC referenceIdentification and controlNumber into PRV03
42 43 44 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 42 def reference_identification @reference_identification end |
#service_provider_number ⇒ Object
Loop: 2100B Segment: MN1, Element: NM109, Notes: NM108=SV Service Provider Number 2-80 alphanumberic characters
45 46 47 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 45 def service_provider_number @service_provider_number end |
#tax_id ⇒ Object
Loop: 2100B Segment: MN1, Element: NM109, Notes: NM108=FI Federal Taxpayer’s Identification Number 2-80 alphanumberic characters
48 49 50 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 48 def tax_id @tax_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 72 def self.attribute_map { 'first_name': :firstName, 'last_name': :lastName, 'name': :name, 'npi': :npi, 'organization_name': :organizationName, 'payor_id': :payorId, 'person': :person, 'provider_code': :providerCode, 'provider_type': :providerType, 'reference_identification': :referenceIdentification, 'service_provider_number': :serviceProviderNumber, 'tax_id': :taxId } end |
.swagger_types ⇒ Object
Attribute type mapping.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 90 def self.swagger_types { 'first_name': :String, 'last_name': :String, 'name': :BOOLEAN, 'npi': :String, 'organization_name': :String, 'payor_id': :String, 'person': :BOOLEAN, 'provider_code': :String, 'provider_type': :String, 'reference_identification': :String, 'service_provider_number': :String, 'tax_id': :String } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 166 def ==(o) return true if equal?(o) self.class == o.class && first_name == o.first_name && last_name == o.last_name && name == o.name && npi == o.npi && organization_name == o.organization_name && payor_id == o.payor_id && person == o.person && provider_code == o.provider_code && provider_type == o.provider_type && reference_identification == o.reference_identification && service_provider_number == o.service_provider_number && tax_id == o.tax_id end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 221 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
288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 288 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
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 199 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
186 187 188 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 186 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
192 193 194 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 192 def hash [first_name, last_name, name, npi, organization_name, payor_id, person, provider_code, provider_type, reference_identification, service_provider_number, tax_id].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
142 143 144 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 142 def list_invalid_properties [] end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
267 268 269 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 267 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
273 274 275 276 277 278 279 280 281 282 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 273 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 ⇒ String
Returns the string representation of the object
261 262 263 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 261 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
148 149 150 151 152 153 |
# File 'lib/change_healthcare/eligibility/swagger_client/models/provider.rb', line 148 def valid? provider_code_validator = EnumAttributeValidator.new('String', %w[AD AT BI CO CV H HH LA OT P1 P2 PC PE R RF SB SK SU]) return false unless provider_code_validator.valid?(@provider_code) true end |