candidhealth 0.34.6 → 0.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/credentialing/client.rb +30 -0
  3. data/lib/candidhealth/credentialing/v_2/client.rb +410 -0
  4. data/lib/candidhealth/credentialing/v_2/types/credentialing_span_status.rb +17 -0
  5. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +196 -0
  6. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span_page.rb +88 -0
  7. data/lib/candidhealth/encounters/v_4/client.rb +34 -18
  8. data/lib/candidhealth/encounters/v_4/types/encounter.rb +9 -1
  9. data/lib/candidhealth/individual/types/patient.rb +13 -1
  10. data/lib/candidhealth/individual/types/patient_create.rb +13 -1
  11. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info.rb +77 -0
  12. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create.rb +70 -0
  13. data/lib/candidhealth/individual/types/patient_update.rb +16 -2
  14. data/lib/candidhealth/insurance_adjudications/v_1/client.rb +2 -2
  15. data/lib/candidhealth/non_insurance_payers/v_1/client.rb +18 -2
  16. data/lib/candidhealth/non_insurance_payers/v_1/types/create_non_insurance_payer_request.rb +21 -2
  17. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer.rb +17 -2
  18. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_address_update.rb +98 -0
  19. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_update_request.rb +20 -2
  20. data/lib/candidhealth/organization_providers/v_3/client.rb +2 -2
  21. data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +4 -4
  22. data/lib/candidhealth/pre_encounter/common/types/canonical_non_insurance_payer_association.rb +73 -0
  23. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +44 -4
  24. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +22 -2
  25. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +12 -4
  26. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
  27. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +24 -2
  28. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +24 -2
  29. data/lib/candidhealth/service_lines/v_2/client.rb +48 -2
  30. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +48 -2
  31. data/lib/candidhealth/x_12/v_1/types/rarc.rb +1 -0
  32. data/lib/candidhealth.rb +7 -0
  33. data/lib/requests.rb +2 -2
  34. data/lib/types_export.rb +7 -1
  35. metadata +11 -3
  36. data/lib/candidhealth/encounters/v_4/types/insurance_pay_missing_primary_coverage_error_type.rb +0 -62
