candidhealth 0.43.1 → 0.46.0

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/billing_notes/v_2/client.rb +2 -2
  3. data/lib/candidhealth/charge_capture/v_1/client.rb +479 -559
  4. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +200 -190
  5. data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +2 -44
  6. data/lib/candidhealth/commons/types/street_address_optional_base.rb +99 -0
  7. data/lib/candidhealth/commons/types/street_address_short_zip_optional.rb +107 -0
  8. data/lib/candidhealth/contracts/v_2/client.rb +18 -34
  9. data/lib/candidhealth/contracts/v_2/types/contract_sort_field.rb +18 -0
  10. data/lib/candidhealth/credentialing/v_2/client.rb +6 -44
  11. data/lib/candidhealth/diagnoses/client.rb +4 -14
  12. data/lib/candidhealth/eligibility/v_2/client.rb +4 -4
  13. data/lib/candidhealth/encounter_attachments/v_1/client.rb +0 -6
  14. data/lib/candidhealth/encounter_providers/v_2/client.rb +16 -16
  15. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +160 -0
  16. data/lib/candidhealth/encounter_providers/v_2/types/initial_referring_provider_update_with_optional_address.rb +134 -0
  17. data/lib/candidhealth/encounter_providers/v_2/types/referring_provider_update_with_optional_address.rb +125 -0
  18. data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider_update_with_optional_address.rb +125 -0
  19. data/lib/candidhealth/encounter_providers/v_2/types/supervising_provider_update_with_optional_address.rb +125 -0
  20. data/lib/candidhealth/encounters/v_4/client.rb +259 -293
  21. data/lib/candidhealth/encounters/v_4/types/encounter.rb +23 -13
  22. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +10 -10
  23. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +10 -10
  24. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +26 -184
  25. data/lib/candidhealth/expected_network_status/v_1/client.rb +12 -18
  26. data/lib/candidhealth/expected_network_status/v_2/client.rb +4 -4
  27. data/lib/candidhealth/expected_network_status/v_2/types/empty_object.rb +53 -0
  28. data/lib/candidhealth/expected_network_status/v_2/types/insurance_type_codes.rb +13 -10
  29. data/lib/candidhealth/external_payment_account_config/v_1/client.rb +2 -2
  30. data/lib/candidhealth/fee_schedules/v_3/client.rb +12 -68
  31. data/lib/candidhealth/fee_schedules/v_3/types/payer_threshold.rb +3 -3
  32. data/lib/candidhealth/fee_schedules/v_3/types/rate_entry.rb +2 -2
  33. data/lib/candidhealth/guarantor/v_1/client.rb +4 -4
  34. data/lib/candidhealth/import_invoice/v_1/client.rb +6 -28
  35. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +179 -0
  36. data/lib/candidhealth/insurance_adjudications/v_1/client.rb +2 -2
  37. data/lib/candidhealth/insurance_payments/v_1/client.rb +2 -20
  38. data/lib/candidhealth/insurance_refunds/v_1/client.rb +6 -24
  39. data/lib/candidhealth/medication_dispense/v_1/client.rb +2 -2
  40. data/lib/candidhealth/non_insurance_payer_payments/v_1/client.rb +6 -22
  41. data/lib/candidhealth/non_insurance_payer_refunds/v_1/client.rb +6 -22
  42. data/lib/candidhealth/non_insurance_payers/v_1/client.rb +6 -22
  43. data/lib/candidhealth/organization_providers/v_3/client.rb +4 -4
  44. data/lib/candidhealth/organization_service_facilities/v_2/client.rb +2 -2
  45. data/lib/candidhealth/patient_payments/v_4/client.rb +8 -38
  46. data/lib/candidhealth/patient_refunds/v_1/client.rb +8 -40
  47. data/lib/candidhealth/payer_plan_groups/v_1/client.rb +6 -30
  48. data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +32 -44
  49. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +4 -4
  50. data/lib/candidhealth/pre_encounter/common/types/base_model.rb +4 -4
  51. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +24 -34
  52. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +4 -4
  53. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +2 -2
  54. data/lib/candidhealth/pre_encounter/images/v_1/client.rb +20 -20
  55. data/lib/candidhealth/pre_encounter/images/v_1/types/image.rb +6 -6
  56. data/lib/candidhealth/pre_encounter/lists/v_1/client.rb +4 -28
  57. data/lib/candidhealth/pre_encounter/notes/v_1/client.rb +14 -14
  58. data/lib/candidhealth/pre_encounter/notes/v_1/types/note.rb +4 -4
  59. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +56 -68
  60. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +8 -8
  61. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +8 -8
  62. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +16 -16
  63. data/lib/candidhealth/pre_encounter/tags/v_1/client.rb +16 -16
  64. data/lib/candidhealth/pre_encounter/tags/v_1/types/tag.rb +4 -4
  65. data/lib/candidhealth/service_facility/client.rb +2 -2
  66. data/lib/candidhealth/service_facility/types/encounter_service_facility_update_with_optional_address.rb +113 -0
  67. data/lib/candidhealth/service_lines/v_2/client.rb +4 -4
  68. data/lib/candidhealth/superbills/v_1/client.rb +4 -6
  69. data/lib/candidhealth/tasks/v_3/client.rb +6 -34
  70. data/lib/candidhealth/write_offs/v_1/client.rb +2 -24
  71. data/lib/environment.rb +4 -0
  72. data/lib/requests.rb +2 -2
  73. data/lib/types_export.rb +11 -1
  74. metadata +13 -3
  75. data/lib/candidhealth/billing_notes/v_2/types/billing_note_optional.rb +0 -112
