candidhealth 0.40.0 → 0.40.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8a91b8d2c08a55de4d0521432bbdc353fa86c1990b8595ed87d3e514008f902
4
- data.tar.gz: 96e4b0340792be17698a6c43203ecd62d2ea4d84062826ff0418d56087ed9cb7
3
+ metadata.gz: 2e81f591e61c1d54bf64e5f14cad0b1fe8c0db21f6c9c1382dbe108807399637
4
+ data.tar.gz: 4babf8a698ec0d2009e6eb5e7db21cd64b523fff991decd816294653301739c8
5
5
  SHA512:
6
- metadata.gz: ed60e8fdaa98c35318617cd5a93a1dd27d8955d7133d8b48385928ee4df95e1cd4442560b6fd1b62575dfa8588448fca29bc35703690112d597f355c1f3c640b
7
- data.tar.gz: 55a2be7ba42326b2bfdee8168c6f05b18451ae43f56f7268987ed7c1d6096e27705f5924a3148217df9e4a2e0e35ceea3e84722c04c2bdbfeec340dff5634aec
6
+ metadata.gz: d95f068a3d201ad782285b2d7e3edc32bf8b959f67e21b27db1b2981eb3c3282d8f02896f8dc55a35320d91ad0710455930ec25dbd7eb70abb3ce92d4c838b43
7
+ data.tar.gz: 5a201f238e0f84c64d97812d20d803ac632b9553c00ec85741a161e284161b699e986103ce64969448f853ac4d4cebdf5d5f93deeacad043e1f6e623128f7c46
@@ -5,6 +5,8 @@ require_relative "types/charge_capture_data"
5
5
  require "date"
6
6
  require_relative "types/charge_capture_status"
7
7
  require_relative "types/charge_capture"
8
+ require_relative "types/charge_capture_sort_field"
9
+ require_relative "../../commons/types/sort_direction"
8
10
  require_relative "types/charge_capture_page"
9
11
  require "async"
10
12
 
@@ -107,6 +109,33 @@ module CandidApiClient
107
109
  # * :first_name (String)
108
110
  # * :last_name (String)
109
111
  # * :gender (CandidApiClient::Individual::Types::Gender)
112
+ # * :subscriber_tertiary (Hash)
113
+ # * :insurance_card (Hash)
114
+ # * :member_id (String)
115
+ # * :payer_name (String)
116
+ # * :payer_id (String)
117
+ # * :rx_bin (String)
118
+ # * :rx_pcn (String)
119
+ # * :image_url_front (String)
120
+ # * :image_url_back (String)
121
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
122
+ # * :group_number (String)
123
+ # * :plan_name (String)
124
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
125
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
126
+ # * :payer_plan_group_id (String)
127
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
128
+ # * :date_of_birth (Date)
129
+ # * :address (Hash)
130
+ # * :zip_plus_four_code (String)
131
+ # * :address_1 (String)
132
+ # * :address_2 (String)
133
+ # * :city (String)
134
+ # * :state (CandidApiClient::Commons::Types::State)
135
+ # * :zip_code (String)
136
+ # * :first_name (String)
137
+ # * :last_name (String)
138
+ # * :gender (CandidApiClient::Individual::Types::Gender)
110
139
  # * :additional_information (String)
111
140
  # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
112
141
  # * :admission_date (Date)
@@ -397,6 +426,33 @@ module CandidApiClient
397
426
  # * :first_name (String)
398
427
  # * :last_name (String)
399
428
  # * :gender (CandidApiClient::Individual::Types::Gender)
429
+ # * :subscriber_tertiary (Hash)
430
+ # * :insurance_card (Hash)
431
+ # * :member_id (String)
432
+ # * :payer_name (String)
433
+ # * :payer_id (String)
434
+ # * :rx_bin (String)
435
+ # * :rx_pcn (String)
436
+ # * :image_url_front (String)
437
+ # * :image_url_back (String)
438
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
439
+ # * :group_number (String)
440
+ # * :plan_name (String)
441
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
442
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
443
+ # * :payer_plan_group_id (String)
444
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
445
+ # * :date_of_birth (Date)
446
+ # * :address (Hash)
447
+ # * :zip_plus_four_code (String)
448
+ # * :address_1 (String)
449
+ # * :address_2 (String)
450
+ # * :city (String)
451
+ # * :state (CandidApiClient::Commons::Types::State)
452
+ # * :zip_code (String)
453
+ # * :first_name (String)
454
+ # * :last_name (String)
455
+ # * :gender (CandidApiClient::Individual::Types::Gender)
400
456
  # * :additional_information (String)
401
457
  # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
402
458
  # * :admission_date (Date)
@@ -606,6 +662,8 @@ module CandidApiClient
606
662
  end
607
663
 
608
664
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
665
+ # @param sort [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureSortField] Defaults to created_at
666
+ # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Sort direction. Defaults to descending order if not provided.
609
667
  # @param page_token [String]
610
668
  # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
611
669
  # @param status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge captures
@@ -614,20 +672,25 @@ module CandidApiClient
614
672
  # This field should not contain PHI.
615
673
  # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
616
674
  # This date must be the local date in the timezone where the service occurred.
675
+ # @param exclude_bundled [Boolean] Whether to exclude charge captures which are associated with a charge capture
676
+ # bundle.
617
677
  # @param request_options [CandidApiClient::RequestOptions]
618
678
  # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePage]
619
679
  # @example
620
680
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
621
681
  # api.charge_capture.v_1.get_all(
622
682
  # limit: 1,
683
+ # sort: CREATED_AT,
684
+ # sort_direction: ASC,
623
685
  # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
624
686
  # patient_external_id: "string",
625
687
  # status: PLANNED,
626
688
  # charge_external_id: "string",
627
- # date_of_service: DateTime.parse(2023-01-15)
689
+ # date_of_service: DateTime.parse(2023-01-15),
690
+ # exclude_bundled: true
628
691
  # )
629
- def get_all(limit: nil, page_token: nil, patient_external_id: nil, status: nil, charge_external_id: nil,
630
- date_of_service: nil, request_options: nil)
692
+ def get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil, status: nil,
693
+ charge_external_id: nil, date_of_service: nil, exclude_bundled: nil, request_options: nil)
631
694
  response = @request_client.conn.get do |req|
632
695
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
633
696
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -639,11 +702,14 @@ module CandidApiClient
639
702
  req.params = {
640
703
  **(request_options&.additional_query_parameters || {}),
641
704
  "limit": limit,
705
+ "sort": sort,
706
+ "sort_direction": sort_direction,
642
707
  "page_token": page_token,
643
708
  "patient_external_id": patient_external_id,
644
709
  "status": status,
645
710
  "charge_external_id": charge_external_id,
646
- "date_of_service": date_of_service
711
+ "date_of_service": date_of_service,
712
+ "exclude_bundled": exclude_bundled
647
713
  }.compact
648
714
  req.url "#{@request_client.get_url(environment: CandidApi,
649
715
  request_options: request_options)}/api/charge_captures/v1"
@@ -748,6 +814,33 @@ module CandidApiClient
748
814
  # * :first_name (String)
749
815
  # * :last_name (String)
750
816
  # * :gender (CandidApiClient::Individual::Types::Gender)
