candidhealth 0.35.0 → 0.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/exports/v_3/client.rb +6 -4
  3. data/lib/candidhealth/guarantor/v_1/types/guarantor.rb +3 -3
  4. data/lib/candidhealth/guarantor/v_1/types/guarantor_base.rb +3 -3
  5. data/lib/candidhealth/guarantor/v_1/types/guarantor_create.rb +4 -4
  6. data/lib/candidhealth/insurance_adjudications/v_1/client.rb +4 -2
  7. data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_create.rb +10 -2
  8. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_work_queue.rb +1 -0
  9. data/lib/candidhealth/pre_encounter/common/types/external_provider.rb +2 -2
  10. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -0
  11. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_benefits.rb +11 -2
  12. data/lib/candidhealth/pre_encounter/lists/v_1/client.rb +4 -6
  13. data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_item.rb +12 -2
  14. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +239 -4
  15. data/lib/candidhealth/pre_encounter/patients/v_1/types/do_not_invoice_reason.rb +18 -0
  16. data/lib/candidhealth/pre_encounter/patients/v_1/types/invalid_mrn_error_body.rb +72 -0
  17. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +11 -2
  18. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +421 -0
  19. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +11 -2
  20. data/lib/candidhealth/x_12/v_1/types/rarc.rb +6 -0
  21. data/lib/requests.rb +2 -2
  22. data/lib/types_export.rb +3 -0
  23. metadata +5 -2
@@ -3,6 +3,7 @@
3
3
  require_relative "../../../../requests"
4
4
  require_relative "types/mutable_patient"
5
5
  require_relative "types/patient"
6
+ require_relative "types/mutable_patient_with_mrn"
6
7
  require_relative "../../common/types/sort_direction"
7
8
  require_relative "types/patient_page"
8
9
  require "json"
@@ -108,11 +109,12 @@ module CandidApiClient
108
109
  # * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
109
110
  # * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
110
111
  # * :primary_service_facility_id (String)
112
+ # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
111
113
  # @param request_options [CandidApiClient::RequestOptions]
112
114
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
113
115
  # @example
114
116
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
115
- # api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", authorization_number: "string", cpt_code: "string", units: VISIT }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string" })
117
+ # api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", authorization_number: "string", cpt_code: "string", units: VISIT }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY })
116
118
  def create(request:, skip_duplicate_check: nil, request_options: nil)
117
119
  response = @request_client.conn.post do |req|
118
120
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -133,6 +135,120 @@ module CandidApiClient
133
135
  CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: response.body)
134
136
  end
135
137
 
