candidhealth 0.39.10 → 0.40.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.
- checksums.yaml +4 -4
- data/lib/candidhealth/charge_capture/v_1/client.rb +4 -0
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +16 -2
- data/lib/candidhealth/clinical_trials/v_1/types/clinical_trial.rb +109 -0
- data/lib/candidhealth/clinical_trials/v_1/types/clinical_trial_phase.rb +15 -0
- data/lib/candidhealth/clinical_trials/v_1/types/mutable_clinical_trial.rb +84 -0
- data/lib/candidhealth/commons/types/procedure_modifier.rb +4 -0
- data/lib/candidhealth/encounters/v_4/client.rb +37 -10
- data/lib/candidhealth/encounters/v_4/types/claim_supplemental_information.rb +86 -0
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +23 -1
- data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +16 -2
- data/lib/candidhealth/encounters/v_4/types/report_transmission_code.rb +14 -0
- data/lib/candidhealth/encounters/v_4/types/report_type_code.rb +73 -0
- data/lib/candidhealth/exports/v_3/client.rb +8 -0
- data/lib/candidhealth/individual/types/patient_clinical_trial_info.rb +80 -0
- data/lib/candidhealth/individual/types/patient_clinical_trial_info_create.rb +73 -0
- data/lib/candidhealth/individual/types/patient_non_insurance_payer_info.rb +17 -2
- data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create.rb +18 -2
- data/lib/candidhealth/non_insurance_payers/v_1/client.rb +4 -2
- data/lib/candidhealth/non_insurance_payers/v_1/types/create_non_insurance_payer_request.rb +15 -2
- data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer.rb +15 -3
- data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +3 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +8 -4
- data/lib/candidhealth/pre_encounter/common/types/canonical_clinical_trial_association.rb +86 -0
- data/lib/candidhealth/pre_encounter/common/types/canonical_non_insurance_payer_association.rb +18 -2
- data/lib/candidhealth/pre_encounter/common/types/human_name.rb +15 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +8 -4
- data/lib/candidhealth/pre_encounter/images/client.rb +32 -0
- data/lib/candidhealth/pre_encounter/images/v_1/client.rb +359 -0
- data/lib/candidhealth/pre_encounter/images/v_1/types/coverage_association.rb +74 -0
- data/lib/candidhealth/pre_encounter/images/v_1/types/coverage_image_side.rb +16 -0
- data/lib/candidhealth/pre_encounter/images/v_1/types/image.rb +188 -0
- data/lib/candidhealth/pre_encounter/images/v_1/types/image_status.rb +17 -0
- data/lib/candidhealth/pre_encounter/images/v_1/types/mutable_image.rb +125 -0
- data/lib/candidhealth/pre_encounter/images/v_1/types/patient_association.rb +75 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +89 -6
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +11 -1
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +6 -4
- data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +6 -4
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +6 -4
- data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +10 -8
- data/lib/candidhealth/service_lines/v_2/types/test_result_type.rb +1 -0
- data/lib/candidhealth/write_offs/v_1/client.rb +98 -0
- data/lib/candidhealth/write_offs/v_1/types/non_insurance_payer_write_off.rb +143 -0
- data/lib/candidhealth/write_offs/v_1/types/non_insurance_payer_write_off_create.rb +113 -0
- data/lib/candidhealth/write_offs/v_1/types/write_off.rb +13 -0
- data/lib/candidhealth/write_offs/v_1/types/write_off_create.rb +13 -0
- data/lib/candidhealth/x_12/v_1/types/rarc.rb +114 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +17 -0
- metadata +21 -2
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../../../commons/types/street_address_short_zip"
|
4
|
+
require_relative "../../../clinical_trials/v_1/types/mutable_clinical_trial"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
@@ -17,6 +18,8 @@ module CandidApiClient
|
|
17
18
|
attr_reader :category
|
18
19
|
# @return [CandidApiClient::Commons::Types::StreetAddressShortZip]
|
19
20
|
attr_reader :address
|
21
|
+
# @return [Array<CandidApiClient::ClinicalTrials::V1::Types::MutableClinicalTrial>] The same name cannot be used across several clinical trials
|
22
|
+
attr_reader :clinical_trials
|
20
23
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
21
24
|
attr_reader :additional_properties
|
22
25
|
# @return [Object]
|
@@ -29,19 +32,23 @@ module CandidApiClient
|
|
29
32
|
# @param description [String] Max 255 characters allowed
|
30
33
|
# @param category [String] Max 255 characters allowed
|
31
34
|
# @param address [CandidApiClient::Commons::Types::StreetAddressShortZip]
|
35
|
+
# @param clinical_trials [Array<CandidApiClient::ClinicalTrials::V1::Types::MutableClinicalTrial>] The same name cannot be used across several clinical trials
|
32
36
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
33
37
|
# @return [CandidApiClient::NonInsurancePayers::V1::Types::CreateNonInsurancePayerRequest]
|
34
|
-
def initialize(name:, description: OMIT, category: OMIT, address: OMIT,
|
38
|
+
def initialize(name:, description: OMIT, category: OMIT, address: OMIT, clinical_trials: OMIT,
|
39
|
+
additional_properties: nil)
|
35
40
|
@name = name
|
36
41
|
@description = description if description != OMIT
|
37
42
|
@category = category if category != OMIT
|
38
43
|
@address = address if address != OMIT
|
44
|
+
@clinical_trials = clinical_trials if clinical_trials != OMIT
|
39
45
|
@additional_properties = additional_properties
|
40
46
|
@_field_set = {
|
41
47
|
"name": name,
|
42
48
|
"description": description,
|
43
49
|
"category": category,
|
44
|
-
"address": address
|
50
|
+
"address": address,
|
51
|
+
"clinical_trials": clinical_trials
|
45
52
|
}.reject do |_k, v|
|
46
53
|
v == OMIT
|
47
54
|
end
|
@@ -63,11 +70,16 @@ module CandidApiClient
|
|
63
70
|
address = parsed_json["address"].to_json
|
64
71
|
address = CandidApiClient::Commons::Types::StreetAddressShortZip.from_json(json_object: address)
|
65
72
|
end
|
73
|
+
clinical_trials = parsed_json["clinical_trials"]&.map do |item|
|
74
|
+
item = item.to_json
|
75
|
+
CandidApiClient::ClinicalTrials::V1::Types::MutableClinicalTrial.from_json(json_object: item)
|
76
|
+
end
|
66
77
|
new(
|
67
78
|
name: name,
|
68
79
|
description: description,
|
69
80
|
category: category,
|
70
81
|
address: address,
|
82
|
+
clinical_trials: clinical_trials,
|
71
83
|
additional_properties: struct
|
72
84
|
)
|
73
85
|
end
|
@@ -90,6 +102,7 @@ module CandidApiClient
|
|
90
102
|
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
91
103
|
obj.category&.is_a?(String) != false || raise("Passed value for field obj.category is not the expected type, validation failed.")
|
92
104
|
obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressShortZip.validate_raw(obj: obj.address)
|
105
|
+
obj.clinical_trials&.is_a?(Array) != false || raise("Passed value for field obj.clinical_trials is not the expected type, validation failed.")
|
93
106
|
end
|
94
107
|
end
|
95
108
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../../../commons/types/street_address_short_zip"
|
4
|
+
require_relative "../../../clinical_trials/v_1/types/clinical_trial"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
@@ -21,6 +22,8 @@ module CandidApiClient
|
|
21
22
|
attr_reader :enabled
|
22
23
|
# @return [CandidApiClient::Commons::Types::StreetAddressShortZip]
|
23
24
|
attr_reader :address
|
25
|
+
# @return [Array<CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrial>]
|
26
|
+
attr_reader :clinical_trials
|
24
27
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
25
28
|
attr_reader :additional_properties
|
26
29
|
# @return [Object]
|
@@ -35,16 +38,18 @@ module CandidApiClient
|
|
35
38
|
# @param category [String]
|
36
39
|
# @param enabled [Boolean]
|
37
40
|
# @param address [CandidApiClient::Commons::Types::StreetAddressShortZip]
|
41
|
+
# @param clinical_trials [Array<CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrial>]
|
38
42
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
39
43
|
# @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer]
|
40
|
-
def initialize(non_insurance_payer_id:, name:, enabled:, description: OMIT, category: OMIT,
|
41
|
-
additional_properties: nil)
|
44
|
+
def initialize(non_insurance_payer_id:, name:, enabled:, clinical_trials:, description: OMIT, category: OMIT,
|
45
|
+
address: OMIT, additional_properties: nil)
|
42
46
|
@non_insurance_payer_id = non_insurance_payer_id
|
43
47
|
@name = name
|
44
48
|
@description = description if description != OMIT
|
45
49
|
@category = category if category != OMIT
|
46
50
|
@enabled = enabled
|
47
51
|
@address = address if address != OMIT
|
52
|
+
@clinical_trials = clinical_trials
|
48
53
|
@additional_properties = additional_properties
|
49
54
|
@_field_set = {
|
50
55
|
"non_insurance_payer_id": non_insurance_payer_id,
|
@@ -52,7 +57,8 @@ module CandidApiClient
|
|
52
57
|
"description": description,
|
53
58
|
"category": category,
|
54
59
|
"enabled": enabled,
|
55
|
-
"address": address
|
60
|
+
"address": address,
|
61
|
+
"clinical_trials": clinical_trials
|
56
62
|
}.reject do |_k, v|
|
57
63
|
v == OMIT
|
58
64
|
end
|
@@ -76,6 +82,10 @@ module CandidApiClient
|
|
76
82
|
address = parsed_json["address"].to_json
|
77
83
|
address = CandidApiClient::Commons::Types::StreetAddressShortZip.from_json(json_object: address)
|
78
84
|
end
|
85
|
+
clinical_trials = parsed_json["clinical_trials"]&.map do |item|
|
86
|
+
item = item.to_json
|
87
|
+
CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrial.from_json(json_object: item)
|
88
|
+
end
|
79
89
|
new(
|
80
90
|
non_insurance_payer_id: non_insurance_payer_id,
|
81
91
|
name: name,
|
@@ -83,6 +93,7 @@ module CandidApiClient
|
|
83
93
|
category: category,
|
84
94
|
enabled: enabled,
|
85
95
|
address: address,
|
96
|
+
clinical_trials: clinical_trials,
|
86
97
|
additional_properties: struct
|
87
98
|
)
|
88
99
|
end
|
@@ -107,6 +118,7 @@ module CandidApiClient
|
|
107
118
|
obj.category&.is_a?(String) != false || raise("Passed value for field obj.category is not the expected type, validation failed.")
|
108
119
|
obj.enabled.is_a?(Boolean) != false || raise("Passed value for field obj.enabled is not the expected type, validation failed.")
|
109
120
|
obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressShortZip.validate_raw(obj: obj.address)
|
121
|
+
obj.clinical_trials.is_a?(Array) != false || raise("Passed value for field obj.clinical_trials is not the expected type, validation failed.")
|
110
122
|
end
|
111
123
|
end
|
112
124
|
end
|
@@ -41,6 +41,7 @@ module CandidApiClient
|
|
41
41
|
# * :period (Hash)
|
42
42
|
# * :start (Date)
|
43
43
|
# * :end_ (Date)
|
44
|
+
# * :suffix (String)
|
44
45
|
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
45
46
|
# * :npi (String)
|
46
47
|
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
@@ -62,7 +63,7 @@ module CandidApiClient
|
|
62
63
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
|
63
64
|
# @example
|
64
65
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
65
|
-
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE })
|
66
|
+
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { }, suffix: "string" }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE })
|
66
67
|
def create(request:, request_options: nil)
|
67
68
|
response = @request_client.conn.post do |req|
|
68
69
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -193,6 +194,7 @@ module CandidApiClient
|
|
193
194
|
# * :period (Hash)
|
194
195
|
# * :start (Date)
|
195
196
|
# * :end_ (Date)
|
197
|
+
# * :suffix (String)
|
196
198
|
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
197
199
|
# * :npi (String)
|
198
200
|
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
@@ -217,7 +219,7 @@ module CandidApiClient
|
|
217
219
|
# api.pre_encounter.appointments.v_1.update(
|
218
220
|
# id: "string",
|
219
221
|
# version: "string",
|
220
|
-
# request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE }
|
222
|
+
# request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { }, suffix: "string" }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE }
|
221
223
|
# )
|
222
224
|
def update(id:, version:, request:, request_options: nil)
|
223
225
|
response = @request_client.conn.put do |req|
|
@@ -319,6 +321,7 @@ module CandidApiClient
|
|
319
321
|
# * :period (Hash)
|
320
322
|
# * :start (Date)
|
321
323
|
# * :end_ (Date)
|
324
|
+
# * :suffix (String)
|
322
325
|
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
323
326
|
# * :npi (String)
|
324
327
|
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
@@ -340,7 +343,7 @@ module CandidApiClient
|
|
340
343
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
|
341
344
|
# @example
|
342
345
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
343
|
-
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE })
|
346
|
+
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { }, suffix: "string" }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE })
|
344
347
|
def create(request:, request_options: nil)
|
345
348
|
Async do
|
346
349
|
response = @request_client.conn.post do |req|
|
@@ -479,6 +482,7 @@ module CandidApiClient
|
|
479
482
|
# * :period (Hash)
|
480
483
|
# * :start (Date)
|
481
484
|
# * :end_ (Date)
|
485
|
+
# * :suffix (String)
|
482
486
|
# * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
|
483
487
|
# * :npi (String)
|
484
488
|
# * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
|
@@ -503,7 +507,7 @@ module CandidApiClient
|
|
503
507
|
# api.pre_encounter.appointments.v_1.update(
|
504
508
|
# id: "string",
|
505
509
|
# version: "string",
|
506
|
-
# request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE }
|
510
|
+
# request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { }, suffix: "string" }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE }
|
507
511
|
# )
|
508
512
|
def update(id:, version:, request:, request_options: nil)
|
509
513
|
Async do
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "period"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module Common
|
10
|
+
module Types
|
11
|
+
class CanonicalClinicalTrialAssociation
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :id
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :clinical_trial_arm
|
16
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Period]
|
17
|
+
attr_reader :period
|
18
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
19
|
+
attr_reader :additional_properties
|
20
|
+
# @return [Object]
|
21
|
+
attr_reader :_field_set
|
22
|
+
protected :_field_set
|
23
|
+
|
24
|
+
OMIT = Object.new
|
25
|
+
|
26
|
+
# @param id [String]
|
27
|
+
# @param clinical_trial_arm [String]
|
28
|
+
# @param period [CandidApiClient::PreEncounter::Common::Types::Period]
|
29
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::CanonicalClinicalTrialAssociation]
|
31
|
+
def initialize(id:, clinical_trial_arm: OMIT, period: OMIT, additional_properties: nil)
|
32
|
+
@id = id
|
33
|
+
@clinical_trial_arm = clinical_trial_arm if clinical_trial_arm != OMIT
|
34
|
+
@period = period if period != OMIT
|
35
|
+
@additional_properties = additional_properties
|
36
|
+
@_field_set = { "id": id, "clinical_trial_arm": clinical_trial_arm, "period": period }.reject do |_k, v|
|
37
|
+
v == OMIT
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# Deserialize a JSON object to an instance of CanonicalClinicalTrialAssociation
|
42
|
+
#
|
43
|
+
# @param json_object [String]
|
44
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::CanonicalClinicalTrialAssociation]
|
45
|
+
def self.from_json(json_object:)
|
46
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
47
|
+
parsed_json = JSON.parse(json_object)
|
48
|
+
id = struct["id"]
|
49
|
+
clinical_trial_arm = struct["clinical_trial_arm"]
|
50
|
+
if parsed_json["period"].nil?
|
51
|
+
period = nil
|
52
|
+
else
|
53
|
+
period = parsed_json["period"].to_json
|
54
|
+
period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
|
55
|
+
end
|
56
|
+
new(
|
57
|
+
id: id,
|
58
|
+
clinical_trial_arm: clinical_trial_arm,
|
59
|
+
period: period,
|
60
|
+
additional_properties: struct
|
61
|
+
)
|
62
|
+
end
|
63
|
+
|
64
|
+
# Serialize an instance of CanonicalClinicalTrialAssociation to a JSON object
|
65
|
+
#
|
66
|
+
# @return [String]
|
67
|
+
def to_json(*_args)
|
68
|
+
@_field_set&.to_json
|
69
|
+
end
|
70
|
+
|
71
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
72
|
+
# hash and check each fields type against the current object's property
|
73
|
+
# definitions.
|
74
|
+
#
|
75
|
+
# @param obj [Object]
|
76
|
+
# @return [Void]
|
77
|
+
def self.validate_raw(obj:)
|
78
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
79
|
+
obj.clinical_trial_arm&.is_a?(String) != false || raise("Passed value for field obj.clinical_trial_arm is not the expected type, validation failed.")
|
80
|
+
obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
data/lib/candidhealth/pre_encounter/common/types/canonical_non_insurance_payer_association.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "canonical_clinical_trial_association"
|
3
4
|
require "ostruct"
|
4
5
|
require "json"
|
5
6
|
|
@@ -12,6 +13,8 @@ module CandidApiClient
|
|
12
13
|
attr_reader :id
|
13
14
|
# @return [String]
|
14
15
|
attr_reader :member_id
|
16
|
+
# @return [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalClinicalTrialAssociation>] A patient cannot be associated with a given trial more than once
|
17
|
+
attr_reader :clinical_trial_info
|
15
18
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
19
|
attr_reader :additional_properties
|
17
20
|
# @return [Object]
|
@@ -22,13 +25,19 @@ module CandidApiClient
|
|
22
25
|
|
23
26
|
# @param id [String]
|
24
27
|
# @param member_id [String]
|
28
|
+
# @param clinical_trial_info [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalClinicalTrialAssociation>] A patient cannot be associated with a given trial more than once
|
25
29
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
30
|
# @return [CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation]
|
27
|
-
def initialize(id:, member_id: OMIT, additional_properties: nil)
|
31
|
+
def initialize(id:, member_id: OMIT, clinical_trial_info: OMIT, additional_properties: nil)
|
28
32
|
@id = id
|
29
33
|
@member_id = member_id if member_id != OMIT
|
34
|
+
@clinical_trial_info = clinical_trial_info if clinical_trial_info != OMIT
|
30
35
|
@additional_properties = additional_properties
|
31
|
-
@_field_set = {
|
36
|
+
@_field_set = {
|
37
|
+
"id": id,
|
38
|
+
"member_id": member_id,
|
39
|
+
"clinical_trial_info": clinical_trial_info
|
40
|
+
}.reject do |_k, v|
|
32
41
|
v == OMIT
|
33
42
|
end
|
34
43
|
end
|
@@ -40,11 +49,17 @@ module CandidApiClient
|
|
40
49
|
# @return [CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation]
|
41
50
|
def self.from_json(json_object:)
|
42
51
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
52
|
+
parsed_json = JSON.parse(json_object)
|
43
53
|
id = struct["id"]
|
44
54
|
member_id = struct["member_id"]
|
55
|
+
clinical_trial_info = parsed_json["clinical_trial_info"]&.map do |item|
|
56
|
+
item = item.to_json
|
57
|
+
CandidApiClient::PreEncounter::Common::Types::CanonicalClinicalTrialAssociation.from_json(json_object: item)
|
58
|
+
end
|
45
59
|
new(
|
46
60
|
id: id,
|
47
61
|
member_id: member_id,
|
62
|
+
clinical_trial_info: clinical_trial_info,
|
48
63
|
additional_properties: struct
|
49
64
|
)
|
50
65
|
end
|
@@ -65,6 +80,7 @@ module CandidApiClient
|
|
65
80
|
def self.validate_raw(obj:)
|
66
81
|
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
67
82
|
obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
|
83
|
+
obj.clinical_trial_info&.is_a?(Array) != false || raise("Passed value for field obj.clinical_trial_info is not the expected type, validation failed.")
|
68
84
|
end
|
69
85
|
end
|
70
86
|
end
|
@@ -18,6 +18,8 @@ module CandidApiClient
|
|
18
18
|
attr_reader :use
|
19
19
|
# @return [CandidApiClient::PreEncounter::Common::Types::Period]
|
20
20
|
attr_reader :period
|
21
|
+
# @return [String]
|
22
|
+
attr_reader :suffix
|
21
23
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
22
24
|
attr_reader :additional_properties
|
23
25
|
# @return [Object]
|
@@ -30,15 +32,23 @@ module CandidApiClient
|
|
30
32
|
# @param given [Array<String>]
|
31
33
|
# @param use [CandidApiClient::PreEncounter::Common::Types::NameUse]
|
32
34
|
# @param period [CandidApiClient::PreEncounter::Common::Types::Period]
|
35
|
+
# @param suffix [String]
|
33
36
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
34
37
|
# @return [CandidApiClient::PreEncounter::Common::Types::HumanName]
|
35
|
-
def initialize(family:, given:, use:, period: OMIT, additional_properties: nil)
|
38
|
+
def initialize(family:, given:, use:, period: OMIT, suffix: OMIT, additional_properties: nil)
|
36
39
|
@family = family
|
37
40
|
@given = given
|
38
41
|
@use = use
|
39
42
|
@period = period if period != OMIT
|
43
|
+
@suffix = suffix if suffix != OMIT
|
40
44
|
@additional_properties = additional_properties
|
41
|
-
@_field_set = {
|
45
|
+
@_field_set = {
|
46
|
+
"family": family,
|
47
|
+
"given": given,
|
48
|
+
"use": use,
|
49
|
+
"period": period,
|
50
|
+
"suffix": suffix
|
51
|
+
}.reject do |_k, v|
|
42
52
|
v == OMIT
|
43
53
|
end
|
44
54
|
end
|
@@ -59,11 +69,13 @@ module CandidApiClient
|
|
59
69
|
period = parsed_json["period"].to_json
|
60
70
|
period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
|
61
71
|
end
|
72
|
+
suffix = struct["suffix"]
|
62
73
|
new(
|
63
74
|
family: family,
|
64
75
|
given: given,
|
65
76
|
use: use,
|
66
77
|
period: period,
|
78
|
+
suffix: suffix,
|
67
79
|
additional_properties: struct
|
68
80
|
)
|
69
81
|
end
|
@@ -86,6 +98,7 @@ module CandidApiClient
|
|
86
98
|
obj.given.is_a?(Array) != false || raise("Passed value for field obj.given is not the expected type, validation failed.")
|
87
99
|
obj.use.is_a?(CandidApiClient::PreEncounter::Common::Types::NameUse) != false || raise("Passed value for field obj.use is not the expected type, validation failed.")
|
88
100
|
obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
|
101
|
+
obj.suffix&.is_a?(String) != false || raise("Passed value for field obj.suffix is not the expected type, validation failed.")
|
89
102
|
end
|
90
103
|
end
|
91
104
|
end
|
@@ -41,6 +41,7 @@ module CandidApiClient
|
|
41
41
|
# * :period (Hash)
|
42
42
|
# * :start (Date)
|
43
43
|
# * :end_ (Date)
|
44
|
+
# * :suffix (String)
|
44
45
|
# * :date_of_birth (Date)
|
45
46
|
# * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
|
46
47
|
# * :address (Hash)
|
@@ -174,7 +175,7 @@ module CandidApiClient
|
|
174
175
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
175
176
|
# @example
|
176
177
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
177
|
-
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } })
|
178
|
+
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { }, suffix: "string" }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } })
|
178
179
|
def create(request:, request_options: nil)
|
179
180
|
response = @request_client.conn.post do |req|
|
180
181
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -206,6 +207,7 @@ module CandidApiClient
|
|
206
207
|
# * :period (Hash)
|
207
208
|
# * :start (Date)
|
208
209
|
# * :end_ (Date)
|
210
|
+
# * :suffix (String)
|
209
211
|
# * :date_of_birth (Date)
|
210
212
|
# * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
|
211
213
|
# * :address (Hash)
|
@@ -342,7 +344,7 @@ module CandidApiClient
|
|
342
344
|
# api.pre_encounter.coverages.v_1.update(
|
343
345
|
# id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
344
346
|
# version: "string",
|
345
|
-
# request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } }
|
347
|
+
# request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { }, suffix: "string" }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } }
|
346
348
|
# )
|
347
349
|
def update(id:, version:, request:, request_options: nil)
|
348
350
|
response = @request_client.conn.put do |req|
|
@@ -596,6 +598,7 @@ module CandidApiClient
|
|
596
598
|
# * :period (Hash)
|
597
599
|
# * :start (Date)
|
598
600
|
# * :end_ (Date)
|
601
|
+
# * :suffix (String)
|
599
602
|
# * :date_of_birth (Date)
|
600
603
|
# * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
|
601
604
|
# * :address (Hash)
|
@@ -729,7 +732,7 @@ module CandidApiClient
|
|
729
732
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
730
733
|
# @example
|
731
734
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
732
|
-
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } })
|
735
|
+
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { }, suffix: "string" }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } })
|
733
736
|
def create(request:, request_options: nil)
|
734
737
|
Async do
|
735
738
|
response = @request_client.conn.post do |req|
|
@@ -763,6 +766,7 @@ module CandidApiClient
|
|
763
766
|
# * :period (Hash)
|
764
767
|
# * :start (Date)
|
765
768
|
# * :end_ (Date)
|
769
|
+
# * :suffix (String)
|
766
770
|
# * :date_of_birth (Date)
|
767
771
|
# * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
|
768
772
|
# * :address (Hash)
|
@@ -899,7 +903,7 @@ module CandidApiClient
|
|
899
903
|
# api.pre_encounter.coverages.v_1.update(
|
900
904
|
# id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
901
905
|
# version: "string",
|
902
|
-
# request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } }
|
906
|
+
# request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { }, suffix: "string" }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } }
|
903
907
|
# )
|
904
908
|
def update(id:, version:, request:, request_options: nil)
|
905
909
|
Async do
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../requests"
|
4
|
+
require_relative "v_1/client"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PreEncounter
|
8
|
+
module Images
|
9
|
+
class Client
|
10
|
+
# @return [CandidApiClient::PreEncounter::Images::V1::V1Client]
|
11
|
+
attr_reader :v_1
|
12
|
+
|
13
|
+
# @param request_client [CandidApiClient::RequestClient]
|
14
|
+
# @return [CandidApiClient::PreEncounter::Images::Client]
|
15
|
+
def initialize(request_client:)
|
16
|
+
@v_1 = CandidApiClient::PreEncounter::Images::V1::V1Client.new(request_client: request_client)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class AsyncClient
|
21
|
+
# @return [CandidApiClient::PreEncounter::Images::V1::AsyncV1Client]
|
22
|
+
attr_reader :v_1
|
23
|
+
|
24
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
25
|
+
# @return [CandidApiClient::PreEncounter::Images::AsyncClient]
|
26
|
+
def initialize(request_client:)
|
27
|
+
@v_1 = CandidApiClient::PreEncounter::Images::V1::AsyncV1Client.new(request_client: request_client)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|