817
+ # * :subscriber_tertiary (Hash)
818
+ # * :insurance_card (Hash)
819
+ # * :member_id (String)
820
+ # * :payer_name (String)
821
+ # * :payer_id (String)
822
+ # * :rx_bin (String)
823
+ # * :rx_pcn (String)
824
+ # * :image_url_front (String)
825
+ # * :image_url_back (String)
826
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
827
+ # * :group_number (String)
828
+ # * :plan_name (String)
829
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
830
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
831
+ # * :payer_plan_group_id (String)
832
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
833
+ # * :date_of_birth (Date)
834
+ # * :address (Hash)
835
+ # * :zip_plus_four_code (String)
836
+ # * :address_1 (String)
837
+ # * :address_2 (String)
838
+ # * :city (String)
839
+ # * :state (CandidApiClient::Commons::Types::State)
840
+ # * :zip_code (String)
841
+ # * :first_name (String)
842
+ # * :last_name (String)
843
+ # * :gender (CandidApiClient::Individual::Types::Gender)
751
844
  # * :additional_information (String)
752
845
  # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
753
846
  # * :admission_date (Date)
@@ -1042,6 +1135,33 @@ module CandidApiClient
1042
1135
  # * :first_name (String)
1043
1136
  # * :last_name (String)
1044
1137
  # * :gender (CandidApiClient::Individual::Types::Gender)
1138
+ # * :subscriber_tertiary (Hash)
1139
+ # * :insurance_card (Hash)
1140
+ # * :member_id (String)
1141
+ # * :payer_name (String)
1142
+ # * :payer_id (String)
1143
+ # * :rx_bin (String)
1144
+ # * :rx_pcn (String)
1145
+ # * :image_url_front (String)
1146
+ # * :image_url_back (String)
1147
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1148
+ # * :group_number (String)
1149
+ # * :plan_name (String)
1150
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1151
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1152
+ # * :payer_plan_group_id (String)
1153
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1154
+ # * :date_of_birth (Date)
1155
+ # * :address (Hash)
1156
+ # * :zip_plus_four_code (String)
1157
+ # * :address_1 (String)
1158
+ # * :address_2 (String)
1159
+ # * :city (String)
1160
+ # * :state (CandidApiClient::Commons::Types::State)
1161
+ # * :zip_code (String)
1162
+ # * :first_name (String)
1163
+ # * :last_name (String)
1164
+ # * :gender (CandidApiClient::Individual::Types::Gender)
1045
1165
  # * :additional_information (String)
1046
1166
  # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
1047
1167
  # * :admission_date (Date)
@@ -1255,6 +1375,8 @@ module CandidApiClient
1255
1375
  end
1256
1376
 
1257
1377
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
1378
+ # @param sort [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureSortField] Defaults to created_at
1379
+ # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Sort direction. Defaults to descending order if not provided.
1258
1380
  # @param page_token [String]
1259
1381
  # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
1260
1382
  # @param status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge captures
@@ -1263,20 +1385,25 @@ module CandidApiClient
1263
1385
  # This field should not contain PHI.
1264
1386
  # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
1265
1387
  # This date must be the local date in the timezone where the service occurred.
1388
+ # @param exclude_bundled [Boolean] Whether to exclude charge captures which are associated with a charge capture
1389
+ # bundle.
1266
1390
  # @param request_options [CandidApiClient::RequestOptions]
1267
1391
  # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePage]
1268
1392
  # @example
1269
1393
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1270
1394
  # api.charge_capture.v_1.get_all(
1271
1395
  # limit: 1,
1396
+ # sort: CREATED_AT,
1397
+ # sort_direction: ASC,
1272
1398
  # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
1273
1399
  # patient_external_id: "string",
1274
1400
  # status: PLANNED,
1275
1401
  # charge_external_id: "string",
1276
- # date_of_service: DateTime.parse(2023-01-15)
1402
+ # date_of_service: DateTime.parse(2023-01-15),
1403
+ # exclude_bundled: true
1277
1404
  # )
1278
- def get_all(limit: nil, page_token: nil, patient_external_id: nil, status: nil, charge_external_id: nil,
1279
- date_of_service: nil, request_options: nil)
1405
+ def get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil, status: nil,
1406
+ charge_external_id: nil, date_of_service: nil, exclude_bundled: nil, request_options: nil)
1280
1407
  Async do
1281
1408
  response = @request_client.conn.get do |req|
1282
1409
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -1289,11 +1416,14 @@ module CandidApiClient
1289
1416
  req.params = {
1290
1417
  **(request_options&.additional_query_parameters || {}),
1291
1418
  "limit": limit,
1419
+ "sort": sort,
1420
+ "sort_direction": sort_direction,
1292
1421
  "page_token": page_token,
1293
1422
  "patient_external_id": patient_external_id,
1294
1423
  "status": status,
1295
1424
  "charge_external_id": charge_external_id,
1296
- "date_of_service": date_of_service
1425
+ "date_of_service": date_of_service,
1426
+ "exclude_bundled": exclude_bundled
1297
1427
  }.compact
1298
1428
  req.url "#{@request_client.get_url(environment: CandidApi,
1299
1429
  request_options: request_options)}/api/charge_captures/v1"
@@ -3,6 +3,7 @@
3
3
  require_relative "charge_capture_status"
4
4
  require_relative "charge_capture_data"
5
5
  require "date"
6
+ require_relative "charge_capture_post_billed_change"
6
7
  require "ostruct"
7
8
  require "json"
8
9
 
@@ -26,6 +27,8 @@ module CandidApiClient
26
27
  # @return [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
27
28
  # This date must be the local date in the timezone where the service occurred.
28
29
  attr_reader :date_of_service
30
+ # @return [Array<CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange>]
31
+ attr_reader :updates
29
32
  # @return [OpenStruct] Additional properties unmapped to the current class definition
30
33
  attr_reader :additional_properties
31
34
  # @return [Object]
@@ -42,9 +45,10 @@ module CandidApiClient
42
45
  # @param ehr_source_url [String]
43
46
  # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
44
47
  # This date must be the local date in the timezone where the service occurred.
48
+ # @param updates [Array<CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange>]
45
49
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
46
50
  # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapture]
