candidhealth 0.34.3 → 0.34.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ec287a4caeda05a8aa7c6617280a1ead83d3578d17770dc4aff6515f79deb4f
4
- data.tar.gz: 9cea5025166327eb5ac4064604da1a79dea04e7bc52e00472a5824a4663ae008
3
+ metadata.gz: e76b394409a81e895ec13570a9b8d7539d2b6002d847e128ee6c03e26e7eb558
4
+ data.tar.gz: d8a03b50904a01621b04a2080ae270bd87e4f6829f62f3c0e9db6f479df4c66e
5
5
  SHA512:
6
- metadata.gz: 3692c5e8cd4698fdf5511e75da2bf57ea3e268ce35e5ef49ac17aaf4e95ea21e8c0733eed9b0565e93c79c2b5c8816f6aba3daa17a0bf48d766f5ac0c5139180
7
- data.tar.gz: 49448ffd0fffb6bd0bdc522a8e9c8a33fef6f5c32531b19765bcb56b8a201283d2410423bea297aaa9c4968beab9187ef83b92e3306e07ebd219c98f83f7aad4
6
+ metadata.gz: 891bf82d60328092697df855aed72fffba74ce459f574f9aee29d90ab875131a535afb4499e5ce70a65089e32c024d989400b02d6594d92444d88a897173b8fa
7
+ data.tar.gz: 4b88a0015149da9b1ec45fa963cb2e06ddf47eaeebea2a863ddfc8062b794497e90fae7b0f8557d33f87fd68e8f25ffae78fc66b43aec96e458588743a12f79f
@@ -0,0 +1,144 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../commons/types/street_address_long_zip"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module EncounterProviders
9
+ module V2
10
+ module Types
11
+ # The billing provider is the provider or business entity submitting the claim.
12
+ # Billing provider may be, but is not necessarily, the same person/NPI as the
13
+ # rendering provider.
14
+ # From a payer's perspective, this represents the person or entity being
15
+ # reimbursed.
16
+ # When a contract exists with the target payer, the billing provider should be the
17
+ # entity contracted with the payer.
18
+ # In some circumstances, this will be an individual provider. In that case, submit
19
+ # that provider's NPI and the
20
+ # tax ID (TIN) that the provider gave to the payer during contracting.
21
+ # In other cases, the billing entity will be a medical group. If so, submit the
22
+ # group NPI and the group's tax ID.
23
+ # Box 33 on the CMS-1500 claim form.
24
+ class BillingProviderUpdate
25
+ # @return [CandidApiClient::Commons::Types::StreetAddressLongZip]
26
+ attr_reader :address
27
+ # @return [String] If the provider has a contract with insurance, this must be the same tax ID
28
+ # given to the payer on an IRS W-9 form completed during contracting.
29
+ attr_reader :tax_id
30
+ # @return [String]
31
+ attr_reader :npi
32
+ # @return [String]
33
+ attr_reader :taxonomy_code
34
+ # @return [String] If the provider is an individual, this should be set instead of organization
35
+ # name
36
+ attr_reader :first_name
37
+ # @return [String] If the provider is an individual, this should be set instead of organization
38
+ # name
39
+ attr_reader :last_name
40
+ # @return [String] If the provider is an organization, this should be set instead of first + last
41
+ # name
42
+ attr_reader :organization_name
43
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
44
+ attr_reader :additional_properties
45
+ # @return [Object]
46
+ attr_reader :_field_set
47
+ protected :_field_set
48
+
49
+ OMIT = Object.new
50
+
51
+ # @param address [CandidApiClient::Commons::Types::StreetAddressLongZip]
52
+ # @param tax_id [String] If the provider has a contract with insurance, this must be the same tax ID
53
+ # given to the payer on an IRS W-9 form completed during contracting.
54
+ # @param npi [String]
55
+ # @param taxonomy_code [String]
56
+ # @param first_name [String] If the provider is an individual, this should be set instead of organization
57
+ # name
58
+ # @param last_name [String] If the provider is an individual, this should be set instead of organization
59
+ # name
60
+ # @param organization_name [String] If the provider is an organization, this should be set instead of first + last
61
+ # name
62
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
63
+ # @return [CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdate]
64
+ def initialize(address: OMIT, tax_id: OMIT, npi: OMIT, taxonomy_code: OMIT, first_name: OMIT,
65
+ last_name: OMIT, organization_name: OMIT, additional_properties: nil)
66
+ @address = address if address != OMIT
67
+ @tax_id = tax_id if tax_id != OMIT
68
+ @npi = npi if npi != OMIT
69
+ @taxonomy_code = taxonomy_code if taxonomy_code != OMIT
70
+ @first_name = first_name if first_name != OMIT
71
+ @last_name = last_name if last_name != OMIT
72
+ @organization_name = organization_name if organization_name != OMIT
73
+ @additional_properties = additional_properties
74
+ @_field_set = {
75
+ "address": address,
76
+ "tax_id": tax_id,
77
+ "npi": npi,
78
+ "taxonomy_code": taxonomy_code,
79
+ "first_name": first_name,
80
+ "last_name": last_name,
81
+ "organization_name": organization_name
82
+ }.reject do |_k, v|
83
+ v == OMIT
84
+ end
85
+ end
86
+
87
+ # Deserialize a JSON object to an instance of BillingProviderUpdate
88
+ #
89
+ # @param json_object [String]
90
+ # @return [CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdate]
91
+ def self.from_json(json_object:)
92
+ struct = JSON.parse(json_object, object_class: OpenStruct)
93
+ parsed_json = JSON.parse(json_object)
94
+ if parsed_json["address"].nil?
95
+ address = nil
96
+ else
97
+ address = parsed_json["address"].to_json
98
+ address = CandidApiClient::Commons::Types::StreetAddressLongZip.from_json(json_object: address)
99
+ end
100
+ tax_id = struct["tax_id"]
101
+ npi = struct["npi"]
102
+ taxonomy_code = struct["taxonomy_code"]
103
+ first_name = struct["first_name"]
104
+ last_name = struct["last_name"]
105
+ organization_name = struct["organization_name"]
106
+ new(
107
+ address: address,
108
+ tax_id: tax_id,
109
+ npi: npi,
110
+ taxonomy_code: taxonomy_code,
111
+ first_name: first_name,
112
+ last_name: last_name,
113
+ organization_name: organization_name,
114
+ additional_properties: struct
115
+ )
116
+ end
117
+
118
+ # Serialize an instance of BillingProviderUpdate to a JSON object
119
+ #
120
+ # @return [String]
121
+ def to_json(*_args)
122
+ @_field_set&.to_json
123
+ end
124
+
125
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
126
+ # hash and check each fields type against the current object's property
127
+ # definitions.
128
+ #
129
+ # @param obj [Object]
130
+ # @return [Void]
131
+ def self.validate_raw(obj:)
132
+ obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressLongZip.validate_raw(obj: obj.address)
133
+ obj.tax_id&.is_a?(String) != false || raise("Passed value for field obj.tax_id is not the expected type, validation failed.")
134
+ obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.")
135
+ obj.taxonomy_code&.is_a?(String) != false || raise("Passed value for field obj.taxonomy_code is not the expected type, validation failed.")
136
+ obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
137
+ obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
138
+ obj.organization_name&.is_a?(String) != false || raise("Passed value for field obj.organization_name is not the expected type, validation failed.")
139
+ end
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
@@ -39,6 +39,7 @@ require_relative "types/vitals_update"
39
39
  require_relative "../../encounter_providers/v_2/types/rendering_provider_update"
