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,79 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "stedi_payer"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module EligibilityChecks
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class StediPayerItem
|
13
|
+
# @return [Integer]
|
14
|
+
attr_reader :score
|
15
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::StediPayer]
|
16
|
+
attr_reader :payer
|
17
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
|
+
attr_reader :additional_properties
|
19
|
+
# @return [Object]
|
20
|
+
attr_reader :_field_set
|
21
|
+
protected :_field_set
|
22
|
+
|
23
|
+
OMIT = Object.new
|
24
|
+
|
25
|
+
# @param score [Integer]
|
26
|
+
# @param payer [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::StediPayer]
|
27
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::StediPayerItem]
|
29
|
+
def initialize(score:, payer:, additional_properties: nil)
|
30
|
+
@score = score
|
31
|
+
@payer = payer
|
32
|
+
@additional_properties = additional_properties
|
33
|
+
@_field_set = { "score": score, "payer": payer }
|
34
|
+
end
|
35
|
+
|
36
|
+
# Deserialize a JSON object to an instance of StediPayerItem
|
37
|
+
#
|
38
|
+
# @param json_object [String]
|
39
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::StediPayerItem]
|
40
|
+
def self.from_json(json_object:)
|
41
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
42
|
+
parsed_json = JSON.parse(json_object)
|
43
|
+
score = struct["score"]
|
44
|
+
if parsed_json["payer"].nil?
|
45
|
+
payer = nil
|
46
|
+
else
|
47
|
+
payer = parsed_json["payer"].to_json
|
48
|
+
payer = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::StediPayer.from_json(json_object: payer)
|
49
|
+
end
|
50
|
+
new(
|
51
|
+
score: score,
|
52
|
+
payer: payer,
|
53
|
+
additional_properties: struct
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Serialize an instance of StediPayerItem to a JSON object
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
def to_json(*_args)
|
61
|
+
@_field_set&.to_json
|
62
|
+
end
|
63
|
+
|
64
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
65
|
+
# hash and check each fields type against the current object's property
|
66
|
+
# definitions.
|
67
|
+
#
|
68
|
+
# @param obj [Object]
|
69
|
+
# @return [Void]
|
70
|
+
def self.validate_raw(obj:)
|
71
|
+
obj.score.is_a?(Integer) != false || raise("Passed value for field obj.score is not the expected type, validation failed.")
|
72
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::StediPayer.validate_raw(obj: obj.payer)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -16,6 +16,10 @@ module CandidApiClient
|
|
16
16
|
attr_reader :patient
|
17
17
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage]
|
18
18
|
attr_reader :primary_coverage
|
19
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage]
|
20
|
+
attr_reader :secondary_coverage
|
21
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage]
|
22
|
+
attr_reader :tertiary_coverage
|
19
23
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::MutableAppointment]
|
20
24
|
attr_reader :next_appointment
|
21
25
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -28,17 +32,24 @@ module CandidApiClient
|
|
28
32
|
|
29
33
|
# @param patient [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
30
34
|
# @param primary_coverage [CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage]
|
35
|
+
# @param secondary_coverage [CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage]
|
36
|
+
# @param tertiary_coverage [CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage]
|
31
37
|
# @param next_appointment [CandidApiClient::PreEncounter::Appointments::V1::Types::MutableAppointment]
|
32
38
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
33
39
|
# @return [CandidApiClient::PreEncounter::Lists::V1::Types::PatientListItem]
|
34
|
-
def initialize(patient:, primary_coverage: OMIT,
|
40
|
+
def initialize(patient:, primary_coverage: OMIT, secondary_coverage: OMIT, tertiary_coverage: OMIT,
|
41
|
+
next_appointment: OMIT, additional_properties: nil)
|
35
42
|
@patient = patient
|
36
43
|
@primary_coverage = primary_coverage if primary_coverage != OMIT
|
44
|
+
@secondary_coverage = secondary_coverage if secondary_coverage != OMIT
|
45
|
+
@tertiary_coverage = tertiary_coverage if tertiary_coverage != OMIT
|
37
46
|
@next_appointment = next_appointment if next_appointment != OMIT
|
38
47
|
@additional_properties = additional_properties
|
39
48
|
@_field_set = {
|
40
49
|
"patient": patient,
|
41
50
|
"primary_coverage": primary_coverage,
|
51
|
+
"secondary_coverage": secondary_coverage,
|
52
|
+
"tertiary_coverage": tertiary_coverage,
|
42
53
|
"next_appointment": next_appointment
|
43
54
|
}.reject do |_k, v|
|
44
55
|
v == OMIT
|
@@ -64,6 +75,18 @@ module CandidApiClient
|
|
64
75
|
primary_coverage = parsed_json["primary_coverage"].to_json
|
65
76
|
primary_coverage = CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage.from_json(json_object: primary_coverage)
|
66
77
|
end
|
78
|
+
if parsed_json["secondary_coverage"].nil?
|
79
|
+
secondary_coverage = nil
|
80
|
+
else
|
81
|
+
secondary_coverage = parsed_json["secondary_coverage"].to_json
|
82
|
+
secondary_coverage = CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage.from_json(json_object: secondary_coverage)
|
83
|
+
end
|
84
|
+
if parsed_json["tertiary_coverage"].nil?
|
85
|
+
tertiary_coverage = nil
|
86
|
+
else
|
87
|
+
tertiary_coverage = parsed_json["tertiary_coverage"].to_json
|
88
|
+
tertiary_coverage = CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage.from_json(json_object: tertiary_coverage)
|
89
|
+
end
|
67
90
|
if parsed_json["next_appointment"].nil?
|
68
91
|
next_appointment = nil
|
69
92
|
else
|
@@ -73,6 +96,8 @@ module CandidApiClient
|
|
73
96
|
new(
|
74
97
|
patient: patient,
|
75
98
|
primary_coverage: primary_coverage,
|
99
|
+
secondary_coverage: secondary_coverage,
|
100
|
+
tertiary_coverage: tertiary_coverage,
|
76
101
|
next_appointment: next_appointment,
|
77
102
|
additional_properties: struct
|
78
103
|
)
|
@@ -94,6 +119,8 @@ module CandidApiClient
|
|
94
119
|
def self.validate_raw(obj:)
|
95
120
|
CandidApiClient::PreEncounter::Patients::V1::Types::Patient.validate_raw(obj: obj.patient)
|
96
121
|
obj.primary_coverage.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage.validate_raw(obj: obj.primary_coverage)
|
122
|
+
obj.secondary_coverage.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage.validate_raw(obj: obj.secondary_coverage)
|
123
|
+
obj.tertiary_coverage.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage.validate_raw(obj: obj.tertiary_coverage)
|
97
124
|
obj.next_appointment.nil? || CandidApiClient::PreEncounter::Appointments::V1::Types::MutableAppointment.validate_raw(obj: obj.next_appointment)
|
98
125
|
end
|
99
126
|
end
|
@@ -76,6 +76,8 @@ module CandidApiClient
|
|
76
76
|
#
|
77
77
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::Tags::V1::Types::MutableTag, as a Hash
|
78
78
|
# * :value (String)
|
79
|
+
# * :description (String)
|
80
|
+
# * :alert (Boolean)
|
79
81
|
# @param request_options [CandidApiClient::RequestOptions]
|
80
82
|
# @return [CandidApiClient::PreEncounter::Tags::V1::Types::Tag]
|
81
83
|
# @example
|
@@ -102,6 +104,8 @@ module CandidApiClient
|
|
102
104
|
# @param version [String]
|
103
105
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::Tags::V1::Types::MutableTag, as a Hash
|
104
106
|
# * :value (String)
|
107
|
+
# * :description (String)
|
108
|
+
# * :alert (Boolean)
|
105
109
|
# @param request_options [CandidApiClient::RequestOptions]
|
106
110
|
# @return [CandidApiClient::PreEncounter::Tags::V1::Types::Tag]
|
107
111
|
# @example
|
@@ -223,6 +227,8 @@ module CandidApiClient
|
|
223
227
|
#
|
224
228
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::Tags::V1::Types::MutableTag, as a Hash
|
225
229
|
# * :value (String)
|
230
|
+
# * :description (String)
|
231
|
+
# * :alert (Boolean)
|
226
232
|
# @param request_options [CandidApiClient::RequestOptions]
|
227
233
|
# @return [CandidApiClient::PreEncounter::Tags::V1::Types::Tag]
|
228
234
|
# @example
|
@@ -252,6 +258,8 @@ module CandidApiClient
|
|
252
258
|
# @param version [String]
|
253
259
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::Tags::V1::Types::MutableTag, as a Hash
|
254
260
|
# * :value (String)
|
261
|
+
# * :description (String)
|
262
|
+
# * :alert (Boolean)
|
255
263
|
# @param request_options [CandidApiClient::RequestOptions]
|
256
264
|
# @return [CandidApiClient::PreEncounter::Tags::V1::Types::Tag]
|
257
265
|
# @example
|
@@ -12,6 +12,10 @@ module CandidApiClient
|
|
12
12
|
class MutableTag
|
13
13
|
# @return [String]
|
14
14
|
attr_reader :value
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :description
|
17
|
+
# @return [Boolean]
|
18
|
+
attr_reader :alert
|
15
19
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
20
|
attr_reader :additional_properties
|
17
21
|
# @return [Object]
|
@@ -21,12 +25,18 @@ module CandidApiClient
|
|
21
25
|
OMIT = Object.new
|
22
26
|
|
23
27
|
# @param value [String]
|
28
|
+
# @param description [String]
|
29
|
+
# @param alert [Boolean]
|
24
30
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
31
|
# @return [CandidApiClient::PreEncounter::Tags::V1::Types::MutableTag]
|
26
|
-
def initialize(value:, additional_properties: nil)
|
32
|
+
def initialize(value:, description: OMIT, alert: OMIT, additional_properties: nil)
|
27
33
|
@value = value
|
34
|
+
@description = description if description != OMIT
|
35
|
+
@alert = alert if alert != OMIT
|
28
36
|
@additional_properties = additional_properties
|
29
|
-
@_field_set = { "value": value }
|
37
|
+
@_field_set = { "value": value, "description": description, "alert": alert }.reject do |_k, v|
|
38
|
+
v == OMIT
|
39
|
+
end
|
30
40
|
end
|
31
41
|
|
32
42
|
# Deserialize a JSON object to an instance of MutableTag
|
@@ -36,7 +46,14 @@ module CandidApiClient
|
|
36
46
|
def self.from_json(json_object:)
|
37
47
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
38
48
|
value = struct["value"]
|
39
|
-
|
49
|
+
description = struct["description"]
|
50
|
+
alert = struct["alert"]
|
51
|
+
new(
|
52
|
+
value: value,
|
53
|
+
description: description,
|
54
|
+
alert: alert,
|
55
|
+
additional_properties: struct
|
56
|
+
)
|
40
57
|
end
|
41
58
|
|
42
59
|
# Serialize an instance of MutableTag to a JSON object
|
@@ -54,6 +71,8 @@ module CandidApiClient
|
|
54
71
|
# @return [Void]
|
55
72
|
def self.validate_raw(obj:)
|
56
73
|
obj.value.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
74
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
75
|
+
obj.alert&.is_a?(Boolean) != false || raise("Passed value for field obj.alert is not the expected type, validation failed.")
|
57
76
|
end
|
58
77
|
end
|
59
78
|
end
|
@@ -27,6 +27,10 @@ module CandidApiClient
|
|
27
27
|
attr_reader :updating_user_id
|
28
28
|
# @return [String]
|
29
29
|
attr_reader :value
|
30
|
+
# @return [String]
|
31
|
+
attr_reader :description
|
32
|
+
# @return [Boolean]
|
33
|
+
attr_reader :alert
|
30
34
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
31
35
|
attr_reader :additional_properties
|
32
36
|
# @return [Object]
|
@@ -44,10 +48,12 @@ module CandidApiClient
|
|
44
48
|
# @param updated_at [DateTime]
|
45
49
|
# @param updating_user_id [String] The user ID of the user who last updated the object.
|
46
50
|
# @param value [String]
|
51
|
+
# @param description [String]
|
52
|
+
# @param alert [Boolean]
|
47
53
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
48
54
|
# @return [CandidApiClient::PreEncounter::Tags::V1::Types::Tag]
|
49
55
|
def initialize(id:, organization_id:, deactivated:, version:, updated_at:, updating_user_id:, value:,
|
50
|
-
additional_properties: nil)
|
56
|
+
description: OMIT, alert: OMIT, additional_properties: nil)
|
51
57
|
@id = id
|
52
58
|
@organization_id = organization_id
|
53
59
|
@deactivated = deactivated
|
@@ -55,6 +61,8 @@ module CandidApiClient
|
|
55
61
|
@updated_at = updated_at
|
56
62
|
@updating_user_id = updating_user_id
|
57
63
|
@value = value
|
64
|
+
@description = description if description != OMIT
|
65
|
+
@alert = alert if alert != OMIT
|
58
66
|
@additional_properties = additional_properties
|
59
67
|
@_field_set = {
|
60
68
|
"id": id,
|
@@ -63,8 +71,12 @@ module CandidApiClient
|
|
63
71
|
"version": version,
|
64
72
|
"updated_at": updated_at,
|
65
73
|
"updating_user_id": updating_user_id,
|
66
|
-
"value": value
|
67
|
-
|
74
|
+
"value": value,
|
75
|
+
"description": description,
|
76
|
+
"alert": alert
|
77
|
+
}.reject do |_k, v|
|
78
|
+
v == OMIT
|
79
|
+
end
|
68
80
|
end
|
69
81
|
|
70
82
|
# Deserialize a JSON object to an instance of Tag
|
@@ -81,6 +93,8 @@ module CandidApiClient
|
|
81
93
|
updated_at = (DateTime.parse(parsed_json["updated_at"]) unless parsed_json["updated_at"].nil?)
|
82
94
|
updating_user_id = struct["updating_user_id"]
|
83
95
|
value = struct["value"]
|
96
|
+
description = struct["description"]
|
97
|
+
alert = struct["alert"]
|
84
98
|
new(
|
85
99
|
id: id,
|
86
100
|
organization_id: organization_id,
|
@@ -89,6 +103,8 @@ module CandidApiClient
|
|
89
103
|
updated_at: updated_at,
|
90
104
|
updating_user_id: updating_user_id,
|
91
105
|
value: value,
|
106
|
+
description: description,
|
107
|
+
alert: alert,
|
92
108
|
additional_properties: struct
|
93
109
|
)
|
94
110
|
end
|
@@ -114,6 +130,8 @@ module CandidApiClient
|
|
114
130
|
obj.updated_at.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.")
|
115
131
|
obj.updating_user_id.is_a?(String) != false || raise("Passed value for field obj.updating_user_id is not the expected type, validation failed.")
|
116
132
|
obj.value.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
133
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
134
|
+
obj.alert&.is_a?(Boolean) != false || raise("Passed value for field obj.alert is not the expected type, validation failed.")
|
117
135
|
end
|
118
136
|
end
|
119
137
|
end
|
@@ -81,6 +81,8 @@ module CandidApiClient
|
|
81
81
|
attr_reader :procedure_code
|
82
82
|
# @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
|
83
83
|
attr_reader :ordering_provider
|
84
|
+
# @return [String]
|
85
|
+
attr_reader :revenue_code
|
84
86
|
# @return [String] String representation of a Decimal that can be parsed by most libraries.
|
85
87
|
# A ServiceLine quantity cannot contain more than one digit of precision.
|
86
88
|
# Example: 1.1 is valid, 1.11 is not.
|
@@ -153,6 +155,7 @@ module CandidApiClient
|
|
153
155
|
# @param service_line_id [String]
|
154
156
|
# @param procedure_code [String]
|
155
157
|
# @param ordering_provider [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
|
158
|
+
# @param revenue_code [String]
|
156
159
|
# @param quantity [String] String representation of a Decimal that can be parsed by most libraries.
|
157
160
|
# A ServiceLine quantity cannot contain more than one digit of precision.
|
158
161
|
# Example: 1.1 is valid, 1.11 is not.
|
@@ -178,7 +181,7 @@ module CandidApiClient
|
|
178
181
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
179
182
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
180
183
|
def initialize(created_at:, service_line_id:, procedure_code:, quantity:, units:, claim_id:, date_of_service_range:, date_of_service:, modifiers: OMIT, charge_amount_cents: OMIT, allowed_amount_cents: OMIT,
|
181
|
-
insurance_balance_cents: OMIT, patient_balance_cents: OMIT, paid_amount_cents: OMIT, primary_paid_amount_cents: OMIT, secondary_paid_amount_cents: OMIT, tertiary_paid_amount_cents: OMIT, patient_responsibility_cents: OMIT, copay_cents: OMIT, coinsurance_cents: OMIT, deductible_cents: OMIT, diagnosis_id_zero: OMIT, diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, service_line_era_data: OMIT, service_line_manual_adjustments: OMIT, related_invoices: OMIT, related_invoice_info: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, ordering_provider: OMIT, description: OMIT, end_date_of_service: OMIT, test_results: OMIT, has_epsdt_indicator: OMIT, has_family_planning_indicator: OMIT, note: OMIT, additional_properties: nil)
|
184
|
+
insurance_balance_cents: OMIT, patient_balance_cents: OMIT, paid_amount_cents: OMIT, primary_paid_amount_cents: OMIT, secondary_paid_amount_cents: OMIT, tertiary_paid_amount_cents: OMIT, patient_responsibility_cents: OMIT, copay_cents: OMIT, coinsurance_cents: OMIT, deductible_cents: OMIT, diagnosis_id_zero: OMIT, diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, service_line_era_data: OMIT, service_line_manual_adjustments: OMIT, related_invoices: OMIT, related_invoice_info: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, ordering_provider: OMIT, revenue_code: OMIT, description: OMIT, end_date_of_service: OMIT, test_results: OMIT, has_epsdt_indicator: OMIT, has_family_planning_indicator: OMIT, note: OMIT, additional_properties: nil)
|
182
185
|
@created_at = created_at
|
183
186
|
@modifiers = modifiers if modifiers != OMIT
|
184
187
|
@charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
|
@@ -212,6 +215,7 @@ module CandidApiClient
|
|
212
215
|
@service_line_id = service_line_id
|
213
216
|
@procedure_code = procedure_code
|
214
217
|
@ordering_provider = ordering_provider if ordering_provider != OMIT
|
218
|
+
@revenue_code = revenue_code if revenue_code != OMIT
|
215
219
|
@quantity = quantity
|
216
220
|
@units = units
|
217
221
|
@claim_id = claim_id
|
@@ -254,6 +258,7 @@ module CandidApiClient
|
|
254
258
|
"service_line_id": service_line_id,
|
255
259
|
"procedure_code": procedure_code,
|
256
260
|
"ordering_provider": ordering_provider,
|
261
|
+
"revenue_code": revenue_code,
|
257
262
|
"quantity": quantity,
|
258
263
|
"units": units,
|
259
264
|
"claim_id": claim_id,
|
@@ -335,6 +340,7 @@ module CandidApiClient
|
|
335
340
|
ordering_provider = parsed_json["ordering_provider"].to_json
|
336
341
|
ordering_provider = CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: ordering_provider)
|
337
342
|
end
|
343
|
+
revenue_code = struct["revenue_code"]
|
338
344
|
quantity = struct["quantity"]
|
339
345
|
units = struct["units"]
|
340
346
|
claim_id = struct["claim_id"]
|
@@ -386,6 +392,7 @@ module CandidApiClient
|
|
386
392
|
service_line_id: service_line_id,
|
387
393
|
procedure_code: procedure_code,
|
388
394
|
ordering_provider: ordering_provider,
|
395
|
+
revenue_code: revenue_code,
|
389
396
|
quantity: quantity,
|
390
397
|
units: units,
|
391
398
|
claim_id: claim_id,
|
@@ -444,6 +451,7 @@ module CandidApiClient
|
|
444
451
|
obj.service_line_id.is_a?(String) != false || raise("Passed value for field obj.service_line_id is not the expected type, validation failed.")
|
445
452
|
obj.procedure_code.is_a?(String) != false || raise("Passed value for field obj.procedure_code is not the expected type, validation failed.")
|
446
453
|
obj.ordering_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.validate_raw(obj: obj.ordering_provider)
|
454
|
+
obj.revenue_code&.is_a?(String) != false || raise("Passed value for field obj.revenue_code is not the expected type, validation failed.")
|
447
455
|
obj.quantity.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
|
448
456
|
obj.units.is_a?(CandidApiClient::Commons::Types::ServiceLineUnits) != false || raise("Passed value for field obj.units is not the expected type, validation failed.")
|
449
457
|
obj.claim_id.is_a?(String) != false || raise("Passed value for field obj.claim_id is not the expected type, validation failed.")
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module X12
|
5
|
+
module V1
|
6
|
+
module Types
|
7
|
+
class PatientDischargeStatusCode
|
8
|
+
C_01 = "01"
|
9
|
+
C_02 = "02"
|
10
|
+
C_03 = "03"
|
11
|
+
C_04 = "04"
|
12
|
+
C_05 = "05"
|
13
|
+
C_06 = "06"
|
14
|
+
C_07 = "07"
|
15
|
+
C_09 = "09"
|
16
|
+
C_20 = "20"
|
17
|
+
C_21 = "21"
|
18
|
+
C_30 = "30"
|
19
|
+
C_40 = "40"
|
20
|
+
C_41 = "41"
|
21
|
+
C_42 = "42"
|
22
|
+
C_43 = "43"
|
23
|
+
C_50 = "50"
|
24
|
+
C_51 = "51"
|
25
|
+
C_61 = "61"
|
26
|
+
C_62 = "62"
|
27
|
+
C_63 = "63"
|
28
|
+
C_64 = "64"
|
29
|
+
C_65 = "65"
|
30
|
+
C_66 = "66"
|
31
|
+
C_69 = "69"
|
32
|
+
C_70 = "70"
|
33
|
+
C_81 = "81"
|
34
|
+
C_82 = "82"
|
35
|
+
C_83 = "83"
|
36
|
+
C_84 = "84"
|
37
|
+
C_85 = "85"
|
38
|
+
C_86 = "86"
|
39
|
+
C_87 = "87"
|
40
|
+
C_88 = "88"
|
41
|
+
C_89 = "89"
|
42
|
+
C_90 = "90"
|
43
|
+
C_91 = "91"
|
44
|
+
C_92 = "92"
|
45
|
+
C_93 = "93"
|
46
|
+
C_94 = "94"
|
47
|
+
C_95 = "95"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module X12
|
5
|
+
module V1
|
6
|
+
module Types
|
7
|
+
class PointOfOriginForAdmissionOrVisitCode
|
8
|
+
C_1 = "1"
|
9
|
+
C_2 = "2"
|
10
|
+
C_4 = "4"
|
11
|
+
C_5 = "5"
|
12
|
+
C_6 = "6"
|
13
|
+
C_8 = "8"
|
14
|
+
C_9 = "9"
|
15
|
+
CD = "D"
|
16
|
+
CE = "E"
|
17
|
+
CF = "F"
|
18
|
+
CG = "G"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "type_of_facility_code"
|
4
|
+
require_relative "type_of_care_code"
|
5
|
+
require_relative "type_of_bill_frequency_code"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module X12
|
11
|
+
module V1
|
12
|
+
module Types
|
13
|
+
class TypeOfBillComposite
|
14
|
+
# @return [String] The composite, 4 digit code of the composite, starting with a padding code 0.
|
15
|
+
attr_reader :code
|
16
|
+
# @return [CandidApiClient::X12::V1::Types::TypeOfFacilityCode] The FL04 Institutional type of facility code for the bill. The second digit of
|
17
|
+
# the composite code.
|
18
|
+
attr_reader :type_of_facility
|
19
|
+
# @return [CandidApiClient::X12::V1::Types::TypeOfCareCode] The FL04 Institutional type of care code for the bill. The second digit of the
|
20
|
+
# composite code.
|
21
|
+
attr_reader :type_of_care
|
22
|
+
# @return [CandidApiClient::X12::V1::Types::TypeOfBillFrequencyCode] The FL04 Institutional frequency code for the bill. The fourth digit of the
|
23
|
+
# composite code.
|
24
|
+
attr_reader :frequency_code
|
25
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
attr_reader :additional_properties
|
27
|
+
# @return [Object]
|
28
|
+
attr_reader :_field_set
|
29
|
+
protected :_field_set
|
30
|
+
|
31
|
+
OMIT = Object.new
|
32
|
+
|
33
|
+
# @param code [String] The composite, 4 digit code of the composite, starting with a padding code 0.
|
34
|
+
# @param type_of_facility [CandidApiClient::X12::V1::Types::TypeOfFacilityCode] The FL04 Institutional type of facility code for the bill. The second digit of
|
35
|
+
# the composite code.
|
36
|
+
# @param type_of_care [CandidApiClient::X12::V1::Types::TypeOfCareCode] The FL04 Institutional type of care code for the bill. The second digit of the
|
37
|
+
# composite code.
|
38
|
+
# @param frequency_code [CandidApiClient::X12::V1::Types::TypeOfBillFrequencyCode] The FL04 Institutional frequency code for the bill. The fourth digit of the
|
39
|
+
# composite code.
|
40
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
41
|
+
# @return [CandidApiClient::X12::V1::Types::TypeOfBillComposite]
|
42
|
+
def initialize(code:, type_of_facility:, type_of_care:, frequency_code:, additional_properties: nil)
|
43
|
+
@code = code
|
44
|
+
@type_of_facility = type_of_facility
|
45
|
+
@type_of_care = type_of_care
|
46
|
+
@frequency_code = frequency_code
|
47
|
+
@additional_properties = additional_properties
|
48
|
+
@_field_set = {
|
49
|
+
"code": code,
|
50
|
+
"type_of_facility": type_of_facility,
|
51
|
+
"type_of_care": type_of_care,
|
52
|
+
"frequency_code": frequency_code
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Deserialize a JSON object to an instance of TypeOfBillComposite
|
57
|
+
#
|
58
|
+
# @param json_object [String]
|
59
|
+
# @return [CandidApiClient::X12::V1::Types::TypeOfBillComposite]
|
60
|
+
def self.from_json(json_object:)
|
61
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
62
|
+
code = struct["code"]
|
63
|
+
type_of_facility = struct["type_of_facility"]
|
64
|
+
type_of_care = struct["type_of_care"]
|
65
|
+
frequency_code = struct["frequency_code"]
|
66
|
+
new(
|
67
|
+
code: code,
|
68
|
+
type_of_facility: type_of_facility,
|
69
|
+
type_of_care: type_of_care,
|
70
|
+
frequency_code: frequency_code,
|
71
|
+
additional_properties: struct
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
75
|
+
# Serialize an instance of TypeOfBillComposite to a JSON object
|
76
|
+
#
|
77
|
+
# @return [String]
|
78
|
+
def to_json(*_args)
|
79
|
+
@_field_set&.to_json
|
80
|
+
end
|
81
|
+
|
82
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
83
|
+
# hash and check each fields type against the current object's property
|
84
|
+
# definitions.
|
85
|
+
#
|
86
|
+
# @param obj [Object]
|
87
|
+
# @return [Void]
|
88
|
+
def self.validate_raw(obj:)
|
89
|
+
obj.code.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
90
|
+
obj.type_of_facility.is_a?(CandidApiClient::X12::V1::Types::TypeOfFacilityCode) != false || raise("Passed value for field obj.type_of_facility is not the expected type, validation failed.")
|
91
|
+
obj.type_of_care.is_a?(CandidApiClient::X12::V1::Types::TypeOfCareCode) != false || raise("Passed value for field obj.type_of_care is not the expected type, validation failed.")
|
92
|
+
obj.frequency_code.is_a?(CandidApiClient::X12::V1::Types::TypeOfBillFrequencyCode) != false || raise("Passed value for field obj.frequency_code is not the expected type, validation failed.")
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module X12
|
5
|
+
module V1
|
6
|
+
module Types
|
7
|
+
class TypeOfBillFrequencyCode
|
8
|
+
C_0 = "0"
|
9
|
+
C_1 = "1"
|
10
|
+
C_2 = "2"
|
11
|
+
C_3 = "3"
|
12
|
+
C_4 = "4"
|
13
|
+
C_5 = "5"
|
14
|
+
C_7 = "7"
|
15
|
+
C_8 = "8"
|
16
|
+
C_9 = "9"
|
17
|
+
CA = "A"
|
18
|
+
CB = "B"
|
19
|
+
CC = "C"
|
20
|
+
CD = "D"
|
21
|
+
CE = "E"
|
22
|
+
CF = "F"
|
23
|
+
CG = "G"
|
24
|
+
CH = "H"
|
25
|
+
CI = "I"
|
26
|
+
CJ = "J"
|
27
|
+
CK = "K"
|
28
|
+
CM = "M"
|
29
|
+
CO_FREQ = "O"
|
30
|
+
CP = "P"
|
31
|
+
CQ = "Q"
|
32
|
+
CX = "X"
|
33
|
+
CY_FREQ = "Y"
|
34
|
+
CZ_FREQ = "Z"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module X12
|
5
|
+
module V1
|
6
|
+
module Types
|
7
|
+
class TypeOfCareCode
|
8
|
+
C_1 = "1"
|
9
|
+
C_2 = "2"
|
10
|
+
C_3 = "3"
|
11
|
+
C_4 = "4"
|
12
|
+
C_5 = "5"
|
13
|
+
C_6 = "6"
|
14
|
+
C_7 = "7"
|
15
|
+
C_8 = "8"
|
16
|
+
C_9 = "9"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module X12
|
5
|
+
module V1
|
6
|
+
module Types
|
7
|
+
class TypeOfFacilityCode
|
8
|
+
C_1 = "1"
|
9
|
+
C_2 = "2"
|
10
|
+
C_3 = "3"
|
11
|
+
C_4 = "4"
|
12
|
+
C_6 = "6"
|
13
|
+
C_7 = "7"
|
14
|
+
C_8 = "8"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|