47
- def initialize(id:, status:, charge_capture_data:, patient_external_id:, charge_external_id:,
51
+ def initialize(id:, status:, charge_capture_data:, patient_external_id:, charge_external_id:, updates:,
48
52
  ehr_source_url: OMIT, date_of_service: OMIT, additional_properties: nil)
49
53
  @id = id
50
54
  @status = status
@@ -53,6 +57,7 @@ module CandidApiClient
53
57
  @charge_external_id = charge_external_id
54
58
  @ehr_source_url = ehr_source_url if ehr_source_url != OMIT
55
59
  @date_of_service = date_of_service if date_of_service != OMIT
60
+ @updates = updates
56
61
  @additional_properties = additional_properties
57
62
  @_field_set = {
58
63
  "id": id,
@@ -61,7 +66,8 @@ module CandidApiClient
61
66
  "patient_external_id": patient_external_id,
62
67
  "charge_external_id": charge_external_id,
63
68
  "ehr_source_url": ehr_source_url,
64
- "date_of_service": date_of_service
69
+ "date_of_service": date_of_service,
70
+ "updates": updates
65
71
  }.reject do |_k, v|
66
72
  v == OMIT
67
73
  end
@@ -86,6 +92,10 @@ module CandidApiClient
86
92
  charge_external_id = struct["charge_external_id"]
87
93
  ehr_source_url = struct["ehr_source_url"]
88
94
  date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
95
+ updates = parsed_json["updates"]&.map do |item|
96
+ item = item.to_json
97
+ CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange.from_json(json_object: item)
98
+ end
89
99
  new(
90
100
  id: id,
91
101
  status: status,
@@ -94,6 +104,7 @@ module CandidApiClient
94
104
  charge_external_id: charge_external_id,
95
105
  ehr_source_url: ehr_source_url,
96
106
  date_of_service: date_of_service,
107
+ updates: updates,
97
108
  additional_properties: struct
98
109
  )
99
110
  end
@@ -119,6 +130,7 @@ module CandidApiClient
119
130
  obj.charge_external_id.is_a?(String) != false || raise("Passed value for field obj.charge_external_id is not the expected type, validation failed.")
120
131
  obj.ehr_source_url&.is_a?(String) != false || raise("Passed value for field obj.ehr_source_url is not the expected type, validation failed.")
121
132
  obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
133
+ obj.updates.is_a?(Array) != false || raise("Passed value for field obj.updates is not the expected type, validation failed.")
122
134
  end
123
135
  end
124
136
  end
@@ -123,6 +123,8 @@ module CandidApiClient
123
123
  attr_reader :subscriber_primary
124
124
  # @return [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the secondary insurance subscriber.
125
125
  attr_reader :subscriber_secondary
126
+ # @return [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the tertiary insurance subscriber.
127
+ attr_reader :subscriber_tertiary
126
128
  # @return [String] Defines additional information on the claim needed by the payer.
127
129
  # Box 19 on the CMS-1500 claim form.
128
130
  attr_reader :additional_information
@@ -301,6 +303,7 @@ module CandidApiClient
301
303
  # end_date_of_service will update all service line date_of_service values.
302
304
  # @param subscriber_primary [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the primary insurance subscriber.
303
305
  # @param subscriber_secondary [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the secondary insurance subscriber.
306
+ # @param subscriber_tertiary [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the tertiary insurance subscriber.
304
307
  # @param additional_information [String] Defines additional information on the claim needed by the payer.
305
308
  # Box 19 on the CMS-1500 claim form.
306
309
  # @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
@@ -388,7 +391,7 @@ module CandidApiClient
388
391
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
389
392
  # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData]
390
393
  def initialize(diagnoses: OMIT, interventions: OMIT, external_claim_submission: OMIT, service_lines: OMIT,
391
- patient_histories: OMIT, billing_notes: OMIT, benefits_assigned_to_provider: OMIT, prior_authorization_number: OMIT, external_id: OMIT, date_of_service: OMIT, tag_ids: OMIT, clinical_notes: OMIT, pay_to_address: OMIT, billable_status: OMIT, responsible_party: OMIT, provider_accepts_assignment: OMIT, synchronicity: OMIT, place_of_service_code: OMIT, appointment_type: OMIT, end_date_of_service: OMIT, subscriber_primary: OMIT, subscriber_secondary: 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, patient: OMIT, patient_authorized_release: OMIT, schema_instances: OMIT, vitals: OMIT, existing_medications: OMIT, rendering_provider: OMIT, service_facility: OMIT, guarantor: OMIT, billing_provider: OMIT, supervising_provider: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, additional_properties: nil)
394
+ patient_histories: OMIT, billing_notes: OMIT, benefits_assigned_to_provider: OMIT, prior_authorization_number: OMIT, external_id: OMIT, date_of_service: OMIT, tag_ids: OMIT, clinical_notes: OMIT, pay_to_address: OMIT, billable_status: OMIT, responsible_party: OMIT, provider_accepts_assignment: OMIT, synchronicity: OMIT, place_of_service_code: OMIT, appointment_type: OMIT, end_date_of_service: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, subscriber_tertiary: 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, patient: OMIT, patient_authorized_release: OMIT, schema_instances: OMIT, vitals: OMIT, existing_medications: OMIT, rendering_provider: OMIT, service_facility: OMIT, guarantor: OMIT, billing_provider: OMIT, supervising_provider: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, additional_properties: nil)
392
395
  @diagnoses = diagnoses if diagnoses != OMIT
393
396
  @interventions = interventions if interventions != OMIT
394
397
  @external_claim_submission = external_claim_submission if external_claim_submission != OMIT
@@ -411,6 +414,7 @@ module CandidApiClient
411
414
  @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
412
415
  @subscriber_primary = subscriber_primary if subscriber_primary != OMIT
413
416
  @subscriber_secondary = subscriber_secondary if subscriber_secondary != OMIT
417
+ @subscriber_tertiary = subscriber_tertiary if subscriber_tertiary != OMIT
414
418
  @additional_information = additional_information if additional_information != OMIT
415
419
  if service_authorization_exception_code != OMIT
416
420
  @service_authorization_exception_code = service_authorization_exception_code
@@ -461,6 +465,7 @@ module CandidApiClient
461
465
  "end_date_of_service": end_date_of_service,
462
466
  "subscriber_primary": subscriber_primary,
463
467
  "subscriber_secondary": subscriber_secondary,
468
+ "subscriber_tertiary": subscriber_tertiary,
464
469
  "additional_information": additional_information,
465
470
  "service_authorization_exception_code": service_authorization_exception_code,
466
471
  "admission_date": admission_date,
@@ -557,6 +562,12 @@ module CandidApiClient
557
562
  subscriber_secondary = parsed_json["subscriber_secondary"].to_json
558
563
  subscriber_secondary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_secondary)
559
564
  end
565
+ if parsed_json["subscriber_tertiary"].nil?
566
+ subscriber_tertiary = nil
567
+ else
568
+ subscriber_tertiary = parsed_json["subscriber_tertiary"].to_json
569
+ subscriber_tertiary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_tertiary)
570
+ end
560
571
  additional_information = struct["additional_information"]
561
572
  service_authorization_exception_code = struct["service_authorization_exception_code"]
562
573
  admission_date = (Date.parse(parsed_json["admission_date"]) unless parsed_json["admission_date"].nil?)
@@ -665,6 +676,7 @@ module CandidApiClient
665
676
  end_date_of_service: end_date_of_service,
666
677
  subscriber_primary: subscriber_primary,
667
678
  subscriber_secondary: subscriber_secondary,
679
+ subscriber_tertiary: subscriber_tertiary,
668
680
  additional_information: additional_information,
669
681
  service_authorization_exception_code: service_authorization_exception_code,
670
682
  admission_date: admission_date,
@@ -727,6 +739,7 @@ module CandidApiClient
727
739
  obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
728
740
  obj.subscriber_primary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_primary)
729
741
  obj.subscriber_secondary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_secondary)
742
+ obj.subscriber_tertiary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_tertiary)
730
743
  obj.additional_information&.is_a?(String) != false || raise("Passed value for field obj.additional_information is not the expected type, validation failed.")
731
744
  obj.service_authorization_exception_code&.is_a?(CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode) != false || raise("Passed value for field obj.service_authorization_exception_code is not the expected type, validation failed.")