138
+ # Adds a patient and hydrates their MRN with a pre-existing MRN. Once this patient
139
+ # is created their MRN will not be editable. InvalidMRNError is returned when the
140
+ # MRN is greater than 20 characters. VersionConflictError is returned when the
141
+ # patient's external ID is already in use.
142
+ #
143
+ # @param skip_duplicate_check [Boolean]
144
+ # @param request [Hash] Request of type CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn, as a Hash
145
+ # * :mrn (String)
146
+ # * :name (Hash)
147
+ # * :family (String)
148
+ # * :given (Array<String>)
149
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
150
+ # * :period (Hash)
151
+ # * :start (Date)
152
+ # * :end_ (Date)
153
+ # * :other_names (Array<CandidApiClient::PreEncounter::Common::Types::HumanName>)
154
+ # * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
155
+ # * :birth_date (Date)
156
+ # * :social_security_number (String)
157
+ # * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
158
+ # * :sexual_orientation (CandidApiClient::PreEncounter::Common::Types::SexualOrientation)
159
+ # * :race (CandidApiClient::PreEncounter::Common::Types::Race)
160
+ # * :ethnicity (CandidApiClient::PreEncounter::Common::Types::Ethnicity)
161
+ # * :disability_status (CandidApiClient::PreEncounter::Common::Types::DisabilityStatus)
162
+ # * :marital_status (CandidApiClient::PreEncounter::Patients::V1::Types::MaritalStatus)
163
+ # * :deceased (DateTime)
164
+ # * :multiple_birth (Integer)
165
+ # * :primary_address (Hash)
166
+ # * :use (CandidApiClient::PreEncounter::Common::Types::AddressUse)
167
+ # * :line (Array<String>)
168
+ # * :city (String)
169
+ # * :state (String)
170
+ # * :postal_code (String)
171
+ # * :country (String)
172
+ # * :period (Hash)
173
+ # * :start (Date)
174
+ # * :end_ (Date)
175
+ # * :other_addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
176
+ # * :primary_telecom (Hash)
177
+ # * :value (String)
178
+ # * :use (CandidApiClient::PreEncounter::Common::Types::ContactPointUse)
179
+ # * :period (Hash)
180
+ # * :start (Date)
181
+ # * :end_ (Date)
182
+ # * :other_telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
183
+ # * :email (String)
184
+ # * :electronic_communication_opt_in (Boolean)
185
+ # * :photo (String)
186
+ # * :language (String)
187
+ # * :external_provenance (Hash)
188
+ # * :external_id (String)
189
+ # * :system_name (String)
190
+ # * :contacts (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>)
191
+ # * :general_practitioners (Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>)
192
+ # * :filing_order (Hash)
193
+ # * :coverages (Array<String>)
194
+ # * :non_insurance_payers (Array<String>)
195
+ # * :non_insurance_payer_associations (Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>)
196
+ # * :guarantor (Hash)
197
+ # * :name (Hash)
198
+ # * :family (String)
199
+ # * :given (Array<String>)
200
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
201
+ # * :period (Hash)
202
+ # * :start (Date)
203
+ # * :end_ (Date)
204
+ # * :telecom (Hash)
205
+ # * :value (String)
206
+ # * :use (CandidApiClient::PreEncounter::Common::Types::ContactPointUse)
207
+ # * :period (Hash)
208
+ # * :start (Date)
209
+ # * :end_ (Date)
210
+ # * :email (String)
211
+ # * :birth_date (Date)
212
+ # * :address (Hash)
213
+ # * :use (CandidApiClient::PreEncounter::Common::Types::AddressUse)
214
+ # * :line (Array<String>)
215
+ # * :city (String)
216
+ # * :state (String)
217
+ # * :postal_code (String)
218
+ # * :country (String)
219
+ # * :period (Hash)
220
+ # * :start (Date)
221
+ # * :end_ (Date)
222
+ # * :self_pay (Boolean)
223
+ # * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
224
+ # * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
225
+ # * :primary_service_facility_id (String)
226
+ # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
227
+ # @param request_options [CandidApiClient::RequestOptions]
228
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
229
+ # @example
230
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
231
+ # api.pre_encounter.patients.v_1.create_with_mrn(skip_duplicate_check: true, request: { mrn: "string", name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", authorization_number: "string", cpt_code: "string", units: VISIT }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY })
232
+ def create_with_mrn(request:, skip_duplicate_check: nil, request_options: nil)
233
+ response = @request_client.conn.post do |req|
234
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
235
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
236
+ req.headers = {
237
+ **(req.headers || {}),
238
+ **@request_client.get_headers,
239
+ **(request_options&.additional_headers || {})
240
+ }.compact
241
+ req.params = {
242
+ **(request_options&.additional_query_parameters || {}),
243
+ "skip_duplicate_check": skip_duplicate_check
244
+ }.compact
245
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
246
+ req.url "#{@request_client.get_url(environment: PreEncounter,
247
+ request_options: request_options)}/patients/v1/with_mrn"
248
+ end
249
+ CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: response.body)
250
+ end
251
+
136
252
  # Searches for patients that match the query parameters.
137
253
  #
138
254
  # @param limit [Integer]
@@ -312,6 +428,7 @@ module CandidApiClient
312
428
  # * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
313
429
  # * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
314
430
  # * :primary_service_facility_id (String)
431
+ # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
315
432
  # @param request_options [CandidApiClient::RequestOptions]
316
433
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
317
434
  # @example
@@ -319,7 +436,7 @@ module CandidApiClient
319
436
  # api.pre_encounter.patients.v_1.update(
320
437
  # id: "string",
321
438
  # version: "string",
322
- # request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", authorization_number: "string", cpt_code: "string", units: VISIT }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string" }
439
+ # request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", authorization_number: "string", cpt_code: "string", units: VISIT }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY }
323
440
  # )
324
441
  def update(id:, version:, request:, request_options: nil)
325
442
  response = @request_client.conn.put do |req|
