candidhealth 0.24.6 → 0.24.7
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 +4 -4
- data/lib/candidhealth/auth/v_2/client.rb +2 -2
- data/lib/candidhealth/billing_notes/v_2/client.rb +2 -2
- data/lib/candidhealth/contracts/v_2/client.rb +10 -10
- data/lib/candidhealth/custom_schemas/v_1/client.rb +8 -8
- data/lib/candidhealth/eligibility/v_2/client.rb +6 -6
- data/lib/candidhealth/encounters/v_4/client.rb +8 -8
- data/lib/candidhealth/expected_network_status/v_1/client.rb +2 -2
- data/lib/candidhealth/expected_network_status/v_2/client.rb +4 -4
- data/lib/candidhealth/exports/v_3/client.rb +2 -2
- data/lib/candidhealth/external_payment_account_config/v_1/client.rb +2 -2
- data/lib/candidhealth/fee_schedules/v_3/client.rb +20 -20
- data/lib/candidhealth/guarantor/v_1/client.rb +6 -6
- data/lib/candidhealth/import_invoice/v_1/client.rb +8 -8
- data/lib/candidhealth/insurance_adjudications/v_1/client.rb +6 -6
- data/lib/candidhealth/insurance_payments/v_1/client.rb +10 -10
- data/lib/candidhealth/insurance_refunds/v_1/client.rb +10 -10
- data/lib/candidhealth/organization_providers/v_3/client.rb +8 -8
- data/lib/candidhealth/organization_service_facilities/v_2/client.rb +10 -10
- data/lib/candidhealth/patient_payments/v_4/client.rb +10 -10
- data/lib/candidhealth/patient_refunds/v_1/client.rb +10 -10
- data/lib/candidhealth/payers/v_3/client.rb +4 -4
- data/lib/candidhealth/pre_encounter/common/types/external_provider.rb +129 -0
- data/lib/candidhealth/pre_encounter/common/types/external_provider_type.rb +14 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +28 -24
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +13 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code.rb +86 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/network_type.rb +5 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +10 -10
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +22 -22
- data/lib/candidhealth/pre_encounter/patients/v_1/types/contact.rb +1 -11
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +14 -10
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +13 -9
- data/lib/candidhealth/service_facility/client.rb +2 -2
- data/lib/candidhealth/tasks/v_3/client.rb +10 -10
- data/lib/candidhealth/write_offs/v_1/client.rb +8 -8
- data/lib/candidhealth.rb +2 -2
- data/lib/environment.rb +8 -0
- data/lib/requests.rb +6 -4
- data/lib/types_export.rb +3 -1
- metadata +5 -3
- data/lib/candidhealth/pre_encounter/patients/v_1/types/external_provider.rb +0 -122
@@ -45,7 +45,7 @@ module CandidApiClient
|
|
45
45
|
# @param request_options [CandidApiClient::RequestOptions]
|
46
46
|
# @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefundsPage]
|
47
47
|
# @example
|
48
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
48
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
49
49
|
# api.patient_refunds.v_1.get_multi(
|
50
50
|
# limit: 1,
|
51
51
|
# patient_external_id: "string",
|
@@ -95,7 +95,7 @@ module CandidApiClient
|
|
95
95
|
# @param request_options [CandidApiClient::RequestOptions]
|
96
96
|
# @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
|
97
97
|
# @example
|
98
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
98
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
99
99
|
# api.patient_refunds.v_1.get(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
100
100
|
def get(patient_refund_id:, request_options: nil)
|
101
101
|
response = @request_client.conn.get do |req|
|
@@ -130,7 +130,7 @@ module CandidApiClient
|
|
130
130
|
# @param request_options [CandidApiClient::RequestOptions]
|
131
131
|
# @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
|
132
132
|
# @example
|
133
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
133
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
134
134
|
# api.patient_refunds.v_1.create(
|
135
135
|
# amount_cents: 1,
|
136
136
|
# refund_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z),
|
@@ -176,7 +176,7 @@ module CandidApiClient
|
|
176
176
|
# @param request_options [CandidApiClient::RequestOptions]
|
177
177
|
# @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
|
178
178
|
# @example
|
179
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
179
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
180
180
|
# api.patient_refunds.v_1.update(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", refund_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z))
|
181
181
|
def update(patient_refund_id:, refund_timestamp: nil, refund_note: nil, invoice: nil, refund_reason: nil,
|
182
182
|
request_options: nil)
|
@@ -207,7 +207,7 @@ module CandidApiClient
|
|
207
207
|
# @param request_options [CandidApiClient::RequestOptions]
|
208
208
|
# @return [Void]
|
209
209
|
# @example
|
210
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
210
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
211
211
|
# api.patient_refunds.v_1.delete(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
212
212
|
def delete(patient_refund_id:, request_options: nil)
|
213
213
|
@request_client.conn.delete do |req|
|
@@ -252,7 +252,7 @@ module CandidApiClient
|
|
252
252
|
# @param request_options [CandidApiClient::RequestOptions]
|
253
253
|
# @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefundsPage]
|
254
254
|
# @example
|
255
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
255
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
256
256
|
# api.patient_refunds.v_1.get_multi(
|
257
257
|
# limit: 1,
|
258
258
|
# patient_external_id: "string",
|
@@ -304,7 +304,7 @@ module CandidApiClient
|
|
304
304
|
# @param request_options [CandidApiClient::RequestOptions]
|
305
305
|
# @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
|
306
306
|
# @example
|
307
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
307
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
308
308
|
# api.patient_refunds.v_1.get(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
309
309
|
def get(patient_refund_id:, request_options: nil)
|
310
310
|
Async do
|
@@ -341,7 +341,7 @@ module CandidApiClient
|
|
341
341
|
# @param request_options [CandidApiClient::RequestOptions]
|
342
342
|
# @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
|
343
343
|
# @example
|
344
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
344
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
345
345
|
# api.patient_refunds.v_1.create(
|
346
346
|
# amount_cents: 1,
|
347
347
|
# refund_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z),
|
@@ -389,7 +389,7 @@ module CandidApiClient
|
|
389
389
|
# @param request_options [CandidApiClient::RequestOptions]
|
390
390
|
# @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
|
391
391
|
# @example
|
392
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
392
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
393
393
|
# api.patient_refunds.v_1.update(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", refund_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z))
|
394
394
|
def update(patient_refund_id:, refund_timestamp: nil, refund_note: nil, invoice: nil, refund_reason: nil,
|
395
395
|
request_options: nil)
|
@@ -422,7 +422,7 @@ module CandidApiClient
|
|
422
422
|
# @param request_options [CandidApiClient::RequestOptions]
|
423
423
|
# @return [Void]
|
424
424
|
# @example
|
425
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
425
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
426
426
|
# api.patient_refunds.v_1.delete(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
427
427
|
def delete(patient_refund_id:, request_options: nil)
|
428
428
|
Async do
|
@@ -22,7 +22,7 @@ module CandidApiClient
|
|
22
22
|
# @param request_options [CandidApiClient::RequestOptions]
|
23
23
|
# @return [CandidApiClient::Payers::V3::Types::Payer]
|
24
24
|
# @example
|
25
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
25
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
26
26
|
# api.payers.v_3.get(payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
27
27
|
def get(payer_uuid:, request_options: nil)
|
28
28
|
response = @request_client.conn.get do |req|
|
@@ -45,7 +45,7 @@ module CandidApiClient
|
|
45
45
|
# @param request_options [CandidApiClient::RequestOptions]
|
46
46
|
# @return [CandidApiClient::Payers::V3::Types::PayerPage]
|
47
47
|
# @example
|
48
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
48
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
49
49
|
# api.payers.v_3.get_all(
|
50
50
|
# limit: 100,
|
51
51
|
# search_term: "john",
|
@@ -86,7 +86,7 @@ module CandidApiClient
|
|
86
86
|
# @param request_options [CandidApiClient::RequestOptions]
|
87
87
|
# @return [CandidApiClient::Payers::V3::Types::Payer]
|
88
88
|
# @example
|
89
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
89
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
90
90
|
# api.payers.v_3.get(payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
91
91
|
def get(payer_uuid:, request_options: nil)
|
92
92
|
Async do
|
@@ -111,7 +111,7 @@ module CandidApiClient
|
|
111
111
|
# @param request_options [CandidApiClient::RequestOptions]
|
112
112
|
# @return [CandidApiClient::Payers::V3::Types::PayerPage]
|
113
113
|
# @example
|
114
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
114
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
115
115
|
# api.payers.v_3.get_all(
|
116
116
|
# limit: 100,
|
117
117
|
# search_term: "john",
|
@@ -0,0 +1,129 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "human_name"
|
4
|
+
require_relative "external_provider_type"
|
5
|
+
require_relative "contact_point"
|
6
|
+
require_relative "address"
|
7
|
+
require_relative "period"
|
8
|
+
require "ostruct"
|
9
|
+
require "json"
|
10
|
+
|
11
|
+
module CandidApiClient
|
12
|
+
module PreEncounter
|
13
|
+
module Common
|
14
|
+
module Types
|
15
|
+
class ExternalProvider
|
16
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::HumanName]
|
17
|
+
attr_reader :name
|
18
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ExternalProviderType]
|
19
|
+
attr_reader :type
|
20
|
+
# @return [String]
|
21
|
+
attr_reader :npi
|
22
|
+
# @return [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>]
|
23
|
+
attr_reader :telecoms
|
24
|
+
# @return [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
|
25
|
+
attr_reader :addresses
|
26
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Period]
|
27
|
+
attr_reader :period
|
28
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
attr_reader :additional_properties
|
30
|
+
# @return [Object]
|
31
|
+
attr_reader :_field_set
|
32
|
+
protected :_field_set
|
33
|
+
|
34
|
+
OMIT = Object.new
|
35
|
+
|
36
|
+
# @param name [CandidApiClient::PreEncounter::Common::Types::HumanName]
|
37
|
+
# @param type [CandidApiClient::PreEncounter::Common::Types::ExternalProviderType]
|
38
|
+
# @param npi [String]
|
39
|
+
# @param telecoms [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>]
|
40
|
+
# @param addresses [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
|
41
|
+
# @param period [CandidApiClient::PreEncounter::Common::Types::Period]
|
42
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
43
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ExternalProvider]
|
44
|
+
def initialize(name:, telecoms:, addresses:, type: OMIT, npi: OMIT, period: OMIT, additional_properties: nil)
|
45
|
+
@name = name
|
46
|
+
@type = type if type != OMIT
|
47
|
+
@npi = npi if npi != OMIT
|
48
|
+
@telecoms = telecoms
|
49
|
+
@addresses = addresses
|
50
|
+
@period = period if period != OMIT
|
51
|
+
@additional_properties = additional_properties
|
52
|
+
@_field_set = {
|
53
|
+
"name": name,
|
54
|
+
"type": type,
|
55
|
+
"npi": npi,
|
56
|
+
"telecoms": telecoms,
|
57
|
+
"addresses": addresses,
|
58
|
+
"period": period
|
59
|
+
}.reject do |_k, v|
|
60
|
+
v == OMIT
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Deserialize a JSON object to an instance of ExternalProvider
|
65
|
+
#
|
66
|
+
# @param json_object [String]
|
67
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ExternalProvider]
|
68
|
+
def self.from_json(json_object:)
|
69
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
70
|
+
parsed_json = JSON.parse(json_object)
|
71
|
+
if parsed_json["name"].nil?
|
72
|
+
name = nil
|
73
|
+
else
|
74
|
+
name = parsed_json["name"].to_json
|
75
|
+
name = CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: name)
|
76
|
+
end
|
77
|
+
type = struct["type"]
|
78
|
+
npi = struct["npi"]
|
79
|
+
telecoms = parsed_json["telecoms"]&.map do |item|
|
80
|
+
item = item.to_json
|
81
|
+
CandidApiClient::PreEncounter::Common::Types::ContactPoint.from_json(json_object: item)
|
82
|
+
end
|
83
|
+
addresses = parsed_json["addresses"]&.map do |item|
|
84
|
+
item = item.to_json
|
85
|
+
CandidApiClient::PreEncounter::Common::Types::Address.from_json(json_object: item)
|
86
|
+
end
|
87
|
+
if parsed_json["period"].nil?
|
88
|
+
period = nil
|
89
|
+
else
|
90
|
+
period = parsed_json["period"].to_json
|
91
|
+
period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
|
92
|
+
end
|
93
|
+
new(
|
94
|
+
name: name,
|
95
|
+
type: type,
|
96
|
+
npi: npi,
|
97
|
+
telecoms: telecoms,
|
98
|
+
addresses: addresses,
|
99
|
+
period: period,
|
100
|
+
additional_properties: struct
|
101
|
+
)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Serialize an instance of ExternalProvider to a JSON object
|
105
|
+
#
|
106
|
+
# @return [String]
|
107
|
+
def to_json(*_args)
|
108
|
+
@_field_set&.to_json
|
109
|
+
end
|
110
|
+
|
111
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
112
|
+
# hash and check each fields type against the current object's property
|
113
|
+
# definitions.
|
114
|
+
#
|
115
|
+
# @param obj [Object]
|
116
|
+
# @return [Void]
|
117
|
+
def self.validate_raw(obj:)
|
118
|
+
CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
|
119
|
+
obj.type&.is_a?(CandidApiClient::PreEncounter::Common::Types::ExternalProviderType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
120
|
+
obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.")
|
121
|
+
obj.telecoms.is_a?(Array) != false || raise("Passed value for field obj.telecoms is not the expected type, validation failed.")
|
122
|
+
obj.addresses.is_a?(Array) != false || raise("Passed value for field obj.addresses is not the expected type, validation failed.")
|
123
|
+
obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
@@ -38,7 +38,7 @@ module CandidApiClient
|
|
38
38
|
# * :start (Date)
|
39
39
|
# * :end_ (Date)
|
40
40
|
# * :date_of_birth (Date)
|
41
|
-
# * :
|
41
|
+
# * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
|
42
42
|
# * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
|
43
43
|
# * :patient (String)
|
44
44
|
# * :insurance_plan (Hash)
|
@@ -47,7 +47,8 @@ module CandidApiClient
|
|
47
47
|
# * :payer_name (String)
|
48
48
|
# * :group_number (String)
|
49
49
|
# * :name (String)
|
50
|
-
# * :
|
50
|
+
# * :plan_type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
|
51
|
+
# * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode)
|
51
52
|
# * :period (Hash)
|
52
53
|
# * :start (Date)
|
53
54
|
# * :end_ (Date)
|
@@ -56,8 +57,8 @@ module CandidApiClient
|
|
56
57
|
# @param request_options [CandidApiClient::RequestOptions]
|
57
58
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
58
59
|
# @example
|
59
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
60
|
-
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15),
|
60
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
61
|
+
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string" }, verified: true })
|
61
62
|
def create(request:, request_options: nil)
|
62
63
|
response = @request_client.conn.post do |req|
|
63
64
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -90,7 +91,7 @@ module CandidApiClient
|
|
90
91
|
# * :start (Date)
|
91
92
|
# * :end_ (Date)
|
92
93
|
# * :date_of_birth (Date)
|
93
|
-
# * :
|
94
|
+
# * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
|
94
95
|
# * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
|
95
96
|
# * :patient (String)
|
96
97
|
# * :insurance_plan (Hash)
|
@@ -99,7 +100,8 @@ module CandidApiClient
|
|
99
100
|
# * :payer_name (String)
|
100
101
|
# * :group_number (String)
|
101
102
|
# * :name (String)
|
102
|
-
# * :
|
103
|
+
# * :plan_type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
|
104
|
+
# * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode)
|
103
105
|
# * :period (Hash)
|
104
106
|
# * :start (Date)
|
105
107
|
# * :end_ (Date)
|
@@ -108,11 +110,11 @@ module CandidApiClient
|
|
108
110
|
# @param request_options [CandidApiClient::RequestOptions]
|
109
111
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
110
112
|
# @example
|
111
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
113
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
112
114
|
# api.pre_encounter.coverages.v_1.update(
|
113
115
|
# id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
114
116
|
# version: "string",
|
115
|
-
# request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15),
|
117
|
+
# request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string" }, verified: true }
|
116
118
|
# )
|
117
119
|
def update(id:, version:, request:, request_options: nil)
|
118
120
|
response = @request_client.conn.put do |req|
|
@@ -136,7 +138,7 @@ module CandidApiClient
|
|
136
138
|
# @param request_options [CandidApiClient::RequestOptions]
|
137
139
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
138
140
|
# @example
|
139
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
141
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
140
142
|
# api.pre_encounter.coverages.v_1.get(id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
141
143
|
def get(id:, request_options: nil)
|
142
144
|
response = @request_client.conn.get do |req|
|
@@ -160,7 +162,7 @@ module CandidApiClient
|
|
160
162
|
# @param request_options [CandidApiClient::RequestOptions]
|
161
163
|
# @return [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage>]
|
162
164
|
# @example
|
163
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
165
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
164
166
|
# api.pre_encounter.coverages.v_1.get_history(id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
165
167
|
def get_history(id:, request_options: nil)
|
166
168
|
response = @request_client.conn.get do |req|
|
@@ -187,7 +189,7 @@ module CandidApiClient
|
|
187
189
|
# @param request_options [CandidApiClient::RequestOptions]
|
188
190
|
# @return [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage>]
|
189
191
|
# @example
|
190
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
192
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
191
193
|
# api.pre_encounter.coverages.v_1.get_multi(patient_id: "string")
|
192
194
|
def get_multi(patient_id: nil, request_options: nil)
|
193
195
|
response = @request_client.conn.get do |req|
|
@@ -216,7 +218,7 @@ module CandidApiClient
|
|
216
218
|
# @param request_options [CandidApiClient::RequestOptions]
|
217
219
|
# @return [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage>]
|
218
220
|
# @example
|
219
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
221
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
220
222
|
# api.pre_encounter.coverages.v_1.scan(since: DateTime.parse(2024-01-15T09:30:00.000Z))
|
221
223
|
def scan(since:, request_options: nil)
|
222
224
|
response = @request_client.conn.get do |req|
|
@@ -266,7 +268,7 @@ module CandidApiClient
|
|
266
268
|
# * :start (Date)
|
267
269
|
# * :end_ (Date)
|
268
270
|
# * :date_of_birth (Date)
|
269
|
-
# * :
|
271
|
+
# * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
|
270
272
|
# * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
|
271
273
|
# * :patient (String)
|
272
274
|
# * :insurance_plan (Hash)
|
@@ -275,7 +277,8 @@ module CandidApiClient
|
|
275
277
|
# * :payer_name (String)
|
276
278
|
# * :group_number (String)
|
277
279
|
# * :name (String)
|
278
|
-
# * :
|
280
|
+
# * :plan_type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
|
281
|
+
# * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode)
|
279
282
|
# * :period (Hash)
|
280
283
|
# * :start (Date)
|
281
284
|
# * :end_ (Date)
|
@@ -284,8 +287,8 @@ module CandidApiClient
|
|
284
287
|
# @param request_options [CandidApiClient::RequestOptions]
|
285
288
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
286
289
|
# @example
|
287
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
288
|
-
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15),
|
290
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
291
|
+
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string" }, verified: true })
|
289
292
|
def create(request:, request_options: nil)
|
290
293
|
Async do
|
291
294
|
response = @request_client.conn.post do |req|
|
@@ -320,7 +323,7 @@ module CandidApiClient
|
|
320
323
|
# * :start (Date)
|
321
324
|
# * :end_ (Date)
|
322
325
|
# * :date_of_birth (Date)
|
323
|
-
# * :
|
326
|
+
# * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
|
324
327
|
# * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
|
325
328
|
# * :patient (String)
|
326
329
|
# * :insurance_plan (Hash)
|
@@ -329,7 +332,8 @@ module CandidApiClient
|
|
329
332
|
# * :payer_name (String)
|
330
333
|
# * :group_number (String)
|
331
334
|
# * :name (String)
|
332
|
-
# * :
|
335
|
+
# * :plan_type (CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType)
|
336
|
+
# * :type (CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode)
|
333
337
|
# * :period (Hash)
|
334
338
|
# * :start (Date)
|
335
339
|
# * :end_ (Date)
|
@@ -338,11 +342,11 @@ module CandidApiClient
|
|
338
342
|
# @param request_options [CandidApiClient::RequestOptions]
|
339
343
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
340
344
|
# @example
|
341
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
345
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
342
346
|
# api.pre_encounter.coverages.v_1.update(
|
343
347
|
# id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
344
348
|
# version: "string",
|
345
|
-
# request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15),
|
349
|
+
# request: { status: ACTIVE, subscriber: { name: { }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string" }, verified: true }
|
346
350
|
# )
|
347
351
|
def update(id:, version:, request:, request_options: nil)
|
348
352
|
Async do
|
@@ -368,7 +372,7 @@ module CandidApiClient
|
|
368
372
|
# @param request_options [CandidApiClient::RequestOptions]
|
369
373
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
370
374
|
# @example
|
371
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
375
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
372
376
|
# api.pre_encounter.coverages.v_1.get(id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
373
377
|
def get(id:, request_options: nil)
|
374
378
|
Async do
|
@@ -394,7 +398,7 @@ module CandidApiClient
|
|
394
398
|
# @param request_options [CandidApiClient::RequestOptions]
|
395
399
|
# @return [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage>]
|
396
400
|
# @example
|
397
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
401
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
398
402
|
# api.pre_encounter.coverages.v_1.get_history(id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
399
403
|
def get_history(id:, request_options: nil)
|
400
404
|
Async do
|
@@ -423,7 +427,7 @@ module CandidApiClient
|
|
423
427
|
# @param request_options [CandidApiClient::RequestOptions]
|
424
428
|
# @return [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage>]
|
425
429
|
# @example
|
426
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
430
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
427
431
|
# api.pre_encounter.coverages.v_1.get_multi(patient_id: "string")
|
428
432
|
def get_multi(patient_id: nil, request_options: nil)
|
429
433
|
Async do
|
@@ -457,7 +461,7 @@ module CandidApiClient
|
|
457
461
|
# @param request_options [CandidApiClient::RequestOptions]
|
458
462
|
# @return [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage>]
|
459
463
|
# @example
|
460
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com")
|
464
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
461
465
|
# api.pre_encounter.coverages.v_1.scan(since: DateTime.parse(2024-01-15T09:30:00.000Z))
|
462
466
|
def scan(since:, request_options: nil)
|
463
467
|
Async do
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "network_type"
|
4
|
+
require_relative "insurance_type_code"
|
4
5
|
require_relative "../../../common/types/period"
|
5
6
|
require "ostruct"
|
6
7
|
require "json"
|
@@ -22,6 +23,8 @@ module CandidApiClient
|
|
22
23
|
# @return [String]
|
23
24
|
attr_reader :name
|
24
25
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType]
|
26
|
+
attr_reader :plan_type
|
27
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode]
|
25
28
|
attr_reader :type
|
26
29
|
# @return [CandidApiClient::PreEncounter::Common::Types::Period]
|
27
30
|
attr_reader :period
|
@@ -40,18 +43,20 @@ module CandidApiClient
|
|
40
43
|
# @param payer_name [String]
|
41
44
|
# @param group_number [String]
|
42
45
|
# @param name [String]
|
43
|
-
# @param
|
46
|
+
# @param plan_type [CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType]
|
47
|
+
# @param type [CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode]
|
44
48
|
# @param period [CandidApiClient::PreEncounter::Common::Types::Period]
|
45
49
|
# @param insurance_card_image_locator [String]
|
46
50
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
47
51
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::InsurancePlan]
|
48
|
-
def initialize(member_id:, payer_id:, payer_name:, group_number: OMIT, name: OMIT,
|
49
|
-
period: OMIT, insurance_card_image_locator: OMIT, additional_properties: nil)
|
52
|
+
def initialize(member_id:, payer_id:, payer_name:, group_number: OMIT, name: OMIT, plan_type: OMIT,
|
53
|
+
type: OMIT, period: OMIT, insurance_card_image_locator: OMIT, additional_properties: nil)
|
50
54
|
@member_id = member_id
|
51
55
|
@payer_id = payer_id
|
52
56
|
@payer_name = payer_name
|
53
57
|
@group_number = group_number if group_number != OMIT
|
54
58
|
@name = name if name != OMIT
|
59
|
+
@plan_type = plan_type if plan_type != OMIT
|
55
60
|
@type = type if type != OMIT
|
56
61
|
@period = period if period != OMIT
|
57
62
|
@insurance_card_image_locator = insurance_card_image_locator if insurance_card_image_locator != OMIT
|
@@ -62,6 +67,7 @@ module CandidApiClient
|
|
62
67
|
"payer_name": payer_name,
|
63
68
|
"group_number": group_number,
|
64
69
|
"name": name,
|
70
|
+
"plan_type": plan_type,
|
65
71
|
"type": type,
|
66
72
|
"period": period,
|
67
73
|
"insurance_card_image_locator": insurance_card_image_locator
|
@@ -82,6 +88,7 @@ module CandidApiClient
|
|
82
88
|
payer_name = struct["payer_name"]
|
83
89
|
group_number = struct["group_number"]
|
84
90
|
name = struct["name"]
|
91
|
+
plan_type = struct["plan_type"]
|
85
92
|
type = struct["type"]
|
86
93
|
if parsed_json["period"].nil?
|
87
94
|
period = nil
|
@@ -96,6 +103,7 @@ module CandidApiClient
|
|
96
103
|
payer_name: payer_name,
|
97
104
|
group_number: group_number,
|
98
105
|
name: name,
|
106
|
+
plan_type: plan_type,
|
99
107
|
type: type,
|
100
108
|
period: period,
|
101
109
|
insurance_card_image_locator: insurance_card_image_locator,
|
@@ -122,7 +130,8 @@ module CandidApiClient
|
|
122
130
|
obj.payer_name.is_a?(String) != false || raise("Passed value for field obj.payer_name is not the expected type, validation failed.")
|
123
131
|
obj.group_number&.is_a?(String) != false || raise("Passed value for field obj.group_number is not the expected type, validation failed.")
|
124
132
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
125
|
-
obj.
|
133
|
+
obj.plan_type&.is_a?(CandidApiClient::PreEncounter::Coverages::V1::Types::NetworkType) != false || raise("Passed value for field obj.plan_type is not the expected type, validation failed.")
|
134
|
+
obj.type&.is_a?(CandidApiClient::PreEncounter::Coverages::V1::Types::InsuranceTypeCode) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
126
135
|
obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
|
127
136
|
obj.insurance_card_image_locator&.is_a?(String) != false || raise("Passed value for field obj.insurance_card_image_locator is not the expected type, validation failed.")
|
128
137
|
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module PreEncounter
|
5
|
+
module Coverages
|
6
|
+
module V1
|
7
|
+
module Types
|
8
|
+
# Code identifying the type of insurance policy within a specific insurance
|
9
|
+
# program (X12 008020 Element 1336)
|
10
|
+
class InsuranceTypeCode
|
11
|
+
C_01 = "01"
|
12
|
+
C_12 = "12"
|
13
|
+
C_13 = "13"
|
14
|
+
C_14 = "14"
|
15
|
+
C_15 = "15"
|
16
|
+
C_16 = "16"
|
17
|
+
C_17 = "17"
|
18
|
+
C_18 = "18"
|
19
|
+
C_19 = "19"
|
20
|
+
C_41 = "41"
|
21
|
+
C_42 = "42"
|
22
|
+
C_43 = "43"
|
23
|
+
C_47 = "47"
|
24
|
+
CAP = "AP"
|
25
|
+
CC_1 = "C1"
|
26
|
+
CCO = "CO"
|
27
|
+
CCP = "CP"
|
28
|
+
CD = "D"
|
29
|
+
CDB = "DB"
|
30
|
+
CE = "E"
|
31
|
+
CEP = "EP"
|
32
|
+
CFF = "FF"
|
33
|
+
CGP = "GP"
|
34
|
+
CHA = "HA"
|
35
|
+
CHB = "HB"
|
36
|
+
CHD = "HD"
|
37
|
+
CHG = "HG"
|
38
|
+
CHM = "HM"
|
39
|
+
CHN = "HN"
|
40
|
+
CHP = "HP"
|
41
|
+
CHS = "HS"
|
42
|
+
CIN = "IN"
|
43
|
+
CIP = "IP"
|
44
|
+
CLC = "LC"
|
45
|
+
CLD = "LD"
|
46
|
+
CLI = "LI"
|
47
|
+
CLT = "LT"
|
48
|
+
CM = "M"
|
49
|
+
CMA = "MA"
|
50
|
+
CMB = "MB"
|
51
|
+
CMC = "MC"
|
52
|
+
CMD = "MD"
|
53
|
+
CME = "ME"
|
54
|
+
CMF = "MF"
|
55
|
+
CMH = "MH"
|
56
|
+
CMI = "MI"
|
57
|
+
CMJ = "MJ"
|
58
|
+
CMK = "MK"
|
59
|
+
CML = "ML"
|
60
|
+
CMM = "MM"
|
61
|
+
CMN = "MN"
|
62
|
+
CMO = "MO"
|
63
|
+
CMP = "MP"
|
64
|
+
CMR = "MR"
|
65
|
+
CMT = "MT"
|
66
|
+
CMV = "MV"
|
67
|
+
COA = "OA"
|
68
|
+
COT = "OT"
|
69
|
+
CPE = "PE"
|
70
|
+
CPL = "PL"
|
71
|
+
CPP = "PP"
|
72
|
+
CPR = "PR"
|
73
|
+
CPS = "PS"
|
74
|
+
CQM = "QM"
|
75
|
+
CRP = "RP"
|
76
|
+
CSP = "SP"
|
77
|
+
CTF = "TF"
|
78
|
+
CU = "U"
|
79
|
+
CWC = "WC"
|
80
|
+
CWU = "WU"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -6,6 +6,8 @@ module CandidApiClient
|
|
6
6
|
module V1
|
7
7
|
module Types
|
8
8
|
class NetworkType
|
9
|
+
SELF_PAY = "09"
|
10
|
+
OTHER_NON_FEDERAL_PROGRAMS = "11"
|
9
11
|
PPO = "12"
|
10
12
|
POS = "13"
|
11
13
|
EPO = "14"
|
@@ -13,8 +15,11 @@ module CandidApiClient
|
|
13
15
|
HMO_MEDICARE_RISK = "16"
|
14
16
|
DMO = "17"
|
15
17
|
AUTO = "AM"
|
18
|
+
BLUE_CROSS_BLUE_SHIELD = "BL"
|
16
19
|
CHAMPUS = "CH"
|
20
|
+
COMMERCIAL_INSURANCE_CO = "CI"
|
17
21
|
DISABILITY = "DS"
|
22
|
+
FEDERAL_EMPLOYEES = "FI"
|
18
23
|
HMO = "HM"
|
19
24
|
LIABILITY = "LM"
|
20
25
|
MEDICARE_PART_A = "MA"
|