40
40
  require_relative "../../service_facility/types/encounter_service_facility_update"
41
41
  require_relative "../../guarantor/v_1/types/guarantor_update"
42
+ require_relative "../../encounter_providers/v_2/types/billing_provider_update"
42
43
  require_relative "../../encounter_providers/v_2/types/supervising_provider_update"
43
44
  require_relative "../../encounter_providers/v_2/types/referring_provider_update"
44
45
  require_relative "../../encounter_providers/v_2/types/initial_referring_provider_update"
@@ -497,6 +498,7 @@ module CandidApiClient
497
498
  # * :first_name (String)
498
499
  # * :last_name (String)
499
500
  # * :organization_name (String)
501
+ # * :test_result (Hash)
500
502
  # @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorCreate, as a Hash
501
503
  # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
502
504
  # * :phone_consent (Boolean)
@@ -885,6 +887,7 @@ module CandidApiClient
885
887
  # * :first_name (String)
886
888
  # * :last_name (String)
887
889
  # * :organization_name (String)
890
+ # * :test_result (Hash)
888
891
  # @param external_claim_submission [Hash] ***This field is in beta.***
889
892
  # To be included for claims that have been submitted outside of Candid.
890
893
  # Candid supports posting remits and payments to these claims and working them
@@ -1220,6 +1223,28 @@ module CandidApiClient
1220
1223
  # * :phone_consent (Boolean)