@@ -0,0 +1,196 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../organization_providers/v_3/types/organization_provider_v_2"
4
+ require_relative "../../../payers/v_3/types/payer"
5
+ require "date"
6
+ require_relative "../../../commons/types/regions"
7
+ require_relative "credentialing_span_status"
8
+ require "ostruct"
9
+ require "json"
10
+
11
+ module CandidApiClient
12
+ module Credentialing
13
+ module V2
14
+ module Types
15
+ class ProviderCredentialingSpan
16
+ # @return [String]
17
+ attr_reader :provider_credentialing_span_id
18
+ # @return [CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2] The rendering provider covered by the credentialing span.
19
+ attr_reader :rendering_provider
20
+ # @return [CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2] The practice location at which the rendering provider is covered by the
21
+ # credentialing span.
22
+ attr_reader :contracting_provider
23
+ # @return [CandidApiClient::Payers::V3::Types::Payer] The payer doing the credentialing.
24
+ attr_reader :payer
25
+ # @return [Date] Start date of the credentialing span.
26
+ attr_reader :start_date
27
+ # @return [Date] End date of the credentialing span.
28
+ attr_reader :end_date
29
+ # @return [CandidApiClient::Commons::Types::Regions] The states covered by the credentialing span. A span may be national and cover
30
+ # all states.
31
+ attr_reader :regions
32
+ # @return [Date] Date that the credential paperwork was submitted.
33
+ attr_reader :submitted_date
34
+ # @return [CandidApiClient::Credentialing::V2::Types::CredentialingSpanStatus] Status of the credentialing span.
35
+ attr_reader :credentialing_status
36
+ # @return [Date] Date that the payer loaded the credentialing span into their system.
37
+ attr_reader :payer_loaded_date
38
+ # @return [String] Source of the credentialing span.
39
+ attr_reader :source
40
+ # @return [String] Provider ID for the related medallion payer enrollment.
41
+ attr_reader :medallion_payer_enrollment_id
42
+ # @return [Boolean] Is the credentialing span enabled?
43
+ attr_reader :is_enabled
44
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
45
+ attr_reader :additional_properties
46
+ # @return [Object]
47
+ attr_reader :_field_set
48
+ protected :_field_set
49
+
50
+ OMIT = Object.new
51
+
52
+ # @param provider_credentialing_span_id [String]
53
+ # @param rendering_provider [CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2] The rendering provider covered by the credentialing span.
54
+ # @param contracting_provider [CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2] The practice location at which the rendering provider is covered by the
55
+ # credentialing span.
56
+ # @param payer [CandidApiClient::Payers::V3::Types::Payer] The payer doing the credentialing.
57
+ # @param start_date [Date] Start date of the credentialing span.
58
+ # @param end_date [Date] End date of the credentialing span.
59
+ # @param regions [CandidApiClient::Commons::Types::Regions] The states covered by the credentialing span. A span may be national and cover
60
+ # all states.
61
+ # @param submitted_date [Date] Date that the credential paperwork was submitted.
62
+ # @param credentialing_status [CandidApiClient::Credentialing::V2::Types::CredentialingSpanStatus] Status of the credentialing span.
63
+ # @param payer_loaded_date [Date] Date that the payer loaded the credentialing span into their system.
64
+ # @param source [String] Source of the credentialing span.
65
+ # @param medallion_payer_enrollment_id [String] Provider ID for the related medallion payer enrollment.
66
+ # @param is_enabled [Boolean] Is the credentialing span enabled?
67
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
68
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan]
69
+ def initialize(provider_credentialing_span_id:, rendering_provider:, contracting_provider:, payer:, regions:, credentialing_status:, source:, is_enabled:,
70
+ start_date: OMIT, end_date: OMIT, submitted_date: OMIT, payer_loaded_date: OMIT, medallion_payer_enrollment_id: OMIT, additional_properties: nil)
71
+ @provider_credentialing_span_id = provider_credentialing_span_id
72
+ @rendering_provider = rendering_provider
73
+ @contracting_provider = contracting_provider
74
+ @payer = payer
75
+ @start_date = start_date if start_date != OMIT
76
+ @end_date = end_date if end_date != OMIT
77
+ @regions = regions
78
+ @submitted_date = submitted_date if submitted_date != OMIT
79
+ @credentialing_status = credentialing_status
80
+ @payer_loaded_date = payer_loaded_date if payer_loaded_date != OMIT
81
+ @source = source
82
+ @medallion_payer_enrollment_id = medallion_payer_enrollment_id if medallion_payer_enrollment_id != OMIT
83
+ @is_enabled = is_enabled
84
+ @additional_properties = additional_properties
85
+ @_field_set = {
86
+ "provider_credentialing_span_id": provider_credentialing_span_id,
87
+ "rendering_provider": rendering_provider,
88
+ "contracting_provider": contracting_provider,
89
+ "payer": payer,
90
+ "start_date": start_date,
91
+ "end_date": end_date,
92
+ "regions": regions,
93
+ "submitted_date": submitted_date,
94
+ "credentialing_status": credentialing_status,
95
+ "payer_loaded_date": payer_loaded_date,
96
+ "source": source,
97
+ "medallion_payer_enrollment_id": medallion_payer_enrollment_id,
98
+ "is_enabled": is_enabled
99
+ }.reject do |_k, v|
100
+ v == OMIT
101
+ end
102
+ end
103
+
104
+ # Deserialize a JSON object to an instance of ProviderCredentialingSpan
105
+ #
106
+ # @param json_object [String]
107
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan]
108
+ def self.from_json(json_object:)
109
+ struct = JSON.parse(json_object, object_class: OpenStruct)
110
+ parsed_json = JSON.parse(json_object)
111
+ provider_credentialing_span_id = struct["provider_credentialing_span_id"]
112
+ if parsed_json["rendering_provider"].nil?
113
+ rendering_provider = nil
114
+ else
115
+ rendering_provider = parsed_json["rendering_provider"].to_json
116
+ rendering_provider = CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.from_json(json_object: rendering_provider)
117
+ end
118
+ if parsed_json["contracting_provider"].nil?
119
+ contracting_provider = nil
120
+ else
121
+ contracting_provider = parsed_json["contracting_provider"].to_json
122
+ contracting_provider = CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.from_json(json_object: contracting_provider)
123
+ end
124
+ if parsed_json["payer"].nil?
125
+ payer = nil
126
+ else
127
+ payer = parsed_json["payer"].to_json
128
+ payer = CandidApiClient::Payers::V3::Types::Payer.from_json(json_object: payer)
129
+ end
130
+ start_date = (Date.parse(parsed_json["start_date"]) unless parsed_json["start_date"].nil?)
131
+ end_date = (Date.parse(parsed_json["end_date"]) unless parsed_json["end_date"].nil?)
132
+ if parsed_json["regions"].nil?
133
+ regions = nil
134
+ else
135
+ regions = parsed_json["regions"].to_json
136
+ regions = CandidApiClient::Commons::Types::Regions.from_json(json_object: regions)
137
+ end
138
+ submitted_date = (Date.parse(parsed_json["submitted_date"]) unless parsed_json["submitted_date"].nil?)
139
+ credentialing_status = struct["credentialing_status"]
140
+ payer_loaded_date = unless parsed_json["payer_loaded_date"].nil?
141
+ Date.parse(parsed_json["payer_loaded_date"])
142
+ end
143
+ source = struct["source"]
144
+ medallion_payer_enrollment_id = struct["medallion_payer_enrollment_id"]
145
+ is_enabled = struct["is_enabled"]
146
+ new(
147
+ provider_credentialing_span_id: provider_credentialing_span_id,
148
+ rendering_provider: rendering_provider,
149
+ contracting_provider: contracting_provider,
150
+ payer: payer,
151
+ start_date: start_date,
152
+ end_date: end_date,
153
+ regions: regions,
154
+ submitted_date: submitted_date,
155
+ credentialing_status: credentialing_status,
156
+ payer_loaded_date: payer_loaded_date,
157
+ source: source,
158
+ medallion_payer_enrollment_id: medallion_payer_enrollment_id,
159
+ is_enabled: is_enabled,
160
+ additional_properties: struct
161
+ )
162
+ end
163
+
164
+ # Serialize an instance of ProviderCredentialingSpan to a JSON object
165
+ #
166
+ # @return [String]
167
+ def to_json(*_args)
168
+ @_field_set&.to_json
169
+ end
170
+
171
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
172
+ # hash and check each fields type against the current object's property
173
+ # definitions.
174
+ #
175
+ # @param obj [Object]
176
+ # @return [Void]
177
+ def self.validate_raw(obj:)
178
+ obj.provider_credentialing_span_id.is_a?(String) != false || raise("Passed value for field obj.provider_credentialing_span_id is not the expected type, validation failed.")
179
+ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.validate_raw(obj: obj.rendering_provider)
180
+ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.validate_raw(obj: obj.contracting_provider)
181
+ CandidApiClient::Payers::V3::Types::Payer.validate_raw(obj: obj.payer)
182
+ obj.start_date&.is_a?(Date) != false || raise("Passed value for field obj.start_date is not the expected type, validation failed.")
183
+ obj.end_date&.is_a?(Date) != false || raise("Passed value for field obj.end_date is not the expected type, validation failed.")
184
+ CandidApiClient::Commons::Types::Regions.validate_raw(obj: obj.regions)
185
+ obj.submitted_date&.is_a?(Date) != false || raise("Passed value for field obj.submitted_date is not the expected type, validation failed.")
186
+ obj.credentialing_status.is_a?(CandidApiClient::Credentialing::V2::Types::CredentialingSpanStatus) != false || raise("Passed value for field obj.credentialing_status is not the expected type, validation failed.")
187
+ obj.payer_loaded_date&.is_a?(Date) != false || raise("Passed value for field obj.payer_loaded_date is not the expected type, validation failed.")
188
+ obj.source.is_a?(String) != false || raise("Passed value for field obj.source is not the expected type, validation failed.")
189
+ obj.medallion_payer_enrollment_id&.is_a?(String) != false || raise("Passed value for field obj.medallion_payer_enrollment_id is not the expected type, validation failed.")
190
+ obj.is_enabled.is_a?(Boolean) != false || raise("Passed value for field obj.is_enabled is not the expected type, validation failed.")
191
+ end
192
+ end
193
+ end
194
+ end
195
+ end
196
+ end
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "provider_credentialing_span"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module Credentialing
9
+ module V2
10
+ module Types
11
+ class ProviderCredentialingSpanPage
12
+ # @return [Array<CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan>]
13
+ attr_reader :items
14
+ # @return [String]
15
+ attr_reader :prev_page_token
16
+ # @return [String]
17
+ attr_reader :next_page_token
18
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
19
+ attr_reader :additional_properties
20
+ # @return [Object]
21
+ attr_reader :_field_set
22
+ protected :_field_set
23
+
24
+ OMIT = Object.new
25
+
26
+ # @param items [Array<CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan>]
27
+ # @param prev_page_token [String]
28
+ # @param next_page_token [String]
29
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage]
31
+ def initialize(items:, prev_page_token: OMIT, next_page_token: OMIT, additional_properties: nil)
32
+ @items = items
33
+ @prev_page_token = prev_page_token if prev_page_token != OMIT
34
+ @next_page_token = next_page_token if next_page_token != OMIT
35
+ @additional_properties = additional_properties
36
+ @_field_set = {
37
+ "items": items,
38
+ "prev_page_token": prev_page_token,
39
+ "next_page_token": next_page_token
40
+ }.reject do |_k, v|
41
+ v == OMIT
42
+ end
43
+ end
44
+
45
+ # Deserialize a JSON object to an instance of ProviderCredentialingSpanPage
46
+ #
47
+ # @param json_object [String]
48
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage]
49
+ def self.from_json(json_object:)
50
+ struct = JSON.parse(json_object, object_class: OpenStruct)
51
+ parsed_json = JSON.parse(json_object)
52
+ items = parsed_json["items"]&.map do |item|
53
+ item = item.to_json
54
+ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan.from_json(json_object: item)
55
+ end
56
+ prev_page_token = struct["prev_page_token"]
57
+ next_page_token = struct["next_page_token"]
58
+ new(
59
+ items: items,
60
+ prev_page_token: prev_page_token,
61
+ next_page_token: next_page_token,
62
+ additional_properties: struct
63
+ )
64
+ end
65
+
66
+ # Serialize an instance of ProviderCredentialingSpanPage to a JSON object
67
+ #
68
+ # @return [String]
69
+ def to_json(*_args)
70
+ @_field_set&.to_json
71
+ end
72
+
73
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
74
+ # hash and check each fields type against the current object's property
75
+ # definitions.
76
+ #
77
+ # @param obj [Object]
78
+ # @return [Void]
79
+ def self.validate_raw(obj:)
80
+ obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
81
+ obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.")
82
+ obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
@@ -265,6 +265,7 @@ module CandidApiClient
265
265
  # * :phone_consent (Boolean)
