candidhealth 0.34.6 → 0.34.9

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 (25) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/encounters/v_4/client.rb +32 -14
  3. data/lib/candidhealth/encounters/v_4/types/encounter.rb +10 -2
  4. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +10 -2
  5. data/lib/candidhealth/individual/types/patient.rb +13 -1
  6. data/lib/candidhealth/individual/types/patient_create.rb +13 -1
  7. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info.rb +77 -0
  8. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create.rb +70 -0
  9. data/lib/candidhealth/individual/types/patient_update.rb +16 -2
  10. data/lib/candidhealth/non_insurance_payers/v_1/client.rb +18 -2
  11. data/lib/candidhealth/non_insurance_payers/v_1/types/create_non_insurance_payer_request.rb +21 -2
  12. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_address_update.rb +98 -0
  13. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_update_request.rb +20 -2
  14. data/lib/candidhealth/pre_encounter/common/types/canonical_non_insurance_payer_association.rb +73 -0
  15. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +44 -4
  16. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +22 -2
  17. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +12 -4
  18. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
  19. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +24 -2
  20. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +24 -2
  21. data/lib/candidhealth/service_lines/v_2/client.rb +22 -2
  22. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +30 -2
  23. data/lib/requests.rb +2 -2
  24. data/lib/types_export.rb +4 -0
  25. metadata +6 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 106295fb417236a64e70a9443641c866b5b7924dc03d9365ded25e5b9f4158b5
4
- data.tar.gz: d93d61e4e2295cc001f253b04feac3ba50af9574666cd52a6c9266af21bffc12
3
+ metadata.gz: 35b972dbdd879822e8a21f3882ac83d11a4fb91b26209aaa72be4b2a6d5dd7f6
4
+ data.tar.gz: e11b9a4569a50abe17869cfe4c0eb217c9f8077629619dbb1793004af2cc73c8
5
5
  SHA512:
6
- metadata.gz: decdf49dacf832bb5b549b98951cec1408948dd053f5938dbcd44e3d2ab218d82fc49df5927c103224275324662dcc63b59ac89fee35f59e11b9f4d4926cd914
7
- data.tar.gz: 1e3797cbc0ef23a19f1d21b9802abe8fdfb7324d65d6dacd5286e1711d9323723fd47b91eca0d09ae153f6227ff8958292cbd6c09c97f411ff218f3387cf9a41
6
+ metadata.gz: 552620decaa04edf840079415e0dae9b196c0d7014bfee52f3990f1ae35013c8211174a2de10a486798d99b7a19018dc7932e352f4b06f6570f3a8575a615d3d
7
+ data.tar.gz: 9de740f6b537e57548f16ec1887d3c61ce2c5d0fe275467fcac308798eff77c5479626ce4c6538de8623a5bf55bcde2c019e853b4185ef6d1b50ed7ad96203c5
@@ -257,6 +257,7 @@ module CandidApiClient
257
257
  # related to the patient's pregnancy.
258
258
  # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
259
259
  # Code indicating the reason why a request was delayed
260
+ # @param referral_number [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
260
261
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
261
262
  # @param _field_set [Object]
262
263
  # @param patient [Hash] Contains the identification information of the individual receiving medical
@@ -265,6 +266,7 @@ module CandidApiClient
265
266
  # * :phone_consent (Boolean)
266
267
  # * :email (String)
267
268
  # * :non_insurance_payers (Array<String>)
269
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
268
270
  # * :email_consent (Boolean)
269
271
  # * :external_id (String)
270
272
  # * :date_of_birth (Date)
@@ -534,7 +536,7 @@ module CandidApiClient
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" },
@@ -557,7 +559,7 @@ module CandidApiClient
557
559
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
558
560
  # )
559
561
  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)
562
+ 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, referral_number: 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)
561
563
  response = @request_client.conn.post do |req|
562
564
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
563
565
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -588,6 +590,7 @@ module CandidApiClient
588
590
  onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
589
591
  last_menstrual_period_date: last_menstrual_period_date,
590
592
  delay_reason_code: delay_reason_code,
593
+ referral_number: referral_number,
591
594
  additional_properties: additional_properties,
592
595
  _field_set: _field_set,
593
596
  patient: patient,
@@ -740,6 +743,7 @@ module CandidApiClient
740
743
  # related to the patient's pregnancy.
741
744
  # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
742
745
  # Code indicating the reason why a request was delayed