1221
1224
  # * :email (String)
1222
1225
  # * :email_consent (Boolean)
1226
+ # @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
1227
+ # Billing provider may be, but is not necessarily, the same person/NPI as the
1228
+ # rendering provider. From a payer's perspective, this represents the person or
1229
+ # entity being reimbursed. When a contract exists with the target payer, the
1230
+ # billing provider should be the entity contracted with the payer. In some
1231
+ # circumstances, this will be an individual provider. In that case, submit that
1232
+ # provider's NPI and the tax ID (TIN) that the provider gave to the payer during
1233
+ # contracting. In other cases, the billing entity will be a medical group. If so,
1234
+ # submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim form.Request of type CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdate, as a Hash
1235
+ # * :address (Hash)
1236
+ # * :zip_plus_four_code (String)
1237
+ # * :address_1 (String)
1238
+ # * :address_2 (String)
1239
+ # * :city (String)
1240
+ # * :state (CandidApiClient::Commons::Types::State)
1241
+ # * :zip_code (String)
1242
+ # * :tax_id (String)
1243
+ # * :npi (String)
1244
+ # * :taxonomy_code (String)
1245
+ # * :first_name (String)
1246
+ # * :last_name (String)
1247
+ # * :organization_name (String)
1223
1248
  # @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
1224
1249
  # required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate, as a Hash
1225
1250
  # * :npi (String)
@@ -1306,12 +1331,13 @@ module CandidApiClient
1306
1331
  # rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
1307
1332
  # service_facility: { organization_name: "Test Organization", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } },
1308
1333
  # guarantor: { first_name: "string", last_name: "string", external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true },
1334
+ # billing_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, tax_id: "string", npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
1309
1335
  # supervising_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
1310
1336
  # referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
1311
1337
  # initial_referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" }
1312
1338
  # )
1313
1339
  def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
1314
- diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, request_options: nil)
1340
+ diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, billing_provider: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, request_options: nil)
1315
1341
  response = @request_client.conn.patch do |req|
1316
1342
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1317
1343
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -1355,6 +1381,7 @@ module CandidApiClient
1355
1381
  rendering_provider: rendering_provider,
1356
1382
  service_facility: service_facility,
1357
1383
  guarantor: guarantor,
1384
+ billing_provider: billing_provider,
1358
1385
  supervising_provider: supervising_provider,
1359
1386
  referring_provider: referring_provider,
1360
1387
  initial_referring_provider: initial_referring_provider
@@ -1820,6 +1847,7 @@ module CandidApiClient
1820
1847
  # * :first_name (String)
1821
1848
  # * :last_name (String)
1822
1849
  # * :organization_name (String)
1850
+ # * :test_result (Hash)
1823
1851
  # @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorCreate, as a Hash
1824
1852
  # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
1825
1853
  # * :phone_consent (Boolean)
@@ -2210,6 +2238,7 @@ module CandidApiClient
2210
2238
  # * :first_name (String)
2211
2239
  # * :last_name (String)
2212
2240
  # * :organization_name (String)
2241
+ # * :test_result (Hash)
2213
2242
  # @param external_claim_submission [Hash] ***This field is in beta.***
2214
2243
  # To be included for claims that have been submitted outside of Candid.
2215
2244
  # Candid supports posting remits and payments to these claims and working them
@@ -2547,6 +2576,28 @@ module CandidApiClient
2547
2576
  # * :phone_consent (Boolean)
2548
2577
  # * :email (String)
2549
2578
  # * :email_consent (Boolean)