266
266
  # * :email (String)
267
267
  # * :non_insurance_payers (Array<String>)
268
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
268
269
  # * :email_consent (Boolean)
269
270
  # * :external_id (String)
270
271
  # * :date_of_birth (Date)
@@ -529,12 +530,13 @@ module CandidApiClient
529
530
  # instances cannot be created for the same schema on an encounter.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
530
531
  # * :schema_id (String)
531
532
  # * :content (Hash{String => Object})
533
+ # @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
532
534
  # @param request_options [CandidApiClient::RequestOptions]
533
535
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
534
536
  # @example
535
537
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
536
538
  # api.encounters.v_4.create(
537
- # patient: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], email_consent: true, 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" }, first_name: "string", last_name: "string", gender: MALE },
539
+ # patient: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], non_insurance_payers_info: [{ non_insurance_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", member_id: "string" }], email_consent: true, 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" }, first_name: "string", last_name: "string", gender: MALE },
538
540
  # 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" },
539
541
  # 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" },
540
542
  # 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" },
@@ -554,10 +556,11 @@ module CandidApiClient
554
556
  # guarantor: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true, 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" } },
555
557
  # external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] },
556
558
  # tag_ids: ["string"],
557
- # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
559
+ # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
560
+ # referral_number: "string"
558
561
  # )
