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
data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_source.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module PreEncounter
|
5
|
+
module EligibilityChecks
|
6
|
+
module V1
|
7
|
+
module Types
|
8
|
+
# enum to represent the source of an error in an eligibility check
|
9
|
+
class EligibilityCheckErrorSource
|
10
|
+
CANDID = "CANDID"
|
11
|
+
STEDI = "STEDI"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "service_type_code"
|
3
|
+
require_relative "../../../coverages/v_1/types/service_type_code"
|
4
4
|
require_relative "eligibility_check_status"
|
5
5
|
require "date"
|
6
6
|
require "ostruct"
|
@@ -8,7 +8,7 @@ require "json"
|
|
8
8
|
|
9
9
|
module CandidApiClient
|
10
10
|
module PreEncounter
|
11
|
-
module
|
11
|
+
module EligibilityChecks
|
12
12
|
module V1
|
13
13
|
module Types
|
14
14
|
class EligibilityCheckMetadata
|
@@ -16,7 +16,7 @@ module CandidApiClient
|
|
16
16
|
attr_reader :check_id
|
17
17
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceTypeCode]
|
18
18
|
attr_reader :service_code
|
19
|
-
# @return [CandidApiClient::PreEncounter::
|
19
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckStatus]
|
20
20
|
attr_reader :status
|
21
21
|
# @return [String]
|
22
22
|
attr_reader :initiated_by
|
@@ -32,11 +32,11 @@ module CandidApiClient
|
|
32
32
|
|
33
33
|
# @param check_id [String]
|
34
34
|
# @param service_code [CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceTypeCode]
|
35
|
-
# @param status [CandidApiClient::PreEncounter::
|
35
|
+
# @param status [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckStatus]
|
36
36
|
# @param initiated_by [String]
|
37
37
|
# @param initiated_at [DateTime]
|
38
38
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
39
|
-
# @return [CandidApiClient::PreEncounter::
|
39
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata]
|
40
40
|
def initialize(check_id:, service_code:, status:, initiated_by:, initiated_at:, additional_properties: nil)
|
41
41
|
@check_id = check_id
|
42
42
|
@service_code = service_code
|
@@ -56,7 +56,7 @@ module CandidApiClient
|
|
56
56
|
# Deserialize a JSON object to an instance of EligibilityCheckMetadata
|
57
57
|
#
|
58
58
|
# @param json_object [String]
|
59
|
-
# @return [CandidApiClient::PreEncounter::
|
59
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata]
|
60
60
|
def self.from_json(json_object:)
|
61
61
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
62
62
|
parsed_json = JSON.parse(json_object)
|
@@ -91,7 +91,7 @@ module CandidApiClient
|
|
91
91
|
def self.validate_raw(obj:)
|
92
92
|
obj.check_id.is_a?(String) != false || raise("Passed value for field obj.check_id is not the expected type, validation failed.")
|
93
93
|
obj.service_code.is_a?(CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceTypeCode) != false || raise("Passed value for field obj.service_code is not the expected type, validation failed.")
|
94
|
-
obj.status.is_a?(CandidApiClient::PreEncounter::
|
94
|
+
obj.status.is_a?(CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
95
95
|
obj.initiated_by.is_a?(String) != false || raise("Passed value for field obj.initiated_by is not the expected type, validation failed.")
|
96
96
|
obj.initiated_at.is_a?(DateTime) != false || raise("Passed value for field obj.initiated_at is not the expected type, validation failed.")
|
97
97
|
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "eligibility_check"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module EligibilityChecks
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class EligibilityCheckPage
|
13
|
+
# @return [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck>]
|
14
|
+
attr_reader :items
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :next_page_token
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :prev_page_token
|
19
|
+
# @return [Integer]
|
20
|
+
attr_reader :total
|
21
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
+
attr_reader :additional_properties
|
23
|
+
# @return [Object]
|
24
|
+
attr_reader :_field_set
|
25
|
+
protected :_field_set
|
26
|
+
|
27
|
+
OMIT = Object.new
|
28
|
+
|
29
|
+
# @param items [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck>]
|
30
|
+
# @param next_page_token [String]
|
31
|
+
# @param prev_page_token [String]
|
32
|
+
# @param total [Integer]
|
33
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
34
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage]
|
35
|
+
def initialize(items:, total:, next_page_token: OMIT, prev_page_token: OMIT, additional_properties: nil)
|
36
|
+
@items = items
|
37
|
+
@next_page_token = next_page_token if next_page_token != OMIT
|
38
|
+
@prev_page_token = prev_page_token if prev_page_token != OMIT
|
39
|
+
@total = total
|
40
|
+
@additional_properties = additional_properties
|
41
|
+
@_field_set = {
|
42
|
+
"items": items,
|
43
|
+
"next_page_token": next_page_token,
|
44
|
+
"prev_page_token": prev_page_token,
|
45
|
+
"total": total
|
46
|
+
}.reject do |_k, v|
|
47
|
+
v == OMIT
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Deserialize a JSON object to an instance of EligibilityCheckPage
|
52
|
+
#
|
53
|
+
# @param json_object [String]
|
54
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage]
|
55
|
+
def self.from_json(json_object:)
|
56
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
57
|
+
parsed_json = JSON.parse(json_object)
|
58
|
+
items = parsed_json["items"]&.map do |item|
|
59
|
+
item = item.to_json
|
60
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck.from_json(json_object: item)
|
61
|
+
end
|
62
|
+
next_page_token = struct["next_page_token"]
|
63
|
+
prev_page_token = struct["prev_page_token"]
|
64
|
+
total = struct["total"]
|
65
|
+
new(
|
66
|
+
items: items,
|
67
|
+
next_page_token: next_page_token,
|
68
|
+
prev_page_token: prev_page_token,
|
69
|
+
total: total,
|
70
|
+
additional_properties: struct
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Serialize an instance of EligibilityCheckPage to a JSON object
|
75
|
+
#
|
76
|
+
# @return [String]
|
77
|
+
def to_json(*_args)
|
78
|
+
@_field_set&.to_json
|
79
|
+
end
|
80
|
+
|
81
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
82
|
+
# hash and check each fields type against the current object's property
|
83
|
+
# definitions.
|
84
|
+
#
|
85
|
+
# @param obj [Object]
|
86
|
+
# @return [Void]
|
87
|
+
def self.validate_raw(obj:)
|
88
|
+
obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
|
89
|
+
obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
|
90
|
+
obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.")
|
91
|
+
obj.total.is_a?(Integer) != false || raise("Passed value for field obj.total is not the expected type, validation failed.")
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
module CandidApiClient
|
4
4
|
module PreEncounter
|
5
|
-
module
|
5
|
+
module EligibilityChecks
|
6
6
|
module V1
|
7
7
|
module Types
|
8
|
-
# enum to represent the
|
8
|
+
# enum to represent the status of an eligibility checks
|
9
9
|
class EligibilityCheckStatus
|
10
10
|
COMPLETED = "COMPLETED"
|
11
11
|
FAILED = "FAILED"
|
@@ -13,6 +13,11 @@ module CandidApiClient
|
|
13
13
|
module Types
|
14
14
|
# An object representing the data for an eligibility request.
|
15
15
|
class EligibilityRequest
|
16
|
+
# @return [String] A unique identifier for the eligibility check within the batch. Candid returns
|
17
|
+
# this identifier in the response for the
|
18
|
+
# /batch/{batch_id} polling endpoint so you can correlate benefit responses with
|
19
|
+
# the original eligibility check.
|
20
|
+
attr_reader :submitter_transaction_identifier
|
16
21
|
# @return [String] Supported payer ID values can be found
|
17
22
|
# [here](https://www.stedi.com/healthcare/network).
|
18
23
|
attr_reader :payer_id
|
@@ -35,6 +40,10 @@ module CandidApiClient
|
|
35
40
|
|
36
41
|
OMIT = Object.new
|
37
42
|
|
43
|
+
# @param submitter_transaction_identifier [String] A unique identifier for the eligibility check within the batch. Candid returns
|
44
|
+
# this identifier in the response for the
|
45
|
+
# /batch/{batch_id} polling endpoint so you can correlate benefit responses with
|
46
|
+
# the original eligibility check.
|
38
47
|
# @param payer_id [String] Supported payer ID values can be found
|
39
48
|
# [here](https://www.stedi.com/healthcare/network).
|
40
49
|
# @param provider [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::Provider]
|
@@ -46,8 +55,11 @@ module CandidApiClient
|
|
46
55
|
# @param encounter [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::Encounter]
|
47
56
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
48
57
|
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest]
|
49
|
-
def initialize(payer_id:, provider:, subscriber:,
|
50
|
-
additional_properties: nil)
|
58
|
+
def initialize(payer_id:, provider:, subscriber:, submitter_transaction_identifier: OMIT, dependent: OMIT,
|
59
|
+
encounter: OMIT, additional_properties: nil)
|
60
|
+
if submitter_transaction_identifier != OMIT
|
61
|
+
@submitter_transaction_identifier = submitter_transaction_identifier
|
62
|
+
end
|
51
63
|
@payer_id = payer_id
|
52
64
|
@provider = provider
|
53
65
|
@subscriber = subscriber
|
@@ -55,6 +67,7 @@ module CandidApiClient
|
|
55
67
|
@encounter = encounter if encounter != OMIT
|
56
68
|
@additional_properties = additional_properties
|
57
69
|
@_field_set = {
|
70
|
+
"submitter_transaction_identifier": submitter_transaction_identifier,
|
58
71
|
"payer_id": payer_id,
|
59
72
|
"provider": provider,
|
60
73
|
"subscriber": subscriber,
|
@@ -72,6 +85,7 @@ module CandidApiClient
|
|
72
85
|
def self.from_json(json_object:)
|
73
86
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
74
87
|
parsed_json = JSON.parse(json_object)
|
88
|
+
submitter_transaction_identifier = struct["submitter_transaction_identifier"]
|
75
89
|
payer_id = struct["payer_id"]
|
76
90
|
if parsed_json["provider"].nil?
|
77
91
|
provider = nil
|
@@ -98,6 +112,7 @@ module CandidApiClient
|
|
98
112
|
encounter = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::Encounter.from_json(json_object: encounter)
|
99
113
|
end
|
100
114
|
new(
|
115
|
+
submitter_transaction_identifier: submitter_transaction_identifier,
|
101
116
|
payer_id: payer_id,
|
102
117
|
provider: provider,
|
103
118
|
subscriber: subscriber,
|
@@ -121,6 +136,7 @@ module CandidApiClient
|
|
121
136
|
# @param obj [Object]
|
122
137
|
# @return [Void]
|
123
138
|
def self.validate_raw(obj:)
|
139
|
+
obj.submitter_transaction_identifier&.is_a?(String) != false || raise("Passed value for field obj.submitter_transaction_identifier is not the expected type, validation failed.")
|
124
140
|
obj.payer_id.is_a?(String) != false || raise("Passed value for field obj.payer_id is not the expected type, validation failed.")
|
125
141
|
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::Provider.validate_raw(obj: obj.provider)
|
126
142
|
CandidApiClient::PreEncounter::Coverages::V1::Types::MemberInfo.validate_raw(obj: obj.subscriber)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "
|
3
|
+
require_relative "eligibility_status"
|
4
4
|
require_relative "../../../coverages/v_1/types/plan_metadata"
|
5
5
|
require_relative "../../../coverages/v_1/types/coverage_benefits"
|
6
6
|
require "ostruct"
|
@@ -12,7 +12,7 @@ module CandidApiClient
|
|
12
12
|
module V1
|
13
13
|
module Types
|
14
14
|
class ParsedResponse
|
15
|
-
# @return [CandidApiClient::PreEncounter::
|
15
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus]
|
16
16
|
attr_reader :eligibility_status
|
17
17
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::PlanMetadata]
|
18
18
|
attr_reader :plan_metadata
|
@@ -26,7 +26,7 @@ module CandidApiClient
|
|
26
26
|
|
27
27
|
OMIT = Object.new
|
28
28
|
|
29
|
-
# @param eligibility_status [CandidApiClient::PreEncounter::
|
29
|
+
# @param eligibility_status [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus]
|
30
30
|
# @param plan_metadata [CandidApiClient::PreEncounter::Coverages::V1::Types::PlanMetadata]
|
31
31
|
# @param benefits [CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits]
|
32
32
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -87,7 +87,7 @@ module CandidApiClient
|
|
87
87
|
# @param obj [Object]
|
88
88
|
# @return [Void]
|
89
89
|
def self.validate_raw(obj:)
|
90
|
-
obj.eligibility_status.is_a?(CandidApiClient::PreEncounter::
|
90
|
+
obj.eligibility_status.is_a?(CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus) != false || raise("Passed value for field obj.eligibility_status is not the expected type, validation failed.")
|
91
91
|
obj.plan_metadata.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::PlanMetadata.validate_raw(obj: obj.plan_metadata)
|
92
92
|
obj.benefits.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits.validate_raw(obj: obj.benefits)
|
93
93
|
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)
|
@@ -13,6 +13,7 @@ module CandidApiClient
|
|
13
13
|
FULL_CONTRACTUAL_ADJUSTMENT = "Full Contractual Adjustment"
|
14
14
|
INCORRECT_PLACE_OF_SERVICE = "Incorrect Place of Service"
|
15
15
|
INCORRECT_PATIENT_GENDER = "Incorrect Patient Gender"
|
16
|
+
INCORRECT_PATIENT_INFO = "Incorrect Patient Info"
|
16
17
|
BUNDLED = "Bundled"
|
17
18
|
EXCEEDED_BILLABLE_TIME = "Exceeded Billable Time"
|
18
19
|
INVALID_PROVIDER_INFORMATION = "Invalid Provider Information"
|
@@ -0,0 +1,126 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "service_id_qualifier"
|
4
|
+
require_relative "measurement_unit_code"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module CandidApiClient
|
9
|
+
module ServiceLines
|
10
|
+
module V2
|
11
|
+
module Types
|
12
|
+
class DrugIdentificationOptional
|
13
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier]
|
14
|
+
attr_reader :service_id_qualifier
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :national_drug_code
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :national_drug_unit_count
|
19
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode]
|
20
|
+
attr_reader :measurement_unit_code
|
21
|
+
# @return [String]
|
22
|
+
attr_reader :link_sequence_number
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :pharmacy_prescription_number
|
25
|
+
# @return [String]
|
26
|
+
attr_reader :conversion_formula
|
27
|
+
# @return [String]
|
28
|
+
attr_reader :drug_description
|
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 service_id_qualifier [CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier]
|
38
|
+
# @param national_drug_code [String]
|
39
|
+
# @param national_drug_unit_count [String]
|
40
|
+
# @param measurement_unit_code [CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode]
|
41
|
+
# @param link_sequence_number [String]
|
42
|
+
# @param pharmacy_prescription_number [String]
|
43
|
+
# @param conversion_formula [String]
|
44
|
+
# @param drug_description [String]
|
45
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
46
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::DrugIdentificationOptional]
|
47
|
+
def initialize(service_id_qualifier: OMIT, national_drug_code: OMIT, national_drug_unit_count: OMIT,
|
48
|
+
measurement_unit_code: OMIT, link_sequence_number: OMIT, pharmacy_prescription_number: OMIT, conversion_formula: OMIT, drug_description: OMIT, additional_properties: nil)
|
49
|
+
@service_id_qualifier = service_id_qualifier if service_id_qualifier != OMIT
|
50
|
+
@national_drug_code = national_drug_code if national_drug_code != OMIT
|
51
|
+
@national_drug_unit_count = national_drug_unit_count if national_drug_unit_count != OMIT
|
52
|
+
@measurement_unit_code = measurement_unit_code if measurement_unit_code != OMIT
|
53
|
+
@link_sequence_number = link_sequence_number if link_sequence_number != OMIT
|
54
|
+
@pharmacy_prescription_number = pharmacy_prescription_number if pharmacy_prescription_number != OMIT
|
55
|
+
@conversion_formula = conversion_formula if conversion_formula != OMIT
|
56
|
+
@drug_description = drug_description if drug_description != OMIT
|
57
|
+
@additional_properties = additional_properties
|
58
|
+
@_field_set = {
|
59
|
+
"service_id_qualifier": service_id_qualifier,
|
60
|
+
"national_drug_code": national_drug_code,
|
61
|
+
"national_drug_unit_count": national_drug_unit_count,
|
62
|
+
"measurement_unit_code": measurement_unit_code,
|
63
|
+
"link_sequence_number": link_sequence_number,
|
64
|
+
"pharmacy_prescription_number": pharmacy_prescription_number,
|
65
|
+
"conversion_formula": conversion_formula,
|
66
|
+
"drug_description": drug_description
|
67
|
+
}.reject do |_k, v|
|
68
|
+
v == OMIT
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# Deserialize a JSON object to an instance of DrugIdentificationOptional
|
73
|
+
#
|
74
|
+
# @param json_object [String]
|
75
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::DrugIdentificationOptional]
|
76
|
+
def self.from_json(json_object:)
|
77
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
78
|
+
service_id_qualifier = struct["service_id_qualifier"]
|
79
|
+
national_drug_code = struct["national_drug_code"]
|
80
|
+
national_drug_unit_count = struct["national_drug_unit_count"]
|
81
|
+
measurement_unit_code = struct["measurement_unit_code"]
|
82
|
+
link_sequence_number = struct["link_sequence_number"]
|
83
|
+
pharmacy_prescription_number = struct["pharmacy_prescription_number"]
|
84
|
+
conversion_formula = struct["conversion_formula"]
|
85
|
+
drug_description = struct["drug_description"]
|
86
|
+
new(
|
87
|
+
service_id_qualifier: service_id_qualifier,
|
88
|
+
national_drug_code: national_drug_code,
|
89
|
+
national_drug_unit_count: national_drug_unit_count,
|
90
|
+
measurement_unit_code: measurement_unit_code,
|
91
|
+
link_sequence_number: link_sequence_number,
|
92
|
+
pharmacy_prescription_number: pharmacy_prescription_number,
|
93
|
+
conversion_formula: conversion_formula,
|
94
|
+
drug_description: drug_description,
|
95
|
+
additional_properties: struct
|
96
|
+
)
|
97
|
+
end
|
98
|
+
|
99
|
+
# Serialize an instance of DrugIdentificationOptional to a JSON object
|
100
|
+
#
|
101
|
+
# @return [String]
|
102
|
+
def to_json(*_args)
|
103
|
+
@_field_set&.to_json
|
104
|
+
end
|
105
|
+
|
106
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
107
|
+
# hash and check each fields type against the current object's property
|
108
|
+
# definitions.
|
109
|
+
#
|
110
|
+
# @param obj [Object]
|
111
|
+
# @return [Void]
|
112
|
+
def self.validate_raw(obj:)
|
113
|
+
obj.service_id_qualifier&.is_a?(CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier) != false || raise("Passed value for field obj.service_id_qualifier is not the expected type, validation failed.")
|
114
|
+
obj.national_drug_code&.is_a?(String) != false || raise("Passed value for field obj.national_drug_code is not the expected type, validation failed.")
|
115
|
+
obj.national_drug_unit_count&.is_a?(String) != false || raise("Passed value for field obj.national_drug_unit_count is not the expected type, validation failed.")
|
116
|
+
obj.measurement_unit_code&.is_a?(CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode) != false || raise("Passed value for field obj.measurement_unit_code is not the expected type, validation failed.")
|
117
|
+
obj.link_sequence_number&.is_a?(String) != false || raise("Passed value for field obj.link_sequence_number is not the expected type, validation failed.")
|
118
|
+
obj.pharmacy_prescription_number&.is_a?(String) != false || raise("Passed value for field obj.pharmacy_prescription_number is not the expected type, validation failed.")
|
119
|
+
obj.conversion_formula&.is_a?(String) != false || raise("Passed value for field obj.conversion_formula is not the expected type, validation failed.")
|
120
|
+
obj.drug_description&.is_a?(String) != false || raise("Passed value for field obj.drug_description is not the expected type, validation failed.")
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|