candidhealth 1.3.1 → 1.4.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/claim_submission/v_1/types/claim_submission_record_create.rb +4 -4
- data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional.rb +4 -4
- data/lib/candidhealth/diagnoses/types/service_lines_must_have_at_least_one_diagnosis_error.rb +77 -0
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +151 -2
- data/lib/candidhealth/encounters/v_4/types/encounter_submission_expectation.rb +23 -0
- data/lib/candidhealth/exports/v_3/client.rb +16 -10
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +205 -2
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/coordination_of_benefits_recommendation.rb +63 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_recommendation.rb +144 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_recommendation_patient_info.rb +124 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_recommendation_payload.rb +102 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/medicare_advantage_recommendation.rb +70 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/medicare_advantage_recommendation_payload.rb +87 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/payer_search_response.rb +107 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/post_eligibility_recommendation_request.rb +96 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/stedi_payer.rb +144 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/stedi_payer_item.rb +79 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_item.rb +28 -1
- data/lib/candidhealth/pre_encounter/tags/v_1/client.rb +8 -0
- data/lib/candidhealth/pre_encounter/tags/v_1/types/mutable_tag.rb +22 -3
- data/lib/candidhealth/pre_encounter/tags/v_1/types/tag.rb +21 -3
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +9 -1
- data/lib/candidhealth/x_12/v_1/types/patient_discharge_status_code.rb +52 -0
- data/lib/candidhealth/x_12/v_1/types/point_of_origin_for_admission_or_visit_code.rb +23 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_admission_or_visit_code.rb +18 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +98 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_bill_frequency_code.rb +39 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_care_code.rb +21 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_facility_code.rb +19 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +19 -1
- metadata +21 -3
- data/lib/candidhealth/claim_submission/v_1/types/claim_frequency_type_code.rb +0 -15
@@ -0,0 +1,102 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
require_relative "medicare_advantage_recommendation"
|
5
|
+
require_relative "coordination_of_benefits_recommendation"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module EligibilityChecks
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class EligibilityRecommendationPayload
|
13
|
+
# @return [Object]
|
14
|
+
attr_reader :member
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :discriminant
|
17
|
+
|
18
|
+
private_class_method :new
|
19
|
+
alias kind_of? is_a?
|
20
|
+
|
21
|
+
# @param member [Object]
|
22
|
+
# @param discriminant [String]
|
23
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload]
|
24
|
+
def initialize(member:, discriminant:)
|
25
|
+
@member = member
|
26
|
+
@discriminant = discriminant
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of EligibilityRecommendationPayload
|
30
|
+
#
|
31
|
+
# @param json_object [String]
|
32
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
case struct.type
|
36
|
+
when "MEDICARE_ADVANTAGE"
|
37
|
+
member = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendation.from_json(json_object: json_object)
|
38
|
+
when "COORDINATION_OF_BENEFITS"
|
39
|
+
member = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::CoordinationOfBenefitsRecommendation.from_json(json_object: json_object)
|
40
|
+
else
|
41
|
+
member = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendation.from_json(json_object: json_object)
|
42
|
+
end
|
43
|
+
new(member: member, discriminant: struct.type)
|
44
|
+
end
|
45
|
+
|
46
|
+
# For Union Types, to_json functionality is delegated to the wrapped member.
|
47
|
+
#
|
48
|
+
# @return [String]
|
49
|
+
def to_json(*_args)
|
50
|
+
case @discriminant
|
51
|
+
when "MEDICARE_ADVANTAGE"
|
52
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
53
|
+
when "COORDINATION_OF_BENEFITS"
|
54
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
55
|
+
else
|
56
|
+
{ "type": @discriminant, value: @member }.to_json
|
57
|
+
end
|
58
|
+
@member.to_json
|
59
|
+
end
|
60
|
+
|
61
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
62
|
+
# hash and check each fields type against the current object's property
|
63
|
+
# definitions.
|
64
|
+
#
|
65
|
+
# @param obj [Object]
|
66
|
+
# @return [Void]
|
67
|
+
def self.validate_raw(obj:)
|
68
|
+
case obj.type
|
69
|
+
when "MEDICARE_ADVANTAGE"
|
70
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendation.validate_raw(obj: obj)
|
71
|
+
when "COORDINATION_OF_BENEFITS"
|
72
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::CoordinationOfBenefitsRecommendation.validate_raw(obj: obj)
|
73
|
+
else
|
74
|
+
raise("Passed value matched no type within the union, validation failed.")
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# For Union Types, is_a? functionality is delegated to the wrapped member.
|
79
|
+
#
|
80
|
+
# @param obj [Object]
|
81
|
+
# @return [Boolean]
|
82
|
+
def is_a?(obj)
|
83
|
+
@member.is_a?(obj)
|
84
|
+
end
|
85
|
+
|
86
|
+
# @param member [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendation]
|
87
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload]
|
88
|
+
def self.medicare_advantage(member:)
|
89
|
+
new(member: member, discriminant: "MEDICARE_ADVANTAGE")
|
90
|
+
end
|
91
|
+
|
92
|
+
# @param member [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::CoordinationOfBenefitsRecommendation]
|
93
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload]
|
94
|
+
def self.coordination_of_benefits(member:)
|
95
|
+
new(member: member, discriminant: "COORDINATION_OF_BENEFITS")
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "medicare_advantage_recommendation_payload"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module EligibilityChecks
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
# An object representing a Medicare Advantage recommendation.
|
13
|
+
class MedicareAdvantageRecommendation
|
14
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendationPayload]
|
15
|
+
attr_reader :payload
|
16
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
attr_reader :additional_properties
|
18
|
+
# @return [Object]
|
19
|
+
attr_reader :_field_set
|
20
|
+
protected :_field_set
|
21
|
+
|
22
|
+
OMIT = Object.new
|
23
|
+
|
24
|
+
# @param payload [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendationPayload]
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendation]
|
27
|
+
def initialize(payload:, additional_properties: nil)
|
28
|
+
@payload = payload
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "payload": payload }
|
31
|
+
end
|
32
|
+
|
33
|
+
# Deserialize a JSON object to an instance of MedicareAdvantageRecommendation
|
34
|
+
#
|
35
|
+
# @param json_object [String]
|
36
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendation]
|
37
|
+
def self.from_json(json_object:)
|
38
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
39
|
+
parsed_json = JSON.parse(json_object)
|
40
|
+
if parsed_json["payload"].nil?
|
41
|
+
payload = nil
|
42
|
+
else
|
43
|
+
payload = parsed_json["payload"].to_json
|
44
|
+
payload = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendationPayload.from_json(json_object: payload)
|
45
|
+
end
|
46
|
+
new(payload: payload, additional_properties: struct)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Serialize an instance of MedicareAdvantageRecommendation to a JSON object
|
50
|
+
#
|
51
|
+
# @return [String]
|
52
|
+
def to_json(*_args)
|
53
|
+
@_field_set&.to_json
|
54
|
+
end
|
55
|
+
|
56
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
57
|
+
# hash and check each fields type against the current object's property
|
58
|
+
# definitions.
|
59
|
+
#
|
60
|
+
# @param obj [Object]
|
61
|
+
# @return [Void]
|
62
|
+
def self.validate_raw(obj:)
|
63
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendationPayload.validate_raw(obj: obj.payload)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PreEncounter
|
8
|
+
module EligibilityChecks
|
9
|
+
module V1
|
10
|
+
module Types
|
11
|
+
# An object representing the payload for a Medicare Advantage recommendation.
|
12
|
+
class MedicareAdvantageRecommendationPayload
|
13
|
+
# @return [String]
|
14
|
+
attr_reader :payer_id
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :payer_name
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :member_id
|
19
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
20
|
+
attr_reader :additional_properties
|
21
|
+
# @return [Object]
|
22
|
+
attr_reader :_field_set
|
23
|
+
protected :_field_set
|
24
|
+
|
25
|
+
OMIT = Object.new
|
26
|
+
|
27
|
+
# @param payer_id [String]
|
28
|
+
# @param payer_name [String]
|
29
|
+
# @param member_id [String]
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendationPayload]
|
32
|
+
def initialize(payer_id:, payer_name:, member_id: OMIT, additional_properties: nil)
|
33
|
+
@payer_id = payer_id
|
34
|
+
@payer_name = payer_name
|
35
|
+
@member_id = member_id if member_id != OMIT
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = {
|
38
|
+
"payer_id": payer_id,
|
39
|
+
"payer_name": payer_name,
|
40
|
+
"member_id": member_id
|
41
|
+
}.reject do |_k, v|
|
42
|
+
v == OMIT
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Deserialize a JSON object to an instance of
|
47
|
+
# MedicareAdvantageRecommendationPayload
|
48
|
+
#
|
49
|
+
# @param json_object [String]
|
50
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendationPayload]
|
51
|
+
def self.from_json(json_object:)
|
52
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
53
|
+
payer_id = struct["payer_id"]
|
54
|
+
payer_name = struct["payer_name"]
|
55
|
+
member_id = struct["member_id"]
|
56
|
+
new(
|
57
|
+
payer_id: payer_id,
|
58
|
+
payer_name: payer_name,
|
59
|
+
member_id: member_id,
|
60
|
+
additional_properties: struct
|
61
|
+
)
|
62
|
+
end
|
63
|
+
|
64
|
+
# Serialize an instance of MedicareAdvantageRecommendationPayload to a JSON object
|
65
|
+
#
|
66
|
+
# @return [String]
|
67
|
+
def to_json(*_args)
|
68
|
+
@_field_set&.to_json
|
69
|
+
end
|
70
|
+
|
71
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
72
|
+
# hash and check each fields type against the current object's property
|
73
|
+
# definitions.
|
74
|
+
#
|
75
|
+
# @param obj [Object]
|
76
|
+
# @return [Void]
|
77
|
+
def self.validate_raw(obj:)
|
78
|
+
obj.payer_id.is_a?(String) != false || raise("Passed value for field obj.payer_id is not the expected type, validation failed.")
|
79
|
+
obj.payer_name.is_a?(String) != false || raise("Passed value for field obj.payer_name is not the expected type, validation failed.")
|
80
|
+
obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "stedi_payer_item"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module EligibilityChecks
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class PayerSearchResponse
|
13
|
+
# @return [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::StediPayerItem>]
|
14
|
+
attr_reader :items
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :stats
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :next_page_token
|
19
|
+
# @return [String]
|
20
|
+
attr_reader :prev_page_token
|
21
|
+
# @return [Integer]
|
22
|
+
attr_reader :total
|
23
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
+
attr_reader :additional_properties
|
25
|
+
# @return [Object]
|
26
|
+
attr_reader :_field_set
|
27
|
+
protected :_field_set
|
28
|
+
|
29
|
+
OMIT = Object.new
|
30
|
+
|
31
|
+
# @param items [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::StediPayerItem>]
|
32
|
+
# @param stats [Object]
|
33
|
+
# @param next_page_token [String]
|
34
|
+
# @param prev_page_token [String]
|
35
|
+
# @param total [Integer]
|
36
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
37
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::PayerSearchResponse]
|
38
|
+
def initialize(items:, stats:, total:, next_page_token: OMIT, prev_page_token: OMIT,
|
39
|
+
additional_properties: nil)
|
40
|
+
@items = items
|
41
|
+
@stats = stats
|
42
|
+
@next_page_token = next_page_token if next_page_token != OMIT
|
43
|
+
@prev_page_token = prev_page_token if prev_page_token != OMIT
|
44
|
+
@total = total
|
45
|
+
@additional_properties = additional_properties
|
46
|
+
@_field_set = {
|
47
|
+
"items": items,
|
48
|
+
"stats": stats,
|
49
|
+
"next_page_token": next_page_token,
|
50
|
+
"prev_page_token": prev_page_token,
|
51
|
+
"total": total
|
52
|
+
}.reject do |_k, v|
|
53
|
+
v == OMIT
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# Deserialize a JSON object to an instance of PayerSearchResponse
|
58
|
+
#
|
59
|
+
# @param json_object [String]
|
60
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::PayerSearchResponse]
|
61
|
+
def self.from_json(json_object:)
|
62
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
63
|
+
parsed_json = JSON.parse(json_object)
|
64
|
+
items = parsed_json["items"]&.map do |item|
|
65
|
+
item = item.to_json
|
66
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::StediPayerItem.from_json(json_object: item)
|
67
|
+
end
|
68
|
+
stats = struct["stats"]
|
69
|
+
next_page_token = struct["next_page_token"]
|
70
|
+
prev_page_token = struct["prev_page_token"]
|
71
|
+
total = struct["total"]
|
72
|
+
new(
|
73
|
+
items: items,
|
74
|
+
stats: stats,
|
75
|
+
next_page_token: next_page_token,
|
76
|
+
prev_page_token: prev_page_token,
|
77
|
+
total: total,
|
78
|
+
additional_properties: struct
|
79
|
+
)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Serialize an instance of PayerSearchResponse to a JSON object
|
83
|
+
#
|
84
|
+
# @return [String]
|
85
|
+
def to_json(*_args)
|
86
|
+
@_field_set&.to_json
|
87
|
+
end
|
88
|
+
|
89
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
90
|
+
# hash and check each fields type against the current object's property
|
91
|
+
# definitions.
|
92
|
+
#
|
93
|
+
# @param obj [Object]
|
94
|
+
# @return [Void]
|
95
|
+
def self.validate_raw(obj:)
|
96
|
+
obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
|
97
|
+
obj.stats.is_a?(Object) != false || raise("Passed value for field obj.stats is not the expected type, validation failed.")
|
98
|
+
obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
|
99
|
+
obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.")
|
100
|
+
obj.total.is_a?(Integer) != false || raise("Passed value for field obj.total is not the expected type, validation failed.")
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "eligibility_recommendation_patient_info"
|
4
|
+
require_relative "eligibility_recommendation_payload"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module CandidApiClient
|
9
|
+
module PreEncounter
|
10
|
+
module EligibilityChecks
|
11
|
+
module V1
|
12
|
+
module Types
|
13
|
+
class PostEligibilityRecommendationRequest
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :eligibility_check_id
|
16
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPatientInfo]
|
17
|
+
attr_reader :patient
|
18
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload]
|
19
|
+
attr_reader :recommendation
|
20
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
21
|
+
attr_reader :additional_properties
|
22
|
+
# @return [Object]
|
23
|
+
attr_reader :_field_set
|
24
|
+
protected :_field_set
|
25
|
+
|
26
|
+
OMIT = Object.new
|
27
|
+
|
28
|
+
# @param eligibility_check_id [String]
|
29
|
+
# @param patient [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPatientInfo]
|
30
|
+
# @param recommendation [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload]
|
31
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
32
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::PostEligibilityRecommendationRequest]
|
33
|
+
def initialize(eligibility_check_id:, patient:, recommendation:, additional_properties: nil)
|
34
|
+
@eligibility_check_id = eligibility_check_id
|
35
|
+
@patient = patient
|
36
|
+
@recommendation = recommendation
|
37
|
+
@additional_properties = additional_properties
|
38
|
+
@_field_set = {
|
39
|
+
"eligibility_check_id": eligibility_check_id,
|
40
|
+
"patient": patient,
|
41
|
+
"recommendation": recommendation
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Deserialize a JSON object to an instance of PostEligibilityRecommendationRequest
|
46
|
+
#
|
47
|
+
# @param json_object [String]
|
48
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::PostEligibilityRecommendationRequest]
|
49
|
+
def self.from_json(json_object:)
|
50
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
51
|
+
parsed_json = JSON.parse(json_object)
|
52
|
+
eligibility_check_id = struct["eligibility_check_id"]
|
53
|
+
if parsed_json["patient"].nil?
|
54
|
+
patient = nil
|
55
|
+
else
|
56
|
+
patient = parsed_json["patient"].to_json
|
57
|
+
patient = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPatientInfo.from_json(json_object: patient)
|
58
|
+
end
|
59
|
+
if parsed_json["recommendation"].nil?
|
60
|
+
recommendation = nil
|
61
|
+
else
|
62
|
+
recommendation = parsed_json["recommendation"].to_json
|
63
|
+
recommendation = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload.from_json(json_object: recommendation)
|
64
|
+
end
|
65
|
+
new(
|
66
|
+
eligibility_check_id: eligibility_check_id,
|
67
|
+
patient: patient,
|
68
|
+
recommendation: recommendation,
|
69
|
+
additional_properties: struct
|
70
|
+
)
|
71
|
+
end
|
72
|
+
|
73
|
+
# Serialize an instance of PostEligibilityRecommendationRequest to a JSON object
|
74
|
+
#
|
75
|
+
# @return [String]
|
76
|
+
def to_json(*_args)
|
77
|
+
@_field_set&.to_json
|
78
|
+
end
|
79
|
+
|
80
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
81
|
+
# hash and check each fields type against the current object's property
|
82
|
+
# definitions.
|
83
|
+
#
|
84
|
+
# @param obj [Object]
|
85
|
+
# @return [Void]
|
86
|
+
def self.validate_raw(obj:)
|
87
|
+
obj.eligibility_check_id.is_a?(String) != false || raise("Passed value for field obj.eligibility_check_id is not the expected type, validation failed.")
|
88
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPatientInfo.validate_raw(obj: obj.patient)
|
89
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload.validate_raw(obj: obj.recommendation)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PreEncounter
|
8
|
+
module EligibilityChecks
|
9
|
+
module V1
|
10
|
+
module Types
|
11
|
+
class StediPayer
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :stedi_id
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :display_name
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :primary_payer_id
|
18
|
+
# @return [Array<String>]
|
19
|
+
attr_reader :aliases
|
20
|
+
# @return [Array<String>]
|
21
|
+
attr_reader :names
|
22
|
+
# @return [Object]
|
23
|
+
attr_reader :transaction_support
|
24
|
+
# @return [Array<String>]
|
25
|
+
attr_reader :employer_identification_numbers
|
26
|
+
# @return [Object]
|
27
|
+
attr_reader :payer_enrollment
|
28
|
+
# @return [String]
|
29
|
+
attr_reader :parent_payer_group
|
30
|
+
# @return [Array<String>]
|
31
|
+
attr_reader :coverage_types
|
32
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
33
|
+
attr_reader :additional_properties
|
34
|
+
# @return [Object]
|
35
|
+
attr_reader :_field_set
|
36
|
+
protected :_field_set
|
37
|
+
|
38
|
+
OMIT = Object.new
|
39
|
+
|
40
|
+
# @param stedi_id [String]
|
41
|
+
# @param display_name [String]
|
42
|
+
# @param primary_payer_id [String]
|
43
|
+
# @param aliases [Array<String>]
|
44
|
+
# @param names [Array<String>]
|
45
|
+
# @param transaction_support [Object]
|
46
|
+
# @param employer_identification_numbers [Array<String>]
|
47
|
+
# @param payer_enrollment [Object]
|
48
|
+
# @param parent_payer_group [String]
|
49
|
+
# @param coverage_types [Array<String>]
|
50
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
51
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::StediPayer]
|
52
|
+
def initialize(stedi_id:, display_name:, primary_payer_id:, aliases:, names:, transaction_support:, payer_enrollment:,
|
53
|
+
employer_identification_numbers: OMIT, parent_payer_group: OMIT, coverage_types: OMIT, additional_properties: nil)
|
54
|
+
@stedi_id = stedi_id
|
55
|
+
@display_name = display_name
|
56
|
+
@primary_payer_id = primary_payer_id
|
57
|
+
@aliases = aliases
|
58
|
+
@names = names
|
59
|
+
@transaction_support = transaction_support
|
60
|
+
if employer_identification_numbers != OMIT
|
61
|
+
@employer_identification_numbers = employer_identification_numbers
|
62
|
+
end
|
63
|
+
@payer_enrollment = payer_enrollment
|
64
|
+
@parent_payer_group = parent_payer_group if parent_payer_group != OMIT
|
65
|
+
@coverage_types = coverage_types if coverage_types != OMIT
|
66
|
+
@additional_properties = additional_properties
|
67
|
+
@_field_set = {
|
68
|
+
"stedi_id": stedi_id,
|
69
|
+
"display_name": display_name,
|
70
|
+
"primary_payer_id": primary_payer_id,
|
71
|
+
"aliases": aliases,
|
72
|
+
"names": names,
|
73
|
+
"transaction_support": transaction_support,
|
74
|
+
"employer_identification_numbers": employer_identification_numbers,
|
75
|
+
"payer_enrollment": payer_enrollment,
|
76
|
+
"parent_payer_group": parent_payer_group,
|
77
|
+
"coverage_types": coverage_types
|
78
|
+
}.reject do |_k, v|
|
79
|
+
v == OMIT
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# Deserialize a JSON object to an instance of StediPayer
|
84
|
+
#
|
85
|
+
# @param json_object [String]
|
86
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::StediPayer]
|
87
|
+
def self.from_json(json_object:)
|
88
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
89
|
+
stedi_id = struct["stedi_id"]
|
90
|
+
display_name = struct["display_name"]
|
91
|
+
primary_payer_id = struct["primary_payer_id"]
|
92
|
+
aliases = struct["aliases"]
|
93
|
+
names = struct["names"]
|
94
|
+
transaction_support = struct["transaction_support"]
|
95
|
+
employer_identification_numbers = struct["employer_identification_numbers"]
|
96
|
+
payer_enrollment = struct["payer_enrollment"]
|
97
|
+
parent_payer_group = struct["parent_payer_group"]
|
98
|
+
coverage_types = struct["coverage_types"]
|
99
|
+
new(
|
100
|
+
stedi_id: stedi_id,
|
101
|
+
display_name: display_name,
|
102
|
+
primary_payer_id: primary_payer_id,
|
103
|
+
aliases: aliases,
|
104
|
+
names: names,
|
105
|
+
transaction_support: transaction_support,
|
106
|
+
employer_identification_numbers: employer_identification_numbers,
|
107
|
+
payer_enrollment: payer_enrollment,
|
108
|
+
parent_payer_group: parent_payer_group,
|
109
|
+
coverage_types: coverage_types,
|
110
|
+
additional_properties: struct
|
111
|
+
)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Serialize an instance of StediPayer to a JSON object
|
115
|
+
#
|
116
|
+
# @return [String]
|
117
|
+
def to_json(*_args)
|
118
|
+
@_field_set&.to_json
|
119
|
+
end
|
120
|
+
|
121
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
122
|
+
# hash and check each fields type against the current object's property
|
123
|
+
# definitions.
|
124
|
+
#
|
125
|
+
# @param obj [Object]
|
126
|
+
# @return [Void]
|
127
|
+
def self.validate_raw(obj:)
|
128
|
+
obj.stedi_id.is_a?(String) != false || raise("Passed value for field obj.stedi_id is not the expected type, validation failed.")
|
129
|
+
obj.display_name.is_a?(String) != false || raise("Passed value for field obj.display_name is not the expected type, validation failed.")
|
130
|
+
obj.primary_payer_id.is_a?(String) != false || raise("Passed value for field obj.primary_payer_id is not the expected type, validation failed.")
|
131
|
+
obj.aliases.is_a?(Array) != false || raise("Passed value for field obj.aliases is not the expected type, validation failed.")
|
132
|
+
obj.names.is_a?(Array) != false || raise("Passed value for field obj.names is not the expected type, validation failed.")
|
133
|
+
obj.transaction_support.is_a?(Object) != false || raise("Passed value for field obj.transaction_support is not the expected type, validation failed.")
|
134
|
+
obj.employer_identification_numbers&.is_a?(Array) != false || raise("Passed value for field obj.employer_identification_numbers is not the expected type, validation failed.")
|
135
|
+
obj.payer_enrollment.is_a?(Object) != false || raise("Passed value for field obj.payer_enrollment is not the expected type, validation failed.")
|
136
|
+
obj.parent_payer_group&.is_a?(String) != false || raise("Passed value for field obj.parent_payer_group is not the expected type, validation failed.")
|
137
|
+
obj.coverage_types&.is_a?(Array) != false || raise("Passed value for field obj.coverage_types is not the expected type, validation failed.")
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|