candidhealth 0.17.4 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/candidhealth/claim_submission/v_1/types/claim_frequency_type_code.rb +0 -1
- data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create.rb +15 -4
- data/lib/candidhealth/commons/types/entity_conflict_error_message.rb +47 -0
- data/lib/candidhealth/commons/types/intended_submission_medium.rb +11 -0
- data/lib/candidhealth/commons/types/network_type.rb +27 -0
- data/lib/candidhealth/commons/types/rate_id.rb +7 -0
- data/lib/candidhealth/commons/types/source_of_payment_code.rb +1 -0
- data/lib/candidhealth/contracts/v_2/types/contract.rb +2 -2
- data/lib/candidhealth/contracts/v_2/types/contract_with_providers.rb +3 -3
- data/lib/candidhealth/eligibility/v_2/client.rb +2 -2
- data/lib/candidhealth/encounters/v_4/client.rb +46 -28
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +33 -31
- data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +7 -31
- data/lib/candidhealth/fee_schedules/client.rb +28 -0
- data/lib/candidhealth/fee_schedules/v_3/client.rb +499 -0
- data/lib/candidhealth/fee_schedules/v_3/types/dimension_match.rb +157 -0
- data/lib/candidhealth/fee_schedules/v_3/types/dimension_name.rb +14 -0
- data/lib/candidhealth/fee_schedules/v_3/types/dimensions.rb +136 -0
- data/lib/candidhealth/fee_schedules/v_3/types/dimensions_page.rb +69 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_cpt_code.rb +60 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_date.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_facility_type_code.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_geo.rb +66 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_license_type.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_modifiers.rb +66 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_network_types.rb +66 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_payer.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_provider.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_result.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_test_result.rb +66 -0
- data/lib/candidhealth/fee_schedules/v_3/types/new_rate.rb +64 -0
- data/lib/candidhealth/fee_schedules/v_3/types/new_rate_version.rb +64 -0
- data/lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb +136 -0
- data/lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb +71 -0
- data/lib/candidhealth/fee_schedules/v_3/types/payer_threshold.rb +66 -0
- data/lib/candidhealth/fee_schedules/v_3/types/payer_thresholds_page.rb +68 -0
- data/lib/candidhealth/fee_schedules/v_3/types/rate.rb +96 -0
- data/lib/candidhealth/fee_schedules/v_3/types/rate_entry.rb +72 -0
- data/lib/candidhealth/fee_schedules/v_3/types/rate_upload.rb +94 -0
- data/lib/candidhealth/fee_schedules/v_3/types/rate_upload_with_possible_errors.rb +76 -0
- data/lib/candidhealth/fee_schedules/v_3/types/rates_page.rb +65 -0
- data/lib/candidhealth/fee_schedules/v_3/types/threshold_match.rb +72 -0
- data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +129 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +20 -5
- data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +19 -4
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +32 -0
- metadata +36 -2
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../payers/v_3/types/payer_uuid"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module FeeSchedules
|
8
|
+
module V3
|
9
|
+
# Match information for a payer
|
10
|
+
class MatchPayer
|
11
|
+
attr_reader :value, :match, :explanation, :additional_properties
|
12
|
+
|
13
|
+
# @param value [Payers::V3::PAYER_UUID]
|
14
|
+
# @param match [Boolean]
|
15
|
+
# @param explanation [String]
|
16
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
# @return [FeeSchedules::V3::MatchPayer]
|
18
|
+
def initialize(value:, match:, explanation:, additional_properties: nil)
|
19
|
+
# @type [Payers::V3::PAYER_UUID]
|
20
|
+
@value = value
|
21
|
+
# @type [Boolean]
|
22
|
+
@match = match
|
23
|
+
# @type [String]
|
24
|
+
@explanation = explanation
|
25
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of MatchPayer
|
30
|
+
#
|
31
|
+
# @param json_object [JSON]
|
32
|
+
# @return [FeeSchedules::V3::MatchPayer]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
JSON.parse(json_object)
|
36
|
+
value = struct.value
|
37
|
+
match = struct.match
|
38
|
+
explanation = struct.explanation
|
39
|
+
new(value: value, match: match, explanation: explanation, additional_properties: struct)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Serialize an instance of MatchPayer to a JSON object
|
43
|
+
#
|
44
|
+
# @return [JSON]
|
45
|
+
def to_json(*_args)
|
46
|
+
{ "value": @value, "match": @match, "explanation": @explanation }.to_json
|
47
|
+
end
|
48
|
+
|
49
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.value.is_a?(UUID) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
55
|
+
obj.match.is_a?(Boolean) != false || raise("Passed value for field obj.match is not the expected type, validation failed.")
|
56
|
+
obj.explanation.is_a?(String) != false || raise("Passed value for field obj.explanation is not the expected type, validation failed.")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../organization_providers/v_2/types/organization_provider_id"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module FeeSchedules
|
8
|
+
module V3
|
9
|
+
# Match information for a billing provider
|
10
|
+
class MatchProvider
|
11
|
+
attr_reader :value, :match, :explanation, :additional_properties
|
12
|
+
|
13
|
+
# @param value [OrganizationProviders::V2::ORGANIZATION_PROVIDER_ID]
|
14
|
+
# @param match [Boolean]
|
15
|
+
# @param explanation [String]
|
16
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
# @return [FeeSchedules::V3::MatchProvider]
|
18
|
+
def initialize(match:, explanation:, value: nil, additional_properties: nil)
|
19
|
+
# @type [OrganizationProviders::V2::ORGANIZATION_PROVIDER_ID]
|
20
|
+
@value = value
|
21
|
+
# @type [Boolean]
|
22
|
+
@match = match
|
23
|
+
# @type [String]
|
24
|
+
@explanation = explanation
|
25
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of MatchProvider
|
30
|
+
#
|
31
|
+
# @param json_object [JSON]
|
32
|
+
# @return [FeeSchedules::V3::MatchProvider]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
JSON.parse(json_object)
|
36
|
+
value = struct.value
|
37
|
+
match = struct.match
|
38
|
+
explanation = struct.explanation
|
39
|
+
new(value: value, match: match, explanation: explanation, additional_properties: struct)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Serialize an instance of MatchProvider to a JSON object
|
43
|
+
#
|
44
|
+
# @return [JSON]
|
45
|
+
def to_json(*_args)
|
46
|
+
{ "value": @value, "match": @match, "explanation": @explanation }.to_json
|
47
|
+
end
|
48
|
+
|
49
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.value&.is_a?(UUID) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
55
|
+
obj.match.is_a?(Boolean) != false || raise("Passed value for field obj.match is not the expected type, validation failed.")
|
56
|
+
obj.explanation.is_a?(String) != false || raise("Passed value for field obj.explanation is not the expected type, validation failed.")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "threshold_match"
|
4
|
+
require_relative "../../../commons/types/rate_id"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module FeeSchedules
|
9
|
+
module V3
|
10
|
+
class MatchResult
|
11
|
+
attr_reader :threshold, :rate_id, :additional_properties
|
12
|
+
|
13
|
+
# @param threshold [FeeSchedules::V3::ThresholdMatch]
|
14
|
+
# @param rate_id [Commons::RATE_ID]
|
15
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
# @return [FeeSchedules::V3::MatchResult]
|
17
|
+
def initialize(threshold:, rate_id:, additional_properties: nil)
|
18
|
+
# @type [FeeSchedules::V3::ThresholdMatch]
|
19
|
+
@threshold = threshold
|
20
|
+
# @type [Commons::RATE_ID]
|
21
|
+
@rate_id = rate_id
|
22
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
@additional_properties = additional_properties
|
24
|
+
end
|
25
|
+
|
26
|
+
# Deserialize a JSON object to an instance of MatchResult
|
27
|
+
#
|
28
|
+
# @param json_object [JSON]
|
29
|
+
# @return [FeeSchedules::V3::MatchResult]
|
30
|
+
def self.from_json(json_object:)
|
31
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
32
|
+
parsed_json = JSON.parse(json_object)
|
33
|
+
if parsed_json["threshold"].nil?
|
34
|
+
threshold = nil
|
35
|
+
else
|
36
|
+
threshold = parsed_json["threshold"].to_json
|
37
|
+
threshold = FeeSchedules::V3::ThresholdMatch.from_json(json_object: threshold)
|
38
|
+
end
|
39
|
+
rate_id = struct.rate_id
|
40
|
+
new(threshold: threshold, rate_id: rate_id, additional_properties: struct)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Serialize an instance of MatchResult to a JSON object
|
44
|
+
#
|
45
|
+
# @return [JSON]
|
46
|
+
def to_json(*_args)
|
47
|
+
{ "threshold": @threshold, "rate_id": @rate_id }.to_json
|
48
|
+
end
|
49
|
+
|
50
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
51
|
+
#
|
52
|
+
# @param obj [Object]
|
53
|
+
# @return [Void]
|
54
|
+
def self.validate_raw(obj:)
|
55
|
+
FeeSchedules::V3::ThresholdMatch.validate_raw(obj: obj.threshold)
|
56
|
+
obj.rate_id.is_a?(UUID) != false || raise("Passed value for field obj.rate_id is not the expected type, validation failed.")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "dimension_match"
|
4
|
+
require_relative "threshold_match"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module FeeSchedules
|
9
|
+
module V3
|
10
|
+
class MatchTestResult
|
11
|
+
attr_reader :dimensions, :threshold, :additional_properties
|
12
|
+
|
13
|
+
# @param dimensions [FeeSchedules::V3::DimensionMatch]
|
14
|
+
# @param threshold [FeeSchedules::V3::ThresholdMatch]
|
15
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
# @return [FeeSchedules::V3::MatchTestResult]
|
17
|
+
def initialize(dimensions:, threshold:, additional_properties: nil)
|
18
|
+
# @type [FeeSchedules::V3::DimensionMatch]
|
19
|
+
@dimensions = dimensions
|
20
|
+
# @type [FeeSchedules::V3::ThresholdMatch]
|
21
|
+
@threshold = threshold
|
22
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
@additional_properties = additional_properties
|
24
|
+
end
|
25
|
+
|
26
|
+
# Deserialize a JSON object to an instance of MatchTestResult
|
27
|
+
#
|
28
|
+
# @param json_object [JSON]
|
29
|
+
# @return [FeeSchedules::V3::MatchTestResult]
|
30
|
+
def self.from_json(json_object:)
|
31
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
32
|
+
parsed_json = JSON.parse(json_object)
|
33
|
+
if parsed_json["dimensions"].nil?
|
34
|
+
dimensions = nil
|
35
|
+
else
|
36
|
+
dimensions = parsed_json["dimensions"].to_json
|
37
|
+
dimensions = FeeSchedules::V3::DimensionMatch.from_json(json_object: dimensions)
|
38
|
+
end
|
39
|
+
if parsed_json["threshold"].nil?
|
40
|
+
threshold = nil
|
41
|
+
else
|
42
|
+
threshold = parsed_json["threshold"].to_json
|
43
|
+
threshold = FeeSchedules::V3::ThresholdMatch.from_json(json_object: threshold)
|
44
|
+
end
|
45
|
+
new(dimensions: dimensions, threshold: threshold, additional_properties: struct)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Serialize an instance of MatchTestResult to a JSON object
|
49
|
+
#
|
50
|
+
# @return [JSON]
|
51
|
+
def to_json(*_args)
|
52
|
+
{ "dimensions": @dimensions, "threshold": @threshold }.to_json
|
53
|
+
end
|
54
|
+
|
55
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
56
|
+
#
|
57
|
+
# @param obj [Object]
|
58
|
+
# @return [Void]
|
59
|
+
def self.validate_raw(obj:)
|
60
|
+
FeeSchedules::V3::DimensionMatch.validate_raw(obj: obj.dimensions)
|
61
|
+
FeeSchedules::V3::ThresholdMatch.validate_raw(obj: obj.threshold)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "dimensions"
|
4
|
+
require_relative "rate_entry"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module FeeSchedules
|
9
|
+
module V3
|
10
|
+
class NewRate
|
11
|
+
attr_reader :dimensions, :entries, :additional_properties
|
12
|
+
|
13
|
+
# @param dimensions [FeeSchedules::V3::Dimensions]
|
14
|
+
# @param entries [Array<FeeSchedules::V3::RateEntry>]
|
15
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
# @return [FeeSchedules::V3::NewRate]
|
17
|
+
def initialize(dimensions:, entries:, additional_properties: nil)
|
18
|
+
# @type [FeeSchedules::V3::Dimensions]
|
19
|
+
@dimensions = dimensions
|
20
|
+
# @type [Array<FeeSchedules::V3::RateEntry>]
|
21
|
+
@entries = entries
|
22
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
@additional_properties = additional_properties
|
24
|
+
end
|
25
|
+
|
26
|
+
# Deserialize a JSON object to an instance of NewRate
|
27
|
+
#
|
28
|
+
# @param json_object [JSON]
|
29
|
+
# @return [FeeSchedules::V3::NewRate]
|
30
|
+
def self.from_json(json_object:)
|
31
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
32
|
+
parsed_json = JSON.parse(json_object)
|
33
|
+
if parsed_json["dimensions"].nil?
|
34
|
+
dimensions = nil
|
35
|
+
else
|
36
|
+
dimensions = parsed_json["dimensions"].to_json
|
37
|
+
dimensions = FeeSchedules::V3::Dimensions.from_json(json_object: dimensions)
|
38
|
+
end
|
39
|
+
entries = parsed_json["entries"]&.map do |v|
|
40
|
+
v = v.to_json
|
41
|
+
FeeSchedules::V3::RateEntry.from_json(json_object: v)
|
42
|
+
end
|
43
|
+
new(dimensions: dimensions, entries: entries, additional_properties: struct)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Serialize an instance of NewRate to a JSON object
|
47
|
+
#
|
48
|
+
# @return [JSON]
|
49
|
+
def to_json(*_args)
|
50
|
+
{ "dimensions": @dimensions, "entries": @entries }.to_json
|
51
|
+
end
|
52
|
+
|
53
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
54
|
+
#
|
55
|
+
# @param obj [Object]
|
56
|
+
# @return [Void]
|
57
|
+
def self.validate_raw(obj:)
|
58
|
+
FeeSchedules::V3::Dimensions.validate_raw(obj: obj.dimensions)
|
59
|
+
obj.entries.is_a?(Array) != false || raise("Passed value for field obj.entries is not the expected type, validation failed.")
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/rate_id"
|
4
|
+
require_relative "rate_entry"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module FeeSchedules
|
9
|
+
module V3
|
10
|
+
class NewRateVersion
|
11
|
+
attr_reader :rate_id, :previous_version, :entries, :additional_properties
|
12
|
+
|
13
|
+
# @param rate_id [Commons::RATE_ID]
|
14
|
+
# @param previous_version [Integer] New versions of rates must indicate the exact version they modify. When the system attempts to save this new version, if the latest version in the system does not equal this previos_version, the request will be rejected with a EntityConflictError.
|
15
|
+
# @param entries [Array<FeeSchedules::V3::RateEntry>]
|
16
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
# @return [FeeSchedules::V3::NewRateVersion]
|
18
|
+
def initialize(rate_id:, previous_version:, entries:, additional_properties: nil)
|
19
|
+
# @type [Commons::RATE_ID]
|
20
|
+
@rate_id = rate_id
|
21
|
+
# @type [Integer] New versions of rates must indicate the exact version they modify. When the system attempts to save this new version, if the latest version in the system does not equal this previos_version, the request will be rejected with a EntityConflictError.
|
22
|
+
@previous_version = previous_version
|
23
|
+
# @type [Array<FeeSchedules::V3::RateEntry>]
|
24
|
+
@entries = entries
|
25
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of NewRateVersion
|
30
|
+
#
|
31
|
+
# @param json_object [JSON]
|
32
|
+
# @return [FeeSchedules::V3::NewRateVersion]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
parsed_json = JSON.parse(json_object)
|
36
|
+
rate_id = struct.rate_id
|
37
|
+
previous_version = struct.previous_version
|
38
|
+
entries = parsed_json["entries"]&.map do |v|
|
39
|
+
v = v.to_json
|
40
|
+
FeeSchedules::V3::RateEntry.from_json(json_object: v)
|
41
|
+
end
|
42
|
+
new(rate_id: rate_id, previous_version: previous_version, entries: entries, additional_properties: struct)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Serialize an instance of NewRateVersion to a JSON object
|
46
|
+
#
|
47
|
+
# @return [JSON]
|
48
|
+
def to_json(*_args)
|
49
|
+
{ "rate_id": @rate_id, "previous_version": @previous_version, "entries": @entries }.to_json
|
50
|
+
end
|
51
|
+
|
52
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
53
|
+
#
|
54
|
+
# @param obj [Object]
|
55
|
+
# @return [Void]
|
56
|
+
def self.validate_raw(obj:)
|
57
|
+
obj.rate_id.is_a?(UUID) != false || raise("Passed value for field obj.rate_id is not the expected type, validation failed.")
|
58
|
+
obj.previous_version.is_a?(Integer) != false || raise("Passed value for field obj.previous_version is not the expected type, validation failed.")
|
59
|
+
obj.entries.is_a?(Array) != false || raise("Passed value for field obj.entries is not the expected type, validation failed.")
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,136 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../payers/v_3/types/payer_uuid"
|
4
|
+
require_relative "../../../organization_providers/v_2/types/organization_provider_id"
|
5
|
+
require "set"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module CandidApiClient
|
9
|
+
module FeeSchedules
|
10
|
+
module V3
|
11
|
+
# A dimensions object where all properties are optional.
|
12
|
+
class OptionalDimensions
|
13
|
+
attr_reader :payer_uuid, :organization_billing_provider_id, :states, :zip_codes, :license_types,
|
14
|
+
:facility_type_codes, :network_types, :cpt_code, :modifiers, :additional_properties
|
15
|
+
|
16
|
+
# @param payer_uuid [Payers::V3::PAYER_UUID]
|
17
|
+
# @param organization_billing_provider_id [OrganizationProviders::V2::ORGANIZATION_PROVIDER_ID]
|
18
|
+
# @param states [Set<Commons::State>]
|
19
|
+
# @param zip_codes [Set<String>]
|
20
|
+
# @param license_types [Set<OrganizationProviders::V2::LicenseType>]
|
21
|
+
# @param facility_type_codes [Set<Commons::FacilityTypeCode>]
|
22
|
+
# @param network_types [Set<Commons::NetworkType>]
|
23
|
+
# @param cpt_code [String]
|
24
|
+
# @param modifiers [Set<Commons::ProcedureModifier>]
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [FeeSchedules::V3::OptionalDimensions]
|
27
|
+
def initialize(states:, zip_codes:, license_types:, facility_type_codes:, network_types:, modifiers:,
|
28
|
+
payer_uuid: nil, organization_billing_provider_id: nil, cpt_code: nil, additional_properties: nil)
|
29
|
+
# @type [Payers::V3::PAYER_UUID]
|
30
|
+
@payer_uuid = payer_uuid
|
31
|
+
# @type [OrganizationProviders::V2::ORGANIZATION_PROVIDER_ID]
|
32
|
+
@organization_billing_provider_id = organization_billing_provider_id
|
33
|
+
# @type [Set<Commons::State>]
|
34
|
+
@states = states
|
35
|
+
# @type [Set<String>]
|
36
|
+
@zip_codes = zip_codes
|
37
|
+
# @type [Set<OrganizationProviders::V2::LicenseType>]
|
38
|
+
@license_types = license_types
|
39
|
+
# @type [Set<Commons::FacilityTypeCode>]
|
40
|
+
@facility_type_codes = facility_type_codes
|
41
|
+
# @type [Set<Commons::NetworkType>]
|
42
|
+
@network_types = network_types
|
43
|
+
# @type [String]
|
44
|
+
@cpt_code = cpt_code
|
45
|
+
# @type [Set<Commons::ProcedureModifier>]
|
46
|
+
@modifiers = modifiers
|
47
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
48
|
+
@additional_properties = additional_properties
|
49
|
+
end
|
50
|
+
|
51
|
+
# Deserialize a JSON object to an instance of OptionalDimensions
|
52
|
+
#
|
53
|
+
# @param json_object [JSON]
|
54
|
+
# @return [FeeSchedules::V3::OptionalDimensions]
|
55
|
+
def self.from_json(json_object:)
|
56
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
57
|
+
parsed_json = JSON.parse(json_object)
|
58
|
+
payer_uuid = struct.payer_uuid
|
59
|
+
organization_billing_provider_id = struct.organization_billing_provider_id
|
60
|
+
if parsed_json["states"].nil?
|
61
|
+
states = nil
|
62
|
+
else
|
63
|
+
states = parsed_json["states"].to_json
|
64
|
+
states = Set.new(states)
|
65
|
+
end
|
66
|
+
if parsed_json["zip_codes"].nil?
|
67
|
+
zip_codes = nil
|
68
|
+
else
|
69
|
+
zip_codes = parsed_json["zip_codes"].to_json
|
70
|
+
zip_codes = Set.new(zip_codes)
|
71
|
+
end
|
72
|
+
if parsed_json["license_types"].nil?
|
73
|
+
license_types = nil
|
74
|
+
else
|
75
|
+
license_types = parsed_json["license_types"].to_json
|
76
|
+
license_types = Set.new(license_types)
|
77
|
+
end
|
78
|
+
if parsed_json["facility_type_codes"].nil?
|
79
|
+
facility_type_codes = nil
|
80
|
+
else
|
81
|
+
facility_type_codes = parsed_json["facility_type_codes"].to_json
|
82
|
+
facility_type_codes = Set.new(facility_type_codes)
|
83
|
+
end
|
84
|
+
if parsed_json["network_types"].nil?
|
85
|
+
network_types = nil
|
86
|
+
else
|
87
|
+
network_types = parsed_json["network_types"].to_json
|
88
|
+
network_types = Set.new(network_types)
|
89
|
+
end
|
90
|
+
cpt_code = struct.cpt_code
|
91
|
+
if parsed_json["modifiers"].nil?
|
92
|
+
modifiers = nil
|
93
|
+
else
|
94
|
+
modifiers = parsed_json["modifiers"].to_json
|
95
|
+
modifiers = Set.new(modifiers)
|
96
|
+
end
|
97
|
+
new(payer_uuid: payer_uuid, organization_billing_provider_id: organization_billing_provider_id,
|
98
|
+
states: states, zip_codes: zip_codes, license_types: license_types, facility_type_codes: facility_type_codes, network_types: network_types, cpt_code: cpt_code, modifiers: modifiers, additional_properties: struct)
|
99
|
+
end
|
100
|
+
|
101
|
+
# Serialize an instance of OptionalDimensions to a JSON object
|
102
|
+
#
|
103
|
+
# @return [JSON]
|
104
|
+
def to_json(*_args)
|
105
|
+
{
|
106
|
+
"payer_uuid": @payer_uuid,
|
107
|
+
"organization_billing_provider_id": @organization_billing_provider_id,
|
108
|
+
"states": @states,
|
109
|
+
"zip_codes": @zip_codes,
|
110
|
+
"license_types": @license_types,
|
111
|
+
"facility_type_codes": @facility_type_codes,
|
112
|
+
"network_types": @network_types,
|
113
|
+
"cpt_code": @cpt_code,
|
114
|
+
"modifiers": @modifiers
|
115
|
+
}.to_json
|
116
|
+
end
|
117
|
+
|
118
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
119
|
+
#
|
120
|
+
# @param obj [Object]
|
121
|
+
# @return [Void]
|
122
|
+
def self.validate_raw(obj:)
|
123
|
+
obj.payer_uuid&.is_a?(UUID) != false || raise("Passed value for field obj.payer_uuid is not the expected type, validation failed.")
|
124
|
+
obj.organization_billing_provider_id&.is_a?(UUID) != false || raise("Passed value for field obj.organization_billing_provider_id is not the expected type, validation failed.")
|
125
|
+
obj.states.is_a?(Set) != false || raise("Passed value for field obj.states is not the expected type, validation failed.")
|
126
|
+
obj.zip_codes.is_a?(Set) != false || raise("Passed value for field obj.zip_codes is not the expected type, validation failed.")
|
127
|
+
obj.license_types.is_a?(Set) != false || raise("Passed value for field obj.license_types is not the expected type, validation failed.")
|
128
|
+
obj.facility_type_codes.is_a?(Set) != false || raise("Passed value for field obj.facility_type_codes is not the expected type, validation failed.")
|
129
|
+
obj.network_types.is_a?(Set) != false || raise("Passed value for field obj.network_types is not the expected type, validation failed.")
|
130
|
+
obj.cpt_code&.is_a?(String) != false || raise("Passed value for field obj.cpt_code is not the expected type, validation failed.")
|
131
|
+
obj.modifiers.is_a?(Set) != false || raise("Passed value for field obj.modifiers is not the expected type, validation failed.")
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "rate_entry"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module FeeSchedules
|
8
|
+
module V3
|
9
|
+
# This error is thrown when two rate entries have time ranges that overlap.
|
10
|
+
class OverlappingRateEntriesError
|
11
|
+
attr_reader :message, :rate_a, :rate_b, :additional_properties
|
12
|
+
|
13
|
+
# @param message [String]
|
14
|
+
# @param rate_a [FeeSchedules::V3::RateEntry]
|
15
|
+
# @param rate_b [FeeSchedules::V3::RateEntry]
|
16
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
# @return [FeeSchedules::V3::OverlappingRateEntriesError]
|
18
|
+
def initialize(message:, rate_a:, rate_b:, additional_properties: nil)
|
19
|
+
# @type [String]
|
20
|
+
@message = message
|
21
|
+
# @type [FeeSchedules::V3::RateEntry]
|
22
|
+
@rate_a = rate_a
|
23
|
+
# @type [FeeSchedules::V3::RateEntry]
|
24
|
+
@rate_b = rate_b
|
25
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of OverlappingRateEntriesError
|
30
|
+
#
|
31
|
+
# @param json_object [JSON]
|
32
|
+
# @return [FeeSchedules::V3::OverlappingRateEntriesError]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
parsed_json = JSON.parse(json_object)
|
36
|
+
message = struct.message
|
37
|
+
if parsed_json["rate_a"].nil?
|
38
|
+
rate_a = nil
|
39
|
+
else
|
40
|
+
rate_a = parsed_json["rate_a"].to_json
|
41
|
+
rate_a = FeeSchedules::V3::RateEntry.from_json(json_object: rate_a)
|
42
|
+
end
|
43
|
+
if parsed_json["rate_b"].nil?
|
44
|
+
rate_b = nil
|
45
|
+
else
|
46
|
+
rate_b = parsed_json["rate_b"].to_json
|
47
|
+
rate_b = FeeSchedules::V3::RateEntry.from_json(json_object: rate_b)
|
48
|
+
end
|
49
|
+
new(message: message, rate_a: rate_a, rate_b: rate_b, additional_properties: struct)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Serialize an instance of OverlappingRateEntriesError to a JSON object
|
53
|
+
#
|
54
|
+
# @return [JSON]
|
55
|
+
def to_json(*_args)
|
56
|
+
{ "message": @message, "rate_a": @rate_a, "rate_b": @rate_b }.to_json
|
57
|
+
end
|
58
|
+
|
59
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
60
|
+
#
|
61
|
+
# @param obj [Object]
|
62
|
+
# @return [Void]
|
63
|
+
def self.validate_raw(obj:)
|
64
|
+
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
65
|
+
FeeSchedules::V3::RateEntry.validate_raw(obj: obj.rate_a)
|
66
|
+
FeeSchedules::V3::RateEntry.validate_raw(obj: obj.rate_b)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module CandidApiClient
|
6
|
+
module FeeSchedules
|
7
|
+
module V3
|
8
|
+
# Rate thresholds that determine fee schedule rate matching behavior. When a service line is adjudicated by a payer Candid determines if the payer's allowed amount "matches" the rate value. If the allowed amount doesn't equal the rate value, Candid moves the claim to a PAID_INCORRECTLY state. These optional thresholds allow a user to set wiggle room to avoid claims moving to PAID_INCORRECTLY and instead have them move directly to FINALIZED_PAID when the payer's allowed amount is greater than [rate_cents - lower_threshold_cents] and less than [rate_cents + upper_threshold_cents].\n Additionally, a client can set disable_paid_incorrectly to avoid the PAID_INCORRECTLY claim status entirely.
|
9
|
+
class PayerThreshold
|
10
|
+
attr_reader :upper_threshold_cents, :lower_threshold_cents, :disable_paid_incorrectly, :additional_properties
|
11
|
+
|
12
|
+
# @param upper_threshold_cents [Integer]
|
13
|
+
# @param lower_threshold_cents [Integer]
|
14
|
+
# @param disable_paid_incorrectly [Boolean]
|
15
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
# @return [FeeSchedules::V3::PayerThreshold]
|
17
|
+
def initialize(disable_paid_incorrectly:, upper_threshold_cents: nil, lower_threshold_cents: nil,
|
18
|
+
additional_properties: nil)
|
19
|
+
# @type [Integer]
|
20
|
+
@upper_threshold_cents = upper_threshold_cents
|
21
|
+
# @type [Integer]
|
22
|
+
@lower_threshold_cents = lower_threshold_cents
|
23
|
+
# @type [Boolean]
|
24
|
+
@disable_paid_incorrectly = disable_paid_incorrectly
|
25
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of PayerThreshold
|
30
|
+
#
|
31
|
+
# @param json_object [JSON]
|
32
|
+
# @return [FeeSchedules::V3::PayerThreshold]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
JSON.parse(json_object)
|
36
|
+
upper_threshold_cents = struct.upper_threshold_cents
|
37
|
+
lower_threshold_cents = struct.lower_threshold_cents
|
38
|
+
disable_paid_incorrectly = struct.disable_paid_incorrectly
|
39
|
+
new(upper_threshold_cents: upper_threshold_cents, lower_threshold_cents: lower_threshold_cents,
|
40
|
+
disable_paid_incorrectly: disable_paid_incorrectly, additional_properties: struct)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Serialize an instance of PayerThreshold to a JSON object
|
44
|
+
#
|
45
|
+
# @return [JSON]
|
46
|
+
def to_json(*_args)
|
47
|
+
{
|
48
|
+
"upper_threshold_cents": @upper_threshold_cents,
|
49
|
+
"lower_threshold_cents": @lower_threshold_cents,
|
50
|
+
"disable_paid_incorrectly": @disable_paid_incorrectly
|
51
|
+
}.to_json
|
52
|
+
end
|
53
|
+
|
54
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
55
|
+
#
|
56
|
+
# @param obj [Object]
|
57
|
+
# @return [Void]
|
58
|
+
def self.validate_raw(obj:)
|
59
|
+
obj.upper_threshold_cents&.is_a?(Integer) != false || raise("Passed value for field obj.upper_threshold_cents is not the expected type, validation failed.")
|
60
|
+
obj.lower_threshold_cents&.is_a?(Integer) != false || raise("Passed value for field obj.lower_threshold_cents is not the expected type, validation failed.")
|
61
|
+
obj.disable_paid_incorrectly.is_a?(Boolean) != false || raise("Passed value for field obj.disable_paid_incorrectly is not the expected type, validation failed.")
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|