Class: CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdate

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb

Overview

The billing provider is the provider or business entity submitting the claim.

Billing provider may be, but is not necessarily, the same person/NPI as the
rendering provider.
From a payer's perspective, this represents the person or entity being
reimbursed.
When a contract exists with the target payer, the billing provider should be the
entity contracted with the payer.
In some circumstances, this will be an individual provider. In that case, submit
that provider's NPI and the
tax ID (TIN) that the provider gave to the payer during contracting.
In other cases, the billing entity will be a medical group. If so, submit the
group NPI and the group's tax ID.
Box 33 on the CMS-1500 claim form.

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address: OMIT, tax_id: OMIT, npi: OMIT, taxonomy_code: OMIT, provider_commercial_license_type: OMIT, first_name: OMIT, last_name: OMIT, organization_name: OMIT, additional_properties: nil) ⇒ CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdate

Parameters:

  • address (CandidApiClient::Commons::Types::StreetAddressLongZip) (defaults to: OMIT)
  • tax_id (String) (defaults to: OMIT)

    If the provider has a contract with insurance, this must be the same tax ID given to the payer on an IRS W-9 form completed during contracting.

  • npi (String) (defaults to: OMIT)
  • taxonomy_code (String) (defaults to: OMIT)
  • provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType) (defaults to: OMIT)

    837i Loop2010BB G2 Provider Commercial Number

  • first_name (String) (defaults to: OMIT)

    If the provider is an individual, this should be set instead of organization name

  • last_name (String) (defaults to: OMIT)

    If the provider is an individual, this should be set instead of organization name

  • organization_name (String) (defaults to: OMIT)

    If the provider is an organization, this should be set instead of first + last name

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 70

def initialize(address: OMIT, tax_id: OMIT, npi: OMIT, taxonomy_code: OMIT,
               provider_commercial_license_type: OMIT, first_name: OMIT, last_name: OMIT, organization_name: OMIT, additional_properties: nil)
  @address = address if address != OMIT
  @tax_id = tax_id if tax_id != OMIT
  @npi = npi if npi != OMIT
  @taxonomy_code = taxonomy_code if taxonomy_code != OMIT
  if provider_commercial_license_type != OMIT
    @provider_commercial_license_type = provider_commercial_license_type
  end
  @first_name = first_name if first_name != OMIT
  @last_name = last_name if last_name != OMIT
  @organization_name = organization_name if organization_name != OMIT
  @additional_properties = additional_properties
  @_field_set = {
    "address": address,
    "tax_id": tax_id,
    "npi": npi,
    "taxonomy_code": taxonomy_code,
    "provider_commercial_license_type": provider_commercial_license_type,
    "first_name": first_name,
    "last_name": last_name,
    "organization_name": organization_name
  }.reject do |_k, v|
    v == OMIT
  end
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



48
49
50
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 48

def additional_properties
  @additional_properties
end

#addressCandidApiClient::Commons::Types::StreetAddressLongZip (readonly)



27
28
29
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 27

def address
  @address
end

#first_nameString (readonly)

Returns If the provider is an individual, this should be set instead of organization name.

Returns:

  • (String)

    If the provider is an individual, this should be set instead of organization name



40
41
42
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 40

def first_name
  @first_name
end

#last_nameString (readonly)

Returns If the provider is an individual, this should be set instead of organization name.

Returns:

  • (String)

    If the provider is an individual, this should be set instead of organization name



43
44
45
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 43

def last_name
  @last_name
end

#npiString (readonly)

Returns:

  • (String)


32
33
34
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 32

def npi
  @npi
end

#organization_nameString (readonly)

Returns If the provider is an organization, this should be set instead of first + last name.

Returns:

  • (String)

    If the provider is an organization, this should be set instead of first + last name



46
47
48
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 46

def organization_name
  @organization_name
end

#provider_commercial_license_typeCandidApiClient::Commons::Types::BillingProviderCommercialLicenseType (readonly)

Returns 837i Loop2010BB G2 Provider Commercial Number.

Returns:



37
38
39
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 37

def provider_commercial_license_type
  @provider_commercial_license_type
end

#tax_idString (readonly)

Returns If the provider has a contract with insurance, this must be the same tax ID given to the payer on an IRS W-9 form completed during contracting.

Returns:

  • (String)

    If the provider has a contract with insurance, this must be the same tax ID given to the payer on an IRS W-9 form completed during contracting.



30
31
32
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 30

def tax_id
  @tax_id
end

#taxonomy_codeString (readonly)

Returns:

  • (String)


34
35
36
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 34

def taxonomy_code
  @taxonomy_code
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdate

Deserialize a JSON object to an instance of BillingProviderUpdate

Parameters:

  • json_object (String)

Returns:



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 101

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  if parsed_json["address"].nil?
    address = nil
  else
    address = parsed_json["address"].to_json
    address = CandidApiClient::Commons::Types::StreetAddressLongZip.from_json(json_object: address)
  end
  tax_id = struct["tax_id"]
  npi = struct["npi"]
  taxonomy_code = struct["taxonomy_code"]
  provider_commercial_license_type = struct["provider_commercial_license_type"]
  first_name = struct["first_name"]
  last_name = struct["last_name"]
  organization_name = struct["organization_name"]
  new(
    address: address,
    tax_id: tax_id,
    npi: npi,
    taxonomy_code: taxonomy_code,
    provider_commercial_license_type: provider_commercial_license_type,
    first_name: first_name,
    last_name: last_name,
    organization_name: organization_name,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Leveraged for Union-type generation, validate_raw attempts to parse the given

hash and check each fields type against the current object's property
definitions.

Parameters:

  • obj (Object)

Returns:

  • (Void)


143
144
145
146
147
148
149
150
151
152
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 143

def self.validate_raw(obj:)
  obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressLongZip.validate_raw(obj: obj.address)
  obj.tax_id&.is_a?(String) != false || raise("Passed value for field obj.tax_id is not the expected type, validation failed.")
  obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.")
  obj.taxonomy_code&.is_a?(String) != false || raise("Passed value for field obj.taxonomy_code is not the expected type, validation failed.")
  obj.provider_commercial_license_type&.is_a?(CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType) != false || raise("Passed value for field obj.provider_commercial_license_type is not the expected type, validation failed.")
  obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
  obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
  obj.organization_name&.is_a?(String) != false || raise("Passed value for field obj.organization_name is not the expected type, validation failed.")
end

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of BillingProviderUpdate to a JSON object

Returns:

  • (String)


133
134
135
# File 'lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb', line 133

def to_json(*_args)
  @_field_set&.to_json
end