candidhealth 0.26.1 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/candidhealth/invoices/types/invoice.rb +169 -0
- data/lib/candidhealth/invoices/types/invoice_item.rb +68 -0
- data/lib/candidhealth/invoices/types/invoice_status.rb +16 -0
- data/lib/candidhealth/pre_encounter/appointments/client.rb +32 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +607 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +257 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_reason.rb +19 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_sort_field.rb +16 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_type.rb +17 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_work_queue.rb +17 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +203 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/service.rb +82 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/universal_service_identifier.rb +18 -0
- data/lib/candidhealth/pre_encounter/common/types/external_provider.rb +11 -2
- data/lib/candidhealth/pre_encounter/common/types/external_provider_type.rb +1 -0
- data/lib/candidhealth/pre_encounter/common/types/resource_page.rb +72 -0
- data/lib/candidhealth/pre_encounter/common/types/sort_direction.rb +14 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +267 -8
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +31 -3
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_benefits.rb +88 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response.rb +94 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value.rb +74 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check.rb +62 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb +103 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_status.rb +19 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code.rb +0 -1
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +31 -3
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage.rb +86 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb +124 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage.rb +98 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage_details.rb +124 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_type_code.rb +203 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +108 -24
- data/lib/candidhealth/pre_encounter/patients/v_1/types/contact.rb +11 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +4 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient_page.rb +90 -0
- data/lib/candidhealth/service_lines/v_2/client.rb +42 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +43 -1
- data/lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb +78 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +26 -0
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7050d2d13615c9d9359a7e99965bf683e999493aadf70fa3e5ca21f1b6391429
|
4
|
+
data.tar.gz: 611a6f45a868541ed4ce357362d1de00e80a4874f2ad48a308e4b4085730e427
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba37abbdb804ffd7677de1e6afab36a66da7189682e234fbb4c8fdc4978c95fe1ba5a485a48bc216aad7bdd10230fdc31c4e959f0d1483592b50034b55cb8aeb
|
7
|
+
data.tar.gz: e0bd6410a9c80169d683d5d8409101b0107b0578527d2e2927b38a628ff9689eae7d51d580f65904bcfc61e3ef358031baf395c90dc8f0e0cc51f467578232e8
|
@@ -0,0 +1,169 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "date"
|
4
|
+
require_relative "invoice_status"
|
5
|
+
require_relative "invoice_item"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module Invoices
|
11
|
+
module Types
|
12
|
+
class Invoice
|
13
|
+
# @return [String]
|
14
|
+
attr_reader :id
|
15
|
+
# @return [DateTime]
|
16
|
+
attr_reader :created_at
|
17
|
+
# @return [DateTime]
|
18
|
+
attr_reader :updated_at
|
19
|
+
# @return [String]
|
20
|
+
attr_reader :organzation_id
|
21
|
+
# @return [String]
|
22
|
+
attr_reader :source_id
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :source_customer_id
|
25
|
+
# @return [String]
|
26
|
+
attr_reader :patient_external_id
|
27
|
+
# @return [String]
|
28
|
+
attr_reader :note
|
29
|
+
# @return [String]
|
30
|
+
attr_reader :due_date
|
31
|
+
# @return [CandidApiClient::Invoices::Types::InvoiceStatus]
|
32
|
+
attr_reader :status
|
33
|
+
# @return [String]
|
34
|
+
attr_reader :url
|
35
|
+
# @return [String]
|
36
|
+
attr_reader :customer_invoice_url
|
37
|
+
# @return [Array<CandidApiClient::Invoices::Types::InvoiceItem>]
|
38
|
+
attr_reader :items
|
39
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
40
|
+
attr_reader :additional_properties
|
41
|
+
# @return [Object]
|
42
|
+
attr_reader :_field_set
|
43
|
+
protected :_field_set
|
44
|
+
|
45
|
+
OMIT = Object.new
|
46
|
+
|
47
|
+
# @param id [String]
|
48
|
+
# @param created_at [DateTime]
|
49
|
+
# @param updated_at [DateTime]
|
50
|
+
# @param organzation_id [String]
|
51
|
+
# @param source_id [String]
|
52
|
+
# @param source_customer_id [String]
|
53
|
+
# @param patient_external_id [String]
|
54
|
+
# @param note [String]
|
55
|
+
# @param due_date [String]
|
56
|
+
# @param status [CandidApiClient::Invoices::Types::InvoiceStatus]
|
57
|
+
# @param url [String]
|
58
|
+
# @param customer_invoice_url [String]
|
59
|
+
# @param items [Array<CandidApiClient::Invoices::Types::InvoiceItem>]
|
60
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
61
|
+
# @return [CandidApiClient::Invoices::Types::Invoice]
|
62
|
+
def initialize(id:, created_at:, updated_at:, organzation_id:, source_id:, source_customer_id:,
|
63
|
+
patient_external_id:, due_date:, status:, items:, note: OMIT, url: OMIT, customer_invoice_url: OMIT, additional_properties: nil)
|
64
|
+
@id = id
|
65
|
+
@created_at = created_at
|
66
|
+
@updated_at = updated_at
|
67
|
+
@organzation_id = organzation_id
|
68
|
+
@source_id = source_id
|
69
|
+
@source_customer_id = source_customer_id
|
70
|
+
@patient_external_id = patient_external_id
|
71
|
+
@note = note if note != OMIT
|
72
|
+
@due_date = due_date
|
73
|
+
@status = status
|
74
|
+
@url = url if url != OMIT
|
75
|
+
@customer_invoice_url = customer_invoice_url if customer_invoice_url != OMIT
|
76
|
+
@items = items
|
77
|
+
@additional_properties = additional_properties
|
78
|
+
@_field_set = {
|
79
|
+
"id": id,
|
80
|
+
"created_at": created_at,
|
81
|
+
"updated_at": updated_at,
|
82
|
+
"organzation_id": organzation_id,
|
83
|
+
"source_id": source_id,
|
84
|
+
"source_customer_id": source_customer_id,
|
85
|
+
"patient_external_id": patient_external_id,
|
86
|
+
"note": note,
|
87
|
+
"due_date": due_date,
|
88
|
+
"status": status,
|
89
|
+
"url": url,
|
90
|
+
"customer_invoice_url": customer_invoice_url,
|
91
|
+
"items": items
|
92
|
+
}.reject do |_k, v|
|
93
|
+
v == OMIT
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# Deserialize a JSON object to an instance of Invoice
|
98
|
+
#
|
99
|
+
# @param json_object [String]
|
100
|
+
# @return [CandidApiClient::Invoices::Types::Invoice]
|
101
|
+
def self.from_json(json_object:)
|
102
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
103
|
+
parsed_json = JSON.parse(json_object)
|
104
|
+
id = struct["id"]
|
105
|
+
created_at = (DateTime.parse(parsed_json["created_at"]) unless parsed_json["created_at"].nil?)
|
106
|
+
updated_at = (DateTime.parse(parsed_json["updated_at"]) unless parsed_json["updated_at"].nil?)
|
107
|
+
organzation_id = struct["organzation_id"]
|
108
|
+
source_id = struct["source_id"]
|
109
|
+
source_customer_id = struct["source_customer_id"]
|
110
|
+
patient_external_id = struct["patient_external_id"]
|
111
|
+
note = struct["note"]
|
112
|
+
due_date = struct["due_date"]
|
113
|
+
status = struct["status"]
|
114
|
+
url = struct["url"]
|
115
|
+
customer_invoice_url = struct["customer_invoice_url"]
|
116
|
+
items = parsed_json["items"]&.map do |item|
|
117
|
+
item = item.to_json
|
118
|
+
CandidApiClient::Invoices::Types::InvoiceItem.from_json(json_object: item)
|
119
|
+
end
|
120
|
+
new(
|
121
|
+
id: id,
|
122
|
+
created_at: created_at,
|
123
|
+
updated_at: updated_at,
|
124
|
+
organzation_id: organzation_id,
|
125
|
+
source_id: source_id,
|
126
|
+
source_customer_id: source_customer_id,
|
127
|
+
patient_external_id: patient_external_id,
|
128
|
+
note: note,
|
129
|
+
due_date: due_date,
|
130
|
+
status: status,
|
131
|
+
url: url,
|
132
|
+
customer_invoice_url: customer_invoice_url,
|
133
|
+
items: items,
|
134
|
+
additional_properties: struct
|
135
|
+
)
|
136
|
+
end
|
137
|
+
|
138
|
+
# Serialize an instance of Invoice to a JSON object
|
139
|
+
#
|
140
|
+
# @return [String]
|
141
|
+
def to_json(*_args)
|
142
|
+
@_field_set&.to_json
|
143
|
+
end
|
144
|
+
|
145
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
146
|
+
# hash and check each fields type against the current object's property
|
147
|
+
# definitions.
|
148
|
+
#
|
149
|
+
# @param obj [Object]
|
150
|
+
# @return [Void]
|
151
|
+
def self.validate_raw(obj:)
|
152
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
153
|
+
obj.created_at.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
|
154
|
+
obj.updated_at.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.")
|
155
|
+
obj.organzation_id.is_a?(String) != false || raise("Passed value for field obj.organzation_id is not the expected type, validation failed.")
|
156
|
+
obj.source_id.is_a?(String) != false || raise("Passed value for field obj.source_id is not the expected type, validation failed.")
|
157
|
+
obj.source_customer_id.is_a?(String) != false || raise("Passed value for field obj.source_customer_id is not the expected type, validation failed.")
|
158
|
+
obj.patient_external_id.is_a?(String) != false || raise("Passed value for field obj.patient_external_id is not the expected type, validation failed.")
|
159
|
+
obj.note&.is_a?(String) != false || raise("Passed value for field obj.note is not the expected type, validation failed.")
|
160
|
+
obj.due_date.is_a?(String) != false || raise("Passed value for field obj.due_date is not the expected type, validation failed.")
|
161
|
+
obj.status.is_a?(CandidApiClient::Invoices::Types::InvoiceStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
162
|
+
obj.url&.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
|
163
|
+
obj.customer_invoice_url&.is_a?(String) != false || raise("Passed value for field obj.customer_invoice_url is not the expected type, validation failed.")
|
164
|
+
obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module Invoices
|
8
|
+
module Types
|
9
|
+
class InvoiceItem
|
10
|
+
# @return [String]
|
11
|
+
attr_reader :service_line_id
|
12
|
+
# @return [Integer]
|
13
|
+
attr_reader :amount_cents
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
|
+
attr_reader :additional_properties
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :_field_set
|
18
|
+
protected :_field_set
|
19
|
+
|
20
|
+
OMIT = Object.new
|
21
|
+
|
22
|
+
# @param service_line_id [String]
|
23
|
+
# @param amount_cents [Integer]
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [CandidApiClient::Invoices::Types::InvoiceItem]
|
26
|
+
def initialize(service_line_id:, amount_cents:, additional_properties: nil)
|
27
|
+
@service_line_id = service_line_id
|
28
|
+
@amount_cents = amount_cents
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "service_line_id": service_line_id, "amount_cents": amount_cents }
|
31
|
+
end
|
32
|
+
|
33
|
+
# Deserialize a JSON object to an instance of InvoiceItem
|
34
|
+
#
|
35
|
+
# @param json_object [String]
|
36
|
+
# @return [CandidApiClient::Invoices::Types::InvoiceItem]
|
37
|
+
def self.from_json(json_object:)
|
38
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
39
|
+
service_line_id = struct["service_line_id"]
|
40
|
+
amount_cents = struct["amount_cents"]
|
41
|
+
new(
|
42
|
+
service_line_id: service_line_id,
|
43
|
+
amount_cents: amount_cents,
|
44
|
+
additional_properties: struct
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Serialize an instance of InvoiceItem to a JSON object
|
49
|
+
#
|
50
|
+
# @return [String]
|
51
|
+
def to_json(*_args)
|
52
|
+
@_field_set&.to_json
|
53
|
+
end
|
54
|
+
|
55
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
56
|
+
# hash and check each fields type against the current object's property
|
57
|
+
# definitions.
|
58
|
+
#
|
59
|
+
# @param obj [Object]
|
60
|
+
# @return [Void]
|
61
|
+
def self.validate_raw(obj:)
|
62
|
+
obj.service_line_id.is_a?(String) != false || raise("Passed value for field obj.service_line_id is not the expected type, validation failed.")
|
63
|
+
obj.amount_cents.is_a?(Integer) != false || raise("Passed value for field obj.amount_cents is not the expected type, validation failed.")
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module Invoices
|
5
|
+
module Types
|
6
|
+
class InvoiceStatus
|
7
|
+
DRAFT = "draft"
|
8
|
+
OPEN = "open"
|
9
|
+
PAID = "paid"
|
10
|
+
VOID = "void"
|
11
|
+
UNCOLLECTIBLE = "uncollectible"
|
12
|
+
HELD = "held"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../requests"
|
4
|
+
require_relative "v_1/client"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PreEncounter
|
8
|
+
module Appointments
|
9
|
+
class Client
|
10
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::V1Client]
|
11
|
+
attr_reader :v_1
|
12
|
+
|
13
|
+
# @param request_client [CandidApiClient::RequestClient]
|
14
|
+
# @return [CandidApiClient::PreEncounter::Appointments::Client]
|
15
|
+
def initialize(request_client:)
|
16
|
+
@v_1 = CandidApiClient::PreEncounter::Appointments::V1::V1Client.new(request_client: request_client)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class AsyncClient
|
21
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::AsyncV1Client]
|
22
|
+
attr_reader :v_1
|
23
|
+
|
24
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
25
|
+
# @return [CandidApiClient::PreEncounter::Appointments::AsyncClient]
|
26
|
+
def initialize(request_client:)
|
27
|
+
@v_1 = CandidApiClient::PreEncounter::Appointments::V1::AsyncV1Client.new(request_client: request_client)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|