@@ -110,28 +110,7 @@ module CandidApiClient
110
110
  # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreationPage]
111
111
  # @example
112
112
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
113
- # api.charge_capture_bundles.v_1.get_all(
114
- # limit: 1,
115
- # sort: CREATED_AT,
116
- # sort_direction: ASC,
117
- # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
118
- # patient_external_id: "string",
119
- # claim_creation_status: NOT_STARTED,
120
- # charge_status: PLANNED,
121
- # charge_external_id: "string",
122
- # date_of_service_min: DateTime.parse(2023-01-15),
123
- # date_of_service_max: DateTime.parse(2023-01-15),
124
- # claim_ids: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
125
- # claim_creation_ids: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
126
- # billing_provider_npis: "string",
127
- # service_facility_name: "string",
128
- # primary_payer_ids: "string",
129
- # rendering_provider_npis: "string",
130
- # rendering_provider_names: "string",
131
- # supervising_provider_npis: "string",
132
- # supervising_provider_names: "string",
133
- # has_charge_capture_updates: true
134
- # )
113
+ # api.charge_capture_bundles.v_1.get_all
135
114
  def get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil,
136
115
  claim_creation_status: nil, charge_status: nil, charge_external_id: nil, date_of_service_min: nil, date_of_service_max: nil, claim_ids: nil, claim_creation_ids: nil, billing_provider_npis: nil, service_facility_name: nil, primary_payer_ids: nil, rendering_provider_npis: nil, rendering_provider_names: nil, supervising_provider_npis: nil, supervising_provider_names: nil, has_charge_capture_updates: nil, request_options: nil)
137
116
  response = @request_client.conn.get do |req|
@@ -272,28 +251,7 @@ module CandidApiClient
272
251
  # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreationPage]
273
252
  # @example
274
253
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
275
- # api.charge_capture_bundles.v_1.get_all(
276
- # limit: 1,
277
- # sort: CREATED_AT,
278
- # sort_direction: ASC,
279
- # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
280
- # patient_external_id: "string",
281
- # claim_creation_status: NOT_STARTED,
282
- # charge_status: PLANNED,
283
- # charge_external_id: "string",
284
- # date_of_service_min: DateTime.parse(2023-01-15),
285
- # date_of_service_max: DateTime.parse(2023-01-15),
286
- # claim_ids: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
287
- # claim_creation_ids: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
288
- # billing_provider_npis: "string",
289
- # service_facility_name: "string",
290
- # primary_payer_ids: "string",
291
- # rendering_provider_npis: "string",
292
- # rendering_provider_names: "string",
293
- # supervising_provider_npis: "string",
294
- # supervising_provider_names: "string",
295
- # has_charge_capture_updates: true
296
- # )
254
+ # api.charge_capture_bundles.v_1.get_all
297
255
  def get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil,