732
745
  obj.admission_date&.is_a?(Date) != false || raise("Passed value for field obj.admission_date is not the expected type, validation failed.")
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module CandidApiClient
7
+ module ChargeCapture
8
+ module V1
9
+ module Types
10
+ # ChargeCapturePostBilledChange represents a change to a ChargeCapture that
11
+ # occurred after the ChargeCapture's status moved to BILLED. Action must be taken
12
+ # to resolve the update, and then the update should be marked as resolved.
13
+ class ChargeCapturePostBilledChange
14
+ # @return [String]
15
+ attr_reader :id
16
+ # @return [String]
17
+ attr_reader :message
18
+ # @return [Boolean]
19
+ attr_reader :resolved
20
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
21
+ attr_reader :additional_properties
22
+ # @return [Object]
23
+ attr_reader :_field_set
24
+ protected :_field_set
25
+
26
+ OMIT = Object.new
27
+
28
+ # @param id [String]
29
+ # @param message [String]
30
+ # @param resolved [Boolean]
31
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
32
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange]
33
+ def initialize(id:, message:, resolved:, additional_properties: nil)
34
+ @id = id
35
+ @message = message
36
+ @resolved = resolved
37
+ @additional_properties = additional_properties
38
+ @_field_set = { "id": id, "message": message, "resolved": resolved }
39
+ end
40
+
41
+ # Deserialize a JSON object to an instance of ChargeCapturePostBilledChange
42
+ #
43
+ # @param json_object [String]
44
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange]
45
+ def self.from_json(json_object:)
46
+ struct = JSON.parse(json_object, object_class: OpenStruct)
47
+ id = struct["id"]
48
+ message = struct["message"]
49
+ resolved = struct["resolved"]
50
+ new(
51
+ id: id,
52
+ message: message,
53
+ resolved: resolved,
54
+ additional_properties: struct
55
+ )
56
+ end
57
+
58
+ # Serialize an instance of ChargeCapturePostBilledChange to a JSON object
59
+ #
60
+ # @return [String]
61
+ def to_json(*_args)
62
+ @_field_set&.to_json
63
+ end
64
+
65
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
66
+ # hash and check each fields type against the current object's property
67
+ # definitions.
68
+ #
69
+ # @param obj [Object]
70
+ # @return [Void]
71
+ def self.validate_raw(obj:)
72
+ obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
73
+ obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
74
+ obj.resolved.is_a?(Boolean) != false || raise("Passed value for field obj.resolved is not the expected type, validation failed.")
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module ChargeCapture
5
+ module V1
6
+ module Types
7
+ class ChargeCaptureSortField
8
+ CREATED_AT = "created_at"
9
+ DATE_OF_SERVICE = "date_of_service"
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -2,6 +2,8 @@
2
2
 
3
3
  require_relative "../../../requests"
4
4
  require_relative "types/charge_capture_bundle"
5
+ require_relative "types/charge_capture_bundle_sort_field"
6
+ require_relative "../../commons/types/sort_direction"
5
7
  require_relative "types/charge_capture_bundle_status"
6
8
  require_relative "../../charge_capture/v_1/types/charge_capture_status"
7
9
  require "date"
@@ -64,6 +66,8 @@ module CandidApiClient
64
66
  end
65
67
 
66
68
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
69
+ # @param sort [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleSortField] Defaults to created_at
70
+ # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Sort direction. Defaults to descending order if not provided.
67
71
  # @param page_token [String]
68
72
  # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
69
73
  # @param bundle_status [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleStatus] the status of the charge capture bundle, refers to whether it was able to create
@@ -74,21 +78,27 @@ module CandidApiClient
74
78
  # This field should not contain PHI.
75
79
  # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
76
80
  # This date must be the local date in the timezone where the service occurred.
81
+ # @param has_charge_capture_updates [Boolean] If true, only return bundles that have charge captures that have been updated
82
+ # since the bundle has had a status of BILLED. See the updates property on
83
+ # ChargeCapture for more details.
77
84
  # @param request_options [CandidApiClient::RequestOptions]
78
85
  # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundlePage]
79
86
  # @example
80
87
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
81
88
  # api.charge_capture_bundles.v_1.get_all(
82
89
  # limit: 1,
90
+ # sort: CREATED_AT,
91
+ # sort_direction: ASC,
83
92
  # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
84
93
  # patient_external_id: "string",
85
94
  # bundle_status: IN_PROGRESS,
86
95
  # charge_status: PLANNED,
87
96
  # charge_external_id: "string",
88
- # date_of_service: DateTime.parse(2023-01-15)
97
+ # date_of_service: DateTime.parse(2023-01-15),
98
+ # has_charge_capture_updates: true
89
99
  # )
90
- def get_all(limit: nil, page_token: nil, patient_external_id: nil, bundle_status: nil, charge_status: nil,
91
- charge_external_id: nil, date_of_service: nil, request_options: nil)
100
+ def get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil,
101
+ bundle_status: nil, charge_status: nil, charge_external_id: nil, date_of_service: nil, has_charge_capture_updates: nil, request_options: nil)
92
102
  response = @request_client.conn.get do |req|
93
103
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
94
104
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -100,12 +110,15 @@ module CandidApiClient
100
110
  req.params = {
101
111
  **(request_options&.additional_query_parameters || {}),
102
112
  "limit": limit,
113
+ "sort": sort,
114
+ "sort_direction": sort_direction,
103
115
  "page_token": page_token,
104
116
  "patient_external_id": patient_external_id,
105
117
  "bundle_status": bundle_status,
106
118
  "charge_status": charge_status,
107
119
  "charge_external_id": charge_external_id,
108
- "date_of_service": date_of_service
120
+ "date_of_service": date_of_service,
121
+ "has_charge_capture_updates": has_charge_capture_updates
109
122
  }.compact
110
123
  req.url "#{@request_client.get_url(environment: CandidApi,
111
124
  request_options: request_options)}/api/charge_capture_bundle/v1"
@@ -171,6 +184,8 @@ module CandidApiClient
171
184
  end
172
185
 
173
186
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
187
+ # @param sort [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleSortField] Defaults to created_at
188
+ # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Sort direction. Defaults to descending order if not provided.
174
189
  # @param page_token [String]
175
190
  # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
176
191
  # @param bundle_status [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleStatus] the status of the charge capture bundle, refers to whether it was able to create
@@ -181,21 +196,27 @@ module CandidApiClient
181
196
  # This field should not contain PHI.
182
197
  # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
183
198
  # This date must be the local date in the timezone where the service occurred.
199
+ # @param has_charge_capture_updates [Boolean] If true, only return bundles that have charge captures that have been updated
200
+ # since the bundle has had a status of BILLED. See the updates property on
201
+ # ChargeCapture for more details.
184
202
  # @param request_options [CandidApiClient::RequestOptions]
185
203
  # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundlePage]
186
204
  # @example
187
205
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
188
206
  # api.charge_capture_bundles.v_1.get_all(
189
207
  # limit: 1,
208
+ # sort: CREATED_AT,
209
+ # sort_direction: ASC,
190
210
  # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
191
211
  # patient_external_id: "string",
192
212
  # bundle_status: IN_PROGRESS,
193
213
  # charge_status: PLANNED,
194
214
  # charge_external_id: "string",
195
- # date_of_service: DateTime.parse(2023-01-15)
215
+ # date_of_service: DateTime.parse(2023-01-15),
216
+ # has_charge_capture_updates: true
196
217
  # )
197
- def get_all(limit: nil, page_token: nil, patient_external_id: nil, bundle_status: nil, charge_status: nil,
198
- charge_external_id: nil, date_of_service: nil, request_options: nil)
218
+ def get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil,
219
+ bundle_status: nil, charge_status: nil, charge_external_id: nil, date_of_service: nil, has_charge_capture_updates: nil, request_options: nil)
199
220
  Async do
200
221
  response = @request_client.conn.get do |req|
201
222
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -208,12 +229,15 @@ module CandidApiClient
208
229
  req.params = {
209
230
  **(request_options&.additional_query_parameters || {}),
210
231
  "limit": limit,
232
+ "sort": sort,
233
+ "sort_direction": sort_direction,
211
234
  "page_token": page_token,
212
235
  "patient_external_id": patient_external_id,
213
236
  "bundle_status": bundle_status,
214
237
  "charge_status": charge_status,
215
238
  "charge_external_id": charge_external_id,
216
- "date_of_service": date_of_service
239
+ "date_of_service": date_of_service,
240
+ "has_charge_capture_updates": has_charge_capture_updates
217
241
  }.compact
218
242
  req.url "#{@request_client.get_url(environment: CandidApi,
219
243
  request_options: request_options)}/api/charge_capture_bundle/v1"
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module ChargeCaptureBundles
5
+ module V1
6
+ module Types
7
+ class ChargeCaptureBundleSortField
8
+ CREATED_AT = "created_at"
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -449,6 +449,33 @@ module CandidApiClient
449
449
  # * :first_name (String)
450
450
  # * :last_name (String)