559
562
  def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
560
- provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: 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, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
563
+ provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: 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, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, referral_number: nil, request_options: nil)
561
564
  response = @request_client.conn.post do |req|
562
565
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
563
566
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -610,7 +613,8 @@ module CandidApiClient
610
613
  guarantor: guarantor,
611
614
  external_claim_submission: external_claim_submission,
612
615
  tag_ids: tag_ids,
613
- schema_instances: schema_instances
616
+ schema_instances: schema_instances,
617
+ referral_number: referral_number
614
618
  }.compact
615
619
  req.url "#{@request_client.get_url(environment: CandidApi,
616
620
  request_options: request_options)}/api/encounters/v4"
@@ -631,7 +635,7 @@ module CandidApiClient
631
635
  # - Referring Provider
632
636
  # - Subscriber Primary
633
637
  # - Subscriber Secondary
634
- # - Prior Authorization Number
638
+ # - Referral Number
635
639
  # - Responsible Party
636
640
  # - Guarantor
637
641
  # Utilizing this endpoint opts you into automatic updating of the encounter when
@@ -1143,6 +1147,7 @@ module CandidApiClient
1143
1147
  # * :email (String)
1144
1148
  # * :email_consent (Boolean)
1145
1149
  # * :non_insurance_payers (Array<String>)