298
256
  claim_creation_status: nil, charge_status: nil, charge_external_id: nil, date_of_service_min: nil, date_of_service_max: nil, claim_ids: nil, claim_creation_ids: nil, billing_provider_npis: nil, service_facility_name: nil, primary_payer_ids: nil, rendering_provider_npis: nil, rendering_provider_names: nil, supervising_provider_npis: nil, supervising_provider_names: nil, has_charge_capture_updates: nil, request_options: nil)
299
257
  Async do
@@ -0,0 +1,99 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "state"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module Commons
9
+ module Types
10
+ class StreetAddressOptionalBase
11
+ # @return [String]
12
+ attr_reader :address_1
13
+ # @return [String]
14
+ attr_reader :address_2
15
+ # @return [String]
16
+ attr_reader :city
17
+ # @return [CandidApiClient::Commons::Types::State]
18
+ attr_reader :state
19
+ # @return [String] 5-digit zip code
20
+ attr_reader :zip_code
21
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
22
+ attr_reader :additional_properties
23
+ # @return [Object]
24
+ attr_reader :_field_set
25
+ protected :_field_set
26
+
27
+ OMIT = Object.new
28
+
29
+ # @param address_1 [String]
30
+ # @param address_2 [String]
31
+ # @param city [String]
32
+ # @param state [CandidApiClient::Commons::Types::State]
33
+ # @param zip_code [String] 5-digit zip code
34
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
35
+ # @return [CandidApiClient::Commons::Types::StreetAddressOptionalBase]
36
+ def initialize(address_1: OMIT, address_2: OMIT, city: OMIT, state: OMIT, zip_code: OMIT,
37
+ additional_properties: nil)
38
+ @address_1 = address_1 if address_1 != OMIT
39
+ @address_2 = address_2 if address_2 != OMIT
40
+ @city = city if city != OMIT
41
+ @state = state if state != OMIT
42
+ @zip_code = zip_code if zip_code != OMIT
43
+ @additional_properties = additional_properties
44
+ @_field_set = {
45
+ "address1": address_1,
46
+ "address2": address_2,
47
+ "city": city,
48
+ "state": state,
49
+ "zip_code": zip_code
50
+ }.reject do |_k, v|
51
+ v == OMIT
52
+ end
53
+ end
54
+
55
+ # Deserialize a JSON object to an instance of StreetAddressOptionalBase
56
+ #
57
+ # @param json_object [String]
58
+ # @return [CandidApiClient::Commons::Types::StreetAddressOptionalBase]
59
+ def self.from_json(json_object:)
60
+ struct = JSON.parse(json_object, object_class: OpenStruct)
61
+ address_1 = struct["address1"]
62
+ address_2 = struct["address2"]
63
+ city = struct["city"]
64
+ state = struct["state"]
65
+ zip_code = struct["zip_code"]
66
+ new(
67
+ address_1: address_1,
68
+ address_2: address_2,
69
+ city: city,
70
+ state: state,
71
+ zip_code: zip_code,
72
+ additional_properties: struct
73
+ )
74
+ end
75
+
76
+ # Serialize an instance of StreetAddressOptionalBase to a JSON object
77
+ #
78
+ # @return [String]
79
+ def to_json(*_args)
80
+ @_field_set&.to_json
81
+ end
82
+
83
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
84
+ # hash and check each fields type against the current object's property
85
+ # definitions.
86
+ #
87
+ # @param obj [Object]
88
+ # @return [Void]
89
+ def self.validate_raw(obj:)
90
+ obj.address_1&.is_a?(String) != false || raise("Passed value for field obj.address_1 is not the expected type, validation failed.")
91
+ obj.address_2&.is_a?(String) != false || raise("Passed value for field obj.address_2 is not the expected type, validation failed.")
92
+ obj.city&.is_a?(String) != false || raise("Passed value for field obj.city is not the expected type, validation failed.")
93
+ obj.state&.is_a?(CandidApiClient::Commons::Types::State) != false || raise("Passed value for field obj.state is not the expected type, validation failed.")
94
+ obj.zip_code&.is_a?(String) != false || raise("Passed value for field obj.zip_code is not the expected type, validation failed.")
95
+ end
96
+ end
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "state"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module Commons
9
+ module Types
10
+ class StreetAddressShortZipOptional
11
+ # @return [String] 4-digit zip add-on code https://en.wikipedia.org/wiki/ZIP_Code#ZIP+4
12
+ attr_reader :zip_plus_four_code
13
+ # @return [String]
14
+ attr_reader :address_1
15
+ # @return [String]
16
+ attr_reader :address_2
17
+ # @return [String]
18
+ attr_reader :city
19
+ # @return [CandidApiClient::Commons::Types::State]
20
+ attr_reader :state
21
+ # @return [String] 5-digit zip code
22
+ attr_reader :zip_code
23
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
24
+ attr_reader :additional_properties
25
+ # @return [Object]
26
+ attr_reader :_field_set
27
+ protected :_field_set
28
+
29
+ OMIT = Object.new
30
+
31
+ # @param zip_plus_four_code [String] 4-digit zip add-on code https://en.wikipedia.org/wiki/ZIP_Code#ZIP+4
32
+ # @param address_1 [String]
33
+ # @param address_2 [String]
34
+ # @param city [String]
35
+ # @param state [CandidApiClient::Commons::Types::State]
36
+ # @param zip_code [String] 5-digit zip code
37
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
38
+ # @return [CandidApiClient::Commons::Types::StreetAddressShortZipOptional]
39
+ def initialize(zip_plus_four_code: OMIT, address_1: OMIT, address_2: OMIT, city: OMIT, state: OMIT,
40
+ zip_code: OMIT, additional_properties: nil)
41
+ @zip_plus_four_code = zip_plus_four_code if zip_plus_four_code != OMIT
42
+ @address_1 = address_1 if address_1 != OMIT
43
+ @address_2 = address_2 if address_2 != OMIT
44
+ @city = city if city != OMIT
45
+ @state = state if state != OMIT
46
+ @zip_code = zip_code if zip_code != OMIT
47
+ @additional_properties = additional_properties
48
+ @_field_set = {
49
+ "zip_plus_four_code": zip_plus_four_code,
50
+ "address1": address_1,
51
+ "address2": address_2,
52
+ "city": city,
53
+ "state": state,
54
+ "zip_code": zip_code
55
+ }.reject do |_k, v|
56
+ v == OMIT
57
+ end
58
+ end
59
+
60
+ # Deserialize a JSON object to an instance of StreetAddressShortZipOptional
61
+ #
62
+ # @param json_object [String]
63
+ # @return [CandidApiClient::Commons::Types::StreetAddressShortZipOptional]
64
+ def self.from_json(json_object:)
65
+ struct = JSON.parse(json_object, object_class: OpenStruct)
66
+ zip_plus_four_code = struct["zip_plus_four_code"]
67
+ address_1 = struct["address1"]
68
+ address_2 = struct["address2"]
69
+ city = struct["city"]
70
+ state = struct["state"]
71
+ zip_code = struct["zip_code"]
72
+ new(
73
+ zip_plus_four_code: zip_plus_four_code,
74
+ address_1: address_1,
75
+ address_2: address_2,
76
+ city: city,
77
+ state: state,
78
+ zip_code: zip_code,
79
+ additional_properties: struct
80
+ )
81
+ end
82
+
83
+ # Serialize an instance of StreetAddressShortZipOptional to a JSON object
84
+ #
85
+ # @return [String]
86
+ def to_json(*_args)
87
+ @_field_set&.to_json
88
+ end
89
+
90
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
91
+ # hash and check each fields type against the current object's property
92
+ # definitions.
93
+ #
94
+ # @param obj [Object]
95
+ # @return [Void]
96
+ def self.validate_raw(obj:)
97
+ obj.zip_plus_four_code&.is_a?(String) != false || raise("Passed value for field obj.zip_plus_four_code is not the expected type, validation failed.")
98
+ obj.address_1&.is_a?(String) != false || raise("Passed value for field obj.address_1 is not the expected type, validation failed.")
99
+ obj.address_2&.is_a?(String) != false || raise("Passed value for field obj.address_2 is not the expected type, validation failed.")
100
+ obj.city&.is_a?(String) != false || raise("Passed value for field obj.city is not the expected type, validation failed.")
101
+ obj.state&.is_a?(CandidApiClient::Commons::Types::State) != false || raise("Passed value for field obj.state is not the expected type, validation failed.")
102
+ obj.zip_code&.is_a?(String) != false || raise("Passed value for field obj.zip_code is not the expected type, validation failed.")
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
@@ -4,6 +4,8 @@ require_relative "../../../requests"
4
4
  require_relative "types/contract_with_providers"