451
451
  # * :gender (CandidApiClient::Individual::Types::Gender)
452
+ # @param subscriber_tertiary [Hash] Please always include this when you have it, even for self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
453
+ # * :insurance_card (Hash)
454
+ # * :member_id (String)
455
+ # * :payer_name (String)
456
+ # * :payer_id (String)
457
+ # * :rx_bin (String)
458
+ # * :rx_pcn (String)
459
+ # * :image_url_front (String)
460
+ # * :image_url_back (String)
461
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
462
+ # * :group_number (String)
463
+ # * :plan_name (String)
464
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
465
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
466
+ # * :payer_plan_group_id (String)
467
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
468
+ # * :date_of_birth (Date)
469
+ # * :address (Hash)
470
+ # * :zip_plus_four_code (String)
471
+ # * :address_1 (String)
472
+ # * :address_2 (String)
473
+ # * :city (String)
474
+ # * :state (CandidApiClient::Commons::Types::State)
475
+ # * :zip_code (String)
476
+ # * :first_name (String)
477
+ # * :last_name (String)
478
+ # * :gender (CandidApiClient::Individual::Types::Gender)
452
479
  # @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
453
480
  # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
454
481
  # @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
@@ -563,6 +590,7 @@ module CandidApiClient
563
590
  # service_facility: { organization_name: "string", npi: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, secondary_identification: "string" },
564
591
  # subscriber_primary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string", rx_bin: "string", rx_pcn: "string", image_url_front: "string", image_url_back: "string", emr_payer_crosswalk: HEALTHIE, group_number: "string", plan_name: "string", plan_type: SELF_PAY, insurance_type: C_01, payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, patient_relationship_to_subscriber_code: SPOUSE, 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 },
565
592
  # subscriber_secondary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string", rx_bin: "string", rx_pcn: "string", image_url_front: "string", image_url_back: "string", emr_payer_crosswalk: HEALTHIE, group_number: "string", plan_name: "string", plan_type: SELF_PAY, insurance_type: C_01, payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, patient_relationship_to_subscriber_code: SPOUSE, 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 },
593
+ # subscriber_tertiary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string", rx_bin: "string", rx_pcn: "string", image_url_front: "string", image_url_back: "string", emr_payer_crosswalk: HEALTHIE, group_number: "string", plan_name: "string", plan_type: SELF_PAY, insurance_type: C_01, payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, patient_relationship_to_subscriber_code: SPOUSE, 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 },
566
594
  # prior_authorization_number: "string",
567
595
  # responsible_party: INSURANCE_PAY,
568
596
  # diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
@@ -580,7 +608,7 @@ module CandidApiClient
580
608
  # claim_supplemental_information: [{ attachment_report_type_code: C_03, attachment_transmission_code: CBM }]
581
609
  # )
582
610
  def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
583
- provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, referral_number: nil, epsdt_referral: nil, claim_supplemental_information: nil, request_options: nil)
611
+ 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, subscriber_tertiary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, referral_number: nil, epsdt_referral: nil, claim_supplemental_information: nil, request_options: nil)
584
612
  response = @request_client.conn.post do |req|
585
613
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
586
614
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -622,6 +650,7 @@ module CandidApiClient
622
650
  service_facility: service_facility,
623
651
  subscriber_primary: subscriber_primary,
624
652
  subscriber_secondary: subscriber_secondary,
653
+ subscriber_tertiary: subscriber_tertiary,
625
654
  prior_authorization_number: prior_authorization_number,
626
655
  responsible_party: responsible_party,
627
656
  diagnoses: diagnoses,
@@ -908,6 +937,33 @@ module CandidApiClient
908
937
  # * :first_name (String)
909
938
  # * :last_name (String)
910
939
  # * :gender (CandidApiClient::Individual::Types::Gender)
940
+ # @param subscriber_tertiary [Hash] Contains details of the tertiary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
941
+ # * :insurance_card (Hash)
942
+ # * :member_id (String)
943
+ # * :payer_name (String)
944
+ # * :payer_id (String)
945
+ # * :rx_bin (String)
946
+ # * :rx_pcn (String)
947
+ # * :image_url_front (String)
948
+ # * :image_url_back (String)
949
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
950
+ # * :group_number (String)
951
+ # * :plan_name (String)
952
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
953
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
954
+ # * :payer_plan_group_id (String)
955
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
956
+ # * :date_of_birth (Date)
957
+ # * :address (Hash)
958
+ # * :zip_plus_four_code (String)
959
+ # * :address_1 (String)
960
+ # * :address_2 (String)
961
+ # * :city (String)
962
+ # * :state (CandidApiClient::Commons::Types::State)
963
+ # * :zip_code (String)
964
+ # * :first_name (String)
965
+ # * :last_name (String)
966
+ # * :gender (CandidApiClient::Individual::Types::Gender)
911
967
  # @param additional_information [String] Defines additional information on the claim needed by the payer.
912
968
  # Box 19 on the CMS-1500 claim form.
913
969
  # @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
@@ -1139,7 +1195,7 @@ module CandidApiClient
1139
1195
  # place_of_service_code_as_submitted: PHARMACY
1140
1196
  # )
1141
1197
  def update(encounter_id:, benefits_assigned_to_provider: nil, prior_authorization_number: nil,
1142
- external_id: nil, date_of_service: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, synchronicity: nil, place_of_service_code: 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, epsdt_referral: nil, claim_supplemental_information: nil, additional_properties: nil, _field_set: nil, diagnosis_ids: nil, place_of_service_code_as_submitted: nil, request_options: nil)
1198
+ external_id: nil, date_of_service: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, subscriber_tertiary: 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, epsdt_referral: nil, claim_supplemental_information: nil, additional_properties: nil, _field_set: nil, diagnosis_ids: nil, place_of_service_code_as_submitted: nil, request_options: nil)
1143
1199
  response = @request_client.conn.patch do |req|
1144
1200
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1145
1201
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -1166,6 +1222,7 @@ module CandidApiClient
1166
1222
  end_date_of_service: end_date_of_service,
1167
1223
  subscriber_primary: subscriber_primary,
1168
1224
  subscriber_secondary: subscriber_secondary,
1225
+ subscriber_tertiary: subscriber_tertiary,
1169
1226
  additional_information: additional_information,
1170
1227
  service_authorization_exception_code: service_authorization_exception_code,
1171
1228
  admission_date: admission_date,
@@ -1602,6 +1659,33 @@ module CandidApiClient
1602
1659
  # * :first_name (String)
1603
1660
  # * :last_name (String)
1604
1661
  # * :gender (CandidApiClient::Individual::Types::Gender)
1662
+ # @param subscriber_tertiary [Hash] Please always include this when you have it, even for self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
1663
+ # * :insurance_card (Hash)
1664
+ # * :member_id (String)
1665
+ # * :payer_name (String)
1666
+ # * :payer_id (String)
1667
+ # * :rx_bin (String)
1668
+ # * :rx_pcn (String)
1669
+ # * :image_url_front (String)
1670
+ # * :image_url_back (String)
1671
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1672
+ # * :group_number (String)
1673
+ # * :plan_name (String)
1674
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1675
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1676
+ # * :payer_plan_group_id (String)
1677
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1678
+ # * :date_of_birth (Date)
1679
+ # * :address (Hash)
1680
+ # * :zip_plus_four_code (String)
1681
+ # * :address_1 (String)
1682
+ # * :address_2 (String)
1683
+ # * :city (String)
1684
+ # * :state (CandidApiClient::Commons::Types::State)
1685
+ # * :zip_code (String)
1686
+ # * :first_name (String)
1687
+ # * :last_name (String)
1688
+ # * :gender (CandidApiClient::Individual::Types::Gender)
1605
1689
  # @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