@@ -521,11 +638,12 @@ module CandidApiClient
521
638
  # * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
522
639
  # * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
523
640
  # * :primary_service_facility_id (String)
641
+ # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
524
642
  # @param request_options [CandidApiClient::RequestOptions]
525
643
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
526
644
  # @example
527
645
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
528
- # api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", authorization_number: "string", cpt_code: "string", units: VISIT }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string" })
646
+ # api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", authorization_number: "string", cpt_code: "string", units: VISIT }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY })
529
647
  def create(request:, skip_duplicate_check: nil, request_options: nil)
530
648
  Async do
531
649
  response = @request_client.conn.post do |req|
@@ -548,6 +666,122 @@ module CandidApiClient
548
666
  end
549
667
  end
550
668
 
669
+ # Adds a patient and hydrates their MRN with a pre-existing MRN. Once this patient
670
+ # is created their MRN will not be editable. InvalidMRNError is returned when the
671
+ # MRN is greater than 20 characters. VersionConflictError is returned when the
672
+ # patient's external ID is already in use.
673
+ #
674
+ # @param skip_duplicate_check [Boolean]
675
+ # @param request [Hash] Request of type CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn, as a Hash
676
+ # * :mrn (String)
677
+ # * :name (Hash)
678
+ # * :family (String)
679
+ # * :given (Array<String>)
680
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
681
+ # * :period (Hash)
682
+ # * :start (Date)
683
+ # * :end_ (Date)
684
+ # * :other_names (Array<CandidApiClient::PreEncounter::Common::Types::HumanName>)
685
+ # * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
686
+ # * :birth_date (Date)
687
+ # * :social_security_number (String)
688
+ # * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
689
+ # * :sexual_orientation (CandidApiClient::PreEncounter::Common::Types::SexualOrientation)
690
+ # * :race (CandidApiClient::PreEncounter::Common::Types::Race)
691
+ # * :ethnicity (CandidApiClient::PreEncounter::Common::Types::Ethnicity)
692
+ # * :disability_status (CandidApiClient::PreEncounter::Common::Types::DisabilityStatus)
693
+ # * :marital_status (CandidApiClient::PreEncounter::Patients::V1::Types::MaritalStatus)
694
+ # * :deceased (DateTime)
695
+ # * :multiple_birth (Integer)
696
+ # * :primary_address (Hash)
697
+ # * :use (CandidApiClient::PreEncounter::Common::Types::AddressUse)
698
+ # * :line (Array<String>)
699
+ # * :city (String)
700
+ # * :state (String)
701
+ # * :postal_code (String)
702
+ # * :country (String)
703
+ # * :period (Hash)
704
+ # * :start (Date)
705
+ # * :end_ (Date)
706
+ # * :other_addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
707
+ # * :primary_telecom (Hash)
708
+ # * :value (String)
709
+ # * :use (CandidApiClient::PreEncounter::Common::Types::ContactPointUse)
710
+ # * :period (Hash)
711
+ # * :start (Date)
712
+ # * :end_ (Date)
713
+ # * :other_telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
714
+ # * :email (String)
715
+ # * :electronic_communication_opt_in (Boolean)
716
+ # * :photo (String)
717
+ # * :language (String)
718
+ # * :external_provenance (Hash)
719
+ # * :external_id (String)
720
+ # * :system_name (String)
721
+ # * :contacts (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>)
722
+ # * :general_practitioners (Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>)
723
+ # * :filing_order (Hash)
724
+ # * :coverages (Array<String>)
725
+ # * :non_insurance_payers (Array<String>)
726
+ # * :non_insurance_payer_associations (Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>)
727
+ # * :guarantor (Hash)
728
+ # * :name (Hash)
729
+ # * :family (String)
730
+ # * :given (Array<String>)
731
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
732
+ # * :period (Hash)
733
+ # * :start (Date)
734
+ # * :end_ (Date)
735
+ # * :telecom (Hash)
736
+ # * :value (String)
737
+ # * :use (CandidApiClient::PreEncounter::Common::Types::ContactPointUse)
738
+ # * :period (Hash)
739
+ # * :start (Date)
740
+ # * :end_ (Date)
741
+ # * :email (String)
742
+ # * :birth_date (Date)
743
+ # * :address (Hash)
744
+ # * :use (CandidApiClient::PreEncounter::Common::Types::AddressUse)
745
+ # * :line (Array<String>)
746
+ # * :city (String)
747
+ # * :state (String)
748
+ # * :postal_code (String)
749
+ # * :country (String)
750
+ # * :period (Hash)
751
+ # * :start (Date)
752
+ # * :end_ (Date)
753
+ # * :self_pay (Boolean)
754
+ # * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
755
+ # * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
756
+ # * :primary_service_facility_id (String)
757
+ # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
758
+ # @param request_options [CandidApiClient::RequestOptions]
759
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
760
+ # @example
761
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
762
+ # api.pre_encounter.patients.v_1.create_with_mrn(skip_duplicate_check: true, request: { mrn: "string", name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", authorization_number: "string", cpt_code: "string", units: VISIT }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY })
763
+ def create_with_mrn(request:, skip_duplicate_check: nil, request_options: nil)
764
+ Async do
765
+ response = @request_client.conn.post do |req|
766
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
767
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
768
+ req.headers = {
769
+ **(req.headers || {}),
770
+ **@request_client.get_headers,
771
+ **(request_options&.additional_headers || {})
772
+ }.compact
773
+ req.params = {
774
+ **(request_options&.additional_query_parameters || {}),
775
+ "skip_duplicate_check": skip_duplicate_check
776
+ }.compact
777
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
778
+ req.url "#{@request_client.get_url(environment: PreEncounter,
779
+ request_options: request_options)}/patients/v1/with_mrn"
780
+ end
781
+ CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: response.body)
782
+ end
783
+ end
784
+
551
785
  # Searches for patients that match the query parameters.