5
5
  require_relative "../../commons/types/state"
6
6
  require_relative "types/contract_status"
7
+ require_relative "types/contract_sort_field"
8
+ require_relative "../../commons/types/sort_direction"
7
9
  require_relative "types/contracts_page"
8
10
  require_relative "../../commons/types/regions"
9
11
  require_relative "types/authorized_signatory"
@@ -56,21 +58,15 @@ module CandidApiClient
56
58
  # @param payer_names [String] Filter to contracts that include any of the included payer names.
57
59
  # @param states [CandidApiClient::Commons::Types::State]
58
60
  # @param contract_status [CandidApiClient::Contracts::V2::Types::ContractStatus] The status of the contract. Defaults to `pending`
61
+ # @param sort [CandidApiClient::Contracts::V2::Types::ContractSortField] Potentially sort by a contract related attribute. Defaults to created_at
62
+ # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Direction of sort, defaulting to desc
59
63
  # @param request_options [CandidApiClient::RequestOptions]
60
64
  # @return [CandidApiClient::Contracts::V2::Types::ContractsPage]
61
65
  # @example
62
66
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
63
- # api.contracts.v_2.get_multi(
64
- # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
65
- # limit: 1,
66
- # contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
67
- # rendering_provider_ids: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
68
- # payer_names: "string",
69
- # states: AA,
70
- # contract_status: PENDING
71
- # )
67
+ # api.contracts.v_2.get_multi
72
68
  def get_multi(page_token: nil, limit: nil, contracting_provider_id: nil, rendering_provider_ids: nil,
73
- payer_names: nil, states: nil, contract_status: nil, request_options: nil)
69
+ payer_names: nil, states: nil, contract_status: nil, sort: nil, sort_direction: nil, request_options: nil)
74
70
  response = @request_client.conn.get do |req|