746
+ # @param referral_number [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
743
747
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
744
748
  # @param _field_set [Object]
745
749
  # @param pre_encounter_patient_id [String]
@@ -926,7 +930,7 @@ module CandidApiClient
926
930
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
927
931
  # )
928
932
  def create_from_pre_encounter_patient(external_id:, patient_authorized_release:,
929
- benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:, pre_encounter_appointment_ids:, billing_provider:, rendering_provider:, 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, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
933
+ benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:, pre_encounter_appointment_ids:, billing_provider:, rendering_provider:, 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, referral_number: nil, additional_properties: nil, _field_set: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
930
934
  response = @request_client.conn.post do |req|
931
935
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
932
936
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -957,6 +961,7 @@ module CandidApiClient
957
961
  onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
958
962
  last_menstrual_period_date: last_menstrual_period_date,
959
963
  delay_reason_code: delay_reason_code,
964
+ referral_number: referral_number,
960
965
  additional_properties: additional_properties,
961
966
  _field_set: _field_set,
962
967
  pre_encounter_patient_id: pre_encounter_patient_id,
@@ -1143,6 +1148,7 @@ module CandidApiClient
1143
1148
  # * :email (String)
1144
1149
  # * :email_consent (Boolean)
1145
1150
  # * :non_insurance_payers (Array<String>)
1151
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
1146
1152
  # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
1147
1153
  # for billing purpose.
1148
1154
  # Box 12 on the CMS-1500 claim form.
@@ -1294,6 +1300,7 @@ module CandidApiClient
1294
1300
  # * :first_name (String)
1295
1301
  # * :last_name (String)
1296
1302
  # * :organization_name (String)
1303
+ # @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
1297
1304
  # @param request_options [CandidApiClient::RequestOptions]
1298
1305
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1299
1306
  # @example
@@ -1325,7 +1332,7 @@ module CandidApiClient
1325
1332
  # onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15),
1326
1333
  # last_menstrual_period_date: DateTime.parse(2023-01-15),
1327
1334
  # 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"] },
1335
+ # 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
1336
  # patient_authorized_release: true,
1330
1337
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
1331
1338
  # 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 +1343,11 @@ module CandidApiClient
1336
1343
  # 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
1344
  # 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
1345
  # 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" }
1346
+ # 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" },
1347
+ # referral_number: "string"
1340
1348
  # )
1341
1349
  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)
1350
+ 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
1351
  response = @request_client.conn.patch do |req|
1344
1352
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1345
1353
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -1386,7 +1394,8 @@ module CandidApiClient
1386
1394
  billing_provider: billing_provider,
1387
1395
  supervising_provider: supervising_provider,
1388
1396
  referring_provider: referring_provider,
1389
- initial_referring_provider: initial_referring_provider
1397
+ initial_referring_provider: initial_referring_provider,
1398
+ referral_number: referral_number
1390
1399
  }.compact
1391
1400
  req.url "#{@request_client.get_url(environment: CandidApi,
1392
1401
  request_options: request_options)}/api/encounters/v4/#{encounter_id}"
@@ -1608,6 +1617,7 @@ module CandidApiClient
1608
1617
  # related to the patient's pregnancy.
1609
1618
  # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
1610
1619
  # Code indicating the reason why a request was delayed
1620
+ # @param referral_number [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
1611
1621
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
1612
1622
  # @param _field_set [Object]
1613
1623
  # @param patient [Hash] Contains the identification information of the individual receiving medical
@@ -1616,6 +1626,7 @@ module CandidApiClient
1616
1626
  # * :phone_consent (Boolean)
1617
1627
  # * :email (String)
1618
1628
  # * :non_insurance_payers (Array<String>)
1629
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
1619
1630
  # * :email_consent (Boolean)
1620
1631
  # * :external_id (String)
1621
1632
  # * :date_of_birth (Date)
@@ -1885,7 +1896,7 @@ module CandidApiClient
1885
1896
  # @example
1886
1897
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1887
1898
  # 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 },
1899
+ # 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
1900
  # 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
1901
  # 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
1902
  # 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" },
@@ -1908,7 +1919,7 @@ module CandidApiClient
1908
1919
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
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, referral_number: 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)
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?
@@ -1940,6 +1951,7 @@ module CandidApiClient
1940
1951
  onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
1941
1952
  last_menstrual_period_date: last_menstrual_period_date,