1606
1690
  # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
1607
1691
  # @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
@@ -1716,6 +1800,7 @@ module CandidApiClient
1716
1800
  # service_facility: { organization_name: "string", npi: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, secondary_identification: "string" },
1717
1801
  # subscriber_primary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string", rx_bin: "string", rx_pcn: "string", image_url_front: "string", image_url_back: "string", emr_payer_crosswalk: HEALTHIE, group_number: "string", plan_name: "string", plan_type: SELF_PAY, insurance_type: C_01, payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, patient_relationship_to_subscriber_code: SPOUSE, 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 },
1718
1802
  # subscriber_secondary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string", rx_bin: "string", rx_pcn: "string", image_url_front: "string", image_url_back: "string", emr_payer_crosswalk: HEALTHIE, group_number: "string", plan_name: "string", plan_type: SELF_PAY, insurance_type: C_01, payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, patient_relationship_to_subscriber_code: SPOUSE, 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 },
1803
+ # subscriber_tertiary: { insurance_card: { member_id: "string", payer_name: "string", payer_id: "string", rx_bin: "string", rx_pcn: "string", image_url_front: "string", image_url_back: "string", emr_payer_crosswalk: HEALTHIE, group_number: "string", plan_name: "string", plan_type: SELF_PAY, insurance_type: C_01, payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, patient_relationship_to_subscriber_code: SPOUSE, 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 },
1719
1804
  # prior_authorization_number: "string",
1720
1805
  # responsible_party: INSURANCE_PAY,
1721
1806
  # diagnoses: [{ name: "string", code_type: ABF, code: "string" }],
@@ -1733,7 +1818,7 @@ module CandidApiClient
1733
1818
  # claim_supplemental_information: [{ attachment_report_type_code: C_03, attachment_transmission_code: CBM }]
1734
1819
  # )
1735
1820
  def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
1736
- provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, referral_number: nil, epsdt_referral: nil, claim_supplemental_information: nil, request_options: nil)
1821
+ 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, subscriber_tertiary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, referral_number: nil, epsdt_referral: nil, claim_supplemental_information: nil, request_options: nil)
1737
1822
  Async do
1738
1823
  response = @request_client.conn.post do |req|
1739
1824
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -1776,6 +1861,7 @@ module CandidApiClient
1776
1861
  service_facility: service_facility,
1777
1862
  subscriber_primary: subscriber_primary,
1778
1863
  subscriber_secondary: subscriber_secondary,
1864
+ subscriber_tertiary: subscriber_tertiary,
1779
1865
  prior_authorization_number: prior_authorization_number,
1780
1866
  responsible_party: responsible_party,
1781
1867
  diagnoses: diagnoses,
@@ -2065,6 +2151,33 @@ module CandidApiClient
2065
2151
  # * :first_name (String)
2066
2152
  # * :last_name (String)
2067
2153
  # * :gender (CandidApiClient::Individual::Types::Gender)
2154
+ # @param subscriber_tertiary [Hash] Contains details of the tertiary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
2155
+ # * :insurance_card (Hash)
2156
+ # * :member_id (String)
2157
+ # * :payer_name (String)
2158
+ # * :payer_id (String)
2159
+ # * :rx_bin (String)
2160
+ # * :rx_pcn (String)
2161
+ # * :image_url_front (String)
2162
+ # * :image_url_back (String)
2163
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
2164
+ # * :group_number (String)
2165
+ # * :plan_name (String)
2166
+ # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
2167
+ # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
2168
+ # * :payer_plan_group_id (String)
2169
+ # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
2170
+ # * :date_of_birth (Date)
2171
+ # * :address (Hash)
2172
+ # * :zip_plus_four_code (String)
2173
+ # * :address_1 (String)
2174
+ # * :address_2 (String)
2175
+ # * :city (String)
2176
+ # * :state (CandidApiClient::Commons::Types::State)
2177
+ # * :zip_code (String)
2178
+ # * :first_name (String)
2179
+ # * :last_name (String)
2180
+ # * :gender (CandidApiClient::Individual::Types::Gender)
2068
2181
  # @param additional_information [String] Defines additional information on the claim needed by the payer.
2069
2182
  # Box 19 on the CMS-1500 claim form.
2070
2183
  # @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
@@ -2296,7 +2409,7 @@ module CandidApiClient
2296
2409
  # place_of_service_code_as_submitted: PHARMACY
2297
2410
  # )
2298
2411
  def update(encounter_id:, benefits_assigned_to_provider: nil, prior_authorization_number: nil,
2299
- external_id: nil, date_of_service: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, synchronicity: nil, place_of_service_code: 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, epsdt_referral: nil, claim_supplemental_information: nil, additional_properties: nil, _field_set: nil, diagnosis_ids: nil, place_of_service_code_as_submitted: nil, request_options: nil)
2412
+ external_id: nil, date_of_service: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, subscriber_tertiary: 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, epsdt_referral: nil, claim_supplemental_information: nil, additional_properties: nil, _field_set: nil, diagnosis_ids: nil, place_of_service_code_as_submitted: nil, request_options: nil)
2300
2413
  Async do
2301
2414
  response = @request_client.conn.patch do |req|
2302
2415
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -2324,6 +2437,7 @@ module CandidApiClient
2324
2437
  end_date_of_service: end_date_of_service,
2325
2438
  subscriber_primary: subscriber_primary,
2326
2439
  subscriber_secondary: subscriber_secondary,
2440
+ subscriber_tertiary: subscriber_tertiary,
2327
2441
  additional_information: additional_information,
2328
2442
  service_authorization_exception_code: service_authorization_exception_code,
2329
2443
  admission_date: admission_date,
@@ -94,6 +94,8 @@ module CandidApiClient
94
94
  attr_reader :subscriber_primary
95
95
  # @return [CandidApiClient::Individual::Types::Subscriber] Contains details of the secondary insurance subscriber.
96
96
  attr_reader :subscriber_secondary
97
+ # @return [CandidApiClient::Individual::Types::Subscriber] Contains details of the tertiary insurance subscriber.
98
+ attr_reader :subscriber_tertiary
97
99
  # @return [String] Box 23 on the CMS-1500 claim form.
98
100
  attr_reader :prior_authorization_number
99
101
  # @return [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
@@ -299,6 +301,7 @@ module CandidApiClient
299
301
  # Note: Cash Pay is no longer a valid payer_id in v4, please use responsible party
300
302
  # to define self-pay claims.
301
303
  # @param subscriber_secondary [CandidApiClient::Individual::Types::Subscriber] Contains details of the secondary insurance subscriber.
304
+ # @param subscriber_tertiary [CandidApiClient::Individual::Types::Subscriber] Contains details of the tertiary insurance subscriber.
302
305
  # @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
303
306
  # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
304
307
  # @param url [String] URL that links directly to the claim created in Candid.
@@ -413,7 +416,7 @@ module CandidApiClient
413
416
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
414
417
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
415
418
  def initialize(encounter_id:, claims:, patient:, billing_provider:, rendering_provider:, service_facility:,
416
- responsible_party:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, schema_instances:, created_at:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, patient_control_number: OMIT, guarantor: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, prior_authorization_number: OMIT, billing_notes: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, coding_attribution: OMIT, work_queue_id: OMIT, work_queue_membership_activated_at: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, last_submitted_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)
419
+ responsible_party:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, schema_instances:, created_at:, 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, subscriber_tertiary: OMIT, prior_authorization_number: OMIT, billing_notes: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, coding_attribution: OMIT, work_queue_id: OMIT, work_queue_membership_activated_at: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, last_submitted_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)
417
420
  @patient_control_number = patient_control_number if patient_control_number != OMIT