2579
+ # @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
2580
+ # Billing provider may be, but is not necessarily, the same person/NPI as the
2581
+ # rendering provider. From a payer's perspective, this represents the person or
2582
+ # entity being reimbursed. When a contract exists with the target payer, the
2583
+ # billing provider should be the entity contracted with the payer. In some
2584
+ # circumstances, this will be an individual provider. In that case, submit that
2585
+ # provider's NPI and the tax ID (TIN) that the provider gave to the payer during
2586
+ # contracting. In other cases, the billing entity will be a medical group. If so,
2587
+ # submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim form.Request of type CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdate, as a Hash
2588
+ # * :address (Hash)
2589
+ # * :zip_plus_four_code (String)
2590
+ # * :address_1 (String)
2591
+ # * :address_2 (String)
2592
+ # * :city (String)
2593
+ # * :state (CandidApiClient::Commons::Types::State)
2594
+ # * :zip_code (String)
2595
+ # * :tax_id (String)
2596
+ # * :npi (String)
2597
+ # * :taxonomy_code (String)
2598
+ # * :first_name (String)
2599
+ # * :last_name (String)
2600
+ # * :organization_name (String)
2550
2601
  # @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
2551
2602
  # required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate, as a Hash
2552
2603
  # * :npi (String)
@@ -2633,12 +2684,13 @@ module CandidApiClient
2633
2684
  # rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
2634
2685
  # service_facility: { organization_name: "Test Organization", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } },
2635
2686
  # guarantor: { first_name: "string", last_name: "string", external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true },
2687
+ # billing_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, tax_id: "string", npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
2636
2688
  # supervising_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
2637
2689
  # referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
2638
2690
  # initial_referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" }
2639
2691
  # )
2640
2692
  def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
2641
- diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, request_options: nil)
2693
+ diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, existing_medications: nil, rendering_provider: nil, service_facility: nil, guarantor: nil, billing_provider: nil, supervising_provider: nil, referring_provider: nil, initial_referring_provider: nil, request_options: nil)
2642
2694
  Async do
2643
2695
  response = @request_client.conn.patch do |req|
2644
2696
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -2683,6 +2735,7 @@ module CandidApiClient
2683
2735
  rendering_provider: rendering_provider,
2684
2736
  service_facility: service_facility,
2685
2737
  guarantor: guarantor,
2738
+ billing_provider: billing_provider,
2686
2739
  supervising_provider: supervising_provider,
2687
2740
  referring_provider: referring_provider,
2688
2741
  initial_referring_provider: initial_referring_provider
@@ -83,6 +83,7 @@ module CandidApiClient
83
83
  # * :description (String)
84
84
  # * :date_of_service (Date)
85
85
  # * :end_date_of_service (Date)
86
+ # * :test_result (Hash)
86
87
  # @param request_options [CandidApiClient::RequestOptions]
87
88
  # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
88
89
  # @example
@@ -201,6 +202,7 @@ module CandidApiClient
201
202
  # * :description (String)
202
203
  # * :date_of_service (Date)
203
204
  # * :end_date_of_service (Date)
205
+ # * :test_result (Hash)
204
206
  # @param request_options [CandidApiClient::RequestOptions]
205
207
  # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
206
208
  # @example
@@ -12,6 +12,7 @@ require_relative "../../../encounter_providers/v_2/types/encounter_provider"
12
12
  require_relative "../../../commons/types/service_line_units"
13
13
  require_relative "../../../commons/types/date_range_optional_end"
14
14
  require "date"
15
+ require_relative "test_result"
15
16
  require "ostruct"
16
17
  require "json"
17
18
 
@@ -89,6 +90,8 @@ module CandidApiClient
89
90
  attr_reader :date_of_service
90
91
  # @return [Date]
91
92
  attr_reader :end_date_of_service
93
+ # @return [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
94
+ attr_reader :test_result
92
95
  # @return [OpenStruct] Additional properties unmapped to the current class definition
93
96
  attr_reader :additional_properties
94
97
  # @return [Object]
@@ -134,10 +137,11 @@ module CandidApiClient
134
137
  # Maps to SV1-01, C003-07 on the 837-P.
135
138
  # @param date_of_service [Date]
136
139
  # @param end_date_of_service [Date]
140
+ # @param test_result [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
137
141
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
138
142
  # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