1942
1953
  delay_reason_code: delay_reason_code,
1954
+ referral_number: referral_number,
1943
1955
  additional_properties: additional_properties,
1944
1956
  _field_set: _field_set,
1945
1957
  patient: patient,
@@ -2093,6 +2105,7 @@ module CandidApiClient
2093
2105
  # related to the patient's pregnancy.
2094
2106
  # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
2095
2107
  # Code indicating the reason why a request was delayed
2108
+ # @param referral_number [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
2096
2109
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
2097
2110
  # @param _field_set [Object]
2098
2111
  # @param pre_encounter_patient_id [String]
@@ -2279,7 +2292,7 @@ module CandidApiClient
2279
2292
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
2280
2293
  # )
2281
2294
  def create_from_pre_encounter_patient(external_id:, patient_authorized_release:,
2282
- benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:, pre_encounter_appointment_ids:, billing_provider:, rendering_provider:, 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, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
2295
+ benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:, pre_encounter_appointment_ids:, billing_provider:, rendering_provider:, 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, referral_number: nil, additional_properties: nil, _field_set: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
2283
2296
  Async do
2284
2297
  response = @request_client.conn.post do |req|
2285
2298
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -2311,6 +2324,7 @@ module CandidApiClient
2311
2324
  onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
2312
2325
  last_menstrual_period_date: last_menstrual_period_date,
2313
2326
  delay_reason_code: delay_reason_code,
2327
+ referral_number: referral_number,
2314
2328
  additional_properties: additional_properties,
2315
2329
  _field_set: _field_set,
2316
2330
  pre_encounter_patient_id: pre_encounter_patient_id,
@@ -2498,6 +2512,7 @@ module CandidApiClient
2498
2512
  # * :email (String)
2499
2513
  # * :email_consent (Boolean)
2500
2514
  # * :non_insurance_payers (Array<String>)
2515
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
2501
2516
  # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
2502
2517
  # for billing purpose.
2503
2518
  # Box 12 on the CMS-1500 claim form.
@@ -2649,6 +2664,7 @@ module CandidApiClient
2649
2664
  # * :first_name (String)
2650
2665
  # * :last_name (String)
2651
2666
  # * :organization_name (String)
2667
+ # @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
2652
2668
  # @param request_options [CandidApiClient::RequestOptions]
2653
2669
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
2654
2670
  # @example
@@ -2680,7 +2696,7 @@ module CandidApiClient
2680
2696
  # onset_of_current_illness_or_symptom_date: DateTime.parse(2023-01-15),
2681
2697
  # last_menstrual_period_date: DateTime.parse(2023-01-15),
2682
2698
  # 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"] },
2699
+ # 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
2700
  # patient_authorized_release: true,
2685
2701
  # schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
2686
2702
  # 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 +2707,11 @@ module CandidApiClient
2691
2707
  # 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
2708
  # 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
2709
  # 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" }
2710
+ # 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" },
2711
+ # referral_number: "string"
2695
2712
  # )
2696
2713
  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)
2714
+ 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
2715
  Async do
2699
2716
  response = @request_client.conn.patch do |req|
2700
2717
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -2742,7 +2759,8 @@ module CandidApiClient
2742
2759
  billing_provider: billing_provider,
2743
2760
  supervising_provider: supervising_provider,
2744
2761
  referring_provider: referring_provider,
2745
- initial_referring_provider: initial_referring_provider
2762
+ initial_referring_provider: initial_referring_provider,
2763
+ referral_number: referral_number
2746
2764
  }.compact
2747
2765
  req.url "#{@request_client.get_url(environment: CandidApi,
2748
2766
  request_options: request_options)}/api/encounters/v4/#{encounter_id}"
@@ -233,6 +233,8 @@ module CandidApiClient
233
233
  # @return [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
234
234
  # Code indicating the reason why a request was delayed
235
235
  attr_reader :delay_reason_code
236
+ # @return [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
237
+ attr_reader :referral_number
236
238
  # @return [OpenStruct] Additional properties unmapped to the current class definition
237
239
  attr_reader :additional_properties
238
240
  # @return [Object]
@@ -389,10 +391,11 @@ module CandidApiClient
389
391
  # related to the patient's pregnancy.
390
392
  # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
391
393
  # Code indicating the reason why a request was delayed
394
+ # @param referral_number [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
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, 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, referral_number: 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
@@ -451,6 +454,7 @@ module CandidApiClient
451
454
  end