75
71
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
76
72
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -87,7 +83,9 @@ module CandidApiClient
87
83
  "rendering_provider_ids": rendering_provider_ids,
88
84
  "payer_names": payer_names,
89
85
  "states": states,
90
- "contract_status": contract_status
86
+ "contract_status": contract_status,
87
+ "sort": sort,
88
+ "sort_direction": sort_direction
91
89
  }.compact
92
90
  req.url "#{@request_client.get_url(environment: CandidApi,
93
91
  request_options: request_options)}/api/contracts/v2"
@@ -197,12 +195,7 @@ module CandidApiClient
197
195
  # @return [CandidApiClient::Contracts::V2::Types::ContractWithProviders]
198
196
  # @example
199
197
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
200
- # api.contracts.v_2.update(
201
- # contract_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
202
- # rendering_provider_ids: Set["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"],
203
- # effective_date: "string",
204
- # contract_status: PENDING
205
- # )
198
+ # api.contracts.v_2.update(contract_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
206
199
  def update(contract_id:, rendering_provider_ids: nil, effective_date: nil, expiration_date: nil, regions: nil,
207
200
  contract_status: nil, authorized_signatory: nil, commercial_insurance_types: nil, medicare_insurance_types: nil, medicaid_insurance_types: nil, request_options: nil)
208
201
  response = @request_client.conn.patch do |req|
@@ -272,21 +265,15 @@ module CandidApiClient
272
265
  # @param payer_names [String] Filter to contracts that include any of the included payer names.
273
266
  # @param states [CandidApiClient::Commons::Types::State]
274
267
  # @param contract_status [CandidApiClient::Contracts::V2::Types::ContractStatus] The status of the contract. Defaults to `pending`
268
+ # @param sort [CandidApiClient::Contracts::V2::Types::ContractSortField] Potentially sort by a contract related attribute. Defaults to created_at
269
+ # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Direction of sort, defaulting to desc
275
270
  # @param request_options [CandidApiClient::RequestOptions]