139
143
  def initialize(service_line_id:, procedure_code:, quantity:, units:, claim_id:, date_of_service_range:, date_of_service:, modifiers: OMIT, charge_amount_cents: OMIT, allowed_amount_cents: OMIT,
140
- insurance_balance_cents: OMIT, patient_balance_cents: OMIT, paid_amount_cents: OMIT, primary_paid_amount_cents: OMIT, secondary_paid_amount_cents: OMIT, tertiary_paid_amount_cents: OMIT, patient_responsibility_cents: OMIT, diagnosis_id_zero: OMIT, diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, service_line_era_data: OMIT, service_line_manual_adjustments: OMIT, related_invoices: OMIT, related_invoice_info: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, ordering_provider: OMIT, description: OMIT, end_date_of_service: OMIT, additional_properties: nil)
144
+ insurance_balance_cents: OMIT, patient_balance_cents: OMIT, paid_amount_cents: OMIT, primary_paid_amount_cents: OMIT, secondary_paid_amount_cents: OMIT, tertiary_paid_amount_cents: OMIT, patient_responsibility_cents: OMIT, diagnosis_id_zero: OMIT, diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, service_line_era_data: OMIT, service_line_manual_adjustments: OMIT, related_invoices: OMIT, related_invoice_info: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, ordering_provider: OMIT, description: OMIT, end_date_of_service: OMIT, test_result: OMIT, additional_properties: nil)
141
145
  @modifiers = modifiers if modifiers != OMIT
142
146
  @charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
143
147
  @allowed_amount_cents = allowed_amount_cents if allowed_amount_cents != OMIT
@@ -174,6 +178,7 @@ module CandidApiClient
174
178
  @description = description if description != OMIT
175
179
  @date_of_service = date_of_service
176
180
  @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
181
+ @test_result = test_result if test_result != OMIT
177
182
  @additional_properties = additional_properties
178
183
  @_field_set = {
179
184
  "modifiers": modifiers,
@@ -207,7 +212,8 @@ module CandidApiClient
207
212
  "date_of_service_range": date_of_service_range,
208
213
  "description": description,
209
214
  "date_of_service": date_of_service,
210
- "end_date_of_service": end_date_of_service
215
+ "end_date_of_service": end_date_of_service,
216
+ "test_result": test_result
211
217
  }.reject do |_k, v|
212
218
  v == OMIT
213
219
  end
@@ -288,6 +294,12 @@ module CandidApiClient
288
294
  end_date_of_service = unless parsed_json["end_date_of_service"].nil?
289
295
  Date.parse(parsed_json["end_date_of_service"])
290
296
  end
297
+ if parsed_json["test_result"].nil?
298
+ test_result = nil
299
+ else
300
+ test_result = parsed_json["test_result"].to_json
301
+ test_result = CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: test_result)
302
+ end
291
303
  new(
292
304
  modifiers: modifiers,
293
305
  charge_amount_cents: charge_amount_cents,
@@ -321,6 +333,7 @@ module CandidApiClient
321
333
  description: description,
322
334
  date_of_service: date_of_service,
323
335
  end_date_of_service: end_date_of_service,
336
+ test_result: test_result,
324
337
  additional_properties: struct
325
338
  )
326
339
  end
@@ -371,6 +384,7 @@ module CandidApiClient
371
384
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
372
385
  obj.date_of_service.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
373
386
  obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
387
+ obj.test_result.nil? || CandidApiClient::ServiceLines::V2::Types::TestResult.validate_raw(obj: obj.test_result)
374
388
  end
375
389
  end
376
390
  end
@@ -6,6 +6,7 @@ require_relative "drug_identification"
6
6
  require_relative "../../../commons/types/facility_type_code"
7
7
  require "date"
8
8
  require_relative "../../../encounter_providers/v_2/types/ordering_provider"
9
+ require_relative "test_result"
9
10
  require "ostruct"
10
11
  require "json"
11
12
 
@@ -47,6 +48,8 @@ module CandidApiClient
47
48
  # than the rendering provider for this service line.
48
49
  # If not required by this implementation guide, do not send.
49
50
  attr_reader :ordering_provider
51
+ # @return [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
52
+ attr_reader :test_result
50
53
  # @return [OpenStruct] Additional properties unmapped to the current class definition
51
54
  attr_reader :additional_properties
52
55
  # @return [Object]