1150
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
1146
1151
  # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
1147
1152
  # for billing purpose.
1148
1153
  # Box 12 on the CMS-1500 claim form.
@@ -1294,6 +1299,7 @@ module CandidApiClient
1294
1299
  # * :first_name (String)
1295
1300
  # * :last_name (String)
1296
1301
  # * :organization_name (String)
1302
+ # @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
1297
1303
  # @param request_options [CandidApiClient::RequestOptions]
1298
1304
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1299
1305
  # @example
@@ -1325,7 +1331,7 @@ module CandidApiClient
1325
1331
  # onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15),
1326
1332
  # last_menstrual_period_date: DateTime.parse(2023-01-15),
1327
1333
  # delay_reason_code: C_1,
1328
- # patient: { first_name: "string", last_name: "string", gender: MALE, 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, non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] },
1334
+ # patient: { first_name: "string", last_name: "string", gender: MALE, 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, non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], non_insurance_payers_info: [{ non_insurance_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", member_id: "string" }] },
1329
1335
  # patient_authorized_release: true,
1330
1336
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
1331
1337
  # vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 },
@@ -1336,10 +1342,11 @@ module CandidApiClient
1336
1342
  # 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" },
1337
1343
  # 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" },
1338
1344
  # 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" },
1339
- # 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" }
1345
+ # 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" },
1346
+ # referral_number: "string"
1340
1347
  # )
1341
1348
  def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
1342
- 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)
1349
+ 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, referral_number: nil, request_options: nil)
1343
1350
  response = @request_client.conn.patch do |req|
1344
1351
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1345
1352
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -1386,7 +1393,8 @@ module CandidApiClient
1386
1393
  billing_provider: billing_provider,
1387
1394
  supervising_provider: supervising_provider,
1388
1395
  referring_provider: referring_provider,
1389
- initial_referring_provider: initial_referring_provider
1396
+ initial_referring_provider: initial_referring_provider,
1397
+ referral_number: referral_number
1390
1398
  }.compact
1391
1399
  req.url "#{@request_client.get_url(environment: CandidApi,
1392
1400
  request_options: request_options)}/api/encounters/v4/#{encounter_id}"
@@ -1616,6 +1624,7 @@ module CandidApiClient
1616
1624
  # * :phone_consent (Boolean)
1617
1625
  # * :email (String)
1618
1626
  # * :non_insurance_payers (Array<String>)
1627
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
1619
1628
  # * :email_consent (Boolean)
1620
1629
  # * :external_id (String)
1621
1630
  # * :date_of_birth (Date)
@@ -1880,12 +1889,13 @@ module CandidApiClient
1880
1889
  # instances cannot be created for the same schema on an encounter.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
1881
1890
  # * :schema_id (String)
1882
1891
  # * :content (Hash{String => Object})
1892
+ # @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
1883
1893
  # @param request_options [CandidApiClient::RequestOptions]
1884
1894
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1885
1895
  # @example
1886
1896
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1887
1897
  # api.encounters.v_4.create(
1888
- # patient: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], email_consent: true, 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" }, first_name: "string", last_name: "string", gender: MALE },
1898
+ # patient: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], non_insurance_payers_info: [{ non_insurance_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", member_id: "string" }], email_consent: true, 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" }, first_name: "string", last_name: "string", gender: MALE },
1889
1899
  # 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" },
1890
1900
  # 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" },
1891
1901
  # 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" },