452
455
  @last_menstrual_period_date = last_menstrual_period_date if last_menstrual_period_date != OMIT
453
456
  @delay_reason_code = delay_reason_code if delay_reason_code != OMIT
457
+ @referral_number = referral_number if referral_number != OMIT
454
458
  @additional_properties = additional_properties
455
459
  @_field_set = {
456
460
  "patient_control_number": patient_control_number,
@@ -502,7 +506,8 @@ module CandidApiClient
502
506
  "discharge_date": discharge_date,
503
507
  "onset_of_current_illness_or_symptom_date": onset_of_current_illness_or_symptom_date,
504
508
  "last_menstrual_period_date": last_menstrual_period_date,
505
- "delay_reason_code": delay_reason_code
509
+ "delay_reason_code": delay_reason_code,
510
+ "referral_number": referral_number
506
511
  }.reject do |_k, v|
507
512
  v == OMIT
508
513
  end
@@ -663,6 +668,7 @@ module CandidApiClient
663
668
  Date.parse(parsed_json["last_menstrual_period_date"])
664
669
  end
665
670
  delay_reason_code = struct["delay_reason_code"]
671
+ referral_number = struct["referral_number"]
666
672
  new(
667
673
  patient_control_number: patient_control_number,
668
674
  encounter_id: encounter_id,
@@ -714,6 +720,7 @@ module CandidApiClient
714
720
  onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
715
721
  last_menstrual_period_date: last_menstrual_period_date,
716
722
  delay_reason_code: delay_reason_code,
723
+ referral_number: referral_number,
717
724
  additional_properties: struct
718
725
  )
719
726
  end
@@ -782,6 +789,7 @@ module CandidApiClient
782
789
  obj.onset_of_current_illness_or_symptom_date&.is_a?(Date) != false || raise("Passed value for field obj.onset_of_current_illness_or_symptom_date is not the expected type, validation failed.")
783
790
  obj.last_menstrual_period_date&.is_a?(Date) != false || raise("Passed value for field obj.last_menstrual_period_date is not the expected type, validation failed.")
784
791
  obj.delay_reason_code&.is_a?(CandidApiClient::Commons::Types::DelayReasonCode) != false || raise("Passed value for field obj.delay_reason_code is not the expected type, validation failed.")
792
+ obj.referral_number&.is_a?(String) != false || raise("Passed value for field obj.referral_number is not the expected type, validation failed.")
785
793
  end
786
794
  end
787
795
  end
@@ -109,6 +109,8 @@ module CandidApiClient
109
109
  # @return [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
110
110
  # Code indicating the reason why a request was delayed
111
111
  attr_reader :delay_reason_code
112
+ # @return [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
113
+ attr_reader :referral_number
112
114
  # @return [OpenStruct] Additional properties unmapped to the current class definition
113
115
  attr_reader :additional_properties
114
116
  # @return [Object]
@@ -189,10 +191,11 @@ module CandidApiClient
189
191
  # related to the patient's pregnancy.
190
192
  # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
191
193
  # Code indicating the reason why a request was delayed
194
+ # @param referral_number [String] Refers to REF\*9F on the 837p. Value cannot be greater than 50 characters.
192
195
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
193
196
  # @return [CandidApiClient::Encounters::V4::Types::EncounterBase]
194
197
  def initialize(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
195
- provider_accepts_assignment:, billable_status:, 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)
198
+ provider_accepts_assignment:, billable_status:, 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, referral_number: OMIT, additional_properties: nil)
196
199
  @external_id = external_id
197
200
  @date_of_service = date_of_service if date_of_service != OMIT
198
201
  @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
@@ -217,6 +220,7 @@ module CandidApiClient
217
220
  end
218
221
  @last_menstrual_period_date = last_menstrual_period_date if last_menstrual_period_date != OMIT
219
222
  @delay_reason_code = delay_reason_code if delay_reason_code != OMIT
223
+ @referral_number = referral_number if referral_number != OMIT
220
224
  @additional_properties = additional_properties
221
225
  @_field_set = {
222
226
  "external_id": external_id,
@@ -238,7 +242,8 @@ module CandidApiClient
238
242
  "discharge_date": discharge_date,
239
243
  "onset_of_current_illness_or_symptom_date": onset_of_current_illness_or_symptom_date,
240
244
  "last_menstrual_period_date": last_menstrual_period_date,
241
- "delay_reason_code": delay_reason_code
245
+ "delay_reason_code": delay_reason_code,
246
+ "referral_number": referral_number
242
247
  }.reject do |_k, v|
