candidhealth 1.0.0 → 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 -482
- 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/patients/v_1/types/authorization.rb +13 -1
- 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 +32 -3
- metadata +34 -5
@@ -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
|
@@ -25,6 +25,9 @@ module CandidApiClient
|
|
25
25
|
# @return [Boolean] If true, then the authorization will apply for all claims for the payer that
|
26
26
|
# fall in range the `period`.
|
27
27
|
attr_reader :apply_for_all_cpt_codes
|
28
|
+
# @return [Boolean] If true, indicates that prior authorization is not required and prior
|
29
|
+
# authorization number will not be set on the claim for this authorization.
|
30
|
+
attr_reader :no_prior_authorization_required
|
28
31
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::AuthorizationUnit]
|
29
32
|
attr_reader :units
|
30
33
|
# @return [Integer]
|
@@ -48,6 +51,8 @@ module CandidApiClient
|
|
48
51
|
# @param cpt_code [String]
|
49
52
|
# @param apply_for_all_cpt_codes [Boolean] If true, then the authorization will apply for all claims for the payer that
|
50
53
|
# fall in range the `period`.
|
54
|
+
# @param no_prior_authorization_required [Boolean] If true, indicates that prior authorization is not required and prior
|
55
|
+
# authorization number will not be set on the claim for this authorization.
|
51
56
|
# @param units [CandidApiClient::PreEncounter::Patients::V1::Types::AuthorizationUnit]
|
52
57
|
# @param quantity [Integer]
|
53
58
|
# @param period [CandidApiClient::PreEncounter::Common::Types::Period]
|
@@ -55,13 +60,16 @@ module CandidApiClient
|
|
55
60
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
56
61
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Authorization]
|
57
62
|
def initialize(payer_id:, payer_name:, authorization_number:, cpt_code:, units:,
|
58
|
-
additional_payer_information: OMIT, apply_for_all_cpt_codes: OMIT, quantity: OMIT, period: OMIT, notes: OMIT, additional_properties: nil)
|
63
|
+
additional_payer_information: OMIT, apply_for_all_cpt_codes: OMIT, no_prior_authorization_required: OMIT, quantity: OMIT, period: OMIT, notes: OMIT, additional_properties: nil)
|
59
64
|
@payer_id = payer_id
|
60
65
|
@payer_name = payer_name
|
61
66
|
@additional_payer_information = additional_payer_information if additional_payer_information != OMIT
|
62
67
|
@authorization_number = authorization_number
|
63
68
|
@cpt_code = cpt_code
|
64
69
|
@apply_for_all_cpt_codes = apply_for_all_cpt_codes if apply_for_all_cpt_codes != OMIT
|
70
|
+
if no_prior_authorization_required != OMIT
|
71
|
+
@no_prior_authorization_required = no_prior_authorization_required
|
72
|
+
end
|
65
73
|
@units = units
|
66
74
|
@quantity = quantity if quantity != OMIT
|
67
75
|
@period = period if period != OMIT
|
@@ -74,6 +82,7 @@ module CandidApiClient
|
|
74
82
|
"authorization_number": authorization_number,
|
75
83
|
"cpt_code": cpt_code,
|
76
84
|
"apply_for_all_cpt_codes": apply_for_all_cpt_codes,
|
85
|
+
"no_prior_authorization_required": no_prior_authorization_required,
|
77
86
|
"units": units,
|
78
87
|
"quantity": quantity,
|
79
88
|
"period": period,
|
@@ -101,6 +110,7 @@ module CandidApiClient
|
|
101
110
|
authorization_number = struct["authorization_number"]
|
102
111
|
cpt_code = struct["cpt_code"]
|
103
112
|
apply_for_all_cpt_codes = struct["apply_for_all_cpt_codes"]
|
113
|
+
no_prior_authorization_required = struct["no_prior_authorization_required"]
|
104
114
|
units = struct["units"]
|
105
115
|
quantity = struct["quantity"]
|
106
116
|
if parsed_json["period"].nil?
|
@@ -117,6 +127,7 @@ module CandidApiClient
|
|
117
127
|
authorization_number: authorization_number,
|
118
128
|
cpt_code: cpt_code,
|
119
129
|
apply_for_all_cpt_codes: apply_for_all_cpt_codes,
|
130
|
+
no_prior_authorization_required: no_prior_authorization_required,
|
120
131
|
units: units,
|
121
132
|
quantity: quantity,
|
122
133
|
period: period,
|
@@ -145,6 +156,7 @@ module CandidApiClient
|
|
145
156
|
obj.authorization_number.is_a?(String) != false || raise("Passed value for field obj.authorization_number is not the expected type, validation failed.")
|
146
157
|
obj.cpt_code.is_a?(String) != false || raise("Passed value for field obj.cpt_code is not the expected type, validation failed.")
|
147
158
|
obj.apply_for_all_cpt_codes&.is_a?(Boolean) != false || raise("Passed value for field obj.apply_for_all_cpt_codes is not the expected type, validation failed.")
|
159
|
+
obj.no_prior_authorization_required&.is_a?(Boolean) != false || raise("Passed value for field obj.no_prior_authorization_required is not the expected type, validation failed.")
|
148
160
|
obj.units.is_a?(CandidApiClient::PreEncounter::Patients::V1::Types::AuthorizationUnit) != false || raise("Passed value for field obj.units is not the expected type, validation failed.")
|
149
161
|
obj.quantity&.is_a?(Integer) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
|
150
162
|
obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
|