@@ -1905,10 +1915,11 @@ module CandidApiClient
1905
1915
  # guarantor: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true, 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" } },
1906
1916
  # external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] },
1907
1917
  # tag_ids: ["string"],
1908
- # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
1918
+ # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
1919
+ # referral_number: "string"
1909
1920
  # )
1910
1921
  def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
1911
- provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: 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, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
1922
+ provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: 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, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, referral_number: nil, request_options: nil)
1912
1923
  Async do
1913
1924
  response = @request_client.conn.post do |req|
1914
1925
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -1962,7 +1973,8 @@ module CandidApiClient
1962
1973
  guarantor: guarantor,
1963
1974
  external_claim_submission: external_claim_submission,
1964
1975
  tag_ids: tag_ids,
1965
- schema_instances: schema_instances
1976
+ schema_instances: schema_instances,
1977
+ referral_number: referral_number
1966
1978
  }.compact
1967
1979
  req.url "#{@request_client.get_url(environment: CandidApi,
1968
1980
  request_options: request_options)}/api/encounters/v4"
@@ -1984,7 +1996,7 @@ module CandidApiClient
1984
1996
  # - Referring Provider
1985
1997
  # - Subscriber Primary
1986
1998
  # - Subscriber Secondary
1987
- # - Prior Authorization Number
1999
+ # - Referral Number
1988
2000
  # - Responsible Party
1989
2001
  # - Guarantor
1990
2002
  # Utilizing this endpoint opts you into automatic updating of the encounter when
@@ -2498,6 +2510,7 @@ module CandidApiClient
2498
2510
  # * :email (String)
2499
2511
  # * :email_consent (Boolean)
2500
2512
  # * :non_insurance_payers (Array<String>)
2513
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
2501
2514
  # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
2502
2515
  # for billing purpose.
2503
2516
  # Box 12 on the CMS-1500 claim form.
@@ -2649,6 +2662,7 @@ module CandidApiClient
2649
2662
  # * :first_name (String)
2650
2663
  # * :last_name (String)
2651
2664
  # * :organization_name (String)
2665
+ # @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
2652
2666
  # @param request_options [CandidApiClient::RequestOptions]
2653
2667
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
2654
2668
  # @example
@@ -2680,7 +2694,7 @@ module CandidApiClient
2680
2694
  # onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15),
2681
2695
  # last_menstrual_period_date: DateTime.parse(2023-01-15),
2682
2696
  # delay_reason_code: C_1,
2683
- # patient: { first_name: "string", last_name: "string", gender: MALE, 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, non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] },
2697
+ # patient: { first_name: "string", last_name: "string", gender: MALE, 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, non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], non_insurance_payers_info: [{ non_insurance_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", member_id: "string" }] },
2684
2698
  # patient_authorized_release: true,
2685
2699
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
2686
2700
  # vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 },
@@ -2691,10 +2705,11 @@ module CandidApiClient
2691
2705
  # 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" },
2692
2706
  # 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" },
2693
2707
  # 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" },
2694
- # 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" }
2708
+ # 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" },
2709
+ # referral_number: "string"
2695
2710
  # )
2696
2711
  def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
2697
- 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)
2712
+ 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, referral_number: nil, request_options: nil)
2698
2713
  Async do
2699
2714
  response = @request_client.conn.patch do |req|
2700
2715
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -2742,7 +2757,8 @@ module CandidApiClient
2742
2757
  billing_provider: billing_provider,
2743
2758
  supervising_provider: supervising_provider,
2744
2759
  referring_provider: referring_provider,
2745
- initial_referring_provider: initial_referring_provider
2760
+ initial_referring_provider: initial_referring_provider,
2761
+ referral_number: referral_number
2746
2762
  }.compact
2747
2763
  req.url "#{@request_client.get_url(environment: CandidApi,
2748
2764
  request_options: request_options)}/api/encounters/v4/#{encounter_id}"
@@ -141,6 +141,8 @@ module CandidApiClient
141
141
  # Multiple schema
142
142
  # instances cannot be created for the same schema on an encounter.
143
143
  attr_reader :schema_instances
144
+ # @return [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
145
+ attr_reader :referral_number
144
146
  # @return [String] A client-specified unique ID to associate with this encounter;