243
248
  v == OMIT
244
249
  end
@@ -293,6 +298,7 @@ module CandidApiClient
293
298
  Date.parse(parsed_json["last_menstrual_period_date"])
294
299
  end
295
300
  delay_reason_code = struct["delay_reason_code"]
301
+ referral_number = struct["referral_number"]
296
302
  new(
297
303
  external_id: external_id,
298
304
  date_of_service: date_of_service,
@@ -314,6 +320,7 @@ module CandidApiClient
314
320
  onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
315
321
  last_menstrual_period_date: last_menstrual_period_date,
316
322
  delay_reason_code: delay_reason_code,
323
+ referral_number: referral_number,
317
324
  additional_properties: struct
318
325
  )
319
326
  end
@@ -352,6 +359,7 @@ module CandidApiClient
352
359
  obj.onset_of_current_illness_or_symptom_date&.is_a?(Date) != false || raise("Passed value for field obj.onset_of_current_illness_or_symptom_date is not the expected type, validation failed.")
353
360
  obj.last_menstrual_period_date&.is_a?(Date) != false || raise("Passed value for field obj.last_menstrual_period_date is not the expected type, validation failed.")
354
361
  obj.delay_reason_code&.is_a?(CandidApiClient::Commons::Types::DelayReasonCode) != false || raise("Passed value for field obj.delay_reason_code is not the expected type, validation failed.")
362
+ obj.referral_number&.is_a?(String) != false || raise("Passed value for field obj.referral_number is not the expected type, validation failed.")
355
363
  end
356
364
  end
357
365
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "../../commons/types/phone_number"
4
4
  require_relative "../../non_insurance_payers/v_1/types/non_insurance_payer"
5
+ require_relative "patient_non_insurance_payer_info"
5
6
  require "date"
6
7
  require_relative "../../commons/types/street_address_short_zip"
7
8
  require_relative "gender"
@@ -24,6 +25,8 @@ module CandidApiClient
24
25
  attr_reader :email_consent
25
26
  # @return [Array<CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer>]
26
27
  attr_reader :non_insurance_payers
28
+ # @return [Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfo>]
29
+ attr_reader :non_insurance_payers_info
27
30
  # @return [String] The ID used to identify this individual in your system. For example, your
28
31
  # internal patient ID or an EHR patient ID.
29
32
  attr_reader :external_id
@@ -52,6 +55,7 @@ module CandidApiClient
52
55
  # @param email [String]
53
56
  # @param email_consent [Boolean]
54
57
  # @param non_insurance_payers [Array<CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer>]
58
+ # @param non_insurance_payers_info [Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfo>]
55
59
  # @param external_id [String] The ID used to identify this individual in your system. For example, your
56
60
  # internal patient ID or an EHR patient ID.
57
61
  # @param date_of_birth [Date] Box 3 on the CMS-1500 claim form. The date format should be in ISO 8601 date;
@@ -63,13 +67,14 @@ module CandidApiClient
63
67
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
64
68
  # @return [CandidApiClient::Individual::Types::Patient]
65
69
  def initialize(individual_id:, phone_numbers:, phone_consent:, email_consent:, non_insurance_payers:,
66
- external_id:, date_of_birth:, address:, first_name:, last_name:, gender:, email: OMIT, additional_properties: nil)
70
+ non_insurance_payers_info:, external_id:, date_of_birth:, address:, first_name:, last_name:, gender:, email: OMIT, additional_properties: nil)
67
71
  @individual_id = individual_id
68
72
  @phone_numbers = phone_numbers
69
73
  @phone_consent = phone_consent
70
74
  @email = email if email != OMIT
71
75
  @email_consent = email_consent
72
76
  @non_insurance_payers = non_insurance_payers
77
+ @non_insurance_payers_info = non_insurance_payers_info
73
78
  @external_id = external_id
74
79
  @date_of_birth = date_of_birth
75
80
  @address = address
@@ -84,6 +89,7 @@ module CandidApiClient
84
89
  "email": email,
85
90
  "email_consent": email_consent,
86
91
  "non_insurance_payers": non_insurance_payers,
92
+ "non_insurance_payers_info": non_insurance_payers_info,
87
93
  "external_id": external_id,