@@ -76,10 +79,11 @@ module CandidApiClient
76
79
  # @param ordering_provider [CandidApiClient::EncounterProviders::V2::Types::OrderingProvider] Required when the service or supply was ordered by a provider who is different
77
80
  # than the rendering provider for this service line.
78
81
  # If not required by this implementation guide, do not send.
82
+ # @param test_result [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
79
83
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
80
84
  # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate]
81
85
  def initialize(procedure_code:, quantity:, units:, diagnosis_pointers:, modifiers: OMIT,
82
- charge_amount_cents: OMIT, drug_identification: OMIT, place_of_service_code: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, ordering_provider: OMIT, additional_properties: nil)
86
+ charge_amount_cents: OMIT, drug_identification: OMIT, place_of_service_code: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, ordering_provider: OMIT, test_result: OMIT, additional_properties: nil)
83
87
  @modifiers = modifiers if modifiers != OMIT
84
88
  @procedure_code = procedure_code
85
89
  @quantity = quantity
@@ -92,6 +96,7 @@ module CandidApiClient
92
96
  @date_of_service = date_of_service if date_of_service != OMIT
93
97
  @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
94
98
  @ordering_provider = ordering_provider if ordering_provider != OMIT
99
+ @test_result = test_result if test_result != OMIT
95
100
  @additional_properties = additional_properties
96
101
  @_field_set = {
97
102
  "modifiers": modifiers,
@@ -105,7 +110,8 @@ module CandidApiClient
105
110
  "description": description,
106
111
  "date_of_service": date_of_service,
107
112
  "end_date_of_service": end_date_of_service,
108
- "ordering_provider": ordering_provider
113
+ "ordering_provider": ordering_provider,
114
+ "test_result": test_result
109
115
  }.reject do |_k, v|
110
116
  v == OMIT
111
117
  end
@@ -142,6 +148,12 @@ module CandidApiClient
142
148
  ordering_provider = parsed_json["ordering_provider"].to_json
143
149
  ordering_provider = CandidApiClient::EncounterProviders::V2::Types::OrderingProvider.from_json(json_object: ordering_provider)
144
150
  end
151
+ if parsed_json["test_result"].nil?
152
+ test_result = nil
153
+ else
154
+ test_result = parsed_json["test_result"].to_json
155
+ test_result = CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: test_result)
156
+ end
145
157
  new(
146
158
  modifiers: modifiers,
147
159
  procedure_code: procedure_code,
@@ -155,6 +167,7 @@ module CandidApiClient
155
167
  date_of_service: date_of_service,
156
168
  end_date_of_service: end_date_of_service,
157
169
  ordering_provider: ordering_provider,
170
+ test_result: test_result,
158
171
  additional_properties: struct
159
172
  )
160
173
  end
@@ -185,6 +198,7 @@ module CandidApiClient
185
198
  obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
186
199
  obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
187
200
  obj.ordering_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::OrderingProvider.validate_raw(obj: obj.ordering_provider)
201
+ obj.test_result.nil? || CandidApiClient::ServiceLines::V2::Types::TestResult.validate_raw(obj: obj.test_result)
188
202
  end
189
203
  end
190
204
  end
@@ -6,6 +6,7 @@ require_relative "service_line_denial_reason"
6
6
  require_relative "../../../commons/types/facility_type_code"
7
7
  require_relative "../../../commons/types/service_line_units"
8
8
  require "date"
9
+ require_relative "test_result"
9
10
  require "ostruct"
10
11
  require "json"
11
12
 
@@ -50,6 +51,8 @@ module CandidApiClient
50
51
  attr_reader :date_of_service
51
52
  # @return [Date]
52
53
  attr_reader :end_date_of_service
54
+ # @return [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
55
+ attr_reader :test_result
53
56
  # @return [OpenStruct] Additional properties unmapped to the current class definition
54
57
  attr_reader :additional_properties
55
58
  # @return [Object]
@@ -78,10 +81,11 @@ module CandidApiClient
78
81
  # @param date_of_service [Date] date_of_service must be defined on either the encounter or the service lines but
79
82
  # not both.
80
83
  # @param end_date_of_service [Date]
84
+ # @param test_result [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
81
85
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
82
86
  # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineUpdate]
