candidhealth 0.46.1 → 1.3.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/auth/client.rb +7 -7
- data/lib/candidhealth/auth/{v_2 → default}/client.rb +39 -13
- data/lib/candidhealth/auth/{v_2 → default}/types/auth_get_token_response.rb +3 -3
- data/lib/candidhealth/auth/default/types/invalid_content_type_error_type.rb +60 -0
- data/lib/candidhealth/auth/{v_2 → default}/types/too_many_requests_error_type.rb +3 -3
- data/lib/candidhealth/billing_notes/v_2/types/billing_note_base_optional.rb +62 -0
- data/lib/candidhealth/charge_capture/v_1/client.rb +504 -524
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture.rb +17 -1
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +173 -173
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb +26 -2
- data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +58 -0
- data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional.rb +100 -0
- data/lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create_optional.rb +101 -0
- data/lib/candidhealth/commons/types/phone_number_optional.rb +71 -0
- data/lib/candidhealth/commons/types/procedure_modifier.rb +2 -0
- data/lib/candidhealth/commons/types/street_address_long_zip_optional.rb +107 -0
- data/lib/candidhealth/custom_schemas/v_1/types/schema_instance_optional.rb +78 -0
- data/lib/candidhealth/diagnoses/client.rb +23 -4
- data/lib/candidhealth/diagnoses/types/diagnosis.rb +21 -2
- data/lib/candidhealth/diagnoses/types/diagnosis_create.rb +25 -2
- data/lib/candidhealth/diagnoses/types/diagnosis_create_optional.rb +126 -0
- data/lib/candidhealth/diagnoses/types/standalone_diagnosis_create.rb +22 -2
- data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider_optional.rb +123 -0
- data/lib/candidhealth/encounters/v_4/client.rb +214 -208
- data/lib/candidhealth/encounters/v_4/types/claim_supplemental_information_optional.rb +86 -0
- data/lib/candidhealth/encounters/v_4/types/clinical_note_category_create_optional.rb +78 -0
- data/lib/candidhealth/encounters/v_4/types/clinical_note_optional.rb +93 -0
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +16 -4
- data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +4 -2
- data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +780 -0
- data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +1 -139
- data/lib/candidhealth/encounters/v_4/types/epsdt_referral_optional.rb +85 -0
- data/lib/candidhealth/encounters/v_4/types/intake_question_optional.rb +84 -0
- data/lib/candidhealth/encounters/v_4/types/intervention_optional.rb +114 -0
- data/lib/candidhealth/encounters/v_4/types/lab_optional.rb +80 -0
- data/lib/candidhealth/encounters/v_4/types/medication_optional.rb +108 -0
- data/lib/candidhealth/encounters/v_4/types/patient_history_category_optional.rb +78 -0
- data/lib/candidhealth/guarantor/v_1/types/guarantor_optional.rb +144 -0
- data/lib/candidhealth/individual/types/individual_base_optional.rb +78 -0
- data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create_optional.rb +89 -0
- data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +8 -8
- data/lib/candidhealth/individual/types/subscriber_base_optional.rb +118 -0
- data/lib/candidhealth/individual/types/subscriber_create_optional.rb +132 -0
- data/lib/candidhealth/insurance_adjudications/v_1/client.rb +2 -0
- data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_create.rb +9 -1
- data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create_optional.rb +167 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +13 -13
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +4 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response.rb +10 -10
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check.rb +4 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +4 -4
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +140 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/batch_eligibility_response.rb +75 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check.rb +18 -6
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error.rb +80 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_details.rb +112 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_source.rb +17 -0
- data/lib/candidhealth/pre_encounter/{coverages → eligibility_checks}/v_1/types/eligibility_check_metadata.rb +7 -7
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_page.rb +98 -0
- data/lib/candidhealth/pre_encounter/{coverages → eligibility_checks}/v_1/types/eligibility_check_status.rb +2 -2
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_request.rb +18 -2
- data/lib/candidhealth/pre_encounter/{coverages → eligibility_checks}/v_1/types/eligibility_status.rb +2 -1
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/parsed_response.rb +4 -4
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +13 -1
- data/lib/candidhealth/service_lines/v_2/types/denial_reason_content.rb +1 -0
- data/lib/candidhealth/service_lines/v_2/types/drug_identification_optional.rb +126 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +239 -0
- data/lib/candidhealth/service_lines/v_2/types/test_result_optional.rb +73 -0
- data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_reason.rb +1 -0
- data/lib/candidhealth/write_offs/v_1/types/patient_write_off_reason.rb +1 -0
- data/lib/candidhealth/yes_no_indicator/types/yes_no_indicator.rb +14 -0
- data/lib/core/oauth.rb +2 -2
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +41 -8
- metadata +42 -9
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check.rb +0 -116
@@ -0,0 +1,118 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../commons/types/patient_relationship_to_insured_code_all"
|
4
|
+
require "date"
|
5
|
+
require_relative "../../commons/types/street_address_short_zip_optional"
|
6
|
+
require_relative "gender"
|
7
|
+
require "ostruct"
|
8
|
+
require "json"
|
9
|
+
|
10
|
+
module CandidApiClient
|
11
|
+
module Individual
|
12
|
+
module Types
|
13
|
+
class SubscriberBaseOptional
|
14
|
+
# @return [CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll]
|
15
|
+
attr_reader :patient_relationship_to_subscriber_code
|
16
|
+
# @return [Date]
|
17
|
+
attr_reader :date_of_birth
|
18
|
+
# @return [CandidApiClient::Commons::Types::StreetAddressShortZipOptional]
|
19
|
+
attr_reader :address
|
20
|
+
# @return [String]
|
21
|
+
attr_reader :first_name
|
22
|
+
# @return [String]
|
23
|
+
attr_reader :last_name
|
24
|
+
# @return [CandidApiClient::Individual::Types::Gender]
|
25
|
+
attr_reader :gender
|
26
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
attr_reader :additional_properties
|
28
|
+
# @return [Object]
|
29
|
+
attr_reader :_field_set
|
30
|
+
protected :_field_set
|
31
|
+
|
32
|
+
OMIT = Object.new
|
33
|
+
|
34
|
+
# @param patient_relationship_to_subscriber_code [CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll]
|
35
|
+
# @param date_of_birth [Date]
|
36
|
+
# @param address [CandidApiClient::Commons::Types::StreetAddressShortZipOptional]
|
37
|
+
# @param first_name [String]
|
38
|
+
# @param last_name [String]
|
39
|
+
# @param gender [CandidApiClient::Individual::Types::Gender]
|
40
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
41
|
+
# @return [CandidApiClient::Individual::Types::SubscriberBaseOptional]
|
42
|
+
def initialize(patient_relationship_to_subscriber_code: OMIT, date_of_birth: OMIT, address: OMIT,
|
43
|
+
first_name: OMIT, last_name: OMIT, gender: OMIT, additional_properties: nil)
|
44
|
+
if patient_relationship_to_subscriber_code != OMIT
|
45
|
+
@patient_relationship_to_subscriber_code = patient_relationship_to_subscriber_code
|
46
|
+
end
|
47
|
+
@date_of_birth = date_of_birth if date_of_birth != OMIT
|
48
|
+
@address = address if address != OMIT
|
49
|
+
@first_name = first_name if first_name != OMIT
|
50
|
+
@last_name = last_name if last_name != OMIT
|
51
|
+
@gender = gender if gender != OMIT
|
52
|
+
@additional_properties = additional_properties
|
53
|
+
@_field_set = {
|
54
|
+
"patient_relationship_to_subscriber_code": patient_relationship_to_subscriber_code,
|
55
|
+
"date_of_birth": date_of_birth,
|
56
|
+
"address": address,
|
57
|
+
"first_name": first_name,
|
58
|
+
"last_name": last_name,
|
59
|
+
"gender": gender
|
60
|
+
}.reject do |_k, v|
|
61
|
+
v == OMIT
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Deserialize a JSON object to an instance of SubscriberBaseOptional
|
66
|
+
#
|
67
|
+
# @param json_object [String]
|
68
|
+
# @return [CandidApiClient::Individual::Types::SubscriberBaseOptional]
|
69
|
+
def self.from_json(json_object:)
|
70
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
71
|
+
parsed_json = JSON.parse(json_object)
|
72
|
+
patient_relationship_to_subscriber_code = struct["patient_relationship_to_subscriber_code"]
|
73
|
+
date_of_birth = (Date.parse(parsed_json["date_of_birth"]) unless parsed_json["date_of_birth"].nil?)
|
74
|
+
if parsed_json["address"].nil?
|
75
|
+
address = nil
|
76
|
+
else
|
77
|
+
address = parsed_json["address"].to_json
|
78
|
+
address = CandidApiClient::Commons::Types::StreetAddressShortZipOptional.from_json(json_object: address)
|
79
|
+
end
|
80
|
+
first_name = struct["first_name"]
|
81
|
+
last_name = struct["last_name"]
|
82
|
+
gender = struct["gender"]
|
83
|
+
new(
|
84
|
+
patient_relationship_to_subscriber_code: patient_relationship_to_subscriber_code,
|
85
|
+
date_of_birth: date_of_birth,
|
86
|
+
address: address,
|
87
|
+
first_name: first_name,
|
88
|
+
last_name: last_name,
|
89
|
+
gender: gender,
|
90
|
+
additional_properties: struct
|
91
|
+
)
|
92
|
+
end
|
93
|
+
|
94
|
+
# Serialize an instance of SubscriberBaseOptional to a JSON object
|
95
|
+
#
|
96
|
+
# @return [String]
|
97
|
+
def to_json(*_args)
|
98
|
+
@_field_set&.to_json
|
99
|
+
end
|
100
|
+
|
101
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
102
|
+
# hash and check each fields type against the current object's property
|
103
|
+
# definitions.
|
104
|
+
#
|
105
|
+
# @param obj [Object]
|
106
|
+
# @return [Void]
|
107
|
+
def self.validate_raw(obj:)
|
108
|
+
obj.patient_relationship_to_subscriber_code&.is_a?(CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll) != false || raise("Passed value for field obj.patient_relationship_to_subscriber_code is not the expected type, validation failed.")
|
109
|
+
obj.date_of_birth&.is_a?(Date) != false || raise("Passed value for field obj.date_of_birth is not the expected type, validation failed.")
|
110
|
+
obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressShortZipOptional.validate_raw(obj: obj.address)
|
111
|
+
obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
|
112
|
+
obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
|
113
|
+
obj.gender&.is_a?(CandidApiClient::Individual::Types::Gender) != false || raise("Passed value for field obj.gender is not the expected type, validation failed.")
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -0,0 +1,132 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../insurance_cards/v_2/types/insurance_card_create_optional"
|
4
|
+
require_relative "../../commons/types/patient_relationship_to_insured_code_all"
|
5
|
+
require "date"
|
6
|
+
require_relative "../../commons/types/street_address_short_zip_optional"
|
7
|
+
require_relative "gender"
|
8
|
+
require "ostruct"
|
9
|
+
require "json"
|
10
|
+
|
11
|
+
module CandidApiClient
|
12
|
+
module Individual
|
13
|
+
module Types
|
14
|
+
class SubscriberCreateOptional
|
15
|
+
# @return [CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreateOptional]
|
16
|
+
attr_reader :insurance_card
|
17
|
+
# @return [CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll]
|
18
|
+
attr_reader :patient_relationship_to_subscriber_code
|
19
|
+
# @return [Date]
|
20
|
+
attr_reader :date_of_birth
|
21
|
+
# @return [CandidApiClient::Commons::Types::StreetAddressShortZipOptional]
|
22
|
+
attr_reader :address
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :first_name
|
25
|
+
# @return [String]
|
26
|
+
attr_reader :last_name
|
27
|
+
# @return [CandidApiClient::Individual::Types::Gender]
|
28
|
+
attr_reader :gender
|
29
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
attr_reader :additional_properties
|
31
|
+
# @return [Object]
|
32
|
+
attr_reader :_field_set
|
33
|
+
protected :_field_set
|
34
|
+
|
35
|
+
OMIT = Object.new
|
36
|
+
|
37
|
+
# @param insurance_card [CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreateOptional]
|
38
|
+
# @param patient_relationship_to_subscriber_code [CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll]
|
39
|
+
# @param date_of_birth [Date]
|
40
|
+
# @param address [CandidApiClient::Commons::Types::StreetAddressShortZipOptional]
|
41
|
+
# @param first_name [String]
|
42
|
+
# @param last_name [String]
|
43
|
+
# @param gender [CandidApiClient::Individual::Types::Gender]
|
44
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
45
|
+
# @return [CandidApiClient::Individual::Types::SubscriberCreateOptional]
|
46
|
+
def initialize(insurance_card: OMIT, patient_relationship_to_subscriber_code: OMIT, date_of_birth: OMIT,
|
47
|
+
address: OMIT, first_name: OMIT, last_name: OMIT, gender: OMIT, additional_properties: nil)
|
48
|
+
@insurance_card = insurance_card if insurance_card != OMIT
|
49
|
+
if patient_relationship_to_subscriber_code != OMIT
|
50
|
+
@patient_relationship_to_subscriber_code = patient_relationship_to_subscriber_code
|
51
|
+
end
|
52
|
+
@date_of_birth = date_of_birth if date_of_birth != OMIT
|
53
|
+
@address = address if address != OMIT
|
54
|
+
@first_name = first_name if first_name != OMIT
|
55
|
+
@last_name = last_name if last_name != OMIT
|
56
|
+
@gender = gender if gender != OMIT
|
57
|
+
@additional_properties = additional_properties
|
58
|
+
@_field_set = {
|
59
|
+
"insurance_card": insurance_card,
|
60
|
+
"patient_relationship_to_subscriber_code": patient_relationship_to_subscriber_code,
|
61
|
+
"date_of_birth": date_of_birth,
|
62
|
+
"address": address,
|
63
|
+
"first_name": first_name,
|
64
|
+
"last_name": last_name,
|
65
|
+
"gender": gender
|
66
|
+
}.reject do |_k, v|
|
67
|
+
v == OMIT
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Deserialize a JSON object to an instance of SubscriberCreateOptional
|
72
|
+
#
|
73
|
+
# @param json_object [String]
|
74
|
+
# @return [CandidApiClient::Individual::Types::SubscriberCreateOptional]
|
75
|
+
def self.from_json(json_object:)
|
76
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
77
|
+
parsed_json = JSON.parse(json_object)
|
78
|
+
if parsed_json["insurance_card"].nil?
|
79
|
+
insurance_card = nil
|
80
|
+
else
|
81
|
+
insurance_card = parsed_json["insurance_card"].to_json
|
82
|
+
insurance_card = CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreateOptional.from_json(json_object: insurance_card)
|
83
|
+
end
|
84
|
+
patient_relationship_to_subscriber_code = struct["patient_relationship_to_subscriber_code"]
|
85
|
+
date_of_birth = (Date.parse(parsed_json["date_of_birth"]) unless parsed_json["date_of_birth"].nil?)
|
86
|
+
if parsed_json["address"].nil?
|
87
|
+
address = nil
|
88
|
+
else
|
89
|
+
address = parsed_json["address"].to_json
|
90
|
+
address = CandidApiClient::Commons::Types::StreetAddressShortZipOptional.from_json(json_object: address)
|
91
|
+
end
|
92
|
+
first_name = struct["first_name"]
|
93
|
+
last_name = struct["last_name"]
|
94
|
+
gender = struct["gender"]
|
95
|
+
new(
|
96
|
+
insurance_card: insurance_card,
|
97
|
+
patient_relationship_to_subscriber_code: patient_relationship_to_subscriber_code,
|
98
|
+
date_of_birth: date_of_birth,
|
99
|
+
address: address,
|
100
|
+
first_name: first_name,
|
101
|
+
last_name: last_name,
|
102
|
+
gender: gender,
|
103
|
+
additional_properties: struct
|
104
|
+
)
|
105
|
+
end
|
106
|
+
|
107
|
+
# Serialize an instance of SubscriberCreateOptional to a JSON object
|
108
|
+
#
|
109
|
+
# @return [String]
|
110
|
+
def to_json(*_args)
|
111
|
+
@_field_set&.to_json
|
112
|
+
end
|
113
|
+
|
114
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
115
|
+
# hash and check each fields type against the current object's property
|
116
|
+
# definitions.
|
117
|
+
#
|
118
|
+
# @param obj [Object]
|
119
|
+
# @return [Void]
|
120
|
+
def self.validate_raw(obj:)
|
121
|
+
obj.insurance_card.nil? || CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreateOptional.validate_raw(obj: obj.insurance_card)
|
122
|
+
obj.patient_relationship_to_subscriber_code&.is_a?(CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll) != false || raise("Passed value for field obj.patient_relationship_to_subscriber_code is not the expected type, validation failed.")
|
123
|
+
obj.date_of_birth&.is_a?(Date) != false || raise("Passed value for field obj.date_of_birth is not the expected type, validation failed.")
|
124
|
+
obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressShortZipOptional.validate_raw(obj: obj.address)
|
125
|
+
obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
|
126
|
+
obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
|
127
|
+
obj.gender&.is_a?(CandidApiClient::Individual::Types::Gender) != false || raise("Passed value for field obj.gender is not the expected type, validation failed.")
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
@@ -53,6 +53,7 @@ module CandidApiClient
|
|
53
53
|
# * :post_date (Date)
|
54
54
|
# * :check_number (String)
|
55
55
|
# * :check_date (Date)
|
56
|
+
# * :check_amount_cents (Integer)
|
56
57
|
# * :note (String)
|
57
58
|
# * :claims (Hash{String => Array})
|
58
59
|
# * :remit_draft_id (String)
|
@@ -148,6 +149,7 @@ module CandidApiClient
|
|
148
149
|
# * :post_date (Date)
|
149
150
|
# * :check_number (String)
|
150
151
|
# * :check_date (Date)
|
152
|
+
# * :check_amount_cents (Integer)
|
151
153
|
# * :note (String)
|
152
154
|
# * :claims (Hash{String => Array})
|
153
155
|
# * :remit_draft_id (String)
|
@@ -21,6 +21,8 @@ module CandidApiClient
|
|
21
21
|
attr_reader :check_number
|
22
22
|
# @return [Date]
|
23
23
|
attr_reader :check_date
|
24
|
+
# @return [Integer]
|
25
|
+
attr_reader :check_amount_cents
|
24
26
|
# @return [String]
|
25
27
|
attr_reader :note
|
26
28
|
# @return [Hash{String => Array}]
|
@@ -40,18 +42,20 @@ module CandidApiClient
|
|
40
42
|
# @param post_date [Date]
|
41
43
|
# @param check_number [String]
|
42
44
|
# @param check_date [Date]
|
45
|
+
# @param check_amount_cents [Integer]
|
43
46
|
# @param note [String]
|
44
47
|
# @param claims [Hash{String => Array}]
|
45
48
|
# @param remit_draft_id [String]
|
46
49
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
47
50
|
# @return [CandidApiClient::InsuranceAdjudications::V1::Types::InsuranceAdjudicationCreate]
|
48
51
|
def initialize(payer_identifier:, payee:, check_date:, claims:, post_date: OMIT, check_number: OMIT,
|
49
|
-
note: OMIT, remit_draft_id: OMIT, additional_properties: nil)
|
52
|
+
check_amount_cents: OMIT, note: OMIT, remit_draft_id: OMIT, additional_properties: nil)
|
50
53
|
@payer_identifier = payer_identifier
|
51
54
|
@payee = payee
|
52
55
|
@post_date = post_date if post_date != OMIT
|
53
56
|
@check_number = check_number if check_number != OMIT
|
54
57
|
@check_date = check_date
|
58
|
+
@check_amount_cents = check_amount_cents if check_amount_cents != OMIT
|
55
59
|
@note = note if note != OMIT
|
56
60
|
@claims = claims
|
57
61
|
@remit_draft_id = remit_draft_id if remit_draft_id != OMIT
|
@@ -62,6 +66,7 @@ module CandidApiClient
|
|
62
66
|
"post_date": post_date,
|
63
67
|
"check_number": check_number,
|
64
68
|
"check_date": check_date,
|
69
|
+
"check_amount_cents": check_amount_cents,
|
65
70
|
"note": note,
|
66
71
|
"claims": claims,
|
67
72
|
"remit_draft_id": remit_draft_id
|
@@ -92,6 +97,7 @@ module CandidApiClient
|
|
92
97
|
post_date = (Date.parse(parsed_json["post_date"]) unless parsed_json["post_date"].nil?)
|
93
98
|
check_number = struct["check_number"]
|
94
99
|
check_date = (Date.parse(parsed_json["check_date"]) unless parsed_json["check_date"].nil?)
|
100
|
+
check_amount_cents = struct["check_amount_cents"]
|
95
101
|
note = struct["note"]
|
96
102
|
claims = parsed_json["claims"]&.transform_values do |value|
|
97
103
|
value&.map do |item|
|
@@ -106,6 +112,7 @@ module CandidApiClient
|
|
106
112
|
post_date: post_date,
|
107
113
|
check_number: check_number,
|
108
114
|
check_date: check_date,
|
115
|
+
check_amount_cents: check_amount_cents,
|
109
116
|
note: note,
|
110
117
|
claims: claims,
|
111
118
|
remit_draft_id: remit_draft_id,
|
@@ -132,6 +139,7 @@ module CandidApiClient
|
|
132
139
|
obj.post_date&.is_a?(Date) != false || raise("Passed value for field obj.post_date is not the expected type, validation failed.")
|
133
140
|
obj.check_number&.is_a?(String) != false || raise("Passed value for field obj.check_number is not the expected type, validation failed.")
|
134
141
|
obj.check_date.is_a?(Date) != false || raise("Passed value for field obj.check_date is not the expected type, validation failed.")
|
142
|
+
obj.check_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.check_amount_cents is not the expected type, validation failed.")
|
135
143
|
obj.note&.is_a?(String) != false || raise("Passed value for field obj.note is not the expected type, validation failed.")
|
136
144
|
obj.claims.is_a?(Hash) != false || raise("Passed value for field obj.claims is not the expected type, validation failed.")
|
137
145
|
obj.remit_draft_id&.is_a?(String) != false || raise("Passed value for field obj.remit_draft_id is not the expected type, validation failed.")
|
@@ -0,0 +1,167 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/emr_payer_crosswalk"
|
4
|
+
require_relative "../../../commons/types/source_of_payment_code"
|
5
|
+
require_relative "../../../commons/types/insurance_type_code"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module InsuranceCards
|
11
|
+
module V2
|
12
|
+
module Types
|
13
|
+
class InsuranceCardCreateOptional
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :member_id
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :payer_name
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :payer_id
|
20
|
+
# @return [String]
|
21
|
+
attr_reader :rx_bin
|
22
|
+
# @return [String]
|
23
|
+
attr_reader :rx_pcn
|
24
|
+
# @return [String]
|
25
|
+
attr_reader :image_url_front
|
26
|
+
# @return [String]
|
27
|
+
attr_reader :image_url_back
|
28
|
+
# @return [CandidApiClient::Commons::Types::EmrPayerCrosswalk]
|
29
|
+
attr_reader :emr_payer_crosswalk
|
30
|
+
# @return [String] Box 11 on the CMS-1500 claim form.
|
31
|
+
attr_reader :group_number
|
32
|
+
# @return [String] Box 11c on the CMS-1500 claim form.
|
33
|
+
attr_reader :plan_name
|
34
|
+
# @return [CandidApiClient::Commons::Types::SourceOfPaymentCode]
|
35
|
+
attr_reader :plan_type
|
36
|
+
# @return [CandidApiClient::Commons::Types::InsuranceTypeCode]
|
37
|
+
attr_reader :insurance_type
|
38
|
+
# @return [String]
|
39
|
+
attr_reader :payer_plan_group_id
|
40
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
41
|
+
attr_reader :additional_properties
|
42
|
+
# @return [Object]
|
43
|
+
attr_reader :_field_set
|
44
|
+
protected :_field_set
|
45
|
+
|
46
|
+
OMIT = Object.new
|
47
|
+
|
48
|
+
# @param member_id [String]
|
49
|
+
# @param payer_name [String]
|
50
|
+
# @param payer_id [String]
|
51
|
+
# @param rx_bin [String]
|
52
|
+
# @param rx_pcn [String]
|
53
|
+
# @param image_url_front [String]
|
54
|
+
# @param image_url_back [String]
|
55
|
+
# @param emr_payer_crosswalk [CandidApiClient::Commons::Types::EmrPayerCrosswalk]
|
56
|
+
# @param group_number [String] Box 11 on the CMS-1500 claim form.
|
57
|
+
# @param plan_name [String] Box 11c on the CMS-1500 claim form.
|
58
|
+
# @param plan_type [CandidApiClient::Commons::Types::SourceOfPaymentCode]
|
59
|
+
# @param insurance_type [CandidApiClient::Commons::Types::InsuranceTypeCode]
|
60
|
+
# @param payer_plan_group_id [String]
|
61
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
62
|
+
# @return [CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreateOptional]
|
63
|
+
def initialize(member_id: OMIT, payer_name: OMIT, payer_id: OMIT, rx_bin: OMIT, rx_pcn: OMIT,
|
64
|
+
image_url_front: OMIT, image_url_back: OMIT, emr_payer_crosswalk: OMIT, group_number: OMIT, plan_name: OMIT, plan_type: OMIT, insurance_type: OMIT, payer_plan_group_id: OMIT, additional_properties: nil)
|
65
|
+
@member_id = member_id if member_id != OMIT
|
66
|
+
@payer_name = payer_name if payer_name != OMIT
|
67
|
+
@payer_id = payer_id if payer_id != OMIT
|
68
|
+
@rx_bin = rx_bin if rx_bin != OMIT
|
69
|
+
@rx_pcn = rx_pcn if rx_pcn != OMIT
|
70
|
+
@image_url_front = image_url_front if image_url_front != OMIT
|
71
|
+
@image_url_back = image_url_back if image_url_back != OMIT
|
72
|
+
@emr_payer_crosswalk = emr_payer_crosswalk if emr_payer_crosswalk != OMIT
|
73
|
+
@group_number = group_number if group_number != OMIT
|
74
|
+
@plan_name = plan_name if plan_name != OMIT
|
75
|
+
@plan_type = plan_type if plan_type != OMIT
|
76
|
+
@insurance_type = insurance_type if insurance_type != OMIT
|
77
|
+
@payer_plan_group_id = payer_plan_group_id if payer_plan_group_id != OMIT
|
78
|
+
@additional_properties = additional_properties
|
79
|
+
@_field_set = {
|
80
|
+
"member_id": member_id,
|
81
|
+
"payer_name": payer_name,
|
82
|
+
"payer_id": payer_id,
|
83
|
+
"rx_bin": rx_bin,
|
84
|
+
"rx_pcn": rx_pcn,
|
85
|
+
"image_url_front": image_url_front,
|
86
|
+
"image_url_back": image_url_back,
|
87
|
+
"emr_payer_crosswalk": emr_payer_crosswalk,
|
88
|
+
"group_number": group_number,
|
89
|
+
"plan_name": plan_name,
|
90
|
+
"plan_type": plan_type,
|
91
|
+
"insurance_type": insurance_type,
|
92
|
+
"payer_plan_group_id": payer_plan_group_id
|
93
|
+
}.reject do |_k, v|
|
94
|
+
v == OMIT
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Deserialize a JSON object to an instance of InsuranceCardCreateOptional
|
99
|
+
#
|
100
|
+
# @param json_object [String]
|
101
|
+
# @return [CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreateOptional]
|
102
|
+
def self.from_json(json_object:)
|
103
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
104
|
+
member_id = struct["member_id"]
|
105
|
+
payer_name = struct["payer_name"]
|
106
|
+
payer_id = struct["payer_id"]
|
107
|
+
rx_bin = struct["rx_bin"]
|
108
|
+
rx_pcn = struct["rx_pcn"]
|
109
|
+
image_url_front = struct["image_url_front"]
|
110
|
+
image_url_back = struct["image_url_back"]
|
111
|
+
emr_payer_crosswalk = struct["emr_payer_crosswalk"]
|
112
|
+
group_number = struct["group_number"]
|
113
|
+
plan_name = struct["plan_name"]
|
114
|
+
plan_type = struct["plan_type"]
|
115
|
+
insurance_type = struct["insurance_type"]
|
116
|
+
payer_plan_group_id = struct["payer_plan_group_id"]
|
117
|
+
new(
|
118
|
+
member_id: member_id,
|
119
|
+
payer_name: payer_name,
|
120
|
+
payer_id: payer_id,
|
121
|
+
rx_bin: rx_bin,
|
122
|
+
rx_pcn: rx_pcn,
|
123
|
+
image_url_front: image_url_front,
|
124
|
+
image_url_back: image_url_back,
|
125
|
+
emr_payer_crosswalk: emr_payer_crosswalk,
|
126
|
+
group_number: group_number,
|
127
|
+
plan_name: plan_name,
|
128
|
+
plan_type: plan_type,
|
129
|
+
insurance_type: insurance_type,
|
130
|
+
payer_plan_group_id: payer_plan_group_id,
|
131
|
+
additional_properties: struct
|
132
|
+
)
|
133
|
+
end
|
134
|
+
|
135
|
+
# Serialize an instance of InsuranceCardCreateOptional to a JSON object
|
136
|
+
#
|
137
|
+
# @return [String]
|
138
|
+
def to_json(*_args)
|
139
|
+
@_field_set&.to_json
|
140
|
+
end
|
141
|
+
|
142
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
143
|
+
# hash and check each fields type against the current object's property
|
144
|
+
# definitions.
|
145
|
+
#
|
146
|
+
# @param obj [Object]
|
147
|
+
# @return [Void]
|
148
|
+
def self.validate_raw(obj:)
|
149
|
+
obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
|
150
|
+
obj.payer_name&.is_a?(String) != false || raise("Passed value for field obj.payer_name is not the expected type, validation failed.")
|
151
|
+
obj.payer_id&.is_a?(String) != false || raise("Passed value for field obj.payer_id is not the expected type, validation failed.")
|
152
|
+
obj.rx_bin&.is_a?(String) != false || raise("Passed value for field obj.rx_bin is not the expected type, validation failed.")
|
153
|
+
obj.rx_pcn&.is_a?(String) != false || raise("Passed value for field obj.rx_pcn is not the expected type, validation failed.")
|
154
|
+
obj.image_url_front&.is_a?(String) != false || raise("Passed value for field obj.image_url_front is not the expected type, validation failed.")
|
155
|
+
obj.image_url_back&.is_a?(String) != false || raise("Passed value for field obj.image_url_back is not the expected type, validation failed.")
|
156
|
+
obj.emr_payer_crosswalk&.is_a?(CandidApiClient::Commons::Types::EmrPayerCrosswalk) != false || raise("Passed value for field obj.emr_payer_crosswalk is not the expected type, validation failed.")
|
157
|
+
obj.group_number&.is_a?(String) != false || raise("Passed value for field obj.group_number is not the expected type, validation failed.")
|
158
|
+
obj.plan_name&.is_a?(String) != false || raise("Passed value for field obj.plan_name is not the expected type, validation failed.")
|
159
|
+
obj.plan_type&.is_a?(CandidApiClient::Commons::Types::SourceOfPaymentCode) != false || raise("Passed value for field obj.plan_type is not the expected type, validation failed.")
|
160
|
+
obj.insurance_type&.is_a?(CandidApiClient::Commons::Types::InsuranceTypeCode) != false || raise("Passed value for field obj.insurance_type is not the expected type, validation failed.")
|
161
|
+
obj.payer_plan_group_id&.is_a?(String) != false || raise("Passed value for field obj.payer_plan_group_id is not the expected type, validation failed.")
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
@@ -8,7 +8,7 @@ require "json"
|
|
8
8
|
require "date"
|
9
9
|
require_relative "types/payer_plan_group_fields"
|
10
10
|
require_relative "types/service_type_code"
|
11
|
-
require_relative "types/eligibility_check_metadata"
|
11
|
+
require_relative "../../eligibility_checks/v_1/types/eligibility_check_metadata"
|
12
12
|
require_relative "types/coverage_eligibility_check_response"
|
13
13
|
require "async"
|
14
14
|
|
@@ -76,10 +76,10 @@ module CandidApiClient
|
|
76
76
|
# * :insurance_card_image_locator (String)
|
77
77
|
# * :payer_plan_group_id (String)
|
78
78
|
# * :verified (Boolean)
|
79
|
-
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::
|
79
|
+
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>)
|
80
80
|
# * :latest_eligibility_check (Hash)
|
81
81
|
# * :check_id (String)
|
82
|
-
# * :status (CandidApiClient::PreEncounter::
|
82
|
+
# * :status (CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus)
|
83
83
|
# * :initiated_at (DateTime)
|
84
84
|
# * :benefits (Hash)
|
85
85
|
# * :plan_coverage (Hash)
|
@@ -242,10 +242,10 @@ module CandidApiClient
|
|
242
242
|
# * :insurance_card_image_locator (String)
|
243
243
|
# * :payer_plan_group_id (String)
|
244
244
|
# * :verified (Boolean)
|
245
|
-
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::
|
245
|
+
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>)
|
246
246
|
# * :latest_eligibility_check (Hash)
|
247
247
|
# * :check_id (String)
|
248
|
-
# * :status (CandidApiClient::PreEncounter::
|
248
|
+
# * :status (CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus)
|
249
249
|
# * :initiated_at (DateTime)
|
250
250
|
# * :benefits (Hash)
|
251
251
|
# * :plan_coverage (Hash)
|
@@ -542,7 +542,7 @@ module CandidApiClient
|
|
542
542
|
# @param date_of_service [Date]
|
543
543
|
# @param npi [String]
|
544
544
|
# @param request_options [CandidApiClient::RequestOptions]
|
545
|
-
# @return [CandidApiClient::PreEncounter::
|
545
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata]
|
546
546
|
# @example
|
547
547
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
548
548
|
# api.pre_encounter.coverages.v_1.check_eligibility(
|
@@ -569,7 +569,7 @@ module CandidApiClient
|
|
569
569
|
req.url "#{@request_client.get_url(environment: PreEncounter,
|
570
570
|
request_options: request_options)}/coverages/v1/#{id}/eligibility"
|
571
571
|
end
|
572
|
-
CandidApiClient::PreEncounter::
|
572
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata.from_json(json_object: response.body)
|
573
573
|
end
|
574
574
|
|
575
575
|
# Gets the eligibility of a patient for a specific coverage if successful.
|
@@ -657,10 +657,10 @@ module CandidApiClient
|
|
657
657
|
# * :insurance_card_image_locator (String)
|
658
658
|
# * :payer_plan_group_id (String)
|
659
659
|
# * :verified (Boolean)
|
660
|
-
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::
|
660
|
+
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>)
|
661
661
|
# * :latest_eligibility_check (Hash)
|
662
662
|
# * :check_id (String)
|
663
|
-
# * :status (CandidApiClient::PreEncounter::
|
663
|
+
# * :status (CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus)
|
664
664
|
# * :initiated_at (DateTime)
|
665
665
|
# * :benefits (Hash)
|
666
666
|
# * :plan_coverage (Hash)
|
@@ -825,10 +825,10 @@ module CandidApiClient
|
|
825
825
|
# * :insurance_card_image_locator (String)
|
826
826
|
# * :payer_plan_group_id (String)
|
827
827
|
# * :verified (Boolean)
|
828
|
-
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::
|
828
|
+
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>)
|
829
829
|
# * :latest_eligibility_check (Hash)
|
830
830
|
# * :check_id (String)
|
831
|
-
# * :status (CandidApiClient::PreEncounter::
|
831
|
+
# * :status (CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus)
|
832
832
|
# * :initiated_at (DateTime)
|
833
833
|
# * :benefits (Hash)
|
834
834
|
# * :plan_coverage (Hash)
|
@@ -1142,7 +1142,7 @@ module CandidApiClient
|
|
1142
1142
|
# @param date_of_service [Date]
|
1143
1143
|
# @param npi [String]
|
1144
1144
|
# @param request_options [CandidApiClient::RequestOptions]
|
1145
|
-
# @return [CandidApiClient::PreEncounter::
|
1145
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata]
|
1146
1146
|
# @example
|
1147
1147
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1148
1148
|
# api.pre_encounter.coverages.v_1.check_eligibility(
|
@@ -1170,7 +1170,7 @@ module CandidApiClient
|
|
1170
1170
|
req.url "#{@request_client.get_url(environment: PreEncounter,
|
1171
1171
|
request_options: request_options)}/coverages/v1/#{id}/eligibility"
|
1172
1172
|
end
|
1173
|
-
CandidApiClient::PreEncounter::
|
1173
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata.from_json(json_object: response.body)
|
1174
1174
|
end
|
1175
1175
|
end
|
1176
1176
|
|
@@ -5,7 +5,7 @@ require_relative "coverage_status"
|
|
5
5
|
require_relative "subscriber"
|
6
6
|
require_relative "../../../common/types/relationship"
|
7
7
|
require_relative "insurance_plan"
|
8
|
-
require_relative "eligibility_check_metadata"
|
8
|
+
require_relative "../../../eligibility_checks/v_1/types/eligibility_check_metadata"
|
9
9
|
require_relative "latest_eligibility_check"
|
10
10
|
require_relative "coverage_benefits"
|
11
11
|
require "ostruct"
|
@@ -47,7 +47,7 @@ module CandidApiClient
|
|
47
47
|
attr_reader :insurance_plan
|
48
48
|
# @return [Boolean] A boolean indicating if the coverage has been verified by a user.
|
49
49
|
attr_reader :verified
|
50
|
-
# @return [Array<CandidApiClient::PreEncounter::
|
50
|
+
# @return [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>] A list of eligibility check metadata that have been initiated on this coverage.
|
51
51
|
attr_reader :eligibility_checks
|
52
52
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::LatestEligibilityCheck] The latest eligibility check metadata that has been initiated on this coverage.
|
53
53
|
attr_reader :latest_eligibility_check
|
@@ -78,7 +78,7 @@ module CandidApiClient
|
|
78
78
|
# @param patient [String] The patient who benefits from the insurance coverage
|
79
79
|
# @param insurance_plan [CandidApiClient::PreEncounter::Coverages::V1::Types::InsurancePlan]
|
80
80
|
# @param verified [Boolean] A boolean indicating if the coverage has been verified by a user.
|
81
|
-
# @param eligibility_checks [Array<CandidApiClient::PreEncounter::
|
81
|
+
# @param eligibility_checks [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>] A list of eligibility check metadata that have been initiated on this coverage.
|
82
82
|
# @param latest_eligibility_check [CandidApiClient::PreEncounter::Coverages::V1::Types::LatestEligibilityCheck] The latest eligibility check metadata that has been initiated on this coverage.
|
83
83
|
# @param benefits [CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits] The eligibility of the patient for the coverage, manually verified by users.
|
84
84
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -153,7 +153,7 @@ module CandidApiClient
|
|
153
153
|
verified = struct["verified"]
|
154
154
|
eligibility_checks = parsed_json["eligibility_checks"]&.map do |item|
|
155
155
|
item = item.to_json
|
156
|
-
CandidApiClient::PreEncounter::
|
156
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata.from_json(json_object: item)
|
157
157
|
end
|
158
158
|
if parsed_json["latest_eligibility_check"].nil?
|
159
159
|
latest_eligibility_check = nil
|