276
271
  # @return [CandidApiClient::Contracts::V2::Types::ContractsPage]
277
272
  # @example
278
273
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
279
- # api.contracts.v_2.get_multi(
280
- # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
281
- # limit: 1,
282
- # contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
283
- # rendering_provider_ids: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
284
- # payer_names: "string",
285
- # states: AA,
286
- # contract_status: PENDING
287
- # )
274
+ # api.contracts.v_2.get_multi
288
275
  def get_multi(page_token: nil, limit: nil, contracting_provider_id: nil, rendering_provider_ids: nil,
289
- payer_names: nil, states: nil, contract_status: nil, request_options: nil)
276
+ payer_names: nil, states: nil, contract_status: nil, sort: nil, sort_direction: nil, request_options: nil)
290
277
  Async do
291
278
  response = @request_client.conn.get do |req|
292
279
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -304,7 +291,9 @@ module CandidApiClient
304
291
  "rendering_provider_ids": rendering_provider_ids,
305
292
  "payer_names": payer_names,
306
293
  "states": states,
307
- "contract_status": contract_status
294
+ "contract_status": contract_status,
295
+ "sort": sort,
296
+ "sort_direction": sort_direction
308
297
  }.compact
309
298
  req.url "#{@request_client.get_url(environment: CandidApi,
310
299
  request_options: request_options)}/api/contracts/v2"
@@ -419,12 +408,7 @@ module CandidApiClient
419
408
  # @return [CandidApiClient::Contracts::V2::Types::ContractWithProviders]
420
409
  # @example
421
410
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
422
- # api.contracts.v_2.update(
423
- # contract_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
424
- # rendering_provider_ids: Set["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"],
425
- # effective_date: "string",
426
- # contract_status: PENDING
427
- # )
411
+ # api.contracts.v_2.update(contract_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
428
412
  def update(contract_id:, rendering_provider_ids: nil, effective_date: nil, expiration_date: nil, regions: nil,
429
413
  contract_status: nil, authorized_signatory: nil, commercial_insurance_types: nil, medicare_insurance_types: nil, medicaid_insurance_types: nil, request_options: nil)
430
414
  Async do
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module Contracts
5
+ module V2
6
+ module Types
7
+ class ContractSortField
8
+ CREATED_AT = "created_at"
9
+ PAYER_NAME = "payer_name"
10
+ PAYER_ID = "payer_id"
11
+ BILLING_PROVIDER_NAME = "billing_provider_name"
12
+ EFFECTIVE_DATE = "effective_date"
13
+ CONTRACT_STATUS = "contract_status"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -37,11 +37,7 @@ module CandidApiClient
37
37
  # api.credentialing.v_2.create(
38
38
  # rendering_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
39
39
  # contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
40
- # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
41
- # start_date: DateTime.parse(2023-01-15),
42
- # end_date: DateTime.parse(2023-01-15),
43
- # submitted_date: DateTime.parse(2023-01-15),
44
- # payer_loaded_date: DateTime.parse(2023-01-15)
40
+ # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
45
41
  # )