418
421
  @encounter_id = encounter_id
419
422
  @claims = claims
@@ -427,6 +430,7 @@ module CandidApiClient
427
430
  @service_facility = service_facility
428
431
  @subscriber_primary = subscriber_primary if subscriber_primary != OMIT
429
432
  @subscriber_secondary = subscriber_secondary if subscriber_secondary != OMIT
433
+ @subscriber_tertiary = subscriber_tertiary if subscriber_tertiary != OMIT
430
434
  @prior_authorization_number = prior_authorization_number if prior_authorization_number != OMIT
431
435
  @responsible_party = responsible_party
432
436
  @url = url
@@ -492,6 +496,7 @@ module CandidApiClient
492
496
  "service_facility": service_facility,
493
497
  "subscriber_primary": subscriber_primary,
494
498
  "subscriber_secondary": subscriber_secondary,
499
+ "subscriber_tertiary": subscriber_tertiary,
495
500
  "prior_authorization_number": prior_authorization_number,
496
501
  "responsible_party": responsible_party,
497
502
  "url": url,
@@ -612,6 +617,12 @@ module CandidApiClient
612
617
  subscriber_secondary = parsed_json["subscriber_secondary"].to_json
613
618
  subscriber_secondary = CandidApiClient::Individual::Types::Subscriber.from_json(json_object: subscriber_secondary)
614
619
  end
620
+ if parsed_json["subscriber_tertiary"].nil?
621
+ subscriber_tertiary = nil
622
+ else
623
+ subscriber_tertiary = parsed_json["subscriber_tertiary"].to_json
624
+ subscriber_tertiary = CandidApiClient::Individual::Types::Subscriber.from_json(json_object: subscriber_tertiary)
625
+ end
615
626
  prior_authorization_number = struct["prior_authorization_number"]
616
627
  responsible_party = struct["responsible_party"]
617
628
  url = struct["url"]
@@ -723,6 +734,7 @@ module CandidApiClient
723
734
  service_facility: service_facility,
724
735
  subscriber_primary: subscriber_primary,
725
736
  subscriber_secondary: subscriber_secondary,
737
+ subscriber_tertiary: subscriber_tertiary,
726
738
  prior_authorization_number: prior_authorization_number,
727
739
  responsible_party: responsible_party,
728
740
  url: url,
@@ -796,6 +808,7 @@ module CandidApiClient
796
808
  CandidApiClient::ServiceFacility::Types::EncounterServiceFacility.validate_raw(obj: obj.service_facility)
797
809
  obj.subscriber_primary.nil? || CandidApiClient::Individual::Types::Subscriber.validate_raw(obj: obj.subscriber_primary)
798
810
  obj.subscriber_secondary.nil? || CandidApiClient::Individual::Types::Subscriber.validate_raw(obj: obj.subscriber_secondary)
811
+ obj.subscriber_tertiary.nil? || CandidApiClient::Individual::Types::Subscriber.validate_raw(obj: obj.subscriber_tertiary)
799
812
  obj.prior_authorization_number&.is_a?(String) != false || raise("Passed value for field obj.prior_authorization_number is not the expected type, validation failed.")
800
813
  obj.responsible_party.is_a?(CandidApiClient::Encounters::V4::Types::ResponsiblePartyType) != false || raise("Passed value for field obj.responsible_party is not the expected type, validation failed.")
801
814
  obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
@@ -95,6 +95,8 @@ module CandidApiClient
95
95
  attr_reader :subscriber_primary
96
96
  # @return [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the secondary insurance subscriber.
97
97
  attr_reader :subscriber_secondary
98
+ # @return [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the tertiary insurance subscriber.
99
+ attr_reader :subscriber_tertiary
98
100
  # @return [String] Defines additional information on the claim needed by the payer.
99
101
  # Box 19 on the CMS-1500 claim form.
100
102
  attr_reader :additional_information
@@ -257,6 +259,7 @@ module CandidApiClient
257
259
  # end_date_of_service will update all service line date_of_service values.
258
260
  # @param subscriber_primary [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the primary insurance subscriber.
259
261
  # @param subscriber_secondary [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the secondary insurance subscriber.
262
+ # @param subscriber_tertiary [CandidApiClient::Individual::Types::SubscriberCreate] Contains details of the tertiary insurance subscriber.
260
263
  # @param additional_information [String] Defines additional information on the claim needed by the payer.
261
264
  # Box 19 on the CMS-1500 claim form.
262
265
  # @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
@@ -344,7 +347,7 @@ module CandidApiClient
344
347
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
345
348
  # @return [CandidApiClient::Encounters::V4::Types::EncounterOptional]
346
349
  def initialize(benefits_assigned_to_provider: OMIT, prior_authorization_number: OMIT, external_id: OMIT,
347
- date_of_service: OMIT, tag_ids: OMIT, clinical_notes: OMIT, pay_to_address: OMIT, billable_status: OMIT, responsible_party: OMIT, provider_accepts_assignment: OMIT, synchronicity: OMIT, place_of_service_code: OMIT, appointment_type: OMIT, end_date_of_service: OMIT, subscriber_primary: OMIT, subscriber_secondary: 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, patient: OMIT, patient_authorized_release: OMIT, schema_instances: OMIT, vitals: OMIT, existing_medications: OMIT, rendering_provider: OMIT, service_facility: OMIT, guarantor: OMIT, billing_provider: OMIT, supervising_provider: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, additional_properties: nil)
350
+ date_of_service: OMIT, tag_ids: OMIT, clinical_notes: OMIT, pay_to_address: OMIT, billable_status: OMIT, responsible_party: OMIT, provider_accepts_assignment: OMIT, synchronicity: OMIT, place_of_service_code: OMIT, appointment_type: OMIT, end_date_of_service: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, subscriber_tertiary: 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, patient: OMIT, patient_authorized_release: OMIT, schema_instances: OMIT, vitals: OMIT, existing_medications: OMIT, rendering_provider: OMIT, service_facility: OMIT, guarantor: OMIT, billing_provider: OMIT, supervising_provider: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, additional_properties: nil)
348
351
  @benefits_assigned_to_provider = benefits_assigned_to_provider if benefits_assigned_to_provider != OMIT
349
352
  @prior_authorization_number = prior_authorization_number if prior_authorization_number != OMIT
350
353
  @external_id = external_id if external_id != OMIT
@@ -361,6 +364,7 @@ module CandidApiClient
361
364
  @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
362
365
  @subscriber_primary = subscriber_primary if subscriber_primary != OMIT
363
366
  @subscriber_secondary = subscriber_secondary if subscriber_secondary != OMIT
367
+ @subscriber_tertiary = subscriber_tertiary if subscriber_tertiary != OMIT
364
368
  @additional_information = additional_information if additional_information != OMIT
365
369
  if service_authorization_exception_code != OMIT
366
370
  @service_authorization_exception_code = service_authorization_exception_code
@@ -405,6 +409,7 @@ module CandidApiClient
405
409
  "end_date_of_service": end_date_of_service,
406
410
  "subscriber_primary": subscriber_primary,
407
411
  "subscriber_secondary": subscriber_secondary,
412
+ "subscriber_tertiary": subscriber_tertiary,
408
413
  "additional_information": additional_information,
409
414
  "service_authorization_exception_code": service_authorization_exception_code,
410
415
  "admission_date": admission_date,
@@ -475,6 +480,12 @@ module CandidApiClient
475
480
  subscriber_secondary = parsed_json["subscriber_secondary"].to_json
476
481
  subscriber_secondary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_secondary)
477
482
  end