145
147
  # for example, your internal encounter ID or a Dr. Chrono encounter ID.
146
148
  # This field should not contain PHI.
@@ -317,6 +319,7 @@ module CandidApiClient
317
319
  # @param schema_instances [Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
318
320
  # Multiple schema
319
321
  # instances cannot be created for the same schema on an encounter.
322
+ # @param referral_number [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
320
323
  # @param external_id [String] A client-specified unique ID to associate with this encounter;
321
324
  # for example, your internal encounter ID or a Dr. Chrono encounter ID.
322
325
  # This field should not contain PHI.
@@ -392,7 +395,7 @@ module CandidApiClient
392
395
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
393
396
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
394
397
  def initialize(encounter_id:, claims:, patient:, billing_provider:, rendering_provider:, service_facility:,
395
- responsible_party:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, schema_instances:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, patient_control_number: OMIT, guarantor: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, prior_authorization_number: OMIT, billing_notes: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, coding_attribution: OMIT, work_queue_id: OMIT, work_queue_membership_activated_at: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, appointment_type: OMIT, existing_medications: OMIT, vitals: OMIT, interventions: OMIT, pay_to_address: OMIT, synchronicity: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, additional_properties: nil)
398
+ responsible_party:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, schema_instances:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, patient_control_number: OMIT, guarantor: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, prior_authorization_number: OMIT, billing_notes: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, coding_attribution: OMIT, work_queue_id: OMIT, work_queue_membership_activated_at: OMIT, referral_number: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, appointment_type: OMIT, existing_medications: OMIT, vitals: OMIT, interventions: OMIT, pay_to_address: OMIT, synchronicity: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, additional_properties: nil)
396
399
  @patient_control_number = patient_control_number if patient_control_number != OMIT
397
400
  @encounter_id = encounter_id
398
401
  @claims = claims
@@ -427,6 +430,7 @@ module CandidApiClient
427
430
  @owner_of_next_action = owner_of_next_action
428
431
  @submission_origin = submission_origin
429
432
  @schema_instances = schema_instances
433
+ @referral_number = referral_number if referral_number != OMIT
430
434
  @external_id = external_id
431
435
  @date_of_service = date_of_service if date_of_service != OMIT
432
436
  @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
@@ -483,6 +487,7 @@ module CandidApiClient
483
487
  "owner_of_next_action": owner_of_next_action,
484
488
  "submission_origin": submission_origin,
485
489
  "schema_instances": schema_instances,
490
+ "referral_number": referral_number,
486
491
  "external_id": external_id,
487
492
  "date_of_service": date_of_service,
488
493
  "end_date_of_service": end_date_of_service,
@@ -621,6 +626,7 @@ module CandidApiClient
621
626
  item = item.to_json
622
627
  CandidApiClient::CustomSchemas::V1::Types::SchemaInstance.from_json(json_object: item)
623
628
  end
629
+ referral_number = struct["referral_number"]
624
630
  external_id = struct["external_id"]
625
631
  date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
626
632
  end_date_of_service = unless parsed_json["end_date_of_service"].nil?
@@ -694,6 +700,7 @@ module CandidApiClient
694
700
  owner_of_next_action: owner_of_next_action,
695
701
  submission_origin: submission_origin,
696
702
  schema_instances: schema_instances,
703
+ referral_number: referral_number,
697
704
  external_id: external_id,
698
705
  date_of_service: date_of_service,
699
706
  end_date_of_service: end_date_of_service,
@@ -762,6 +769,7 @@ module CandidApiClient
762
769
  obj.owner_of_next_action.is_a?(CandidApiClient::Encounters::V4::Types::EncounterOwnerOfNextActionType) != false || raise("Passed value for field obj.owner_of_next_action is not the expected type, validation failed.")
763
770
  obj.submission_origin.is_a?(CandidApiClient::Encounters::V4::Types::EncounterSubmissionOriginType) != false || raise("Passed value for field obj.submission_origin is not the expected type, validation failed.")
764
771
  obj.schema_instances.is_a?(Array) != false || raise("Passed value for field obj.schema_instances is not the expected type, validation failed.")
772
+ obj.referral_number&.is_a?(String) != false || raise("Passed value for field obj.referral_number is not the expected type, validation failed.")
765
773
  obj.external_id.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
766
774
  obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
767
775
  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.")