88
94
  "date_of_birth": date_of_birth,
89
95
  "address": address,
@@ -114,6 +120,10 @@ module CandidApiClient
114
120
  item = item.to_json
115
121
  CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.from_json(json_object: item)
116
122
  end
123
+ non_insurance_payers_info = parsed_json["non_insurance_payers_info"]&.map do |item|
124
+ item = item.to_json
125
+ CandidApiClient::Individual::Types::PatientNonInsurancePayerInfo.from_json(json_object: item)
126
+ end
117
127
  external_id = struct["external_id"]
118
128
  date_of_birth = (Date.parse(parsed_json["date_of_birth"]) unless parsed_json["date_of_birth"].nil?)
119
129
  if parsed_json["address"].nil?
@@ -132,6 +142,7 @@ module CandidApiClient
132
142
  email: email,
133
143
  email_consent: email_consent,
134
144
  non_insurance_payers: non_insurance_payers,
145
+ non_insurance_payers_info: non_insurance_payers_info,
135
146
  external_id: external_id,
136
147
  date_of_birth: date_of_birth,
137
148
  address: address,
@@ -162,6 +173,7 @@ module CandidApiClient
162
173
  obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
163
174
  obj.email_consent.is_a?(Boolean) != false || raise("Passed value for field obj.email_consent is not the expected type, validation failed.")
164
175
  obj.non_insurance_payers.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers is not the expected type, validation failed.")
176
+ obj.non_insurance_payers_info.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers_info is not the expected type, validation failed.")
165
177
  obj.external_id.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
166
178
  obj.date_of_birth.is_a?(Date) != false || raise("Passed value for field obj.date_of_birth is not the expected type, validation failed.")
167
179
  CandidApiClient::Commons::Types::StreetAddressShortZip.validate_raw(obj: obj.address)
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "../../commons/types/phone_number"
4
+ require_relative "patient_non_insurance_payer_info_create"
4
5
  require "date"
5
6
  require_relative "../../commons/types/street_address_short_zip"
6
7
  require_relative "gender"
@@ -19,6 +20,8 @@ module CandidApiClient
19
20
  attr_reader :email
20
21
  # @return [Array<String>]
21
22
  attr_reader :non_insurance_payers
23
+ # @return [Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>]
24
+ attr_reader :non_insurance_payers_info
22
25
  # @return [Boolean] Defaults to false
23
26
  attr_reader :email_consent
24
27
  # @return [String] The ID used to identify this individual in your system. For example, your
@@ -47,6 +50,7 @@ module CandidApiClient
47
50
  # @param phone_consent [Boolean] Defaults to false
48
51
  # @param email [String]
49
52
  # @param non_insurance_payers [Array<String>]
53
+ # @param non_insurance_payers_info [Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>]
50
54
  # @param email_consent [Boolean] Defaults to false
51
55
  # @param external_id [String] The ID used to identify this individual in your system. For example, your
52
56
  # internal patient ID or an EHR patient ID.
@@ -59,11 +63,12 @@ module CandidApiClient
59
63
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
60
64
  # @return [CandidApiClient::Individual::Types::PatientCreate]
61
65
  def initialize(external_id:, date_of_birth:, address:, first_name:, last_name:, gender:, phone_numbers: OMIT, phone_consent: OMIT, email: OMIT, non_insurance_payers: OMIT,
62
- email_consent: OMIT, additional_properties: nil)
66
+ non_insurance_payers_info: OMIT, email_consent: OMIT, additional_properties: nil)
63
67
  @phone_numbers = phone_numbers if phone_numbers != OMIT
64
68
  @phone_consent = phone_consent if phone_consent != OMIT
65
69
  @email = email if email != OMIT
66
70
  @non_insurance_payers = non_insurance_payers if non_insurance_payers != OMIT
71
+ @non_insurance_payers_info = non_insurance_payers_info if non_insurance_payers_info != OMIT
67
72
  @email_consent = email_consent if email_consent != OMIT
68
73
  @external_id = external_id
69
74
  @date_of_birth = date_of_birth
@@ -77,6 +82,7 @@ module CandidApiClient
77
82
  "phone_consent": phone_consent,
78
83
  "email": email,
79
84
  "non_insurance_payers": non_insurance_payers,
85
+ "non_insurance_payers_info": non_insurance_payers_info,
80
86
  "email_consent": email_consent,