483
+ if parsed_json["subscriber_tertiary"].nil?
484
+ subscriber_tertiary = nil
485
+ else
486
+ subscriber_tertiary = parsed_json["subscriber_tertiary"].to_json
487
+ subscriber_tertiary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_tertiary)
488
+ end
478
489
  additional_information = struct["additional_information"]
479
490
  service_authorization_exception_code = struct["service_authorization_exception_code"]
480
491
  admission_date = (Date.parse(parsed_json["admission_date"]) unless parsed_json["admission_date"].nil?)
@@ -577,6 +588,7 @@ module CandidApiClient
577
588
  end_date_of_service: end_date_of_service,
578
589
  subscriber_primary: subscriber_primary,
579
590
  subscriber_secondary: subscriber_secondary,
591
+ subscriber_tertiary: subscriber_tertiary,
580
592
  additional_information: additional_information,
581
593
  service_authorization_exception_code: service_authorization_exception_code,
582
594
  admission_date: admission_date,
@@ -633,6 +645,7 @@ module CandidApiClient
633
645
  obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
634
646
  obj.subscriber_primary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_primary)
635
647
  obj.subscriber_secondary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_secondary)
648
+ obj.subscriber_tertiary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_tertiary)
636
649
  obj.additional_information&.is_a?(String) != false || raise("Passed value for field obj.additional_information is not the expected type, validation failed.")
637
650
  obj.service_authorization_exception_code&.is_a?(CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode) != false || raise("Passed value for field obj.service_authorization_exception_code is not the expected type, validation failed.")
638
651
  obj.admission_date&.is_a?(Date) != false || raise("Passed value for field obj.admission_date is not the expected type, validation failed.")
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "period"
3
4
  require_relative "canonical_clinical_trial_association"
4
5
  require "ostruct"
5
6
  require "json"
@@ -13,6 +14,8 @@ module CandidApiClient
13
14
  attr_reader :id
14
15
  # @return [String]
15
16
  attr_reader :member_id
17
+ # @return [CandidApiClient::PreEncounter::Common::Types::Period]
18
+ attr_reader :period
16
19
  # @return [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalClinicalTrialAssociation>] A patient cannot be associated with a given trial more than once
17
20
  attr_reader :clinical_trial_info
18
21
  # @return [OpenStruct] Additional properties unmapped to the current class definition
@@ -25,17 +28,20 @@ module CandidApiClient
25
28
 
26
29
  # @param id [String]
27
30
  # @param member_id [String]
31
+ # @param period [CandidApiClient::PreEncounter::Common::Types::Period]
28
32
  # @param clinical_trial_info [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalClinicalTrialAssociation>] A patient cannot be associated with a given trial more than once
29
33
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
34
  # @return [CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation]
31
- def initialize(id:, member_id: OMIT, clinical_trial_info: OMIT, additional_properties: nil)
35
+ def initialize(id:, member_id: OMIT, period: OMIT, clinical_trial_info: OMIT, additional_properties: nil)
32
36
  @id = id
33
37
  @member_id = member_id if member_id != OMIT
38
+ @period = period if period != OMIT
34
39
  @clinical_trial_info = clinical_trial_info if clinical_trial_info != OMIT
35
40
  @additional_properties = additional_properties
36
41
  @_field_set = {
37
42
  "id": id,
38
43
  "member_id": member_id,
44
+ "period": period,
39
45
  "clinical_trial_info": clinical_trial_info
40
46
  }.reject do |_k, v|
41
47
  v == OMIT
@@ -52,6 +58,12 @@ module CandidApiClient
52
58
  parsed_json = JSON.parse(json_object)
53
59
  id = struct["id"]
54
60
  member_id = struct["member_id"]
61
+ if parsed_json["period"].nil?
62
+ period = nil
63
+ else
64
+ period = parsed_json["period"].to_json
65
+ period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
66
+ end
55
67
  clinical_trial_info = parsed_json["clinical_trial_info"]&.map do |item|
56
68
  item = item.to_json
57
69
  CandidApiClient::PreEncounter::Common::Types::CanonicalClinicalTrialAssociation.from_json(json_object: item)
@@ -59,6 +71,7 @@ module CandidApiClient
59
71
  new(
60
72
  id: id,
61
73
  member_id: member_id,
74
+ period: period,
62
75
  clinical_trial_info: clinical_trial_info,
63
76
  additional_properties: struct
64
77
  )
@@ -80,6 +93,7 @@ module CandidApiClient
80
93
  def self.validate_raw(obj:)
81
94
  obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
82
95
  obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
96
+ obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
83
97
  obj.clinical_trial_info&.is_a?(Array) != false || raise("Passed value for field obj.clinical_trial_info is not the expected type, validation failed.")
84
98
  end
85
99
  end
@@ -7,6 +7,7 @@ module CandidApiClient
7
7
  module Types
8
8
  class AuthorizationUnit
9
9
  VISIT = "VISIT"
10
+ UNIT = "UNIT"
10
11
  end
11
12
  end
12
13
  end
@@ -14,6 +14,7 @@ module CandidApiClient
14
14
  COLLECTION_AGENCY = "COLLECTION_AGENCY"
15
15
  OTHER = "OTHER"
16
16
  UNKNOWN = "UNKNOWN"
17
+ UNCOLLECTIBLE_OR_NON_BILLABLE = "UNCOLLECTIBLE_OR_NON_BILLABLE"
17
18
  end
18
19
  end
19
20
  end
data/lib/requests.rb CHANGED
@@ -43,7 +43,7 @@ module CandidApiClient
43
43
 
44
44
  # @return [Hash{String => String}]
45
45
  def get_headers
46
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.40.0" }
46
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.40.2" }
47
47
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
48
48
  headers
49
49
  end
@@ -87,7 +87,7 @@ module CandidApiClient
87
87
 
88
88
  # @return [Hash{String => String}]
89
89
  def get_headers
90
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.40.0" }
90
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.40.2" }
91
91
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
92
92
  headers
93
93
  end
data/lib/types_export.rb CHANGED
@@ -8,10 +8,13 @@ require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_b
8
8
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle"
9
9
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_bundle_error"
10
10
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_status"
11
+ require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_sort_field"
11
12
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture_page"
12
13
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture"
13
14
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture_data"
15
+ require_relative "candidhealth/charge_capture/v_1/types/charge_capture_sort_field"
14
16
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture_status"
17
+ require_relative "candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change"
15
18
  require_relative "candidhealth/claim_submission/v_1/types/claim_frequency_type_code"
16
19
  require_relative "candidhealth/claim_submission/v_1/types/external_claim_submission_create"
17
20
  require_relative "candidhealth/claim_submission/v_1/types/claim_submission_record_create"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: candidhealth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.40.0
4
+ version: 0.40.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-24 00:00:00.000000000 Z
11
+ date: 2025-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http-faraday
@@ -110,12 +110,15 @@ files:
110
110
  - lib/candidhealth/charge_capture/v_1/types/charge_capture.rb
111
111
  - lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb
112
112
  - lib/candidhealth/charge_capture/v_1/types/charge_capture_page.rb
113
+ - lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb
114
+ - lib/candidhealth/charge_capture/v_1/types/charge_capture_sort_field.rb
113
115
  - lib/candidhealth/charge_capture/v_1/types/charge_capture_status.rb
114
116
  - lib/candidhealth/charge_capture_bundles/client.rb
115
117
  - lib/candidhealth/charge_capture_bundles/v_1/client.rb
116
118
  - lib/candidhealth/charge_capture_bundles/v_1/types/charge_bundle_error.rb
117
119
  - lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle.rb
118
120
  - lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_page.rb
121
+ - lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_sort_field.rb
119
122
  - lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_status.rb
120
123
  - lib/candidhealth/claim_submission/v_1/types/claim_frequency_type_code.rb
121
124
  - lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create.rb