83
87
  def initialize(edit_reason: OMIT, modifiers: OMIT, charge_amount_cents: OMIT, diagnosis_id_zero: OMIT,
84
- diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, units: OMIT, procedure_code: OMIT, quantity: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, additional_properties: nil)
88
+ diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, units: OMIT, procedure_code: OMIT, quantity: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, test_result: OMIT, additional_properties: nil)
85
89
  @edit_reason = edit_reason if edit_reason != OMIT
86
90
  @modifiers = modifiers if modifiers != OMIT
87
91
  @charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
@@ -98,6 +102,7 @@ module CandidApiClient
98
102
  @description = description if description != OMIT
99
103
  @date_of_service = date_of_service if date_of_service != OMIT
100
104
  @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
105
+ @test_result = test_result if test_result != OMIT
101
106
  @additional_properties = additional_properties
102
107
  @_field_set = {
103
108
  "edit_reason": edit_reason,
@@ -115,7 +120,8 @@ module CandidApiClient
115
120
  "quantity": quantity,
116
121
  "description": description,
117
122
  "date_of_service": date_of_service,
118
- "end_date_of_service": end_date_of_service
123
+ "end_date_of_service": end_date_of_service,
124
+ "test_result": test_result
119
125
  }.reject do |_k, v|
120
126
  v == OMIT
121
127
  end
@@ -156,6 +162,12 @@ module CandidApiClient
156
162
  end_date_of_service = unless parsed_json["end_date_of_service"].nil?
157
163
  Date.parse(parsed_json["end_date_of_service"])
158
164
  end
165
+ if parsed_json["test_result"].nil?
166
+ test_result = nil
167
+ else
168
+ test_result = parsed_json["test_result"].to_json
169
+ test_result = CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: test_result)
170
+ end
159
171
  new(
160
172
  edit_reason: edit_reason,
161
173
  modifiers: modifiers,
@@ -173,6 +185,7 @@ module CandidApiClient
173
185
  description: description,
174
186
  date_of_service: date_of_service,
175
187
  end_date_of_service: end_date_of_service,
188
+ test_result: test_result,
176
189
  additional_properties: struct
177
190
  )
178
191
  end
@@ -207,6 +220,7 @@ module CandidApiClient
207
220
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
208
221
  obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
209
222
  obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
223
+ obj.test_result.nil? || CandidApiClient::ServiceLines::V2::Types::TestResult.validate_raw(obj: obj.test_result)
210
224
  end
211
225
  end
212
226
  end
@@ -0,0 +1,95 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+
5
+ module CandidApiClient
6
+ module ServiceLines
7
+ module V2
8
+ module Types
9
+ class TestResult
10
+ # @return [Object]
11
+ attr_reader :member
12
+ # @return [String]
13
+ attr_reader :discriminant
14
+
15
+ private_class_method :new
16
+ alias kind_of? is_a?
17
+
18
+ # @param member [Object]
19
+ # @param discriminant [String]
20
+ # @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
21
+ def initialize(member:, discriminant:)
22
+ @member = member
23
+ @discriminant = discriminant
24
+ end
25
+
26
+ # Deserialize a JSON object to an instance of TestResult
27
+ #
28
+ # @param json_object [String]
29
+ # @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
30
+ def self.from_json(json_object:)
31
+ struct = JSON.parse(json_object, object_class: OpenStruct)
32
+ member = case struct.type
33
+ when "hematocrit"
34
+ json_object.value
35
+ when "hemoglobin"
36
+ json_object.value
37
+ else
38
+ json_object
39
+ end
40
+ new(member: member, discriminant: struct.type)
41
+ end
42
+
43
+ # For Union Types, to_json functionality is delegated to the wrapped member.
44
+ #
45
+ # @return [String]
46
+ def to_json(*_args)
47
+ case @discriminant
48
+ when "hematocrit"
49
+ when "hemoglobin"
50
+ end
51
+ { "type": @discriminant, "value": @member }.to_json
52
+ @member.to_json
53
+ end
54
+
55
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
56
+ # hash and check each fields type against the current object's property
57
+ # definitions.
58
+ #
59
+ # @param obj [Object]
60
+ # @return [Void]
61
+ def self.validate_raw(obj:)
62
+ case obj.type
63
+ when "hematocrit"
64
+ obj.is_a?(Float) != false || raise("Passed value for field obj is not the expected type, validation failed.")
65
+ when "hemoglobin"
66
+ obj.is_a?(Float) != false || raise("Passed value for field obj is not the expected type, validation failed.")
67
+ else
68
+ raise("Passed value matched no type within the union, validation failed.")
69
+ end
70
+ end
71
+
72
+ # For Union Types, is_a? functionality is delegated to the wrapped member.
73
+ #
74
+ # @param obj [Object]
75
+ # @return [Boolean]
76
+ def is_a?(obj)
77
+ @member.is_a?(obj)
78
+ end
79
+
80
+ # @param member [Float]
81
+ # @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
82
+ def self.hematocrit(member:)
83
+ new(member: member, discriminant: "hematocrit")
84
+ end
85
+
86
+ # @param member [Float]
87
+ # @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
88
+ def self.hemoglobin(member:)
89
+ new(member: member, discriminant: "hemoglobin")
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
95
+ end
data/lib/requests.rb CHANGED
@@ -43,7 +43,7 @@ module CandidApiClient
43
43
 