46
42
  def create(rendering_provider_id:, contracting_provider_id:, payer_uuid:, regions:, start_date: nil,
47
43
  end_date: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
@@ -104,14 +100,7 @@ module CandidApiClient
104
100
  # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage]
105
101
  # @example
106
102
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
107
- # api.credentialing.v_2.get_all(
108
- # limit: 1,
109
- # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
110
- # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
111
- # provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
112
- # as_rendering_provider: true,
113
- # as_contracting_provider: true
114
- # )
103
+ # api.credentialing.v_2.get_all
115
104
  def get_all(limit: nil, page_token: nil, payer_uuid: nil, provider_id: nil, as_rendering_provider: nil,
116
105
  as_contracting_provider: nil, request_options: nil)
117
106
  response = @request_client.conn.get do |req|
@@ -173,15 +162,7 @@ module CandidApiClient
173
162
  # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan]
174
163
  # @example
175
164
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
176
- # api.credentialing.v_2.update(
177
- # provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
178
- # contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
179
- # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
180
- # start_date: DateTime.parse(2023-01-15),
181
- # end_date: DateTime.parse(2023-01-15),
182
- # submitted_date: DateTime.parse(2023-01-15),
183
- # payer_loaded_date: DateTime.parse(2023-01-15)
184
- # )
165
+ # api.credentialing.v_2.update(provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
185
166
  def update(provider_credentialing_id:, contracting_provider_id: nil, payer_uuid: nil, start_date: nil,
186
167
  end_date: nil, regions: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
187
168
  response = @request_client.conn.patch do |req|
@@ -236,11 +217,7 @@ module CandidApiClient
236
217
  # api.credentialing.v_2.create(
237
218
  # rendering_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
238
219
  # contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
239
- # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
240
- # start_date: DateTime.parse(2023-01-15),
241
- # end_date: DateTime.parse(2023-01-15),
242
- # submitted_date: DateTime.parse(2023-01-15),
243
- # payer_loaded_date: DateTime.parse(2023-01-15)
220
+ # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
244
221
  # )
245
222
  def create(rendering_provider_id:, contracting_provider_id:, payer_uuid:, regions:, start_date: nil,
246
223
  end_date: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
@@ -307,14 +284,7 @@ module CandidApiClient
307
284
  # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage]
308
285
  # @example
309
286
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
310
- # api.credentialing.v_2.get_all(
311
- # limit: 1,
312
- # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
313
- # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
314
- # provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
315
- # as_rendering_provider: true,
316
- # as_contracting_provider: true
317
- # )
287
+ # api.credentialing.v_2.get_all
318
288
  def get_all(limit: nil, page_token: nil, payer_uuid: nil, provider_id: nil, as_rendering_provider: nil,
319
289
  as_contracting_provider: nil, request_options: nil)
320
290
  Async do
@@ -380,15 +350,7 @@ module CandidApiClient
380
350
  # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan]
381
351
  # @example
382
352
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
383
- # api.credentialing.v_2.update(
384
- # provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
385
- # contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
386
- # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
387
- # start_date: DateTime.parse(2023-01-15),
388
- # end_date: DateTime.parse(2023-01-15),
389
- # submitted_date: DateTime.parse(2023-01-15),
390
- # payer_loaded_date: DateTime.parse(2023-01-15)
391
- # )
353
+ # api.credentialing.v_2.update(provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
392
354
  def update(provider_credentialing_id:, contracting_provider_id: nil, payer_uuid: nil, start_date: nil,
393
355
  end_date: nil, regions: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
394
356
  Async do
@@ -28,7 +28,7 @@ module CandidApiClient
28
28
  # @return [CandidApiClient::Diagnoses::Types::Diagnosis]
29
29
  # @example
30
30
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
31
- # api.diagnoses.create(request: { encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", name: "string", code_type: ABF, code: "string" })
31
+ # api.diagnoses.create(request: { code_type: ABF, code: "code", encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" })
32
32
  def create(request:, request_options: nil)
33
33
  response = @request_client.conn.post do |req|
34
34
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -66,12 +66,7 @@ module CandidApiClient
66
66
  # @return [CandidApiClient::Diagnoses::Types::Diagnosis]
67
67
  # @example
68
68
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
69
- # api.diagnoses.update(
70
- # diagnosis_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
71
- # name: "string",
72
- # code_type: ABF,
73
- # code: "string"
74
- # )
69
+ # api.diagnoses.update(diagnosis_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
75
70
  def update(diagnosis_id:, name: nil, code_type: nil, code: nil, request_options: nil)
76
71
  response = @request_client.conn.patch do |req|
77
72
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -137,7 +132,7 @@ module CandidApiClient
137
132
  # @return [CandidApiClient::Diagnoses::Types::Diagnosis]
138
133
  # @example
139
134
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
140
- # api.diagnoses.create(request: { encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", name: "string", code_type: ABF, code: "string" })
135
+ # api.diagnoses.create(request: { code_type: ABF, code: "code", encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" })
141
136
  def create(request:, request_options: nil)
142
137
  Async do
143
138
  response = @request_client.conn.post do |req|
@@ -178,12 +173,7 @@ module CandidApiClient
178
173
  # @return [CandidApiClient::Diagnoses::Types::Diagnosis]
179
174
  # @example
180
175
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
181
- # api.diagnoses.update(
182
- # diagnosis_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
183
- # name: "string",
184
- # code_type: ABF,
185
- # code: "string"
186
- # )
176
+ # api.diagnoses.update(diagnosis_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
187
177
  def update(diagnosis_id:, name: nil, code_type: nil, code: nil, request_options: nil)
188
178
  Async do
189
179
  response = @request_client.conn.patch do |req|
@@ -97,7 +97,7 @@ module CandidApiClient
97
97
  # th.com/hc/en-us/articles/24218441631892--Availity-Eligibility-Integration-Guide)
98
98
  # A schema of the response object can be found here: [Availity
99
99
  # tner/product/191210/api/190898#/Coverages_100/operation/%2Fcoverages%2F{id}/get)
100
- # - Note Availity requires a free developer account to access this documentation.
100
+ # * Note Availity requires a free developer account to access this documentation.
101
101
  # Check connection status of Availity API and partners here:
102
102
  # - [Availity Trading Partner Connection Status](https://www.availity.com/status/)
103
103
  #
@@ -139,7 +139,7 @@ module CandidApiClient
139
139
  # th.com/hc/en-us/articles/24218441631892--Availity-Eligibility-Integration-Guide)
140
140
  # A schema of the response object can be found here: [Availity
141
141
  # tner/product/191210/api/190898#/Coverages_100/operation/%2Fcoverages%2F{id}/get)
142
- # - Note Availity requires a free developer account to access this documentation.
142
+ # * Note Availity requires a free developer account to access this documentation.
143
143
  # Check connection status of Availity API and partners here:
144
144
  # - [Availity Trading Partner Connection Status](https://www.availity.com/status/)
145
145
  #
@@ -259,7 +259,7 @@ module CandidApiClient
259
259
  # th.com/hc/en-us/articles/24218441631892--Availity-Eligibility-Integration-Guide)
260
260
  # A schema of the response object can be found here: [Availity
261
261
  # tner/product/191210/api/190898#/Coverages_100/operation/%2Fcoverages%2F{id}/get)
262
- # - Note Availity requires a free developer account to access this documentation.
262
+ # * Note Availity requires a free developer account to access this documentation.
263
263
  # Check connection status of Availity API and partners here:
264
264
  # - [Availity Trading Partner Connection Status](https://www.availity.com/status/)
265
265
  #
@@ -304,7 +304,7 @@ module CandidApiClient
304
304
  # th.com/hc/en-us/articles/24218441631892--Availity-Eligibility-Integration-Guide)
305
305
  # A schema of the response object can be found here: [Availity
306
306
  # tner/product/191210/api/190898#/Coverages_100/operation/%2Fcoverages%2F{id}/get)
307
- # - Note Availity requires a free developer account to access this documentation.
307
+ # * Note Availity requires a free developer account to access this documentation.
308
308
  # Check connection status of Availity API and partners here:
309
309
  # - [Availity Trading Partner Connection Status](https://www.availity.com/status/)
310
310
  #
@@ -53,9 +53,6 @@ module CandidApiClient
53
53
  # @param attachment_type [CandidApiClient::EncounterAttachments::V1::Types::EncounterAttachmentType]
54
54
  # @param request_options [CandidApiClient::RequestOptions]
55
55
  # @return [String]
56
- # @example
57
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
58
- # api.encounter_attachments.v_1.create(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", attachment_file: my_file.txt)
59
56
  def create(encounter_id:, attachment_file:, attachment_type:, request_options: nil)
60
57
  response = @request_client.conn.put do |req|
61
58
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -144,9 +141,6 @@ module CandidApiClient
144
141
  # @param attachment_type [CandidApiClient::EncounterAttachments::V1::Types::EncounterAttachmentType]
145
142
  # @param request_options [CandidApiClient::RequestOptions]
146
143
  # @return [String]
147
- # @example
148
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
149
- # api.encounter_attachments.v_1.create(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", attachment_file: my_file.txt)
150
144
  def create(encounter_id:, attachment_file:, attachment_type:, request_options: nil)
151
145
  Async do
152
146
  response = @request_client.conn.put do |req|