candidhealth 1.3.1 → 1.5.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/charge_capture/v_1/client.rb +885 -235
- 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/contracts/v_2/client.rb +4 -4
- data/lib/candidhealth/diagnoses/types/disallow_multiple_primary_diagnosis_error.rb +80 -0
- 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/fee_schedules/v_3/client.rb +82 -0
- data/lib/candidhealth/individual/types/subscriber_create.rb +6 -2
- data/lib/candidhealth/individual/types/subscriber_create_optional.rb +6 -2
- data/lib/candidhealth/non_insurance_payers/v_1/client.rb +95 -6
- data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_categories_page.rb +83 -0
- data/lib/candidhealth/organization_providers/v_3/client.rb +8 -4
- data/lib/candidhealth/organization_service_facilities/v_2/client.rb +8 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +12 -4
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +11 -3
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +9 -1
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/visit.rb +24 -2
- data/lib/candidhealth/pre_encounter/common/types/base_model.rb +2 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +8 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +6 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +4 -2
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +205 -16
- 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 +96 -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/images/v_1/types/image.rb +2 -2
- data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_item.rb +28 -1
- data/lib/candidhealth/pre_encounter/notes/v_1/types/note.rb +2 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +8 -4
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +2 -2
- 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 +23 -5
- 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 +21 -1
- metadata +23 -3
- data/lib/candidhealth/claim_submission/v_1/types/claim_frequency_type_code.rb +0 -15
data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_recommendation.rb
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "eligibility_recommendation_payload"
|
4
|
+
require_relative "eligibility_recommendation_patient_info"
|
5
|
+
require "date"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module PreEncounter
|
11
|
+
module EligibilityChecks
|
12
|
+
module V1
|
13
|
+
module Types
|
14
|
+
# An eligibility recommendation object that contains an
|
15
|
+
# EligibilityRecommendationType and a payload of data denoting the recommendation.
|
16
|
+
class EligibilityRecommendation
|
17
|
+
# @return [String] The unique UUID identifier for an EligibilityRecommendation.
|
18
|
+
attr_reader :id
|
19
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload]
|
20
|
+
attr_reader :recommendation
|
21
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPatientInfo]
|
22
|
+
attr_reader :patient
|
23
|
+
# @return [String] The organization that owns this object.
|
24
|
+
attr_reader :organization_id
|
25
|
+
# @return [Boolean] True if the object is deactivated. Deactivated objects are not returned in
|
26
|
+
# search results but are returned in all other endpoints including scan.
|
27
|
+
attr_reader :deactivated
|
28
|
+
# @return [Integer] The version of the object. Any update to any property of an object object will
|
29
|
+
# create a new version.
|
30
|
+
attr_reader :version
|
31
|
+
# @return [DateTime]
|
32
|
+
attr_reader :updated_at
|
33
|
+
# @return [String] The user ID of the user who last updated the object.
|
34
|
+
attr_reader :updating_user_id
|
35
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
36
|
+
attr_reader :additional_properties
|
37
|
+
# @return [Object]
|
38
|
+
attr_reader :_field_set
|
39
|
+
protected :_field_set
|
40
|
+
|
41
|
+
OMIT = Object.new
|
42
|
+
|
43
|
+
# @param id [String] The unique UUID identifier for an EligibilityRecommendation.
|
44
|
+
# @param recommendation [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload]
|
45
|
+
# @param patient [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPatientInfo]
|
46
|
+
# @param organization_id [String] The organization that owns this object.
|
47
|
+
# @param deactivated [Boolean] True if the object is deactivated. Deactivated objects are not returned in
|
48
|
+
# search results but are returned in all other endpoints including scan.
|
49
|
+
# @param version [Integer] The version of the object. Any update to any property of an object object will
|
50
|
+
# create a new version.
|
51
|
+
# @param updated_at [DateTime]
|
52
|
+
# @param updating_user_id [String] The user ID of the user who last updated the object.
|
53
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
54
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendation]
|
55
|
+
def initialize(id:, recommendation:, patient:, organization_id:, deactivated:, version:, updated_at:,
|
56
|
+
updating_user_id:, additional_properties: nil)
|
57
|
+
@id = id
|
58
|
+
@recommendation = recommendation
|
59
|
+
@patient = patient
|
60
|
+
@organization_id = organization_id
|
61
|
+
@deactivated = deactivated
|
62
|
+
@version = version
|
63
|
+
@updated_at = updated_at
|
64
|
+
@updating_user_id = updating_user_id
|
65
|
+
@additional_properties = additional_properties
|
66
|
+
@_field_set = {
|
67
|
+
"id": id,
|
68
|
+
"recommendation": recommendation,
|
69
|
+
"patient": patient,
|
70
|
+
"organization_id": organization_id,
|
71
|
+
"deactivated": deactivated,
|
72
|
+
"version": version,
|
73
|
+
"updated_at": updated_at,
|
74
|
+
"updating_user_id": updating_user_id
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# Deserialize a JSON object to an instance of EligibilityRecommendation
|
79
|
+
#
|
80
|
+
# @param json_object [String]
|
81
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendation]
|
82
|
+
def self.from_json(json_object:)
|
83
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
84
|
+
parsed_json = JSON.parse(json_object)
|
85
|
+
id = struct["id"]
|
86
|
+
if parsed_json["recommendation"].nil?
|
87
|
+
recommendation = nil
|
88
|
+
else
|
89
|
+
recommendation = parsed_json["recommendation"].to_json
|
90
|
+
recommendation = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload.from_json(json_object: recommendation)
|
91
|
+
end
|
92
|
+
if parsed_json["patient"].nil?
|
93
|
+
patient = nil
|
94
|
+
else
|
95
|
+
patient = parsed_json["patient"].to_json
|
96
|
+
patient = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPatientInfo.from_json(json_object: patient)
|
97
|
+
end
|
98
|
+
organization_id = struct["organization_id"]
|
99
|
+
deactivated = struct["deactivated"]
|
100
|
+
version = struct["version"]
|
101
|
+
updated_at = (DateTime.parse(parsed_json["updated_at"]) unless parsed_json["updated_at"].nil?)
|
102
|
+
updating_user_id = struct["updating_user_id"]
|
103
|
+
new(
|
104
|
+
id: id,
|
105
|
+
recommendation: recommendation,
|
106
|
+
patient: patient,
|
107
|
+
organization_id: organization_id,
|
108
|
+
deactivated: deactivated,
|
109
|
+
version: version,
|
110
|
+
updated_at: updated_at,
|
111
|
+
updating_user_id: updating_user_id,
|
112
|
+
additional_properties: struct
|
113
|
+
)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Serialize an instance of EligibilityRecommendation to a JSON object
|
117
|
+
#
|
118
|
+
# @return [String]
|
119
|
+
def to_json(*_args)
|
120
|
+
@_field_set&.to_json
|
121
|
+
end
|
122
|
+
|
123
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
124
|
+
# hash and check each fields type against the current object's property
|
125
|
+
# definitions.
|
126
|
+
#
|
127
|
+
# @param obj [Object]
|
128
|
+
# @return [Void]
|
129
|
+
def self.validate_raw(obj:)
|
130
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
131
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPayload.validate_raw(obj: obj.recommendation)
|
132
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPatientInfo.validate_raw(obj: obj.patient)
|
133
|
+
obj.organization_id.is_a?(String) != false || raise("Passed value for field obj.organization_id is not the expected type, validation failed.")
|
134
|
+
obj.deactivated.is_a?(Boolean) != false || raise("Passed value for field obj.deactivated is not the expected type, validation failed.")
|
135
|
+
obj.version.is_a?(Integer) != false || raise("Passed value for field obj.version is not the expected type, validation failed.")
|
136
|
+
obj.updated_at.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.")
|
137
|
+
obj.updating_user_id.is_a?(String) != false || raise("Passed value for field obj.updating_user_id is not the expected type, validation failed.")
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -0,0 +1,124 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "date"
|
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 patient information for an eligibility recommendation.
|
13
|
+
# This is used to find recommendations. Each field helps us find the right
|
14
|
+
# corresponding
|
15
|
+
# eligibility recommendation for the patient.
|
16
|
+
class EligibilityRecommendationPatientInfo
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :id
|
19
|
+
# @return [String]
|
20
|
+
attr_reader :mrn
|
21
|
+
# @return [String]
|
22
|
+
attr_reader :organization_id
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :last_name
|
25
|
+
# @return [String]
|
26
|
+
attr_reader :first_name
|
27
|
+
# @return [Date]
|
28
|
+
attr_reader :date_of_birth
|
29
|
+
# @return [String]
|
30
|
+
attr_reader :member_id
|
31
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
32
|
+
attr_reader :additional_properties
|
33
|
+
# @return [Object]
|
34
|
+
attr_reader :_field_set
|
35
|
+
protected :_field_set
|
36
|
+
|
37
|
+
OMIT = Object.new
|
38
|
+
|
39
|
+
# @param id [String]
|
40
|
+
# @param mrn [String]
|
41
|
+
# @param organization_id [String]
|
42
|
+
# @param last_name [String]
|
43
|
+
# @param first_name [String]
|
44
|
+
# @param date_of_birth [Date]
|
45
|
+
# @param member_id [String]
|
46
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
47
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPatientInfo]
|
48
|
+
def initialize(id: OMIT, mrn: OMIT, organization_id: OMIT, last_name: OMIT, first_name: OMIT,
|
49
|
+
date_of_birth: OMIT, member_id: OMIT, additional_properties: nil)
|
50
|
+
@id = id if id != OMIT
|
51
|
+
@mrn = mrn if mrn != OMIT
|
52
|
+
@organization_id = organization_id if organization_id != OMIT
|
53
|
+
@last_name = last_name if last_name != OMIT
|
54
|
+
@first_name = first_name if first_name != OMIT
|
55
|
+
@date_of_birth = date_of_birth if date_of_birth != OMIT
|
56
|
+
@member_id = member_id if member_id != OMIT
|
57
|
+
@additional_properties = additional_properties
|
58
|
+
@_field_set = {
|
59
|
+
"id": id,
|
60
|
+
"mrn": mrn,
|
61
|
+
"organization_id": organization_id,
|
62
|
+
"last_name": last_name,
|
63
|
+
"first_name": first_name,
|
64
|
+
"date_of_birth": date_of_birth,
|
65
|
+
"member_id": member_id
|
66
|
+
}.reject do |_k, v|
|
67
|
+
v == OMIT
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Deserialize a JSON object to an instance of EligibilityRecommendationPatientInfo
|
72
|
+
#
|
73
|
+
# @param json_object [String]
|
74
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendationPatientInfo]
|
75
|
+
def self.from_json(json_object:)
|
76
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
77
|
+
parsed_json = JSON.parse(json_object)
|
78
|
+
id = struct["id"]
|
79
|
+
mrn = struct["mrn"]
|
80
|
+
organization_id = struct["organization_id"]
|
81
|
+
last_name = struct["last_name"]
|
82
|
+
first_name = struct["first_name"]
|
83
|
+
date_of_birth = (Date.parse(parsed_json["date_of_birth"]) unless parsed_json["date_of_birth"].nil?)
|
84
|
+
member_id = struct["member_id"]
|
85
|
+
new(
|
86
|
+
id: id,
|
87
|
+
mrn: mrn,
|
88
|
+
organization_id: organization_id,
|
89
|
+
last_name: last_name,
|
90
|
+
first_name: first_name,
|
91
|
+
date_of_birth: date_of_birth,
|
92
|
+
member_id: member_id,
|
93
|
+
additional_properties: struct
|
94
|
+
)
|
95
|
+
end
|
96
|
+
|
97
|
+
# Serialize an instance of EligibilityRecommendationPatientInfo to a JSON object
|
98
|
+
#
|
99
|
+
# @return [String]
|
100
|
+
def to_json(*_args)
|
101
|
+
@_field_set&.to_json
|
102
|
+
end
|
103
|
+
|
104
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
105
|
+
# hash and check each fields type against the current object's property
|
106
|
+
# definitions.
|
107
|
+
#
|
108
|
+
# @param obj [Object]
|
109
|
+
# @return [Void]
|
110
|
+
def self.validate_raw(obj:)
|
111
|
+
obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
112
|
+
obj.mrn&.is_a?(String) != false || raise("Passed value for field obj.mrn is not the expected type, validation failed.")
|
113
|
+
obj.organization_id&.is_a?(String) != false || raise("Passed value for field obj.organization_id is not the expected type, validation failed.")
|
114
|
+
obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
|
115
|
+
obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
|
116
|
+
obj.date_of_birth&.is_a?(Date) != false || raise("Passed value for field obj.date_of_birth is not the expected type, validation failed.")
|
117
|
+
obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
@@ -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,96 @@
|
|
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 [Object]
|
14
|
+
attr_reader :ma_benefit
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :payer_id
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :payer_name
|
19
|
+
# @return [String]
|
20
|
+
attr_reader :member_id
|
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 ma_benefit [Object]
|
30
|
+
# @param payer_id [String]
|
31
|
+
# @param payer_name [String]
|
32
|
+
# @param member_id [String]
|
33
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
34
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendationPayload]
|
35
|
+
def initialize(ma_benefit: OMIT, payer_id: OMIT, payer_name: OMIT, member_id: OMIT,
|
36
|
+
additional_properties: nil)
|
37
|
+
@ma_benefit = ma_benefit if ma_benefit != OMIT
|
38
|
+
@payer_id = payer_id if payer_id != OMIT
|
39
|
+
@payer_name = payer_name if payer_name != OMIT
|
40
|
+
@member_id = member_id if member_id != OMIT
|
41
|
+
@additional_properties = additional_properties
|
42
|
+
@_field_set = {
|
43
|
+
"ma_benefit": ma_benefit,
|
44
|
+
"payer_id": payer_id,
|
45
|
+
"payer_name": payer_name,
|
46
|
+
"member_id": member_id
|
47
|
+
}.reject do |_k, v|
|
48
|
+
v == OMIT
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# Deserialize a JSON object to an instance of
|
53
|
+
# MedicareAdvantageRecommendationPayload
|
54
|
+
#
|
55
|
+
# @param json_object [String]
|
56
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::MedicareAdvantageRecommendationPayload]
|
57
|
+
def self.from_json(json_object:)
|
58
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
59
|
+
ma_benefit = struct["ma_benefit"]
|
60
|
+
payer_id = struct["payer_id"]
|
61
|
+
payer_name = struct["payer_name"]
|
62
|
+
member_id = struct["member_id"]
|
63
|
+
new(
|
64
|
+
ma_benefit: ma_benefit,
|
65
|
+
payer_id: payer_id,
|
66
|
+
payer_name: payer_name,
|
67
|
+
member_id: member_id,
|
68
|
+
additional_properties: struct
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
# Serialize an instance of MedicareAdvantageRecommendationPayload to a JSON object
|
73
|
+
#
|
74
|
+
# @return [String]
|
75
|
+
def to_json(*_args)
|
76
|
+
@_field_set&.to_json
|
77
|
+
end
|
78
|
+
|
79
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
80
|
+
# hash and check each fields type against the current object's property
|
81
|
+
# definitions.
|
82
|
+
#
|
83
|
+
# @param obj [Object]
|
84
|
+
# @return [Void]
|
85
|
+
def self.validate_raw(obj:)
|
86
|
+
obj.ma_benefit&.is_a?(Object) != false || raise("Passed value for field obj.ma_benefit is not the expected type, validation failed.")
|
87
|
+
obj.payer_id&.is_a?(String) != false || raise("Passed value for field obj.payer_id is not the expected type, validation failed.")
|
88
|
+
obj.payer_name&.is_a?(String) != false || raise("Passed value for field obj.payer_name is not the expected type, validation failed.")
|
89
|
+
obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
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
|