candidhealth 0.39.10 → 0.39.11
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/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 +2 -2
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +9 -1
- 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/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/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/write_offs/v_1/client.rb +98 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +6 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b6231982cbcd2cb4e3d7c351b7c9fb52cfd69cf7a39d85e511f3ee22b9e8a66
|
4
|
+
data.tar.gz: 130af694c5f021d199bce6225e6e573632969675c11d36a2cc34cbc3a6e5c605
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1f7c32a0aa8672ce2853efd3246e2b86df029f8dac497a3cbcf199eb07cda358d21443d4fac04d3ccd6652285b4c9cf10522edf65715398cf4f037e33105dd2
|
7
|
+
data.tar.gz: 9fa06e6b9d7487a5ddf40c37c64e620217de9712cf9ca7adc5cee2f6478937bcedcdac75f4b128fdec441a84f4df31ff3979fdb603dd027207ebd0e27a1fa002
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "clinical_trial_phase"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module ClinicalTrials
|
9
|
+
module V1
|
10
|
+
module Types
|
11
|
+
class ClinicalTrial
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :clinical_trial_id
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :non_insurance_payer_id
|
16
|
+
# @return [Boolean]
|
17
|
+
attr_reader :is_active
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :name
|
20
|
+
# @return [String] Must be 8 characters long
|
21
|
+
attr_reader :clinical_trial_number
|
22
|
+
# @return [CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrialPhase]
|
23
|
+
attr_reader :clinical_trial_phase
|
24
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
attr_reader :additional_properties
|
26
|
+
# @return [Object]
|
27
|
+
attr_reader :_field_set
|
28
|
+
protected :_field_set
|
29
|
+
|
30
|
+
OMIT = Object.new
|
31
|
+
|
32
|
+
# @param clinical_trial_id [String]
|
33
|
+
# @param non_insurance_payer_id [String]
|
34
|
+
# @param is_active [Boolean]
|
35
|
+
# @param name [String]
|
36
|
+
# @param clinical_trial_number [String] Must be 8 characters long
|
37
|
+
# @param clinical_trial_phase [CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrialPhase]
|
38
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
39
|
+
# @return [CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrial]
|
40
|
+
def initialize(clinical_trial_id:, non_insurance_payer_id:, is_active:, name:, clinical_trial_number:,
|
41
|
+
clinical_trial_phase: OMIT, additional_properties: nil)
|
42
|
+
@clinical_trial_id = clinical_trial_id
|
43
|
+
@non_insurance_payer_id = non_insurance_payer_id
|
44
|
+
@is_active = is_active
|
45
|
+
@name = name
|
46
|
+
@clinical_trial_number = clinical_trial_number
|
47
|
+
@clinical_trial_phase = clinical_trial_phase if clinical_trial_phase != OMIT
|
48
|
+
@additional_properties = additional_properties
|
49
|
+
@_field_set = {
|
50
|
+
"clinical_trial_id": clinical_trial_id,
|
51
|
+
"non_insurance_payer_id": non_insurance_payer_id,
|
52
|
+
"is_active": is_active,
|
53
|
+
"name": name,
|
54
|
+
"clinical_trial_number": clinical_trial_number,
|
55
|
+
"clinical_trial_phase": clinical_trial_phase
|
56
|
+
}.reject do |_k, v|
|
57
|
+
v == OMIT
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Deserialize a JSON object to an instance of ClinicalTrial
|
62
|
+
#
|
63
|
+
# @param json_object [String]
|
64
|
+
# @return [CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrial]
|
65
|
+
def self.from_json(json_object:)
|
66
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
67
|
+
clinical_trial_id = struct["clinical_trial_id"]
|
68
|
+
non_insurance_payer_id = struct["non_insurance_payer_id"]
|
69
|
+
is_active = struct["is_active"]
|
70
|
+
name = struct["name"]
|
71
|
+
clinical_trial_number = struct["clinical_trial_number"]
|
72
|
+
clinical_trial_phase = struct["clinical_trial_phase"]
|
73
|
+
new(
|
74
|
+
clinical_trial_id: clinical_trial_id,
|
75
|
+
non_insurance_payer_id: non_insurance_payer_id,
|
76
|
+
is_active: is_active,
|
77
|
+
name: name,
|
78
|
+
clinical_trial_number: clinical_trial_number,
|
79
|
+
clinical_trial_phase: clinical_trial_phase,
|
80
|
+
additional_properties: struct
|
81
|
+
)
|
82
|
+
end
|
83
|
+
|
84
|
+
# Serialize an instance of ClinicalTrial to a JSON object
|
85
|
+
#
|
86
|
+
# @return [String]
|
87
|
+
def to_json(*_args)
|
88
|
+
@_field_set&.to_json
|
89
|
+
end
|
90
|
+
|
91
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
92
|
+
# hash and check each fields type against the current object's property
|
93
|
+
# definitions.
|
94
|
+
#
|
95
|
+
# @param obj [Object]
|
96
|
+
# @return [Void]
|
97
|
+
def self.validate_raw(obj:)
|
98
|
+
obj.clinical_trial_id.is_a?(String) != false || raise("Passed value for field obj.clinical_trial_id is not the expected type, validation failed.")
|
99
|
+
obj.non_insurance_payer_id.is_a?(String) != false || raise("Passed value for field obj.non_insurance_payer_id is not the expected type, validation failed.")
|
100
|
+
obj.is_active.is_a?(Boolean) != false || raise("Passed value for field obj.is_active is not the expected type, validation failed.")
|
101
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
102
|
+
obj.clinical_trial_number.is_a?(String) != false || raise("Passed value for field obj.clinical_trial_number is not the expected type, validation failed.")
|
103
|
+
obj.clinical_trial_phase&.is_a?(CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrialPhase) != false || raise("Passed value for field obj.clinical_trial_phase is not the expected type, validation failed.")
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "clinical_trial_phase"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module ClinicalTrials
|
9
|
+
module V1
|
10
|
+
module Types
|
11
|
+
class MutableClinicalTrial
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :name
|
14
|
+
# @return [String] Must be 8 characters long
|
15
|
+
attr_reader :clinical_trial_number
|
16
|
+
# @return [CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrialPhase]
|
17
|
+
attr_reader :clinical_trial_phase
|
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 name [String]
|
27
|
+
# @param clinical_trial_number [String] Must be 8 characters long
|
28
|
+
# @param clinical_trial_phase [CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrialPhase]
|
29
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
# @return [CandidApiClient::ClinicalTrials::V1::Types::MutableClinicalTrial]
|
31
|
+
def initialize(name:, clinical_trial_number:, clinical_trial_phase: OMIT, additional_properties: nil)
|
32
|
+
@name = name
|
33
|
+
@clinical_trial_number = clinical_trial_number
|
34
|
+
@clinical_trial_phase = clinical_trial_phase if clinical_trial_phase != OMIT
|
35
|
+
@additional_properties = additional_properties
|
36
|
+
@_field_set = {
|
37
|
+
"name": name,
|
38
|
+
"clinical_trial_number": clinical_trial_number,
|
39
|
+
"clinical_trial_phase": clinical_trial_phase
|
40
|
+
}.reject do |_k, v|
|
41
|
+
v == OMIT
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Deserialize a JSON object to an instance of MutableClinicalTrial
|
46
|
+
#
|
47
|
+
# @param json_object [String]
|
48
|
+
# @return [CandidApiClient::ClinicalTrials::V1::Types::MutableClinicalTrial]
|
49
|
+
def self.from_json(json_object:)
|
50
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
51
|
+
name = struct["name"]
|
52
|
+
clinical_trial_number = struct["clinical_trial_number"]
|
53
|
+
clinical_trial_phase = struct["clinical_trial_phase"]
|
54
|
+
new(
|
55
|
+
name: name,
|
56
|
+
clinical_trial_number: clinical_trial_number,
|
57
|
+
clinical_trial_phase: clinical_trial_phase,
|
58
|
+
additional_properties: struct
|
59
|
+
)
|
60
|
+
end
|
61
|
+
|
62
|
+
# Serialize an instance of MutableClinicalTrial to a JSON object
|
63
|
+
#
|
64
|
+
# @return [String]
|
65
|
+
def to_json(*_args)
|
66
|
+
@_field_set&.to_json
|
67
|
+
end
|
68
|
+
|
69
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
70
|
+
# hash and check each fields type against the current object's property
|
71
|
+
# definitions.
|
72
|
+
#
|
73
|
+
# @param obj [Object]
|
74
|
+
# @return [Void]
|
75
|
+
def self.validate_raw(obj:)
|
76
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
77
|
+
obj.clinical_trial_number.is_a?(String) != false || raise("Passed value for field obj.clinical_trial_number is not the expected type, validation failed.")
|
78
|
+
obj.clinical_trial_phase&.is_a?(CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrialPhase) != false || raise("Passed value for field obj.clinical_trial_phase is not the expected type, validation failed.")
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -548,7 +548,7 @@ module CandidApiClient
|
|
548
548
|
# @example
|
549
549
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
550
550
|
# api.encounters.v_4.create(
|
551
|
-
# patient: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], non_insurance_payers_info: [{ non_insurance_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", member_id: "string" }], email_consent: true, external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", gender: MALE },
|
551
|
+
# patient: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], non_insurance_payers_info: [{ non_insurance_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", member_id: "string", clinical_trial_info: [{ clinical_trial_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }] }], email_consent: true, external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", gender: MALE },
|
552
552
|
# billing_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, tax_id: "string", npi: "string", taxonomy_code: "string", provider_commercial_license_type: LICENSED_CLINICAL_SOCIAL_WORKER, first_name: "string", last_name: "string", organization_name: "string" },
|
553
553
|
# rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
|
554
554
|
# referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
|
@@ -1688,7 +1688,7 @@ module CandidApiClient
|
|
1688
1688
|
# @example
|
1689
1689
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1690
1690
|
# api.encounters.v_4.create(
|
1691
|
-
# patient: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], non_insurance_payers_info: [{ non_insurance_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", member_id: "string" }], email_consent: true, external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", gender: MALE },
|
1691
|
+
# patient: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", non_insurance_payers: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], non_insurance_payers_info: [{ non_insurance_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", member_id: "string", clinical_trial_info: [{ clinical_trial_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }] }], email_consent: true, external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", gender: MALE },
|
1692
1692
|
# billing_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, tax_id: "string", npi: "string", taxonomy_code: "string", provider_commercial_license_type: LICENSED_CLINICAL_SOCIAL_WORKER, first_name: "string", last_name: "string", organization_name: "string" },
|
1693
1693
|
# rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
|
1694
1694
|
# referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
|
@@ -149,6 +149,8 @@ module CandidApiClient
|
|
149
149
|
attr_reader :epsdt_referral
|
150
150
|
# @return [DateTime] The date and time the encounter was last submitted to a payer.
|
151
151
|
attr_reader :last_submitted_at
|
152
|
+
# @return [DateTime] The date and time the encounter was created.
|
153
|
+
attr_reader :created_at
|
152
154
|
# @return [String] A client-specified unique ID to associate with this encounter;
|
153
155
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
154
156
|
# This field should not contain PHI.
|
@@ -329,6 +331,7 @@ module CandidApiClient
|
|
329
331
|
# @param epsdt_referral [CandidApiClient::Encounters::V4::Types::EpsdtReferral] Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
|
330
332
|
# 837P form
|
331
333
|
# @param last_submitted_at [DateTime] The date and time the encounter was last submitted to a payer.
|
334
|
+
# @param created_at [DateTime] The date and time the encounter was created.
|
332
335
|
# @param external_id [String] A client-specified unique ID to associate with this encounter;
|
333
336
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
334
337
|
# This field should not contain PHI.
|
@@ -404,7 +407,7 @@ module CandidApiClient
|
|
404
407
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
405
408
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
406
409
|
def initialize(encounter_id:, claims:, patient:, billing_provider:, rendering_provider:, service_facility:,
|
407
|
-
responsible_party:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, schema_instances:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, patient_control_number: OMIT, guarantor: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, prior_authorization_number: OMIT, billing_notes: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, coding_attribution: OMIT, work_queue_id: OMIT, work_queue_membership_activated_at: OMIT, referral_number: OMIT, epsdt_referral: OMIT, last_submitted_at: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, appointment_type: OMIT, existing_medications: OMIT, vitals: OMIT, interventions: OMIT, pay_to_address: OMIT, synchronicity: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, additional_properties: nil)
|
410
|
+
responsible_party:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, schema_instances:, created_at:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, patient_control_number: OMIT, guarantor: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, prior_authorization_number: OMIT, billing_notes: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, coding_attribution: OMIT, work_queue_id: OMIT, work_queue_membership_activated_at: OMIT, referral_number: OMIT, epsdt_referral: OMIT, last_submitted_at: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, appointment_type: OMIT, existing_medications: OMIT, vitals: OMIT, interventions: OMIT, pay_to_address: OMIT, synchronicity: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, additional_properties: nil)
|
408
411
|
@patient_control_number = patient_control_number if patient_control_number != OMIT
|
409
412
|
@encounter_id = encounter_id
|
410
413
|
@claims = claims
|
@@ -442,6 +445,7 @@ module CandidApiClient
|
|
442
445
|
@referral_number = referral_number if referral_number != OMIT
|
443
446
|
@epsdt_referral = epsdt_referral if epsdt_referral != OMIT
|
444
447
|
@last_submitted_at = last_submitted_at if last_submitted_at != OMIT
|
448
|
+
@created_at = created_at
|
445
449
|
@external_id = external_id
|
446
450
|
@date_of_service = date_of_service if date_of_service != OMIT
|
447
451
|
@end_date_of_service = end_date_of_service if end_date_of_service != OMIT
|
@@ -501,6 +505,7 @@ module CandidApiClient
|
|
501
505
|
"referral_number": referral_number,
|
502
506
|
"epsdt_referral": epsdt_referral,
|
503
507
|
"last_submitted_at": last_submitted_at,
|
508
|
+
"created_at": created_at,
|
504
509
|
"external_id": external_id,
|
505
510
|
"date_of_service": date_of_service,
|
506
511
|
"end_date_of_service": end_date_of_service,
|
@@ -649,6 +654,7 @@ module CandidApiClient
|
|
649
654
|
last_submitted_at = unless parsed_json["last_submitted_at"].nil?
|
650
655
|
DateTime.parse(parsed_json["last_submitted_at"])
|
651
656
|
end
|
657
|
+
created_at = (DateTime.parse(parsed_json["created_at"]) unless parsed_json["created_at"].nil?)
|
652
658
|
external_id = struct["external_id"]
|
653
659
|
date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
|
654
660
|
end_date_of_service = unless parsed_json["end_date_of_service"].nil?
|
@@ -725,6 +731,7 @@ module CandidApiClient
|
|
725
731
|
referral_number: referral_number,
|
726
732
|
epsdt_referral: epsdt_referral,
|
727
733
|
last_submitted_at: last_submitted_at,
|
734
|
+
created_at: created_at,
|
728
735
|
external_id: external_id,
|
729
736
|
date_of_service: date_of_service,
|
730
737
|
end_date_of_service: end_date_of_service,
|
@@ -796,6 +803,7 @@ module CandidApiClient
|
|
796
803
|
obj.referral_number&.is_a?(String) != false || raise("Passed value for field obj.referral_number is not the expected type, validation failed.")
|
797
804
|
obj.epsdt_referral.nil? || CandidApiClient::Encounters::V4::Types::EpsdtReferral.validate_raw(obj: obj.epsdt_referral)
|
798
805
|
obj.last_submitted_at&.is_a?(DateTime) != false || raise("Passed value for field obj.last_submitted_at is not the expected type, validation failed.")
|
806
|
+
obj.created_at.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
|
799
807
|
obj.external_id.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
|
800
808
|
obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
801
809
|
obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
|
@@ -40,6 +40,10 @@ module CandidApiClient
|
|
40
40
|
# up to 90 days in the past by default. Please email our [Support
|
41
41
|
# team](mailto:support@joincandidhealth.com) with any data requests
|
42
42
|
# outside of these stated guarantees.
|
43
|
+
# **New Customers:** This endpoint is not enabled by default for new Candid
|
44
|
+
# customers. To have this endpoint enabled for your organization,
|
45
|
+
# please email our [Support team](mailto:support@joincandidhealth.com) with the
|
46
|
+
# request.
|
43
47
|
#
|
44
48
|
# @param start_date [Date] Beginning date of claim versions returned in the export, ISO 8601 date e.g.
|
45
49
|
# 2019-08-24.
|
@@ -105,6 +109,10 @@ module CandidApiClient
|
|
105
109
|
# up to 90 days in the past by default. Please email our [Support
|
106
110
|
# team](mailto:support@joincandidhealth.com) with any data requests
|
107
111
|
# outside of these stated guarantees.
|
112
|
+
# **New Customers:** This endpoint is not enabled by default for new Candid
|
113
|
+
# customers. To have this endpoint enabled for your organization,
|
114
|
+
# please email our [Support team](mailto:support@joincandidhealth.com) with the
|
115
|
+
# request.
|
108
116
|
#
|
109
117
|
# @param start_date [Date] Beginning date of claim versions returned in the export, ISO 8601 date e.g.
|
110
118
|
# 2019-08-24.
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../clinical_trials/v_1/types/clinical_trial"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module Individual
|
9
|
+
module Types
|
10
|
+
class PatientClinicalTrialInfo
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :clinical_trial_arm
|
13
|
+
# @return [CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrial]
|
14
|
+
attr_reader :clinical_trial
|
15
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
attr_reader :additional_properties
|
17
|
+
# @return [Object]
|
18
|
+
attr_reader :_field_set
|
19
|
+
protected :_field_set
|
20
|
+
|
21
|
+
OMIT = Object.new
|
22
|
+
|
23
|
+
# @param clinical_trial_arm [String]
|
24
|
+
# @param clinical_trial [CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrial]
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [CandidApiClient::Individual::Types::PatientClinicalTrialInfo]
|
27
|
+
def initialize(clinical_trial:, clinical_trial_arm: OMIT, additional_properties: nil)
|
28
|
+
@clinical_trial_arm = clinical_trial_arm if clinical_trial_arm != OMIT
|
29
|
+
@clinical_trial = clinical_trial
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = {
|
32
|
+
"clinical_trial_arm": clinical_trial_arm,
|
33
|
+
"clinical_trial": clinical_trial
|
34
|
+
}.reject do |_k, v|
|
35
|
+
v == OMIT
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Deserialize a JSON object to an instance of PatientClinicalTrialInfo
|
40
|
+
#
|
41
|
+
# @param json_object [String]
|
42
|
+
# @return [CandidApiClient::Individual::Types::PatientClinicalTrialInfo]
|
43
|
+
def self.from_json(json_object:)
|
44
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
45
|
+
parsed_json = JSON.parse(json_object)
|
46
|
+
clinical_trial_arm = struct["clinical_trial_arm"]
|
47
|
+
if parsed_json["clinical_trial"].nil?
|
48
|
+
clinical_trial = nil
|
49
|
+
else
|
50
|
+
clinical_trial = parsed_json["clinical_trial"].to_json
|
51
|
+
clinical_trial = CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrial.from_json(json_object: clinical_trial)
|
52
|
+
end
|
53
|
+
new(
|
54
|
+
clinical_trial_arm: clinical_trial_arm,
|
55
|
+
clinical_trial: clinical_trial,
|
56
|
+
additional_properties: struct
|
57
|
+
)
|
58
|
+
end
|
59
|
+
|
60
|
+
# Serialize an instance of PatientClinicalTrialInfo to a JSON object
|
61
|
+
#
|
62
|
+
# @return [String]
|
63
|
+
def to_json(*_args)
|
64
|
+
@_field_set&.to_json
|
65
|
+
end
|
66
|
+
|
67
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
68
|
+
# hash and check each fields type against the current object's property
|
69
|
+
# definitions.
|
70
|
+
#
|
71
|
+
# @param obj [Object]
|
72
|
+
# @return [Void]
|
73
|
+
def self.validate_raw(obj:)
|
74
|
+
obj.clinical_trial_arm&.is_a?(String) != false || raise("Passed value for field obj.clinical_trial_arm is not the expected type, validation failed.")
|
75
|
+
CandidApiClient::ClinicalTrials::V1::Types::ClinicalTrial.validate_raw(obj: obj.clinical_trial)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module Individual
|
8
|
+
module Types
|
9
|
+
class PatientClinicalTrialInfoCreate
|
10
|
+
# @return [String]
|
11
|
+
attr_reader :clinical_trial_arm
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :clinical_trial_id
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
|
+
attr_reader :additional_properties
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :_field_set
|
18
|
+
protected :_field_set
|
19
|
+
|
20
|
+
OMIT = Object.new
|
21
|
+
|
22
|
+
# @param clinical_trial_arm [String]
|
23
|
+
# @param clinical_trial_id [String]
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [CandidApiClient::Individual::Types::PatientClinicalTrialInfoCreate]
|
26
|
+
def initialize(clinical_trial_id:, clinical_trial_arm: OMIT, additional_properties: nil)
|
27
|
+
@clinical_trial_arm = clinical_trial_arm if clinical_trial_arm != OMIT
|
28
|
+
@clinical_trial_id = clinical_trial_id
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = {
|
31
|
+
"clinical_trial_arm": clinical_trial_arm,
|
32
|
+
"clinical_trial_id": clinical_trial_id
|
33
|
+
}.reject do |_k, v|
|
34
|
+
v == OMIT
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# Deserialize a JSON object to an instance of PatientClinicalTrialInfoCreate
|
39
|
+
#
|
40
|
+
# @param json_object [String]
|
41
|
+
# @return [CandidApiClient::Individual::Types::PatientClinicalTrialInfoCreate]
|
42
|
+
def self.from_json(json_object:)
|
43
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
44
|
+
clinical_trial_arm = struct["clinical_trial_arm"]
|
45
|
+
clinical_trial_id = struct["clinical_trial_id"]
|
46
|
+
new(
|
47
|
+
clinical_trial_arm: clinical_trial_arm,
|
48
|
+
clinical_trial_id: clinical_trial_id,
|
49
|
+
additional_properties: struct
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serialize an instance of PatientClinicalTrialInfoCreate to a JSON object
|
54
|
+
#
|
55
|
+
# @return [String]
|
56
|
+
def to_json(*_args)
|
57
|
+
@_field_set&.to_json
|
58
|
+
end
|
59
|
+
|
60
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
61
|
+
# hash and check each fields type against the current object's property
|
62
|
+
# definitions.
|
63
|
+
#
|
64
|
+
# @param obj [Object]
|
65
|
+
# @return [Void]
|
66
|
+
def self.validate_raw(obj:)
|
67
|
+
obj.clinical_trial_arm&.is_a?(String) != false || raise("Passed value for field obj.clinical_trial_arm is not the expected type, validation failed.")
|
68
|
+
obj.clinical_trial_id.is_a?(String) != false || raise("Passed value for field obj.clinical_trial_id is not the expected type, validation failed.")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../../non_insurance_payers/v_1/types/non_insurance_payer"
|
4
|
+
require_relative "patient_clinical_trial_info"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
@@ -12,6 +13,8 @@ module CandidApiClient
|
|
12
13
|
attr_reader :non_insurance_payer
|
13
14
|
# @return [String]
|
14
15
|
attr_reader :member_id
|
16
|
+
# @return [Array<CandidApiClient::Individual::Types::PatientClinicalTrialInfo>] 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 non_insurance_payer [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer]
|
24
27
|
# @param member_id [String]
|
28
|
+
# @param clinical_trial_info [Array<CandidApiClient::Individual::Types::PatientClinicalTrialInfo>] 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::Individual::Types::PatientNonInsurancePayerInfo]
|
27
|
-
def initialize(non_insurance_payer:, member_id: OMIT, additional_properties: nil)
|
31
|
+
def initialize(non_insurance_payer:, clinical_trial_info:, member_id: OMIT, additional_properties: nil)
|
28
32
|
@non_insurance_payer = non_insurance_payer
|
29
33
|
@member_id = member_id if member_id != OMIT
|
34
|
+
@clinical_trial_info = clinical_trial_info
|
30
35
|
@additional_properties = additional_properties
|
31
|
-
@_field_set = {
|
36
|
+
@_field_set = {
|
37
|
+
"non_insurance_payer": non_insurance_payer,
|
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
|
@@ -47,9 +56,14 @@ module CandidApiClient
|
|
47
56
|
non_insurance_payer = CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.from_json(json_object: non_insurance_payer)
|
48
57
|
end
|
49
58
|
member_id = struct["member_id"]
|
59
|
+
clinical_trial_info = parsed_json["clinical_trial_info"]&.map do |item|
|
60
|
+
item = item.to_json
|
61
|
+
CandidApiClient::Individual::Types::PatientClinicalTrialInfo.from_json(json_object: item)
|
62
|
+
end
|
50
63
|
new(
|
51
64
|
non_insurance_payer: non_insurance_payer,
|
52
65
|
member_id: member_id,
|
66
|
+
clinical_trial_info: clinical_trial_info,
|
53
67
|
additional_properties: struct
|
54
68
|
)
|
55
69
|
end
|
@@ -70,6 +84,7 @@ module CandidApiClient
|
|
70
84
|
def self.validate_raw(obj:)
|
71
85
|
CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.validate_raw(obj: obj.non_insurance_payer)
|
72
86
|
obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
|
87
|
+
obj.clinical_trial_info.is_a?(Array) != false || raise("Passed value for field obj.clinical_trial_info is not the expected type, validation failed.")
|
73
88
|
end
|
74
89
|
end
|
75
90
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "patient_clinical_trial_info_create"
|
3
4
|
require "ostruct"
|
4
5
|
require "json"
|
5
6
|
|
@@ -11,6 +12,8 @@ module CandidApiClient
|
|
11
12
|
attr_reader :non_insurance_payer_id
|
12
13
|
# @return [String]
|
13
14
|
attr_reader :member_id
|
15
|
+
# @return [Array<CandidApiClient::Individual::Types::PatientClinicalTrialInfoCreate>]
|
16
|
+
attr_reader :clinical_trial_info
|
14
17
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
18
|
attr_reader :additional_properties
|
16
19
|
# @return [Object]
|
@@ -21,13 +24,19 @@ module CandidApiClient
|
|
21
24
|
|
22
25
|
# @param non_insurance_payer_id [String]
|
23
26
|
# @param member_id [String]
|
27
|
+
# @param clinical_trial_info [Array<CandidApiClient::Individual::Types::PatientClinicalTrialInfoCreate>]
|
24
28
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
29
|
# @return [CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate]
|
26
|
-
def initialize(non_insurance_payer_id:, member_id: OMIT, additional_properties: nil)
|
30
|
+
def initialize(non_insurance_payer_id:, member_id: OMIT, clinical_trial_info: OMIT, additional_properties: nil)
|
27
31
|
@non_insurance_payer_id = non_insurance_payer_id
|
28
32
|
@member_id = member_id if member_id != OMIT
|
33
|
+
@clinical_trial_info = clinical_trial_info if clinical_trial_info != OMIT
|
29
34
|
@additional_properties = additional_properties
|
30
|
-
@_field_set = {
|
35
|
+
@_field_set = {
|
36
|
+
"non_insurance_payer_id": non_insurance_payer_id,
|
37
|
+
"member_id": member_id,
|
38
|
+
"clinical_trial_info": clinical_trial_info
|
39
|
+
}.reject do |_k, v|
|
31
40
|
v == OMIT
|
32
41
|
end
|
33
42
|
end
|
@@ -38,11 +47,17 @@ module CandidApiClient
|
|
38
47
|
# @return [CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate]
|
39
48
|
def self.from_json(json_object:)
|
40
49
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
50
|
+
parsed_json = JSON.parse(json_object)
|
41
51
|
non_insurance_payer_id = struct["non_insurance_payer_id"]
|
42
52
|
member_id = struct["member_id"]
|
53
|
+
clinical_trial_info = parsed_json["clinical_trial_info"]&.map do |item|
|
54
|
+
item = item.to_json
|
55
|
+
CandidApiClient::Individual::Types::PatientClinicalTrialInfoCreate.from_json(json_object: item)
|
56
|
+
end
|
43
57
|
new(
|
44
58
|
non_insurance_payer_id: non_insurance_payer_id,
|
45
59
|
member_id: member_id,
|
60
|
+
clinical_trial_info: clinical_trial_info,
|
46
61
|
additional_properties: struct
|
47
62
|
)
|
48
63
|
end
|
@@ -63,6 +78,7 @@ module CandidApiClient
|
|
63
78
|
def self.validate_raw(obj:)
|
64
79
|
obj.non_insurance_payer_id.is_a?(String) != false || raise("Passed value for field obj.non_insurance_payer_id is not the expected type, validation failed.")
|
65
80
|
obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
|
81
|
+
obj.clinical_trial_info&.is_a?(Array) != false || raise("Passed value for field obj.clinical_trial_info is not the expected type, validation failed.")
|
66
82
|
end
|
67
83
|
end
|
68
84
|
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
|
@@ -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
|
@@ -8,6 +8,7 @@ require_relative "types/write_offs_page"
|
|
8
8
|
require_relative "types/write_off"
|
9
9
|
require_relative "types/write_off_create"
|
10
10
|
require_relative "types/create_write_offs_response"
|
11
|
+
require "json"
|
11
12
|
require "async"
|
12
13
|
|
13
14
|
module CandidApiClient
|
@@ -150,6 +151,52 @@ module CandidApiClient
|
|
150
151
|
end
|
151
152
|
CandidApiClient::WriteOffs::V1::Types::WriteOff.from_json(json_object: response.body)
|
152
153
|
end
|
154
|
+
|
155
|
+
# Reverts an Insurance Balance Adjustment given an `adjustment_id`
|
156
|
+
#
|
157
|
+
# @param adjustment_id [String]
|
158
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
159
|
+
# @return [CandidApiClient::WriteOffs::V1::Types::WriteOff]
|
160
|
+
# @example
|
161
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
162
|
+
# api.write_offs.v_1.revert_insurance_balance_adjustment(adjustment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
163
|
+
def revert_insurance_balance_adjustment(adjustment_id:, request_options: nil)
|
164
|
+
response = @request_client.conn.post do |req|
|
165
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
166
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
167
|
+
req.headers = {
|
168
|
+
**(req.headers || {}),
|
169
|
+
**@request_client.get_headers,
|
170
|
+
**(request_options&.additional_headers || {})
|
171
|
+
}.compact
|
172
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
173
|
+
request_options: request_options)}/api/write-offs/v1/#{adjustment_id}/revert"
|
174
|
+
end
|
175
|
+
CandidApiClient::WriteOffs::V1::Types::WriteOff.from_json(json_object: response.body)
|
176
|
+
end
|
177
|
+
|
178
|
+
# Reverts an ERA-originated Insurance Balance Adjustment given an `adjustment_id`
|
179
|
+
#
|
180
|
+
# @param adjustment_id [String]
|
181
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
182
|
+
# @return [String]
|
183
|
+
# @example
|
184
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
185
|
+
# api.write_offs.v_1.revert_era_originated_insurance_balance_adjustment(adjustment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
186
|
+
def revert_era_originated_insurance_balance_adjustment(adjustment_id:, request_options: nil)
|
187
|
+
response = @request_client.conn.post do |req|
|
188
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
189
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
190
|
+
req.headers = {
|
191
|
+
**(req.headers || {}),
|
192
|
+
**@request_client.get_headers,
|
193
|
+
**(request_options&.additional_headers || {})
|
194
|
+
}.compact
|
195
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
196
|
+
request_options: request_options)}/api/write-offs/v1/#{adjustment_id}/revert-era-originated"
|
197
|
+
end
|
198
|
+
JSON.parse(response.body)
|
199
|
+
end
|
153
200
|
end
|
154
201
|
|
155
202
|
class AsyncV1Client
|
@@ -297,6 +344,57 @@ module CandidApiClient
|
|
297
344
|
CandidApiClient::WriteOffs::V1::Types::WriteOff.from_json(json_object: response.body)
|
298
345
|
end
|
299
346
|
end
|
347
|
+
|
348
|
+
# Reverts an Insurance Balance Adjustment given an `adjustment_id`
|
349
|
+
#
|
350
|
+
# @param adjustment_id [String]
|
351
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
352
|
+
# @return [CandidApiClient::WriteOffs::V1::Types::WriteOff]
|
353
|
+
# @example
|
354
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
355
|
+
# api.write_offs.v_1.revert_insurance_balance_adjustment(adjustment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
356
|
+
def revert_insurance_balance_adjustment(adjustment_id:, request_options: nil)
|
357
|
+
Async do
|
358
|
+
response = @request_client.conn.post do |req|
|
359
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
360
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
361
|
+
req.headers = {
|
362
|
+
**(req.headers || {}),
|
363
|
+
**@request_client.get_headers,
|
364
|
+
**(request_options&.additional_headers || {})
|
365
|
+
}.compact
|
366
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
367
|
+
request_options: request_options)}/api/write-offs/v1/#{adjustment_id}/revert"
|
368
|
+
end
|
369
|
+
CandidApiClient::WriteOffs::V1::Types::WriteOff.from_json(json_object: response.body)
|
370
|
+
end
|
371
|
+
end
|
372
|
+
|
373
|
+
# Reverts an ERA-originated Insurance Balance Adjustment given an `adjustment_id`
|
374
|
+
#
|
375
|
+
# @param adjustment_id [String]
|
376
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
377
|
+
# @return [String]
|
378
|
+
# @example
|
379
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
380
|
+
# api.write_offs.v_1.revert_era_originated_insurance_balance_adjustment(adjustment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
381
|
+
def revert_era_originated_insurance_balance_adjustment(adjustment_id:, request_options: nil)
|
382
|
+
Async do
|
383
|
+
response = @request_client.conn.post do |req|
|
384
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
385
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
386
|
+
req.headers = {
|
387
|
+
**(req.headers || {}),
|
388
|
+
**@request_client.get_headers,
|
389
|
+
**(request_options&.additional_headers || {})
|
390
|
+
}.compact
|
391
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
392
|
+
request_options: request_options)}/api/write-offs/v1/#{adjustment_id}/revert-era-originated"
|
393
|
+
end
|
394
|
+
parsed_json = JSON.parse(response.body)
|
395
|
+
parsed_json
|
396
|
+
end
|
397
|
+
end
|
300
398
|
end
|
301
399
|
end
|
302
400
|
end
|
data/lib/requests.rb
CHANGED
@@ -43,7 +43,7 @@ module CandidApiClient
|
|
43
43
|
|
44
44
|
# @return [Hash{String => String}]
|
45
45
|
def get_headers
|
46
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.39.
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.39.11" }
|
47
47
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
48
48
|
headers
|
49
49
|
end
|
@@ -87,7 +87,7 @@ module CandidApiClient
|
|
87
87
|
|
88
88
|
# @return [Hash{String => String}]
|
89
89
|
def get_headers
|
90
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.39.
|
90
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.39.11" }
|
91
91
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
92
92
|
headers
|
93
93
|
end
|
data/lib/types_export.rb
CHANGED
@@ -15,6 +15,9 @@ require_relative "candidhealth/charge_capture/v_1/types/charge_capture_status"
|
|
15
15
|
require_relative "candidhealth/claim_submission/v_1/types/claim_frequency_type_code"
|
16
16
|
require_relative "candidhealth/claim_submission/v_1/types/external_claim_submission_create"
|
17
17
|
require_relative "candidhealth/claim_submission/v_1/types/claim_submission_record_create"
|
18
|
+
require_relative "candidhealth/clinical_trials/v_1/types/mutable_clinical_trial"
|
19
|
+
require_relative "candidhealth/clinical_trials/v_1/types/clinical_trial"
|
20
|
+
require_relative "candidhealth/clinical_trials/v_1/types/clinical_trial_phase"
|
18
21
|
require_relative "candidhealth/contracts/v_2/types/contract_is_linked_to_fee_schedule_error"
|
19
22
|
require_relative "candidhealth/contracts/v_2/types/contract_invalid_expiration_date_error"
|
20
23
|
require_relative "candidhealth/contracts/v_2/types/regions_update"
|
@@ -432,6 +435,8 @@ require_relative "candidhealth/individual/types/subscriber_base"
|
|
432
435
|
require_relative "candidhealth/individual/types/subscriber_create"
|
433
436
|
require_relative "candidhealth/individual/types/subscriber"
|
434
437
|
require_relative "candidhealth/individual/types/patient_non_insurance_payer_info_create"
|
438
|
+
require_relative "candidhealth/individual/types/patient_clinical_trial_info_create"
|
439
|
+
require_relative "candidhealth/individual/types/patient_clinical_trial_info"
|
435
440
|
require_relative "candidhealth/individual/types/patient_non_insurance_payer_info"
|
436
441
|
require_relative "candidhealth/individual/types/patient_create"
|
437
442
|
require_relative "candidhealth/individual/types/patient_update"
|
@@ -453,6 +458,7 @@ require_relative "candidhealth/tasks/commons/types/task_category"
|
|
453
458
|
require_relative "candidhealth/pre_encounter/common/types/base_model"
|
454
459
|
require_relative "candidhealth/pre_encounter/common/types/external_identifier"
|
455
460
|
require_relative "candidhealth/pre_encounter/common/types/canonical_non_insurance_payer_association"
|
461
|
+
require_relative "candidhealth/pre_encounter/common/types/canonical_clinical_trial_association"
|
456
462
|
require_relative "candidhealth/pre_encounter/common/types/relationship"
|
457
463
|
require_relative "candidhealth/pre_encounter/common/types/gender"
|
458
464
|
require_relative "candidhealth/pre_encounter/common/types/sex"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: candidhealth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.39.
|
4
|
+
version: 0.39.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -122,6 +122,9 @@ files:
|
|
122
122
|
- lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create.rb
|
123
123
|
- lib/candidhealth/claims/types/claim.rb
|
124
124
|
- lib/candidhealth/claims/types/claim_status.rb
|
125
|
+
- lib/candidhealth/clinical_trials/v_1/types/clinical_trial.rb
|
126
|
+
- lib/candidhealth/clinical_trials/v_1/types/clinical_trial_phase.rb
|
127
|
+
- lib/candidhealth/clinical_trials/v_1/types/mutable_clinical_trial.rb
|
125
128
|
- lib/candidhealth/commons/types/billing_provider_commercial_license_type.rb
|
126
129
|
- lib/candidhealth/commons/types/claim_adjustment_group_codes.rb
|
127
130
|
- lib/candidhealth/commons/types/claim_submission_payer_responsibility_type.rb
|
@@ -366,6 +369,8 @@ files:
|
|
366
369
|
- lib/candidhealth/individual/types/individual_base.rb
|
367
370
|
- lib/candidhealth/individual/types/patient.rb
|
368
371
|
- lib/candidhealth/individual/types/patient_base.rb
|
372
|
+
- lib/candidhealth/individual/types/patient_clinical_trial_info.rb
|
373
|
+
- lib/candidhealth/individual/types/patient_clinical_trial_info_create.rb
|
369
374
|
- lib/candidhealth/individual/types/patient_create.rb
|
370
375
|
- lib/candidhealth/individual/types/patient_non_insurance_payer_info.rb
|
371
376
|
- lib/candidhealth/individual/types/patient_non_insurance_payer_info_create.rb
|
@@ -497,6 +502,7 @@ files:
|
|
497
502
|
- lib/candidhealth/pre_encounter/common/types/address.rb
|
498
503
|
- lib/candidhealth/pre_encounter/common/types/address_use.rb
|
499
504
|
- lib/candidhealth/pre_encounter/common/types/base_model.rb
|
505
|
+
- lib/candidhealth/pre_encounter/common/types/canonical_clinical_trial_association.rb
|
500
506
|
- lib/candidhealth/pre_encounter/common/types/canonical_non_insurance_payer_association.rb
|
501
507
|
- lib/candidhealth/pre_encounter/common/types/contact_point.rb
|
502
508
|
- lib/candidhealth/pre_encounter/common/types/contact_point_use.rb
|