candidhealth 0.24.7 → 0.25.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/financials/types/allocation_target.rb +13 -0
- data/lib/candidhealth/financials/types/allocation_target_create.rb +12 -0
- data/lib/candidhealth/financials/types/appointment_allocation_target.rb +58 -0
- data/lib/candidhealth/service_lines/client.rb +30 -0
- data/lib/candidhealth/service_lines/v_2/client.rb +229 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +279 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +281 -0
- data/lib/candidhealth/write_offs/v_1/types/patient_write_off.rb +18 -2
- data/lib/candidhealth.rb +7 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +3 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 218a5d9b13ccba40aaa88b7b8b9053173ad1fcdbbe9c413fe9f62be90bbb8994
|
4
|
+
data.tar.gz: 347c1ee3e5cbd30d80dc4123f24785f17346c4a861011f5142503ecf1c027ba5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '086ea181fd2648a863006761aea50dcdc963ebc4ad5ad9f6c8ab5ef6ad7a172387ce0a13cb325a2ad0b6eec9b192ab65be125b1be59aefc400b05ac05f20ae68'
|
7
|
+
data.tar.gz: a27a3d07c76e9a4cb331bc5aaa058b429a5f8c5215648966706724bfe9a3e7f62c0801d70a5b2294e1b1960987a9abe9e045082fa6b082667922021498b24474
|
@@ -4,6 +4,7 @@ require "json"
|
|
4
4
|
require_relative "service_line_allocation_target"
|
5
5
|
require_relative "claim_allocation_target"
|
6
6
|
require_relative "billing_provider_allocation_target"
|
7
|
+
require_relative "appointment_allocation_target"
|
7
8
|
|
8
9
|
module CandidApiClient
|
9
10
|
module Financials
|
@@ -41,6 +42,8 @@ module CandidApiClient
|
|
41
42
|
CandidApiClient::Financials::Types::ClaimAllocationTarget.from_json(json_object: json_object)
|
42
43
|
when "billing_provider_id"
|
43
44
|
CandidApiClient::Financials::Types::BillingProviderAllocationTarget.from_json(json_object: json_object)
|
45
|
+
when "appointment"
|
46
|
+
CandidApiClient::Financials::Types::AppointmentAllocationTarget.from_json(json_object: json_object)
|
44
47
|
when "unattributed"
|
45
48
|
nil
|
46
49
|
else
|
@@ -60,6 +63,8 @@ module CandidApiClient
|
|
60
63
|
{ **@member.to_json, type: @discriminant }.to_json
|
61
64
|
when "billing_provider_id"
|
62
65
|
{ **@member.to_json, type: @discriminant }.to_json
|
66
|
+
when "appointment"
|
67
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
63
68
|
when "unattributed"
|
64
69
|
{ type: @discriminant }.to_json
|
65
70
|
else
|
@@ -82,6 +87,8 @@ module CandidApiClient
|
|
82
87
|
CandidApiClient::Financials::Types::ClaimAllocationTarget.validate_raw(obj: obj)
|
83
88
|
when "billing_provider_id"
|
84
89
|
CandidApiClient::Financials::Types::BillingProviderAllocationTarget.validate_raw(obj: obj)
|
90
|
+
when "appointment"
|
91
|
+
CandidApiClient::Financials::Types::AppointmentAllocationTarget.validate_raw(obj: obj)
|
85
92
|
when "unattributed"
|
86
93
|
# noop
|
87
94
|
else
|
@@ -115,6 +122,12 @@ module CandidApiClient
|
|
115
122
|
new(member: member, discriminant: "billing_provider_id")
|
116
123
|
end
|
117
124
|
|
125
|
+
# @param member [CandidApiClient::Financials::Types::AppointmentAllocationTarget]
|
126
|
+
# @return [CandidApiClient::Financials::Types::AllocationTarget]
|
127
|
+
def self.appointment(member:)
|
128
|
+
new(member: member, discriminant: "appointment")
|
129
|
+
end
|
130
|
+
|
118
131
|
# @return [CandidApiClient::Financials::Types::AllocationTarget]
|
119
132
|
def self.unattributed
|
120
133
|
new(member: nil, discriminant: "unattributed")
|
@@ -40,6 +40,8 @@ module CandidApiClient
|
|
40
40
|
json_object.value
|
41
41
|
when "billing_provider_by_id"
|
42
42
|
json_object.value
|
43
|
+
when "appointment_by_id"
|
44
|
+
json_object.value
|
43
45
|
when "unattributed"
|
44
46
|
nil
|
45
47
|
else
|
@@ -61,6 +63,8 @@ module CandidApiClient
|
|
61
63
|
{ "type": @discriminant, "value": @member }.to_json
|
62
64
|
when "billing_provider_by_id"
|
63
65
|
{ "type": @discriminant, "value": @member }.to_json
|
66
|
+
when "appointment_by_id"
|
67
|
+
{ "type": @discriminant, "value": @member }.to_json
|
64
68
|
when "unattributed"
|
65
69
|
{ type: @discriminant }.to_json
|
66
70
|
else
|
@@ -85,6 +89,8 @@ module CandidApiClient
|
|
85
89
|
obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
86
90
|
when "billing_provider_by_id"
|
87
91
|
obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
92
|
+
when "appointment_by_id"
|
93
|
+
obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
88
94
|
when "unattributed"
|
89
95
|
# noop
|
90
96
|
else
|
@@ -124,6 +130,12 @@ module CandidApiClient
|
|
124
130
|
new(member: member, discriminant: "billing_provider_by_id")
|
125
131
|
end
|
126
132
|
|
133
|
+
# @param member [String]
|
134
|
+
# @return [CandidApiClient::Financials::Types::AllocationTargetCreate]
|
135
|
+
def self.appointment_by_id(member:)
|
136
|
+
new(member: member, discriminant: "appointment_by_id")
|
137
|
+
end
|
138
|
+
|
127
139
|
# @return [CandidApiClient::Financials::Types::AllocationTargetCreate]
|
128
140
|
def self.unattributed
|
129
141
|
new(member: nil, discriminant: "unattributed")
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module Financials
|
8
|
+
module Types
|
9
|
+
class AppointmentAllocationTarget
|
10
|
+
# @return [String]
|
11
|
+
attr_reader :appointment_id
|
12
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
13
|
+
attr_reader :additional_properties
|
14
|
+
# @return [Object]
|
15
|
+
attr_reader :_field_set
|
16
|
+
protected :_field_set
|
17
|
+
|
18
|
+
OMIT = Object.new
|
19
|
+
|
20
|
+
# @param appointment_id [String]
|
21
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
+
# @return [CandidApiClient::Financials::Types::AppointmentAllocationTarget]
|
23
|
+
def initialize(appointment_id:, additional_properties: nil)
|
24
|
+
@appointment_id = appointment_id
|
25
|
+
@additional_properties = additional_properties
|
26
|
+
@_field_set = { "appointment_id": appointment_id }
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of AppointmentAllocationTarget
|
30
|
+
#
|
31
|
+
# @param json_object [String]
|
32
|
+
# @return [CandidApiClient::Financials::Types::AppointmentAllocationTarget]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
appointment_id = struct["appointment_id"]
|
36
|
+
new(appointment_id: appointment_id, additional_properties: struct)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Serialize an instance of AppointmentAllocationTarget to a JSON object
|
40
|
+
#
|
41
|
+
# @return [String]
|
42
|
+
def to_json(*_args)
|
43
|
+
@_field_set&.to_json
|
44
|
+
end
|
45
|
+
|
46
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
47
|
+
# hash and check each fields type against the current object's property
|
48
|
+
# definitions.
|
49
|
+
#
|
50
|
+
# @param obj [Object]
|
51
|
+
# @return [Void]
|
52
|
+
def self.validate_raw(obj:)
|
53
|
+
obj.appointment_id.is_a?(String) != false || raise("Passed value for field obj.appointment_id is not the expected type, validation failed.")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../requests"
|
4
|
+
require_relative "v_2/client"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module ServiceLines
|
8
|
+
class Client
|
9
|
+
# @return [CandidApiClient::ServiceLines::V2::V2Client]
|
10
|
+
attr_reader :v_2
|
11
|
+
|
12
|
+
# @param request_client [CandidApiClient::RequestClient]
|
13
|
+
# @return [CandidApiClient::ServiceLines::Client]
|
14
|
+
def initialize(request_client:)
|
15
|
+
@v_2 = CandidApiClient::ServiceLines::V2::V2Client.new(request_client: request_client)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class AsyncClient
|
20
|
+
# @return [CandidApiClient::ServiceLines::V2::AsyncV2Client]
|
21
|
+
attr_reader :v_2
|
22
|
+
|
23
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
24
|
+
# @return [CandidApiClient::ServiceLines::AsyncClient]
|
25
|
+
def initialize(request_client:)
|
26
|
+
@v_2 = CandidApiClient::ServiceLines::V2::AsyncV2Client.new(request_client: request_client)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../requests"
|
4
|
+
require_relative "types/service_line_create_standalone"
|
5
|
+
require_relative "types/service_line"
|
6
|
+
require_relative "types/service_line_update"
|
7
|
+
require "async"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module ServiceLines
|
11
|
+
module V2
|
12
|
+
class V2Client
|
13
|
+
# @return [CandidApiClient::RequestClient]
|
14
|
+
attr_reader :request_client
|
15
|
+
|
16
|
+
# @param request_client [CandidApiClient::RequestClient]
|
17
|
+
# @return [CandidApiClient::ServiceLines::V2::V2Client]
|
18
|
+
def initialize(request_client:)
|
19
|
+
@request_client = request_client
|
20
|
+
end
|
21
|
+
|
22
|
+
# @param request [Hash] Request of type CandidApiClient::ServiceLines::V2::Types::ServiceLineCreateStandalone, as a Hash
|
23
|
+
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
24
|
+
# * :charge_amount_cents (Integer)
|
25
|
+
# * :allowed_amount_cents (Integer)
|
26
|
+
# * :insurance_balance_cents (Integer)
|
27
|
+
# * :patient_balance_cents (Integer)
|
28
|
+
# * :primary_paid_amount_cents (Integer)
|
29
|
+
# * :secondary_paid_amount_cents (Integer)
|
30
|
+
# * :tertiary_paid_amount_cents (Integer)
|
31
|
+
# * :patient_responsibility_cents (Integer)
|
32
|
+
# * :diagnosis_id_zero (String)
|
33
|
+
# * :diagnosis_id_one (String)
|
34
|
+
# * :diagnosis_id_two (String)
|
35
|
+
# * :diagnosis_id_three (String)
|
36
|
+
# * :service_line_manual_adjustments (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>)
|
37
|
+
# * :denial_reason (Hash)
|
38
|
+
# * :reason (CandidApiClient::ServiceLines::V2::Types::DenialReasonContent)
|
39
|
+
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
40
|
+
# * :place_of_service_code_as_submitted (CandidApiClient::Commons::Types::FacilityTypeCode)
|
41
|
+
# * :procedure_code (String)
|
42
|
+
# * :quantity (String)
|
43
|
+
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
44
|
+
# * :claim_id (String)
|
45
|
+
# * :description (String)
|
46
|
+
# * :date_of_service (Date)
|
47
|
+
# * :end_date_of_service (Date)
|
48
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
49
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
50
|
+
# @example
|
51
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
52
|
+
# api.service_lines.v_2.create(request: { modifiers: [TWENTY_TWO], charge_amount_cents: 1, allowed_amount_cents: 1, insurance_balance_cents: 1, patient_balance_cents: 1, primary_paid_amount_cents: 1, secondary_paid_amount_cents: 1, tertiary_paid_amount_cents: 1, patient_responsibility_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", service_line_manual_adjustments: [{ }], denial_reason: { }, place_of_service_code: PHARMACY, place_of_service_code_as_submitted: PHARMACY, procedure_code: "string", quantity: "string", units: MJ, claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
53
|
+
def create(request:, request_options: nil)
|
54
|
+
response = @request_client.conn.post do |req|
|
55
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
56
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
57
|
+
req.headers = {
|
58
|
+
**(req.headers || {}),
|
59
|
+
**@request_client.get_headers,
|
60
|
+
**(request_options&.additional_headers || {})
|
61
|
+
}.compact
|
62
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
63
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
64
|
+
request_options: request_options)}/api/service-lines/v2"
|
65
|
+
end
|
66
|
+
CandidApiClient::ServiceLines::V2::Types::ServiceLine.from_json(json_object: response.body)
|
67
|
+
end
|
68
|
+
|
69
|
+
# @param service_line_id [String]
|
70
|
+
# @param request [Hash] Request of type CandidApiClient::ServiceLines::V2::Types::ServiceLineUpdate, as a Hash
|
71
|
+
# * :edit_reason (String)
|
72
|
+
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
73
|
+
# * :charge_amount_cents (Integer)
|
74
|
+
# * :allowed_amount_cents (Integer)
|
75
|
+
# * :insurance_balance_cents (Integer)
|
76
|
+
# * :patient_balance_cents (Integer)
|
77
|
+
# * :primary_paid_amount_cents (Integer)
|
78
|
+
# * :secondary_paid_amount_cents (Integer)
|
79
|
+
# * :tertiary_paid_amount_cents (Integer)
|
80
|
+
# * :patient_responsibility_cents (Integer)
|
81
|
+
# * :diagnosis_id_zero (String)
|
82
|
+
# * :diagnosis_id_one (String)
|
83
|
+
# * :diagnosis_id_two (String)
|
84
|
+
# * :diagnosis_id_three (String)
|
85
|
+
# * :service_line_manual_adjustments (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>)
|
86
|
+
# * :denial_reason (Hash)
|
87
|
+
# * :reason (CandidApiClient::ServiceLines::V2::Types::DenialReasonContent)
|
88
|
+
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
89
|
+
# * :place_of_service_code_as_submitted (CandidApiClient::Commons::Types::FacilityTypeCode)
|
90
|
+
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
91
|
+
# * :procedure_code (String)
|
92
|
+
# * :quantity (String)
|
93
|
+
# * :description (String)
|
94
|
+
# * :date_of_service (Date)
|
95
|
+
# * :end_date_of_service (Date)
|
96
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
97
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
98
|
+
# @example
|
99
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
100
|
+
# api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, allowed_amount_cents: 1, insurance_balance_cents: 1, patient_balance_cents: 1, primary_paid_amount_cents: 1, secondary_paid_amount_cents: 1, tertiary_paid_amount_cents: 1, patient_responsibility_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", service_line_manual_adjustments: [{ }], denial_reason: { }, place_of_service_code: PHARMACY, place_of_service_code_as_submitted: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
101
|
+
def update(service_line_id:, request:, request_options: nil)
|
102
|
+
response = @request_client.conn.patch do |req|
|
103
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
104
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
105
|
+
req.headers = {
|
106
|
+
**(req.headers || {}),
|
107
|
+
**@request_client.get_headers,
|
108
|
+
**(request_options&.additional_headers || {})
|
109
|
+
}.compact
|
110
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
111
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
112
|
+
request_options: request_options)}/api/service-lines/v2/#{service_line_id}"
|
113
|
+
end
|
114
|
+
CandidApiClient::ServiceLines::V2::Types::ServiceLine.from_json(json_object: response.body)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
class AsyncV2Client
|
119
|
+
# @return [CandidApiClient::AsyncRequestClient]
|
120
|
+
attr_reader :request_client
|
121
|
+
|
122
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
123
|
+
# @return [CandidApiClient::ServiceLines::V2::AsyncV2Client]
|
124
|
+
def initialize(request_client:)
|
125
|
+
@request_client = request_client
|
126
|
+
end
|
127
|
+
|
128
|
+
# @param request [Hash] Request of type CandidApiClient::ServiceLines::V2::Types::ServiceLineCreateStandalone, as a Hash
|
129
|
+
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
130
|
+
# * :charge_amount_cents (Integer)
|
131
|
+
# * :allowed_amount_cents (Integer)
|
132
|
+
# * :insurance_balance_cents (Integer)
|
133
|
+
# * :patient_balance_cents (Integer)
|
134
|
+
# * :primary_paid_amount_cents (Integer)
|
135
|
+
# * :secondary_paid_amount_cents (Integer)
|
136
|
+
# * :tertiary_paid_amount_cents (Integer)
|
137
|
+
# * :patient_responsibility_cents (Integer)
|
138
|
+
# * :diagnosis_id_zero (String)
|
139
|
+
# * :diagnosis_id_one (String)
|
140
|
+
# * :diagnosis_id_two (String)
|
141
|
+
# * :diagnosis_id_three (String)
|
142
|
+
# * :service_line_manual_adjustments (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>)
|
143
|
+
# * :denial_reason (Hash)
|
144
|
+
# * :reason (CandidApiClient::ServiceLines::V2::Types::DenialReasonContent)
|
145
|
+
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
146
|
+
# * :place_of_service_code_as_submitted (CandidApiClient::Commons::Types::FacilityTypeCode)
|
147
|
+
# * :procedure_code (String)
|
148
|
+
# * :quantity (String)
|
149
|
+
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
150
|
+
# * :claim_id (String)
|
151
|
+
# * :description (String)
|
152
|
+
# * :date_of_service (Date)
|
153
|
+
# * :end_date_of_service (Date)
|
154
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
155
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
156
|
+
# @example
|
157
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
158
|
+
# api.service_lines.v_2.create(request: { modifiers: [TWENTY_TWO], charge_amount_cents: 1, allowed_amount_cents: 1, insurance_balance_cents: 1, patient_balance_cents: 1, primary_paid_amount_cents: 1, secondary_paid_amount_cents: 1, tertiary_paid_amount_cents: 1, patient_responsibility_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", service_line_manual_adjustments: [{ }], denial_reason: { }, place_of_service_code: PHARMACY, place_of_service_code_as_submitted: PHARMACY, procedure_code: "string", quantity: "string", units: MJ, claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
159
|
+
def create(request:, request_options: nil)
|
160
|
+
Async do
|
161
|
+
response = @request_client.conn.post do |req|
|
162
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
163
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
164
|
+
req.headers = {
|
165
|
+
**(req.headers || {}),
|
166
|
+
**@request_client.get_headers,
|
167
|
+
**(request_options&.additional_headers || {})
|
168
|
+
}.compact
|
169
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
170
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
171
|
+
request_options: request_options)}/api/service-lines/v2"
|
172
|
+
end
|
173
|
+
CandidApiClient::ServiceLines::V2::Types::ServiceLine.from_json(json_object: response.body)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
# @param service_line_id [String]
|
178
|
+
# @param request [Hash] Request of type CandidApiClient::ServiceLines::V2::Types::ServiceLineUpdate, as a Hash
|
179
|
+
# * :edit_reason (String)
|
180
|
+
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
181
|
+
# * :charge_amount_cents (Integer)
|
182
|
+
# * :allowed_amount_cents (Integer)
|
183
|
+
# * :insurance_balance_cents (Integer)
|
184
|
+
# * :patient_balance_cents (Integer)
|
185
|
+
# * :primary_paid_amount_cents (Integer)
|
186
|
+
# * :secondary_paid_amount_cents (Integer)
|
187
|
+
# * :tertiary_paid_amount_cents (Integer)
|
188
|
+
# * :patient_responsibility_cents (Integer)
|
189
|
+
# * :diagnosis_id_zero (String)
|
190
|
+
# * :diagnosis_id_one (String)
|
191
|
+
# * :diagnosis_id_two (String)
|
192
|
+
# * :diagnosis_id_three (String)
|
193
|
+
# * :service_line_manual_adjustments (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>)
|
194
|
+
# * :denial_reason (Hash)
|
195
|
+
# * :reason (CandidApiClient::ServiceLines::V2::Types::DenialReasonContent)
|
196
|
+
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
197
|
+
# * :place_of_service_code_as_submitted (CandidApiClient::Commons::Types::FacilityTypeCode)
|
198
|
+
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
199
|
+
# * :procedure_code (String)
|
200
|
+
# * :quantity (String)
|
201
|
+
# * :description (String)
|
202
|
+
# * :date_of_service (Date)
|
203
|
+
# * :end_date_of_service (Date)
|
204
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
205
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
206
|
+
# @example
|
207
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
208
|
+
# api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, allowed_amount_cents: 1, insurance_balance_cents: 1, patient_balance_cents: 1, primary_paid_amount_cents: 1, secondary_paid_amount_cents: 1, tertiary_paid_amount_cents: 1, patient_responsibility_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", service_line_manual_adjustments: [{ }], denial_reason: { }, place_of_service_code: PHARMACY, place_of_service_code_as_submitted: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
209
|
+
def update(service_line_id:, request:, request_options: nil)
|
210
|
+
Async do
|
211
|
+
response = @request_client.conn.patch do |req|
|
212
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
213
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
214
|
+
req.headers = {
|
215
|
+
**(req.headers || {}),
|
216
|
+
**@request_client.get_headers,
|
217
|
+
**(request_options&.additional_headers || {})
|
218
|
+
}.compact
|
219
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
220
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
221
|
+
request_options: request_options)}/api/service-lines/v2/#{service_line_id}"
|
222
|
+
end
|
223
|
+
CandidApiClient::ServiceLines::V2::Types::ServiceLine.from_json(json_object: response.body)
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
@@ -0,0 +1,279 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/procedure_modifier"
|
4
|
+
require_relative "service_line_adjustment"
|
5
|
+
require_relative "service_line_denial_reason"
|
6
|
+
require_relative "../../../commons/types/facility_type_code"
|
7
|
+
require_relative "../../../commons/types/service_line_units"
|
8
|
+
require "date"
|
9
|
+
require "ostruct"
|
10
|
+
require "json"
|
11
|
+
|
12
|
+
module CandidApiClient
|
13
|
+
module ServiceLines
|
14
|
+
module V2
|
15
|
+
module Types
|
16
|
+
class ServiceLineCreateStandalone
|
17
|
+
# @return [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
|
18
|
+
attr_reader :modifiers
|
19
|
+
# @return [Integer]
|
20
|
+
attr_reader :charge_amount_cents
|
21
|
+
# @return [Integer]
|
22
|
+
attr_reader :allowed_amount_cents
|
23
|
+
# @return [Integer]
|
24
|
+
attr_reader :insurance_balance_cents
|
25
|
+
# @return [Integer]
|
26
|
+
attr_reader :patient_balance_cents
|
27
|
+
# @return [Integer]
|
28
|
+
attr_reader :primary_paid_amount_cents
|
29
|
+
# @return [Integer]
|
30
|
+
attr_reader :secondary_paid_amount_cents
|
31
|
+
# @return [Integer]
|
32
|
+
attr_reader :tertiary_paid_amount_cents
|
33
|
+
# @return [Integer]
|
34
|
+
attr_reader :patient_responsibility_cents
|
35
|
+
# @return [String]
|
36
|
+
attr_reader :diagnosis_id_zero
|
37
|
+
# @return [String]
|
38
|
+
attr_reader :diagnosis_id_one
|
39
|
+
# @return [String]
|
40
|
+
attr_reader :diagnosis_id_two
|
41
|
+
# @return [String]
|
42
|
+
attr_reader :diagnosis_id_three
|
43
|
+
# @return [Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>]
|
44
|
+
attr_reader :service_line_manual_adjustments
|
45
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason]
|
46
|
+
attr_reader :denial_reason
|
47
|
+
# @return [CandidApiClient::Commons::Types::FacilityTypeCode]
|
48
|
+
attr_reader :place_of_service_code
|
49
|
+
# @return [CandidApiClient::Commons::Types::FacilityTypeCode]
|
50
|
+
attr_reader :place_of_service_code_as_submitted
|
51
|
+
# @return [String]
|
52
|
+
attr_reader :procedure_code
|
53
|
+
# @return [String] String representation of a Decimal that can be parsed by most libraries.
|
54
|
+
# A ServiceLine quantity cannot contain more than one digit of precision.
|
55
|
+
# Example: 1.1 is valid, 1.11 is not.
|
56
|
+
attr_reader :quantity
|
57
|
+
# @return [CandidApiClient::Commons::Types::ServiceLineUnits]
|
58
|
+
attr_reader :units
|
59
|
+
# @return [String]
|
60
|
+
attr_reader :claim_id
|
61
|
+
# @return [String] A free-form description to clarify the related data elements and their content.
|
62
|
+
# Maps to SV1-01, C003-07 on the 837-P.
|
63
|
+
attr_reader :description
|
64
|
+
# @return [Date]
|
65
|
+
attr_reader :date_of_service
|
66
|
+
# @return [Date]
|
67
|
+
attr_reader :end_date_of_service
|
68
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
69
|
+
attr_reader :additional_properties
|
70
|
+
# @return [Object]
|
71
|
+
attr_reader :_field_set
|
72
|
+
protected :_field_set
|
73
|
+
|
74
|
+
OMIT = Object.new
|
75
|
+
|
76
|
+
# @param modifiers [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
|
77
|
+
# @param charge_amount_cents [Integer]
|
78
|
+
# @param allowed_amount_cents [Integer]
|
79
|
+
# @param insurance_balance_cents [Integer]
|
80
|
+
# @param patient_balance_cents [Integer]
|
81
|
+
# @param primary_paid_amount_cents [Integer]
|
82
|
+
# @param secondary_paid_amount_cents [Integer]
|
83
|
+
# @param tertiary_paid_amount_cents [Integer]
|
84
|
+
# @param patient_responsibility_cents [Integer]
|
85
|
+
# @param diagnosis_id_zero [String]
|
86
|
+
# @param diagnosis_id_one [String]
|
87
|
+
# @param diagnosis_id_two [String]
|
88
|
+
# @param diagnosis_id_three [String]
|
89
|
+
# @param service_line_manual_adjustments [Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>]
|
90
|
+
# @param denial_reason [CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason]
|
91
|
+
# @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode]
|
92
|
+
# @param place_of_service_code_as_submitted [CandidApiClient::Commons::Types::FacilityTypeCode]
|
93
|
+
# @param procedure_code [String]
|
94
|
+
# @param quantity [String] String representation of a Decimal that can be parsed by most libraries.
|
95
|
+
# A ServiceLine quantity cannot contain more than one digit of precision.
|
96
|
+
# Example: 1.1 is valid, 1.11 is not.
|
97
|
+
# @param units [CandidApiClient::Commons::Types::ServiceLineUnits]
|
98
|
+
# @param claim_id [String]
|
99
|
+
# @param description [String] A free-form description to clarify the related data elements and their content.
|
100
|
+
# Maps to SV1-01, C003-07 on the 837-P.
|
101
|
+
# @param date_of_service [Date]
|
102
|
+
# @param end_date_of_service [Date]
|
103
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
104
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineCreateStandalone]
|
105
|
+
def initialize(procedure_code:, quantity:, units:, claim_id:, modifiers: OMIT, charge_amount_cents: OMIT, allowed_amount_cents: OMIT,
|
106
|
+
insurance_balance_cents: OMIT, patient_balance_cents: OMIT, primary_paid_amount_cents: OMIT, secondary_paid_amount_cents: OMIT, tertiary_paid_amount_cents: OMIT, patient_responsibility_cents: OMIT, diagnosis_id_zero: OMIT, diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, service_line_manual_adjustments: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, additional_properties: nil)
|
107
|
+
@modifiers = modifiers if modifiers != OMIT
|
108
|
+
@charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
|
109
|
+
@allowed_amount_cents = allowed_amount_cents if allowed_amount_cents != OMIT
|
110
|
+
@insurance_balance_cents = insurance_balance_cents if insurance_balance_cents != OMIT
|
111
|
+
@patient_balance_cents = patient_balance_cents if patient_balance_cents != OMIT
|
112
|
+
@primary_paid_amount_cents = primary_paid_amount_cents if primary_paid_amount_cents != OMIT
|
113
|
+
@secondary_paid_amount_cents = secondary_paid_amount_cents if secondary_paid_amount_cents != OMIT
|
114
|
+
@tertiary_paid_amount_cents = tertiary_paid_amount_cents if tertiary_paid_amount_cents != OMIT
|
115
|
+
@patient_responsibility_cents = patient_responsibility_cents if patient_responsibility_cents != OMIT
|
116
|
+
@diagnosis_id_zero = diagnosis_id_zero if diagnosis_id_zero != OMIT
|
117
|
+
@diagnosis_id_one = diagnosis_id_one if diagnosis_id_one != OMIT
|
118
|
+
@diagnosis_id_two = diagnosis_id_two if diagnosis_id_two != OMIT
|
119
|
+
@diagnosis_id_three = diagnosis_id_three if diagnosis_id_three != OMIT
|
120
|
+
if service_line_manual_adjustments != OMIT
|
121
|
+
@service_line_manual_adjustments = service_line_manual_adjustments
|
122
|
+
end
|
123
|
+
@denial_reason = denial_reason if denial_reason != OMIT
|
124
|
+
@place_of_service_code = place_of_service_code if place_of_service_code != OMIT
|
125
|
+
if place_of_service_code_as_submitted != OMIT
|
126
|
+
@place_of_service_code_as_submitted = place_of_service_code_as_submitted
|
127
|
+
end
|
128
|
+
@procedure_code = procedure_code
|
129
|
+
@quantity = quantity
|
130
|
+
@units = units
|
131
|
+
@claim_id = claim_id
|
132
|
+
@description = description if description != OMIT
|
133
|
+
@date_of_service = date_of_service if date_of_service != OMIT
|
134
|
+
@end_date_of_service = end_date_of_service if end_date_of_service != OMIT
|
135
|
+
@additional_properties = additional_properties
|
136
|
+
@_field_set = {
|
137
|
+
"modifiers": modifiers,
|
138
|
+
"charge_amount_cents": charge_amount_cents,
|
139
|
+
"allowed_amount_cents": allowed_amount_cents,
|
140
|
+
"insurance_balance_cents": insurance_balance_cents,
|
141
|
+
"patient_balance_cents": patient_balance_cents,
|
142
|
+
"primary_paid_amount_cents": primary_paid_amount_cents,
|
143
|
+
"secondary_paid_amount_cents": secondary_paid_amount_cents,
|
144
|
+
"tertiary_paid_amount_cents": tertiary_paid_amount_cents,
|
145
|
+
"patient_responsibility_cents": patient_responsibility_cents,
|
146
|
+
"diagnosis_id_zero": diagnosis_id_zero,
|
147
|
+
"diagnosis_id_one": diagnosis_id_one,
|
148
|
+
"diagnosis_id_two": diagnosis_id_two,
|
149
|
+
"diagnosis_id_three": diagnosis_id_three,
|
150
|
+
"service_line_manual_adjustments": service_line_manual_adjustments,
|
151
|
+
"denial_reason": denial_reason,
|
152
|
+
"place_of_service_code": place_of_service_code,
|
153
|
+
"place_of_service_code_as_submitted": place_of_service_code_as_submitted,
|
154
|
+
"procedure_code": procedure_code,
|
155
|
+
"quantity": quantity,
|
156
|
+
"units": units,
|
157
|
+
"claim_id": claim_id,
|
158
|
+
"description": description,
|
159
|
+
"date_of_service": date_of_service,
|
160
|
+
"end_date_of_service": end_date_of_service
|
161
|
+
}.reject do |_k, v|
|
162
|
+
v == OMIT
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
# Deserialize a JSON object to an instance of ServiceLineCreateStandalone
|
167
|
+
#
|
168
|
+
# @param json_object [String]
|
169
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineCreateStandalone]
|
170
|
+
def self.from_json(json_object:)
|
171
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
172
|
+
parsed_json = JSON.parse(json_object)
|
173
|
+
modifiers = struct["modifiers"]
|
174
|
+
charge_amount_cents = struct["charge_amount_cents"]
|
175
|
+
allowed_amount_cents = struct["allowed_amount_cents"]
|
176
|
+
insurance_balance_cents = struct["insurance_balance_cents"]
|
177
|
+
patient_balance_cents = struct["patient_balance_cents"]
|
178
|
+
primary_paid_amount_cents = struct["primary_paid_amount_cents"]
|
179
|
+
secondary_paid_amount_cents = struct["secondary_paid_amount_cents"]
|
180
|
+
tertiary_paid_amount_cents = struct["tertiary_paid_amount_cents"]
|
181
|
+
patient_responsibility_cents = struct["patient_responsibility_cents"]
|
182
|
+
diagnosis_id_zero = struct["diagnosis_id_zero"]
|
183
|
+
diagnosis_id_one = struct["diagnosis_id_one"]
|
184
|
+
diagnosis_id_two = struct["diagnosis_id_two"]
|
185
|
+
diagnosis_id_three = struct["diagnosis_id_three"]
|
186
|
+
service_line_manual_adjustments = parsed_json["service_line_manual_adjustments"]&.map do |item|
|
187
|
+
item = item.to_json
|
188
|
+
CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment.from_json(json_object: item)
|
189
|
+
end
|
190
|
+
if parsed_json["denial_reason"].nil?
|
191
|
+
denial_reason = nil
|
192
|
+
else
|
193
|
+
denial_reason = parsed_json["denial_reason"].to_json
|
194
|
+
denial_reason = CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason.from_json(json_object: denial_reason)
|
195
|
+
end
|
196
|
+
place_of_service_code = struct["place_of_service_code"]
|
197
|
+
place_of_service_code_as_submitted = struct["place_of_service_code_as_submitted"]
|
198
|
+
procedure_code = struct["procedure_code"]
|
199
|
+
quantity = struct["quantity"]
|
200
|
+
units = struct["units"]
|
201
|
+
claim_id = struct["claim_id"]
|
202
|
+
description = struct["description"]
|
203
|
+
date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
|
204
|
+
end_date_of_service = unless parsed_json["end_date_of_service"].nil?
|
205
|
+
Date.parse(parsed_json["end_date_of_service"])
|
206
|
+
end
|
207
|
+
new(
|
208
|
+
modifiers: modifiers,
|
209
|
+
charge_amount_cents: charge_amount_cents,
|
210
|
+
allowed_amount_cents: allowed_amount_cents,
|
211
|
+
insurance_balance_cents: insurance_balance_cents,
|
212
|
+
patient_balance_cents: patient_balance_cents,
|
213
|
+
primary_paid_amount_cents: primary_paid_amount_cents,
|
214
|
+
secondary_paid_amount_cents: secondary_paid_amount_cents,
|
215
|
+
tertiary_paid_amount_cents: tertiary_paid_amount_cents,
|
216
|
+
patient_responsibility_cents: patient_responsibility_cents,
|
217
|
+
diagnosis_id_zero: diagnosis_id_zero,
|
218
|
+
diagnosis_id_one: diagnosis_id_one,
|
219
|
+
diagnosis_id_two: diagnosis_id_two,
|
220
|
+
diagnosis_id_three: diagnosis_id_three,
|
221
|
+
service_line_manual_adjustments: service_line_manual_adjustments,
|
222
|
+
denial_reason: denial_reason,
|
223
|
+
place_of_service_code: place_of_service_code,
|
224
|
+
place_of_service_code_as_submitted: place_of_service_code_as_submitted,
|
225
|
+
procedure_code: procedure_code,
|
226
|
+
quantity: quantity,
|
227
|
+
units: units,
|
228
|
+
claim_id: claim_id,
|
229
|
+
description: description,
|
230
|
+
date_of_service: date_of_service,
|
231
|
+
end_date_of_service: end_date_of_service,
|
232
|
+
additional_properties: struct
|
233
|
+
)
|
234
|
+
end
|
235
|
+
|
236
|
+
# Serialize an instance of ServiceLineCreateStandalone to a JSON object
|
237
|
+
#
|
238
|
+
# @return [String]
|
239
|
+
def to_json(*_args)
|
240
|
+
@_field_set&.to_json
|
241
|
+
end
|
242
|
+
|
243
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
244
|
+
# hash and check each fields type against the current object's property
|
245
|
+
# definitions.
|
246
|
+
#
|
247
|
+
# @param obj [Object]
|
248
|
+
# @return [Void]
|
249
|
+
def self.validate_raw(obj:)
|
250
|
+
obj.modifiers&.is_a?(Array) != false || raise("Passed value for field obj.modifiers is not the expected type, validation failed.")
|
251
|
+
obj.charge_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.charge_amount_cents is not the expected type, validation failed.")
|
252
|
+
obj.allowed_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.allowed_amount_cents is not the expected type, validation failed.")
|
253
|
+
obj.insurance_balance_cents&.is_a?(Integer) != false || raise("Passed value for field obj.insurance_balance_cents is not the expected type, validation failed.")
|
254
|
+
obj.patient_balance_cents&.is_a?(Integer) != false || raise("Passed value for field obj.patient_balance_cents is not the expected type, validation failed.")
|
255
|
+
obj.primary_paid_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.primary_paid_amount_cents is not the expected type, validation failed.")
|
256
|
+
obj.secondary_paid_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.secondary_paid_amount_cents is not the expected type, validation failed.")
|
257
|
+
obj.tertiary_paid_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.tertiary_paid_amount_cents is not the expected type, validation failed.")
|
258
|
+
obj.patient_responsibility_cents&.is_a?(Integer) != false || raise("Passed value for field obj.patient_responsibility_cents is not the expected type, validation failed.")
|
259
|
+
obj.diagnosis_id_zero&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_zero is not the expected type, validation failed.")
|
260
|
+
obj.diagnosis_id_one&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_one is not the expected type, validation failed.")
|
261
|
+
obj.diagnosis_id_two&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_two is not the expected type, validation failed.")
|
262
|
+
obj.diagnosis_id_three&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_three is not the expected type, validation failed.")
|
263
|
+
obj.service_line_manual_adjustments&.is_a?(Array) != false || raise("Passed value for field obj.service_line_manual_adjustments is not the expected type, validation failed.")
|
264
|
+
obj.denial_reason.nil? || CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason.validate_raw(obj: obj.denial_reason)
|
265
|
+
obj.place_of_service_code&.is_a?(CandidApiClient::Commons::Types::FacilityTypeCode) != false || raise("Passed value for field obj.place_of_service_code is not the expected type, validation failed.")
|
266
|
+
obj.place_of_service_code_as_submitted&.is_a?(CandidApiClient::Commons::Types::FacilityTypeCode) != false || raise("Passed value for field obj.place_of_service_code_as_submitted is not the expected type, validation failed.")
|
267
|
+
obj.procedure_code.is_a?(String) != false || raise("Passed value for field obj.procedure_code is not the expected type, validation failed.")
|
268
|
+
obj.quantity.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
|
269
|
+
obj.units.is_a?(CandidApiClient::Commons::Types::ServiceLineUnits) != false || raise("Passed value for field obj.units is not the expected type, validation failed.")
|
270
|
+
obj.claim_id.is_a?(String) != false || raise("Passed value for field obj.claim_id is not the expected type, validation failed.")
|
271
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
272
|
+
obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
273
|
+
obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
277
|
+
end
|
278
|
+
end
|
279
|
+
end
|
@@ -0,0 +1,281 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/procedure_modifier"
|
4
|
+
require_relative "service_line_adjustment"
|
5
|
+
require_relative "service_line_denial_reason"
|
6
|
+
require_relative "../../../commons/types/facility_type_code"
|
7
|
+
require_relative "../../../commons/types/service_line_units"
|
8
|
+
require "date"
|
9
|
+
require "ostruct"
|
10
|
+
require "json"
|
11
|
+
|
12
|
+
module CandidApiClient
|
13
|
+
module ServiceLines
|
14
|
+
module V2
|
15
|
+
module Types
|
16
|
+
class ServiceLineUpdate
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :edit_reason
|
19
|
+
# @return [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
|
20
|
+
attr_reader :modifiers
|
21
|
+
# @return [Integer]
|
22
|
+
attr_reader :charge_amount_cents
|
23
|
+
# @return [Integer]
|
24
|
+
attr_reader :allowed_amount_cents
|
25
|
+
# @return [Integer]
|
26
|
+
attr_reader :insurance_balance_cents
|
27
|
+
# @return [Integer]
|
28
|
+
attr_reader :patient_balance_cents
|
29
|
+
# @return [Integer]
|
30
|
+
attr_reader :primary_paid_amount_cents
|
31
|
+
# @return [Integer]
|
32
|
+
attr_reader :secondary_paid_amount_cents
|
33
|
+
# @return [Integer]
|
34
|
+
attr_reader :tertiary_paid_amount_cents
|
35
|
+
# @return [Integer]
|
36
|
+
attr_reader :patient_responsibility_cents
|
37
|
+
# @return [String]
|
38
|
+
attr_reader :diagnosis_id_zero
|
39
|
+
# @return [String]
|
40
|
+
attr_reader :diagnosis_id_one
|
41
|
+
# @return [String]
|
42
|
+
attr_reader :diagnosis_id_two
|
43
|
+
# @return [String]
|
44
|
+
attr_reader :diagnosis_id_three
|
45
|
+
# @return [Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>]
|
46
|
+
attr_reader :service_line_manual_adjustments
|
47
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason]
|
48
|
+
attr_reader :denial_reason
|
49
|
+
# @return [CandidApiClient::Commons::Types::FacilityTypeCode]
|
50
|
+
attr_reader :place_of_service_code
|
51
|
+
# @return [CandidApiClient::Commons::Types::FacilityTypeCode]
|
52
|
+
attr_reader :place_of_service_code_as_submitted
|
53
|
+
# @return [CandidApiClient::Commons::Types::ServiceLineUnits]
|
54
|
+
attr_reader :units
|
55
|
+
# @return [String]
|
56
|
+
attr_reader :procedure_code
|
57
|
+
# @return [String] String representation of a Decimal that can be parsed by most libraries.
|
58
|
+
# A ServiceLine quantity cannot contain more than one digit of precision.
|
59
|
+
# Example: 1.1 is valid, 1.11 is not.
|
60
|
+
attr_reader :quantity
|
61
|
+
# @return [String] A free-form description to clarify the related data elements and their content.
|
62
|
+
# Maps to SV1-01, C003-07 on the 837-P.
|
63
|
+
attr_reader :description
|
64
|
+
# @return [Date] date_of_service must be defined on either the encounter or the service lines but
|
65
|
+
# not both.
|
66
|
+
attr_reader :date_of_service
|
67
|
+
# @return [Date]
|
68
|
+
attr_reader :end_date_of_service
|
69
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
70
|
+
attr_reader :additional_properties
|
71
|
+
# @return [Object]
|
72
|
+
attr_reader :_field_set
|
73
|
+
protected :_field_set
|
74
|
+
|
75
|
+
OMIT = Object.new
|
76
|
+
|
77
|
+
# @param edit_reason [String]
|
78
|
+
# @param modifiers [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
|
79
|
+
# @param charge_amount_cents [Integer]
|
80
|
+
# @param allowed_amount_cents [Integer]
|
81
|
+
# @param insurance_balance_cents [Integer]
|
82
|
+
# @param patient_balance_cents [Integer]
|
83
|
+
# @param primary_paid_amount_cents [Integer]
|
84
|
+
# @param secondary_paid_amount_cents [Integer]
|
85
|
+
# @param tertiary_paid_amount_cents [Integer]
|
86
|
+
# @param patient_responsibility_cents [Integer]
|
87
|
+
# @param diagnosis_id_zero [String]
|
88
|
+
# @param diagnosis_id_one [String]
|
89
|
+
# @param diagnosis_id_two [String]
|
90
|
+
# @param diagnosis_id_three [String]
|
91
|
+
# @param service_line_manual_adjustments [Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>]
|
92
|
+
# @param denial_reason [CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason]
|
93
|
+
# @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode]
|
94
|
+
# @param place_of_service_code_as_submitted [CandidApiClient::Commons::Types::FacilityTypeCode]
|
95
|
+
# @param units [CandidApiClient::Commons::Types::ServiceLineUnits]
|
96
|
+
# @param procedure_code [String]
|
97
|
+
# @param quantity [String] String representation of a Decimal that can be parsed by most libraries.
|
98
|
+
# A ServiceLine quantity cannot contain more than one digit of precision.
|
99
|
+
# Example: 1.1 is valid, 1.11 is not.
|
100
|
+
# @param description [String] A free-form description to clarify the related data elements and their content.
|
101
|
+
# Maps to SV1-01, C003-07 on the 837-P.
|
102
|
+
# @param date_of_service [Date] date_of_service must be defined on either the encounter or the service lines but
|
103
|
+
# not both.
|
104
|
+
# @param end_date_of_service [Date]
|
105
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
106
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineUpdate]
|
107
|
+
def initialize(edit_reason: OMIT, modifiers: OMIT, charge_amount_cents: OMIT, allowed_amount_cents: OMIT,
|
108
|
+
insurance_balance_cents: OMIT, patient_balance_cents: OMIT, primary_paid_amount_cents: OMIT, secondary_paid_amount_cents: OMIT, tertiary_paid_amount_cents: OMIT, patient_responsibility_cents: OMIT, diagnosis_id_zero: OMIT, diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, service_line_manual_adjustments: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, units: OMIT, procedure_code: OMIT, quantity: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, additional_properties: nil)
|
109
|
+
@edit_reason = edit_reason if edit_reason != OMIT
|
110
|
+
@modifiers = modifiers if modifiers != OMIT
|
111
|
+
@charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
|
112
|
+
@allowed_amount_cents = allowed_amount_cents if allowed_amount_cents != OMIT
|
113
|
+
@insurance_balance_cents = insurance_balance_cents if insurance_balance_cents != OMIT
|
114
|
+
@patient_balance_cents = patient_balance_cents if patient_balance_cents != OMIT
|
115
|
+
@primary_paid_amount_cents = primary_paid_amount_cents if primary_paid_amount_cents != OMIT
|
116
|
+
@secondary_paid_amount_cents = secondary_paid_amount_cents if secondary_paid_amount_cents != OMIT
|
117
|
+
@tertiary_paid_amount_cents = tertiary_paid_amount_cents if tertiary_paid_amount_cents != OMIT
|
118
|
+
@patient_responsibility_cents = patient_responsibility_cents if patient_responsibility_cents != OMIT
|
119
|
+
@diagnosis_id_zero = diagnosis_id_zero if diagnosis_id_zero != OMIT
|
120
|
+
@diagnosis_id_one = diagnosis_id_one if diagnosis_id_one != OMIT
|
121
|
+
@diagnosis_id_two = diagnosis_id_two if diagnosis_id_two != OMIT
|
122
|
+
@diagnosis_id_three = diagnosis_id_three if diagnosis_id_three != OMIT
|
123
|
+
if service_line_manual_adjustments != OMIT
|
124
|
+
@service_line_manual_adjustments = service_line_manual_adjustments
|
125
|
+
end
|
126
|
+
@denial_reason = denial_reason if denial_reason != OMIT
|
127
|
+
@place_of_service_code = place_of_service_code if place_of_service_code != OMIT
|
128
|
+
if place_of_service_code_as_submitted != OMIT
|
129
|
+
@place_of_service_code_as_submitted = place_of_service_code_as_submitted
|
130
|
+
end
|
131
|
+
@units = units if units != OMIT
|
132
|
+
@procedure_code = procedure_code if procedure_code != OMIT
|
133
|
+
@quantity = quantity if quantity != OMIT
|
134
|
+
@description = description if description != OMIT
|
135
|
+
@date_of_service = date_of_service if date_of_service != OMIT
|
136
|
+
@end_date_of_service = end_date_of_service if end_date_of_service != OMIT
|
137
|
+
@additional_properties = additional_properties
|
138
|
+
@_field_set = {
|
139
|
+
"edit_reason": edit_reason,
|
140
|
+
"modifiers": modifiers,
|
141
|
+
"charge_amount_cents": charge_amount_cents,
|
142
|
+
"allowed_amount_cents": allowed_amount_cents,
|
143
|
+
"insurance_balance_cents": insurance_balance_cents,
|
144
|
+
"patient_balance_cents": patient_balance_cents,
|
145
|
+
"primary_paid_amount_cents": primary_paid_amount_cents,
|
146
|
+
"secondary_paid_amount_cents": secondary_paid_amount_cents,
|
147
|
+
"tertiary_paid_amount_cents": tertiary_paid_amount_cents,
|
148
|
+
"patient_responsibility_cents": patient_responsibility_cents,
|
149
|
+
"diagnosis_id_zero": diagnosis_id_zero,
|
150
|
+
"diagnosis_id_one": diagnosis_id_one,
|
151
|
+
"diagnosis_id_two": diagnosis_id_two,
|
152
|
+
"diagnosis_id_three": diagnosis_id_three,
|
153
|
+
"service_line_manual_adjustments": service_line_manual_adjustments,
|
154
|
+
"denial_reason": denial_reason,
|
155
|
+
"place_of_service_code": place_of_service_code,
|
156
|
+
"place_of_service_code_as_submitted": place_of_service_code_as_submitted,
|
157
|
+
"units": units,
|
158
|
+
"procedure_code": procedure_code,
|
159
|
+
"quantity": quantity,
|
160
|
+
"description": description,
|
161
|
+
"date_of_service": date_of_service,
|
162
|
+
"end_date_of_service": end_date_of_service
|
163
|
+
}.reject do |_k, v|
|
164
|
+
v == OMIT
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
# Deserialize a JSON object to an instance of ServiceLineUpdate
|
169
|
+
#
|
170
|
+
# @param json_object [String]
|
171
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineUpdate]
|
172
|
+
def self.from_json(json_object:)
|
173
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
174
|
+
parsed_json = JSON.parse(json_object)
|
175
|
+
edit_reason = struct["edit_reason"]
|
176
|
+
modifiers = struct["modifiers"]
|
177
|
+
charge_amount_cents = struct["charge_amount_cents"]
|
178
|
+
allowed_amount_cents = struct["allowed_amount_cents"]
|
179
|
+
insurance_balance_cents = struct["insurance_balance_cents"]
|
180
|
+
patient_balance_cents = struct["patient_balance_cents"]
|
181
|
+
primary_paid_amount_cents = struct["primary_paid_amount_cents"]
|
182
|
+
secondary_paid_amount_cents = struct["secondary_paid_amount_cents"]
|
183
|
+
tertiary_paid_amount_cents = struct["tertiary_paid_amount_cents"]
|
184
|
+
patient_responsibility_cents = struct["patient_responsibility_cents"]
|
185
|
+
diagnosis_id_zero = struct["diagnosis_id_zero"]
|
186
|
+
diagnosis_id_one = struct["diagnosis_id_one"]
|
187
|
+
diagnosis_id_two = struct["diagnosis_id_two"]
|
188
|
+
diagnosis_id_three = struct["diagnosis_id_three"]
|
189
|
+
service_line_manual_adjustments = parsed_json["service_line_manual_adjustments"]&.map do |item|
|
190
|
+
item = item.to_json
|
191
|
+
CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment.from_json(json_object: item)
|
192
|
+
end
|
193
|
+
if parsed_json["denial_reason"].nil?
|
194
|
+
denial_reason = nil
|
195
|
+
else
|
196
|
+
denial_reason = parsed_json["denial_reason"].to_json
|
197
|
+
denial_reason = CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason.from_json(json_object: denial_reason)
|
198
|
+
end
|
199
|
+
place_of_service_code = struct["place_of_service_code"]
|
200
|
+
place_of_service_code_as_submitted = struct["place_of_service_code_as_submitted"]
|
201
|
+
units = struct["units"]
|
202
|
+
procedure_code = struct["procedure_code"]
|
203
|
+
quantity = struct["quantity"]
|
204
|
+
description = struct["description"]
|
205
|
+
date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
|
206
|
+
end_date_of_service = unless parsed_json["end_date_of_service"].nil?
|
207
|
+
Date.parse(parsed_json["end_date_of_service"])
|
208
|
+
end
|
209
|
+
new(
|
210
|
+
edit_reason: edit_reason,
|
211
|
+
modifiers: modifiers,
|
212
|
+
charge_amount_cents: charge_amount_cents,
|
213
|
+
allowed_amount_cents: allowed_amount_cents,
|
214
|
+
insurance_balance_cents: insurance_balance_cents,
|
215
|
+
patient_balance_cents: patient_balance_cents,
|
216
|
+
primary_paid_amount_cents: primary_paid_amount_cents,
|
217
|
+
secondary_paid_amount_cents: secondary_paid_amount_cents,
|
218
|
+
tertiary_paid_amount_cents: tertiary_paid_amount_cents,
|
219
|
+
patient_responsibility_cents: patient_responsibility_cents,
|
220
|
+
diagnosis_id_zero: diagnosis_id_zero,
|
221
|
+
diagnosis_id_one: diagnosis_id_one,
|
222
|
+
diagnosis_id_two: diagnosis_id_two,
|
223
|
+
diagnosis_id_three: diagnosis_id_three,
|
224
|
+
service_line_manual_adjustments: service_line_manual_adjustments,
|
225
|
+
denial_reason: denial_reason,
|
226
|
+
place_of_service_code: place_of_service_code,
|
227
|
+
place_of_service_code_as_submitted: place_of_service_code_as_submitted,
|
228
|
+
units: units,
|
229
|
+
procedure_code: procedure_code,
|
230
|
+
quantity: quantity,
|
231
|
+
description: description,
|
232
|
+
date_of_service: date_of_service,
|
233
|
+
end_date_of_service: end_date_of_service,
|
234
|
+
additional_properties: struct
|
235
|
+
)
|
236
|
+
end
|
237
|
+
|
238
|
+
# Serialize an instance of ServiceLineUpdate to a JSON object
|
239
|
+
#
|
240
|
+
# @return [String]
|
241
|
+
def to_json(*_args)
|
242
|
+
@_field_set&.to_json
|
243
|
+
end
|
244
|
+
|
245
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
246
|
+
# hash and check each fields type against the current object's property
|
247
|
+
# definitions.
|
248
|
+
#
|
249
|
+
# @param obj [Object]
|
250
|
+
# @return [Void]
|
251
|
+
def self.validate_raw(obj:)
|
252
|
+
obj.edit_reason&.is_a?(String) != false || raise("Passed value for field obj.edit_reason is not the expected type, validation failed.")
|
253
|
+
obj.modifiers&.is_a?(Array) != false || raise("Passed value for field obj.modifiers is not the expected type, validation failed.")
|
254
|
+
obj.charge_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.charge_amount_cents is not the expected type, validation failed.")
|
255
|
+
obj.allowed_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.allowed_amount_cents is not the expected type, validation failed.")
|
256
|
+
obj.insurance_balance_cents&.is_a?(Integer) != false || raise("Passed value for field obj.insurance_balance_cents is not the expected type, validation failed.")
|
257
|
+
obj.patient_balance_cents&.is_a?(Integer) != false || raise("Passed value for field obj.patient_balance_cents is not the expected type, validation failed.")
|
258
|
+
obj.primary_paid_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.primary_paid_amount_cents is not the expected type, validation failed.")
|
259
|
+
obj.secondary_paid_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.secondary_paid_amount_cents is not the expected type, validation failed.")
|
260
|
+
obj.tertiary_paid_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.tertiary_paid_amount_cents is not the expected type, validation failed.")
|
261
|
+
obj.patient_responsibility_cents&.is_a?(Integer) != false || raise("Passed value for field obj.patient_responsibility_cents is not the expected type, validation failed.")
|
262
|
+
obj.diagnosis_id_zero&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_zero is not the expected type, validation failed.")
|
263
|
+
obj.diagnosis_id_one&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_one is not the expected type, validation failed.")
|
264
|
+
obj.diagnosis_id_two&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_two is not the expected type, validation failed.")
|
265
|
+
obj.diagnosis_id_three&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_three is not the expected type, validation failed.")
|
266
|
+
obj.service_line_manual_adjustments&.is_a?(Array) != false || raise("Passed value for field obj.service_line_manual_adjustments is not the expected type, validation failed.")
|
267
|
+
obj.denial_reason.nil? || CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason.validate_raw(obj: obj.denial_reason)
|
268
|
+
obj.place_of_service_code&.is_a?(CandidApiClient::Commons::Types::FacilityTypeCode) != false || raise("Passed value for field obj.place_of_service_code is not the expected type, validation failed.")
|
269
|
+
obj.place_of_service_code_as_submitted&.is_a?(CandidApiClient::Commons::Types::FacilityTypeCode) != false || raise("Passed value for field obj.place_of_service_code_as_submitted is not the expected type, validation failed.")
|
270
|
+
obj.units&.is_a?(CandidApiClient::Commons::Types::ServiceLineUnits) != false || raise("Passed value for field obj.units is not the expected type, validation failed.")
|
271
|
+
obj.procedure_code&.is_a?(String) != false || raise("Passed value for field obj.procedure_code is not the expected type, validation failed.")
|
272
|
+
obj.quantity&.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
|
273
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
274
|
+
obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
275
|
+
obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
|
276
|
+
end
|
277
|
+
end
|
278
|
+
end
|
279
|
+
end
|
280
|
+
end
|
281
|
+
end
|
@@ -19,6 +19,10 @@ module CandidApiClient
|
|
19
19
|
# @return [CandidApiClient::WriteOffs::V1::Types::PatientWriteOffReason]
|
20
20
|
attr_reader :write_off_reason
|
21
21
|
# @return [String]
|
22
|
+
attr_reader :patient_external_id
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :claim_id
|
25
|
+
# @return [String]
|
22
26
|
attr_reader :service_line_id
|
23
27
|
# @return [String]
|
24
28
|
attr_reader :reverts_write_off_id
|
@@ -38,18 +42,22 @@ module CandidApiClient
|
|
38
42
|
# @param write_off_timestamp [DateTime]
|
39
43
|
# @param write_off_note [String]
|
40
44
|
# @param write_off_reason [CandidApiClient::WriteOffs::V1::Types::PatientWriteOffReason]
|
45
|
+
# @param patient_external_id [String]
|
46
|
+
# @param claim_id [String]
|
41
47
|
# @param service_line_id [String]
|
42
48
|
# @param reverts_write_off_id [String]
|
43
49
|
# @param reverted_by_write_off_id [String]
|
44
50
|
# @param amount_cents [Integer]
|
45
51
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
46
52
|
# @return [CandidApiClient::WriteOffs::V1::Types::PatientWriteOff]
|
47
|
-
def initialize(write_off_id:, write_off_timestamp:, write_off_reason:,
|
48
|
-
write_off_note: OMIT, reverts_write_off_id: OMIT, reverted_by_write_off_id: OMIT, additional_properties: nil)
|
53
|
+
def initialize(write_off_id:, write_off_timestamp:, write_off_reason:, patient_external_id:, claim_id:,
|
54
|
+
service_line_id:, amount_cents:, write_off_note: OMIT, reverts_write_off_id: OMIT, reverted_by_write_off_id: OMIT, additional_properties: nil)
|
49
55
|
@write_off_id = write_off_id
|
50
56
|
@write_off_timestamp = write_off_timestamp
|
51
57
|
@write_off_note = write_off_note if write_off_note != OMIT
|
52
58
|
@write_off_reason = write_off_reason
|
59
|
+
@patient_external_id = patient_external_id
|
60
|
+
@claim_id = claim_id
|
53
61
|
@service_line_id = service_line_id
|
54
62
|
@reverts_write_off_id = reverts_write_off_id if reverts_write_off_id != OMIT
|
55
63
|
@reverted_by_write_off_id = reverted_by_write_off_id if reverted_by_write_off_id != OMIT
|
@@ -60,6 +68,8 @@ module CandidApiClient
|
|
60
68
|
"write_off_timestamp": write_off_timestamp,
|
61
69
|
"write_off_note": write_off_note,
|
62
70
|
"write_off_reason": write_off_reason,
|
71
|
+
"patient_external_id": patient_external_id,
|
72
|
+
"claim_id": claim_id,
|
63
73
|
"service_line_id": service_line_id,
|
64
74
|
"reverts_write_off_id": reverts_write_off_id,
|
65
75
|
"reverted_by_write_off_id": reverted_by_write_off_id,
|
@@ -82,6 +92,8 @@ module CandidApiClient
|
|
82
92
|
end
|
83
93
|
write_off_note = struct["write_off_note"]
|
84
94
|
write_off_reason = struct["write_off_reason"]
|
95
|
+
patient_external_id = struct["patient_external_id"]
|
96
|
+
claim_id = struct["claim_id"]
|
85
97
|
service_line_id = struct["service_line_id"]
|
86
98
|
reverts_write_off_id = struct["reverts_write_off_id"]
|
87
99
|
reverted_by_write_off_id = struct["reverted_by_write_off_id"]
|
@@ -91,6 +103,8 @@ module CandidApiClient
|
|
91
103
|
write_off_timestamp: write_off_timestamp,
|
92
104
|
write_off_note: write_off_note,
|
93
105
|
write_off_reason: write_off_reason,
|
106
|
+
patient_external_id: patient_external_id,
|
107
|
+
claim_id: claim_id,
|
94
108
|
service_line_id: service_line_id,
|
95
109
|
reverts_write_off_id: reverts_write_off_id,
|
96
110
|
reverted_by_write_off_id: reverted_by_write_off_id,
|
@@ -117,6 +131,8 @@ module CandidApiClient
|
|
117
131
|
obj.write_off_timestamp.is_a?(DateTime) != false || raise("Passed value for field obj.write_off_timestamp is not the expected type, validation failed.")
|
118
132
|
obj.write_off_note&.is_a?(String) != false || raise("Passed value for field obj.write_off_note is not the expected type, validation failed.")
|
119
133
|
obj.write_off_reason.is_a?(CandidApiClient::WriteOffs::V1::Types::PatientWriteOffReason) != false || raise("Passed value for field obj.write_off_reason is not the expected type, validation failed.")
|
134
|
+
obj.patient_external_id.is_a?(String) != false || raise("Passed value for field obj.patient_external_id is not the expected type, validation failed.")
|
135
|
+
obj.claim_id.is_a?(String) != false || raise("Passed value for field obj.claim_id is not the expected type, validation failed.")
|
120
136
|
obj.service_line_id.is_a?(String) != false || raise("Passed value for field obj.service_line_id is not the expected type, validation failed.")
|
121
137
|
obj.reverts_write_off_id&.is_a?(String) != false || raise("Passed value for field obj.reverts_write_off_id is not the expected type, validation failed.")
|
122
138
|
obj.reverted_by_write_off_id&.is_a?(String) != false || raise("Passed value for field obj.reverted_by_write_off_id is not the expected type, validation failed.")
|
data/lib/candidhealth.rb
CHANGED
@@ -24,6 +24,7 @@ require_relative "candidhealth/organization_providers/client"
|
|
24
24
|
require_relative "candidhealth/patient_payments/client"
|
25
25
|
require_relative "candidhealth/patient_refunds/client"
|
26
26
|
require_relative "candidhealth/payers/client"
|
27
|
+
require_relative "candidhealth/service_lines/client"
|
27
28
|
require_relative "candidhealth/tasks/client"
|
28
29
|
require_relative "candidhealth/write_offs/client"
|
29
30
|
require_relative "candidhealth/pre_encounter/client"
|
@@ -71,6 +72,8 @@ module CandidApiClient
|
|
71
72
|
attr_reader :patient_refunds
|
72
73
|
# @return [CandidApiClient::Payers::Client]
|
73
74
|
attr_reader :payers
|
75
|
+
# @return [CandidApiClient::ServiceLines::Client]
|
76
|
+
attr_reader :service_lines
|
74
77
|
# @return [CandidApiClient::Tasks::Client]
|
75
78
|
attr_reader :tasks
|
76
79
|
# @return [CandidApiClient::WriteOffs::Client]
|
@@ -126,6 +129,7 @@ module CandidApiClient
|
|
126
129
|
@patient_payments = CandidApiClient::PatientPayments::Client.new(request_client: @request_client)
|
127
130
|
@patient_refunds = CandidApiClient::PatientRefunds::Client.new(request_client: @request_client)
|
128
131
|
@payers = CandidApiClient::Payers::Client.new(request_client: @request_client)
|
132
|
+
@service_lines = CandidApiClient::ServiceLines::Client.new(request_client: @request_client)
|
129
133
|
@tasks = CandidApiClient::Tasks::Client.new(request_client: @request_client)
|
130
134
|
@write_offs = CandidApiClient::WriteOffs::Client.new(request_client: @request_client)
|
131
135
|
@pre_encounter = CandidApiClient::PreEncounter::Client.new(request_client: @request_client)
|
@@ -174,6 +178,8 @@ module CandidApiClient
|
|
174
178
|
attr_reader :patient_refunds
|
175
179
|
# @return [CandidApiClient::Payers::AsyncClient]
|
176
180
|
attr_reader :payers
|
181
|
+
# @return [CandidApiClient::ServiceLines::AsyncClient]
|
182
|
+
attr_reader :service_lines
|
177
183
|
# @return [CandidApiClient::Tasks::AsyncClient]
|
178
184
|
attr_reader :tasks
|
179
185
|
# @return [CandidApiClient::WriteOffs::AsyncClient]
|
@@ -229,6 +235,7 @@ module CandidApiClient
|
|
229
235
|
@patient_payments = CandidApiClient::PatientPayments::AsyncClient.new(request_client: @async_request_client)
|
230
236
|
@patient_refunds = CandidApiClient::PatientRefunds::AsyncClient.new(request_client: @async_request_client)
|
231
237
|
@payers = CandidApiClient::Payers::AsyncClient.new(request_client: @async_request_client)
|
238
|
+
@service_lines = CandidApiClient::ServiceLines::AsyncClient.new(request_client: @async_request_client)
|
232
239
|
@tasks = CandidApiClient::Tasks::AsyncClient.new(request_client: @async_request_client)
|
233
240
|
@write_offs = CandidApiClient::WriteOffs::AsyncClient.new(request_client: @async_request_client)
|
234
241
|
@pre_encounter = CandidApiClient::PreEncounter::AsyncClient.new(request_client: @async_request_client)
|
data/lib/requests.rb
CHANGED
@@ -43,7 +43,7 @@ module CandidApiClient
|
|
43
43
|
|
44
44
|
# @return [Hash{String => String}]
|
45
45
|
def get_headers
|
46
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.25.0" }
|
47
47
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
48
48
|
headers
|
49
49
|
end
|
@@ -87,7 +87,7 @@ module CandidApiClient
|
|
87
87
|
|
88
88
|
# @return [Hash{String => String}]
|
89
89
|
def get_headers
|
90
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.
|
90
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.25.0" }
|
91
91
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
92
92
|
headers
|
93
93
|
end
|
data/lib/types_export.rb
CHANGED
@@ -198,6 +198,8 @@ require_relative "candidhealth/payers/v_3/types/payer_identifier"
|
|
198
198
|
require_relative "candidhealth/remits/v_1/types/payee_identifier"
|
199
199
|
require_relative "candidhealth/remits/v_1/types/payee"
|
200
200
|
require_relative "candidhealth/service_lines/v_2/types/service_line_create"
|
201
|
+
require_relative "candidhealth/service_lines/v_2/types/service_line_create_standalone"
|
202
|
+
require_relative "candidhealth/service_lines/v_2/types/service_line_update"
|
201
203
|
require_relative "candidhealth/service_lines/v_2/types/service_line"
|
202
204
|
require_relative "candidhealth/service_lines/v_2/types/service_line_era_data"
|
203
205
|
require_relative "candidhealth/service_lines/v_2/types/service_line_adjustment"
|
@@ -298,6 +300,7 @@ require_relative "candidhealth/financials/types/allocation"
|
|
298
300
|
require_relative "candidhealth/financials/types/service_line_allocation_target"
|
299
301
|
require_relative "candidhealth/financials/types/claim_allocation_target"
|
300
302
|
require_relative "candidhealth/financials/types/billing_provider_allocation_target"
|
303
|
+
require_relative "candidhealth/financials/types/appointment_allocation_target"
|
301
304
|
require_relative "candidhealth/financials/types/allocation_target"
|
302
305
|
require_relative "candidhealth/financials/types/allocation_create"
|
303
306
|
require_relative "candidhealth/financials/types/allocation_target_create"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: candidhealth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -289,6 +289,7 @@ files:
|
|
289
289
|
- lib/candidhealth/financials/types/allocation_create.rb
|
290
290
|
- lib/candidhealth/financials/types/allocation_target.rb
|
291
291
|
- lib/candidhealth/financials/types/allocation_target_create.rb
|
292
|
+
- lib/candidhealth/financials/types/appointment_allocation_target.rb
|
292
293
|
- lib/candidhealth/financials/types/billing_provider_allocation_target.rb
|
293
294
|
- lib/candidhealth/financials/types/claim_allocation_target.rb
|
294
295
|
- lib/candidhealth/financials/types/invoice_update.rb
|
@@ -453,6 +454,8 @@ files:
|
|
453
454
|
- lib/candidhealth/service_facility/client.rb
|
454
455
|
- lib/candidhealth/service_facility/types/encounter_service_facility.rb
|
455
456
|
- lib/candidhealth/service_facility/types/encounter_service_facility_base.rb
|
457
|
+
- lib/candidhealth/service_lines/client.rb
|
458
|
+
- lib/candidhealth/service_lines/v_2/client.rb
|
456
459
|
- lib/candidhealth/service_lines/v_2/types/denial_reason_content.rb
|
457
460
|
- lib/candidhealth/service_lines/v_2/types/drug_identification.rb
|
458
461
|
- lib/candidhealth/service_lines/v_2/types/measurement_unit_code.rb
|
@@ -460,8 +463,10 @@ files:
|
|
460
463
|
- lib/candidhealth/service_lines/v_2/types/service_line.rb
|
461
464
|
- lib/candidhealth/service_lines/v_2/types/service_line_adjustment.rb
|
462
465
|
- lib/candidhealth/service_lines/v_2/types/service_line_create.rb
|
466
|
+
- lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb
|
463
467
|
- lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb
|
464
468
|
- lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb
|
469
|
+
- lib/candidhealth/service_lines/v_2/types/service_line_update.rb
|
465
470
|
- lib/candidhealth/tags/types/tag.rb
|
466
471
|
- lib/candidhealth/tags/types/tag_color_enum.rb
|
467
472
|
- lib/candidhealth/tags/types/tag_create.rb
|