81
87
  "external_id": external_id,
82
88
  "date_of_birth": date_of_birth,
@@ -103,6 +109,10 @@ module CandidApiClient
103
109
  phone_consent = struct["phone_consent"]
104
110
  email = struct["email"]
105
111
  non_insurance_payers = struct["non_insurance_payers"]
112
+ non_insurance_payers_info = parsed_json["non_insurance_payers_info"]&.map do |item|
113
+ item = item.to_json
114
+ CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate.from_json(json_object: item)
115
+ end
106
116
  email_consent = struct["email_consent"]
107
117
  external_id = struct["external_id"]
108
118
  date_of_birth = (Date.parse(parsed_json["date_of_birth"]) unless parsed_json["date_of_birth"].nil?)
@@ -120,6 +130,7 @@ module CandidApiClient
120
130
  phone_consent: phone_consent,
121
131
  email: email,
122
132
  non_insurance_payers: non_insurance_payers,
133
+ non_insurance_payers_info: non_insurance_payers_info,
123
134
  email_consent: email_consent,
124
135
  external_id: external_id,
125
136
  date_of_birth: date_of_birth,
@@ -149,6 +160,7 @@ module CandidApiClient
149
160
  obj.phone_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.phone_consent is not the expected type, validation failed.")
150
161
  obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
151
162
  obj.non_insurance_payers&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers is not the expected type, validation failed.")
163
+ obj.non_insurance_payers_info&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers_info is not the expected type, validation failed.")
152
164
  obj.email_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.email_consent is not the expected type, validation failed.")
153
165
  obj.external_id.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
154
166
  obj.date_of_birth.is_a?(Date) != false || raise("Passed value for field obj.date_of_birth is not the expected type, validation failed.")
@@ -0,0 +1,77 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../non_insurance_payers/v_1/types/non_insurance_payer"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module Individual
9
+ module Types
10
+ class PatientNonInsurancePayerInfo
11
+ # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer]
12
+ attr_reader :non_insurance_payer
13
+ # @return [String]
14
+ attr_reader :member_id
15
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
16
+ attr_reader :additional_properties
17
+ # @return [Object]
18
+ attr_reader :_field_set
19
+ protected :_field_set
20
+
21
+ OMIT = Object.new
22
+
23
+ # @param non_insurance_payer [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer]
24
+ # @param member_id [String]
25
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
+ # @return [CandidApiClient::Individual::Types::PatientNonInsurancePayerInfo]
27
+ def initialize(non_insurance_payer:, member_id: OMIT, additional_properties: nil)
28
+ @non_insurance_payer = non_insurance_payer
29
+ @member_id = member_id if member_id != OMIT
30
+ @additional_properties = additional_properties
31
+ @_field_set = { "non_insurance_payer": non_insurance_payer, "member_id": member_id }.reject do |_k, v|
32
+ v == OMIT
33
+ end
34
+ end
35
+
36
+ # Deserialize a JSON object to an instance of PatientNonInsurancePayerInfo
37
+ #
38
+ # @param json_object [String]
39
+ # @return [CandidApiClient::Individual::Types::PatientNonInsurancePayerInfo]
40
+ def self.from_json(json_object:)
41
+ struct = JSON.parse(json_object, object_class: OpenStruct)
42
+ parsed_json = JSON.parse(json_object)
43
+ if parsed_json["non_insurance_payer"].nil?
44
+ non_insurance_payer = nil
45
+ else
46
+ non_insurance_payer = parsed_json["non_insurance_payer"].to_json
47
+ non_insurance_payer = CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.from_json(json_object: non_insurance_payer)
48
+ end
49
+ member_id = struct["member_id"]
50
+ new(
51
+ non_insurance_payer: non_insurance_payer,
52
+ member_id: member_id,
53
+ additional_properties: struct
54
+ )
55
+ end
56
+
57
+ # Serialize an instance of PatientNonInsurancePayerInfo to a JSON object
58
+ #
59
+ # @return [String]
60
+ def to_json(*_args)
61
+ @_field_set&.to_json
62
+ end
63
+
64
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
65
+ # hash and check each fields type against the current object's property
66
+ # definitions.
67
+ #
68
+ # @param obj [Object]
69
+ # @return [Void]
70
+ def self.validate_raw(obj:)
71
+ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.validate_raw(obj: obj.non_insurance_payer)
72
+ obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end