552
786
  #
553
787
  # @param limit [Integer]
@@ -733,6 +967,7 @@ module CandidApiClient
733
967
  # * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
734
968
  # * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
735
969
  # * :primary_service_facility_id (String)
970
+ # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
736
971
  # @param request_options [CandidApiClient::RequestOptions]
737
972
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
738
973
  # @example
@@ -740,7 +975,7 @@ module CandidApiClient
740
975
  # api.pre_encounter.patients.v_1.update(
741
976
  # id: "string",
742
977
  # version: "string",
743
- # request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", authorization_number: "string", cpt_code: "string", units: VISIT }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string" }
978
+ # request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", authorization_number: "string", cpt_code: "string", units: VISIT }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY }
744
979
  # )
745
980
  def update(id:, version:, request:, request_options: nil)
746
981
  Async do
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module PreEncounter
5
+ module Patients
6
+ module V1
7
+ module Types
8
+ class DoNotInvoiceReason
9
+ BANKRUPTCY = "BANKRUPTCY"
10
+ DECEASED = "DECEASED"
11
+ HARDSHIP = "HARDSHIP"
12
+ OTHER = "OTHER"
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module CandidApiClient
7
+ module PreEncounter
8
+ module Patients
9
+ module V1
10
+ module Types
11
+ class InvalidMrnErrorBody
12
+ # @return [String]
13
+ attr_reader :code
14
+ # @return [String]
15
+ attr_reader :message
16
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
17
+ attr_reader :additional_properties
18
+ # @return [Object]
19
+ attr_reader :_field_set
20
+ protected :_field_set
21
+
22
+ OMIT = Object.new
23
+
24
+ # @param code [String]
25
+ # @param message [String]
26
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
27
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::InvalidMrnErrorBody]
28
+ def initialize(code:, message:, additional_properties: nil)
29
+ @code = code
30
+ @message = message
31
+ @additional_properties = additional_properties
32
+ @_field_set = { "code": code, "message": message }
33
+ end
34
+
35
+ # Deserialize a JSON object to an instance of InvalidMrnErrorBody
36
+ #
37
+ # @param json_object [String]
38
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::InvalidMrnErrorBody]
39
+ def self.from_json(json_object:)
40
+ struct = JSON.parse(json_object, object_class: OpenStruct)
41
+ code = struct["code"]
42
+ message = struct["message"]
43
+ new(
44
+ code: code,
45
+ message: message,
46
+ additional_properties: struct
47
+ )
48
+ end
49
+
50
+ # Serialize an instance of InvalidMrnErrorBody to a JSON object
51
+ #
52
+ # @return [String]
53
+ def to_json(*_args)
54
+ @_field_set&.to_json
55
+ end
56
+
57
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
58
+ # hash and check each fields type against the current object's property
59
+ # definitions.
60
+ #
61
+ # @param obj [Object]
62
+ # @return [Void]
63
+ def self.validate_raw(obj:)
64
+ obj.code.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
65
+ obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
@@ -19,6 +19,7 @@ require_relative "../../../common/types/canonical_non_insurance_payer_associatio
19
19
  require_relative "guarantor"