44
44
  # @return [Hash{String => String}]
45
45
  def get_headers
46
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.34.3" }
46
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.34.5" }
47
47
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
48
48
  headers
49
49
  end
@@ -87,7 +87,7 @@ module CandidApiClient
87
87
 
88
88
  # @return [Hash{String => String}]
89
89
  def get_headers
90
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.34.3" }
90
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.34.5" }
91
91
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
92
92
  headers
93
93
  end
data/lib/types_export.rb CHANGED
@@ -38,6 +38,7 @@ require_relative "candidhealth/encounter_providers/v_2/types/supervising_provide
38
38
  require_relative "candidhealth/encounter_providers/v_2/types/ordering_provider"
39
39
  require_relative "candidhealth/encounter_providers/v_2/types/ordering_provider_update"
40
40
  require_relative "candidhealth/encounter_providers/v_2/types/billing_provider"
41
+ require_relative "candidhealth/encounter_providers/v_2/types/billing_provider_update"
41
42
  require_relative "candidhealth/encounter_providers/v_2/types/encounter_provider"
42
43
  require_relative "candidhealth/encounters/v_4/types/encounter_base"
43
44
  require_relative "candidhealth/encounters/v_4/types/encounter"
@@ -231,6 +232,7 @@ require_relative "candidhealth/service_lines/v_2/types/service_line_adjustment"
231
232
  require_relative "candidhealth/service_lines/v_2/types/service_line_denial_reason"
232
233
  require_relative "candidhealth/service_lines/v_2/types/denial_reason_content"
233
234
  require_relative "candidhealth/service_lines/v_2/types/drug_identification"
235
+ require_relative "candidhealth/service_lines/v_2/types/test_result"
234
236
  require_relative "candidhealth/service_lines/v_2/types/service_id_qualifier"
235
237
  require_relative "candidhealth/service_lines/v_2/types/measurement_unit_code"
236
238
  require_relative "candidhealth/tasks/v_3/types/task"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: candidhealth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.3
4
+ version: 0.34.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-01 00:00:00.000000000 Z
11
+ date: 2024-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http-faraday
@@ -177,6 +177,7 @@ files:
177
177
  - lib/candidhealth/encounter_providers/client.rb
178
178
  - lib/candidhealth/encounter_providers/v_2/client.rb
179
179
  - lib/candidhealth/encounter_providers/v_2/types/billing_provider.rb
180
+ - lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb
180
181
  - lib/candidhealth/encounter_providers/v_2/types/encounter_provider.rb
181
182
  - lib/candidhealth/encounter_providers/v_2/types/encounter_provider_base.rb
182
183
  - lib/candidhealth/encounter_providers/v_2/types/initial_referring_provider.rb
@@ -548,6 +549,7 @@ files:
548
549
  - lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb
549
550
  - lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb
550
551
  - lib/candidhealth/service_lines/v_2/types/service_line_update.rb
552
+ - lib/candidhealth/service_lines/v_2/types/test_result.rb
551
553
  - lib/candidhealth/tags/types/tag.rb
552
554
  - lib/candidhealth/tags/types/tag_color_enum.rb
553
555
  - lib/candidhealth/tags/types/tag_create.rb