20
20
  require_relative "authorization"
21
21
  require_relative "referral"
22
+ require_relative "do_not_invoice_reason"
22
23
  require "ostruct"
23
24
  require "json"
24
25
 
@@ -97,6 +98,8 @@ module CandidApiClient
97
98
  attr_reader :referrals
98
99
  # @return [String]
99
100
  attr_reader :primary_service_facility_id
101
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason] If this value is defined, the customer will not be invoiced.
102
+ attr_reader :do_not_invoice_reason
100
103
  # @return [OpenStruct] Additional properties unmapped to the current class definition
101
104
  attr_reader :additional_properties
102
105
  # @return [Object]
@@ -141,10 +144,11 @@ module CandidApiClient
141
144
  # @param authorizations [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>]
142
145
  # @param referrals [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
143
146
  # @param primary_service_facility_id [String]
147
+ # @param do_not_invoice_reason [CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason] If this value is defined, the customer will not be invoiced.
144
148
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
145
149
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatient]
146
150
  def initialize(name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:,
147
- primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, additional_properties: nil)
151
+ primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, do_not_invoice_reason: OMIT, additional_properties: nil)
148
152
  @name = name
149
153
  @other_names = other_names
150
154
  @gender = gender if gender != OMIT
@@ -181,6 +185,7 @@ module CandidApiClient
181
185
  @authorizations = authorizations if authorizations != OMIT
182
186
  @referrals = referrals if referrals != OMIT
183
187
  @primary_service_facility_id = primary_service_facility_id if primary_service_facility_id != OMIT
188
+ @do_not_invoice_reason = do_not_invoice_reason if do_not_invoice_reason != OMIT
184
189
  @additional_properties = additional_properties
185
190
  @_field_set = {
186
191
  "name": name,
@@ -214,7 +219,8 @@ module CandidApiClient
214
219
  "self_pay": self_pay,
215
220
  "authorizations": authorizations,
216
221
  "referrals": referrals,
217
- "primary_service_facility_id": primary_service_facility_id
222
+ "primary_service_facility_id": primary_service_facility_id,
223
+ "do_not_invoice_reason": do_not_invoice_reason
218
224
  }.reject do |_k, v|
219
225
  v == OMIT
220
226
  end
@@ -313,6 +319,7 @@ module CandidApiClient
313
319
  CandidApiClient::PreEncounter::Patients::V1::Types::Referral.from_json(json_object: item)
314
320
  end
315
321
  primary_service_facility_id = struct["primary_service_facility_id"]
322
+ do_not_invoice_reason = struct["do_not_invoice_reason"]
316
323
  new(
317
324
  name: name,
318
325
  other_names: other_names,
@@ -346,6 +353,7 @@ module CandidApiClient
346
353
  authorizations: authorizations,
347
354
  referrals: referrals,
348
355
  primary_service_facility_id: primary_service_facility_id,
356
+ do_not_invoice_reason: do_not_invoice_reason,
349
357
  additional_properties: struct
350
358
  )
351
359
  end
@@ -396,6 +404,7 @@ module CandidApiClient
396
404
  obj.authorizations&.is_a?(Array) != false || raise("Passed value for field obj.authorizations is not the expected type, validation failed.")
397
405
  obj.referrals&.is_a?(Array) != false || raise("Passed value for field obj.referrals is not the expected type, validation failed.")
398
406
  obj.primary_service_facility_id&.is_a?(String) != false || raise("Passed value for field obj.primary_service_facility_id is not the expected type, validation failed.")
407
+ obj.do_not_invoice_reason&.is_a?(CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason) != false || raise("Passed value for field obj.do_not_invoice_reason is not the expected type, validation failed.")
399
408
  end
400
409
  end
401
410
  end