candidhealth 0.39.6 → 0.39.8
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/commons/types/procedure_modifier.rb +1 -0
- data/lib/candidhealth/eligibility/v_2/client.rb +48 -6
- data/lib/candidhealth/fee_schedules/v_3/client.rb +16 -4
- data/lib/candidhealth/fee_schedules/v_3/types/dimension_match.rb +16 -2
- data/lib/candidhealth/fee_schedules/v_3/types/dimensions.rb +16 -2
- data/lib/candidhealth/fee_schedules/v_3/types/match_payer_plan_groups.rb +85 -0
- data/lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb +15 -2
- data/lib/candidhealth/fee_schedules/v_3/types/payer_plan_group_does_not_match_rate_payer_error.rb +75 -0
- data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +39 -14
- data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +4 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +98 -4
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +2 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +2 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/visit.rb +96 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/visits_page.rb +98 -0
- data/lib/candidhealth/pre_encounter/common/types/external_identifier.rb +87 -0
- data/lib/candidhealth/pre_encounter/common/types/external_provider.rb +10 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +89 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/address.rb +118 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefits_related_entity.rb +11 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverages_page.rb +98 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/expanded_member_info.rb +133 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +10 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code.rb +1 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/member_info.rb +93 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_metadata.rb +38 -3
- data/lib/candidhealth/pre_encounter/eligibility_checks/client.rb +32 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +124 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check.rb +119 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_request.rb +135 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_response.rb +15 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/encounter.rb +83 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/individual_provider.rb +81 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/organization_provider.rb +74 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/parsed_response.rb +99 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/provider.rb +66 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/request_correction.rb +79 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_item.rb +5 -5
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +70 -14
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +14 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +14 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +13 -1
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +18 -0
- metadata +22 -2
@@ -4,6 +4,7 @@ require "json"
|
|
4
4
|
require_relative "overlapping_rate_entries_error"
|
5
5
|
require_relative "../../../commons/types/entity_conflict_error_message"
|
6
6
|
require_relative "../../../commons/types/entity_not_found_error_message"
|
7
|
+
require_relative "payer_plan_group_does_not_match_rate_payer_error"
|
7
8
|
|
8
9
|
module CandidApiClient
|
9
10
|
module FeeSchedules
|
@@ -32,20 +33,24 @@ module CandidApiClient
|
|
32
33
|
# @return [CandidApiClient::FeeSchedules::V3::Types::ValidationError]
|
33
34
|
def self.from_json(json_object:)
|
34
35
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
36
|
+
case struct.type
|
37
|
+
when "overlapping_rate_entries"
|
38
|
+
member = CandidApiClient::FeeSchedules::V3::Types::OverlappingRateEntriesError.from_json(json_object: json_object)
|
39
|
+
when "version_conflict"
|
40
|
+
member = CandidApiClient::Commons::Types::EntityConflictErrorMessage.from_json(json_object: json_object)
|
41
|
+
when "organization_provider_not_found"
|
42
|
+
member = CandidApiClient::Commons::Types::EntityNotFoundErrorMessage.from_json(json_object: json_object)
|
43
|
+
when "duplicate_rate"
|
44
|
+
member = nil
|
45
|
+
when "empty_entries"
|
46
|
+
member = nil
|
47
|
+
when "payer_plan_group_not_found"
|
48
|
+
member = CandidApiClient::Commons::Types::EntityNotFoundErrorMessage.from_json(json_object: json_object)
|
49
|
+
when "payer_plan_group_does_not_match_rate_payer"
|
50
|
+
member = CandidApiClient::FeeSchedules::V3::Types::PayerPlanGroupDoesNotMatchRatePayerError.from_json(json_object: json_object)
|
51
|
+
else
|
52
|
+
member = CandidApiClient::FeeSchedules::V3::Types::OverlappingRateEntriesError.from_json(json_object: json_object)
|
53
|
+
end
|
49
54
|
new(member: member, discriminant: struct.type)
|
50
55
|
end
|
51
56
|
|
@@ -64,6 +69,10 @@ module CandidApiClient
|
|
64
69
|
{ type: @discriminant }.to_json
|
65
70
|
when "empty_entries"
|
66
71
|
{ type: @discriminant }.to_json
|
72
|
+
when "payer_plan_group_not_found"
|
73
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
74
|
+
when "payer_plan_group_does_not_match_rate_payer"
|
75
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
67
76
|
else
|
68
77
|
{ "type": @discriminant, value: @member }.to_json
|
69
78
|
end
|
@@ -88,6 +97,10 @@ module CandidApiClient
|
|
88
97
|
# noop
|
89
98
|
when "empty_entries"
|
90
99
|
# noop
|
100
|
+
when "payer_plan_group_not_found"
|
101
|
+
CandidApiClient::Commons::Types::EntityNotFoundErrorMessage.validate_raw(obj: obj)
|
102
|
+
when "payer_plan_group_does_not_match_rate_payer"
|
103
|
+
CandidApiClient::FeeSchedules::V3::Types::PayerPlanGroupDoesNotMatchRatePayerError.validate_raw(obj: obj)
|
91
104
|
else
|
92
105
|
raise("Passed value matched no type within the union, validation failed.")
|
93
106
|
end
|
@@ -128,6 +141,18 @@ module CandidApiClient
|
|
128
141
|
def self.empty_entries
|
129
142
|
new(member: nil, discriminant: "empty_entries")
|
130
143
|
end
|
144
|
+
|
145
|
+
# @param member [CandidApiClient::Commons::Types::EntityNotFoundErrorMessage]
|
146
|
+
# @return [CandidApiClient::FeeSchedules::V3::Types::ValidationError]
|
147
|
+
def self.payer_plan_group_not_found(member:)
|
148
|
+
new(member: member, discriminant: "payer_plan_group_not_found")
|
149
|
+
end
|
150
|
+
|
151
|
+
# @param member [CandidApiClient::FeeSchedules::V3::Types::PayerPlanGroupDoesNotMatchRatePayerError]
|
152
|
+
# @return [CandidApiClient::FeeSchedules::V3::Types::ValidationError]
|
153
|
+
def self.payer_plan_group_does_not_match_rate_payer(member:)
|
154
|
+
new(member: member, discriminant: "payer_plan_group_does_not_match_rate_payer")
|
155
|
+
end
|
131
156
|
end
|
132
157
|
end
|
133
158
|
end
|
@@ -3,6 +3,8 @@
|
|
3
3
|
require_relative "../../../../requests"
|
4
4
|
require_relative "types/mutable_appointment"
|
5
5
|
require_relative "types/appointment"
|
6
|
+
require_relative "../../common/types/sort_direction"
|
7
|
+
require_relative "types/visits_page"
|
6
8
|
require "json"
|
7
9
|
require "date"
|
8
10
|
require "async"
|
@@ -47,6 +49,7 @@ module CandidApiClient
|
|
47
49
|
# * :start (Date)
|
48
50
|
# * :end_ (Date)
|
49
51
|
# * :canonical_id (String)
|
52
|
+
# * :fax (String)
|
50
53
|
# * :estimated_copay_cents (Integer)
|
51
54
|
# * :estimated_patient_responsibility_cents (Integer)
|
52
55
|
# * :patient_deposit_cents (Integer)
|
@@ -59,7 +62,7 @@ module CandidApiClient
|
|
59
62
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
|
60
63
|
# @example
|
61
64
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
62
|
-
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE })
|
65
|
+
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE })
|
63
66
|
def create(request:, request_options: nil)
|
64
67
|
response = @request_client.conn.post do |req|
|
65
68
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -76,6 +79,49 @@ module CandidApiClient
|
|
76
79
|
CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment.from_json(json_object: response.body)
|
77
80
|
end
|
78
81
|
|
82
|
+
# Gets all Visits within a given time range. The return list is ordered by
|
83
|
+
# start_time ascending.
|
84
|
+
#
|
85
|
+
# @param page_token [String]
|
86
|
+
# @param limit [Integer]
|
87
|
+
# @param sort_field [String] Defaults to appointment.start_time.
|
88
|
+
# @param sort_direction [CandidApiClient::PreEncounter::Common::Types::SortDirection] Defaults to ascending.
|
89
|
+
# @param filters [String]
|
90
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
91
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::VisitsPage]
|
92
|
+
# @example
|
93
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
94
|
+
# api.pre_encounter.appointments.v_1.get_visits(
|
95
|
+
# page_token: "string",
|
96
|
+
# limit: 1,
|
97
|
+
# sort_field: "string",
|
98
|
+
# sort_direction: ASC,
|
99
|
+
# filters: "string"
|
100
|
+
# )
|
101
|
+
def get_visits(page_token: nil, limit: nil, sort_field: nil, sort_direction: nil, filters: nil,
|
102
|
+
request_options: nil)
|
103
|
+
response = @request_client.conn.get do |req|
|
104
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
105
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
106
|
+
req.headers = {
|
107
|
+
**(req.headers || {}),
|
108
|
+
**@request_client.get_headers,
|
109
|
+
**(request_options&.additional_headers || {})
|
110
|
+
}.compact
|
111
|
+
req.params = {
|
112
|
+
**(request_options&.additional_query_parameters || {}),
|
113
|
+
"page_token": page_token,
|
114
|
+
"limit": limit,
|
115
|
+
"sort_field": sort_field,
|
116
|
+
"sort_direction": sort_direction,
|
117
|
+
"filters": filters
|
118
|
+
}.compact
|
119
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
120
|
+
request_options: request_options)}/appointments/v1/visits"
|
121
|
+
end
|
122
|
+
CandidApiClient::PreEncounter::Appointments::V1::Types::VisitsPage.from_json(json_object: response.body)
|
123
|
+
end
|
124
|
+
|
79
125
|
# Gets an appointment.
|
80
126
|
#
|
81
127
|
# @param id [String]
|
@@ -155,6 +201,7 @@ module CandidApiClient
|
|
155
201
|
# * :start (Date)
|
156
202
|
# * :end_ (Date)
|
157
203
|
# * :canonical_id (String)
|
204
|
+
# * :fax (String)
|
158
205
|
# * :estimated_copay_cents (Integer)
|
159
206
|
# * :estimated_patient_responsibility_cents (Integer)
|
160
207
|
# * :patient_deposit_cents (Integer)
|
@@ -170,7 +217,7 @@ module CandidApiClient
|
|
170
217
|
# api.pre_encounter.appointments.v_1.update(
|
171
218
|
# id: "string",
|
172
219
|
# version: "string",
|
173
|
-
# request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE }
|
220
|
+
# request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE }
|
174
221
|
# )
|
175
222
|
def update(id:, version:, request:, request_options: nil)
|
176
223
|
response = @request_client.conn.put do |req|
|
@@ -280,6 +327,7 @@ module CandidApiClient
|
|
280
327
|
# * :start (Date)
|
281
328
|
# * :end_ (Date)
|
282
329
|
# * :canonical_id (String)
|
330
|
+
# * :fax (String)
|
283
331
|
# * :estimated_copay_cents (Integer)
|
284
332
|
# * :estimated_patient_responsibility_cents (Integer)
|
285
333
|
# * :patient_deposit_cents (Integer)
|
@@ -292,7 +340,7 @@ module CandidApiClient
|
|
292
340
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
|
293
341
|
# @example
|
294
342
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
295
|
-
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE })
|
343
|
+
# api.pre_encounter.appointments.v_1.create(request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE })
|
296
344
|
def create(request:, request_options: nil)
|
297
345
|
Async do
|
298
346
|
response = @request_client.conn.post do |req|
|
@@ -311,6 +359,51 @@ module CandidApiClient
|
|
311
359
|
end
|
312
360
|
end
|
313
361
|
|
362
|
+
# Gets all Visits within a given time range. The return list is ordered by
|
363
|
+
# start_time ascending.
|
364
|
+
#
|
365
|
+
# @param page_token [String]
|
366
|
+
# @param limit [Integer]
|
367
|
+
# @param sort_field [String] Defaults to appointment.start_time.
|
368
|
+
# @param sort_direction [CandidApiClient::PreEncounter::Common::Types::SortDirection] Defaults to ascending.
|
369
|
+
# @param filters [String]
|
370
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
371
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::VisitsPage]
|
372
|
+
# @example
|
373
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
374
|
+
# api.pre_encounter.appointments.v_1.get_visits(
|
375
|
+
# page_token: "string",
|
376
|
+
# limit: 1,
|
377
|
+
# sort_field: "string",
|
378
|
+
# sort_direction: ASC,
|
379
|
+
# filters: "string"
|
380
|
+
# )
|
381
|
+
def get_visits(page_token: nil, limit: nil, sort_field: nil, sort_direction: nil, filters: nil,
|
382
|
+
request_options: nil)
|
383
|
+
Async do
|
384
|
+
response = @request_client.conn.get do |req|
|
385
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
386
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
387
|
+
req.headers = {
|
388
|
+
**(req.headers || {}),
|
389
|
+
**@request_client.get_headers,
|
390
|
+
**(request_options&.additional_headers || {})
|
391
|
+
}.compact
|
392
|
+
req.params = {
|
393
|
+
**(request_options&.additional_query_parameters || {}),
|
394
|
+
"page_token": page_token,
|
395
|
+
"limit": limit,
|
396
|
+
"sort_field": sort_field,
|
397
|
+
"sort_direction": sort_direction,
|
398
|
+
"filters": filters
|
399
|
+
}.compact
|
400
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
401
|
+
request_options: request_options)}/appointments/v1/visits"
|
402
|
+
end
|
403
|
+
CandidApiClient::PreEncounter::Appointments::V1::Types::VisitsPage.from_json(json_object: response.body)
|
404
|
+
end
|
405
|
+
end
|
406
|
+
|
314
407
|
# Gets an appointment.
|
315
408
|
#
|
316
409
|
# @param id [String]
|
@@ -394,6 +487,7 @@ module CandidApiClient
|
|
394
487
|
# * :start (Date)
|
395
488
|
# * :end_ (Date)
|
396
489
|
# * :canonical_id (String)
|
490
|
+
# * :fax (String)
|
397
491
|
# * :estimated_copay_cents (Integer)
|
398
492
|
# * :estimated_patient_responsibility_cents (Integer)
|
399
493
|
# * :patient_deposit_cents (Integer)
|
@@ -409,7 +503,7 @@ module CandidApiClient
|
|
409
503
|
# api.pre_encounter.appointments.v_1.update(
|
410
504
|
# id: "string",
|
411
505
|
# version: "string",
|
412
|
-
# request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE }
|
506
|
+
# request: { patient_id: "string", start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), status: PENDING, service_duration: 1, services: [{ universal_service_identifier: MD_VISIT, start_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z) }], placer_appointment_id: "string", attending_doctor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, estimated_copay_cents: 1, estimated_patient_responsibility_cents: 1, patient_deposit_cents: 1, checked_in_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), notes: "string", location_resource_id: "string", automated_eligibility_check_complete: true, work_queue: EMERGENT_ISSUE }
|
413
507
|
# )
|
414
508
|
def update(id:, version:, request:, request_options: nil)
|
415
509
|
Async do
|
@@ -70,7 +70,7 @@ module CandidApiClient
|
|
70
70
|
attr_reader :automated_eligibility_check_complete
|
71
71
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue] The work queue that the appointment belongs to. It is not recommended to change
|
72
72
|
# this value manually via API. If status is NOT_READY, work_queue must be set. If
|
73
|
-
# status is READY
|
73
|
+
# status is READY, work_queue must be null.
|
74
74
|
attr_reader :work_queue
|
75
75
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
76
76
|
attr_reader :additional_properties
|
@@ -115,7 +115,7 @@ module CandidApiClient
|
|
115
115
|
# appointment.
|
116
116
|
# @param work_queue [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue] The work queue that the appointment belongs to. It is not recommended to change
|
117
117
|
# this value manually via API. If status is NOT_READY, work_queue must be set. If
|
118
|
-
# status is READY
|
118
|
+
# status is READY, work_queue must be null.
|
119
119
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
120
120
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
|
121
121
|
def initialize(id:, organization_id:, deactivated:, version:, updated_at:, updating_user_id:, patient_id:,
|
@@ -56,7 +56,7 @@ module CandidApiClient
|
|
56
56
|
attr_reader :automated_eligibility_check_complete
|
57
57
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue] The work queue that the appointment belongs to. It is not recommended to change
|
58
58
|
# this value manually via API. If status is NOT_READY, work_queue must be set. If
|
59
|
-
# status is READY
|
59
|
+
# status is READY, work_queue must be null.
|
60
60
|
attr_reader :work_queue
|
61
61
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
62
62
|
attr_reader :additional_properties
|
@@ -93,7 +93,7 @@ module CandidApiClient
|
|
93
93
|
# appointment.
|
94
94
|
# @param work_queue [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue] The work queue that the appointment belongs to. It is not recommended to change
|
95
95
|
# this value manually via API. If status is NOT_READY, work_queue must be set. If
|
96
|
-
# status is READY
|
96
|
+
# status is READY, work_queue must be null.
|
97
97
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
98
98
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::MutableAppointment]
|
99
99
|
def initialize(patient_id:, start_timestamp:, service_duration:, services:, status: OMIT,
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../patients/v_1/types/mutable_patient_with_mrn"
|
4
|
+
require "date"
|
5
|
+
require_relative "appointment_status"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module PreEncounter
|
11
|
+
module Appointments
|
12
|
+
module V1
|
13
|
+
module Types
|
14
|
+
# A visit is a collection of appointments that occur on the same day.
|
15
|
+
class Visit
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :patient_id
|
18
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn]
|
19
|
+
attr_reader :patient
|
20
|
+
# @return [DateTime]
|
21
|
+
attr_reader :start_time
|
22
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus]
|
23
|
+
attr_reader :status
|
24
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
attr_reader :additional_properties
|
26
|
+
# @return [Object]
|
27
|
+
attr_reader :_field_set
|
28
|
+
protected :_field_set
|
29
|
+
|
30
|
+
OMIT = Object.new
|
31
|
+
|
32
|
+
# @param patient_id [String]
|
33
|
+
# @param patient [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn]
|
34
|
+
# @param start_time [DateTime]
|
35
|
+
# @param status [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus]
|
36
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
37
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Visit]
|
38
|
+
def initialize(patient_id:, patient:, start_time:, status:, additional_properties: nil)
|
39
|
+
@patient_id = patient_id
|
40
|
+
@patient = patient
|
41
|
+
@start_time = start_time
|
42
|
+
@status = status
|
43
|
+
@additional_properties = additional_properties
|
44
|
+
@_field_set = { "patient_id": patient_id, "patient": patient, "start_time": start_time, "status": status }
|
45
|
+
end
|
46
|
+
|
47
|
+
# Deserialize a JSON object to an instance of Visit
|
48
|
+
#
|
49
|
+
# @param json_object [String]
|
50
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Visit]
|
51
|
+
def self.from_json(json_object:)
|
52
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
53
|
+
parsed_json = JSON.parse(json_object)
|
54
|
+
patient_id = struct["patient_id"]
|
55
|
+
if parsed_json["patient"].nil?
|
56
|
+
patient = nil
|
57
|
+
else
|
58
|
+
patient = parsed_json["patient"].to_json
|
59
|
+
patient = CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn.from_json(json_object: patient)
|
60
|
+
end
|
61
|
+
start_time = (DateTime.parse(parsed_json["start_time"]) unless parsed_json["start_time"].nil?)
|
62
|
+
status = struct["status"]
|
63
|
+
new(
|
64
|
+
patient_id: patient_id,
|
65
|
+
patient: patient,
|
66
|
+
start_time: start_time,
|
67
|
+
status: status,
|
68
|
+
additional_properties: struct
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
# Serialize an instance of Visit to a JSON object
|
73
|
+
#
|
74
|
+
# @return [String]
|
75
|
+
def to_json(*_args)
|
76
|
+
@_field_set&.to_json
|
77
|
+
end
|
78
|
+
|
79
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
80
|
+
# hash and check each fields type against the current object's property
|
81
|
+
# definitions.
|
82
|
+
#
|
83
|
+
# @param obj [Object]
|
84
|
+
# @return [Void]
|
85
|
+
def self.validate_raw(obj:)
|
86
|
+
obj.patient_id.is_a?(String) != false || raise("Passed value for field obj.patient_id is not the expected type, validation failed.")
|
87
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn.validate_raw(obj: obj.patient)
|
88
|
+
obj.start_time.is_a?(DateTime) != false || raise("Passed value for field obj.start_time is not the expected type, validation failed.")
|
89
|
+
obj.status.is_a?(CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "visit"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module Appointments
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class VisitsPage
|
13
|
+
# @return [Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Visit>]
|
14
|
+
attr_reader :items
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :next_page_token
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :prev_page_token
|
19
|
+
# @return [Integer]
|
20
|
+
attr_reader :total
|
21
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
+
attr_reader :additional_properties
|
23
|
+
# @return [Object]
|
24
|
+
attr_reader :_field_set
|
25
|
+
protected :_field_set
|
26
|
+
|
27
|
+
OMIT = Object.new
|
28
|
+
|
29
|
+
# @param items [Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Visit>]
|
30
|
+
# @param next_page_token [String]
|
31
|
+
# @param prev_page_token [String]
|
32
|
+
# @param total [Integer]
|
33
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
34
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::VisitsPage]
|
35
|
+
def initialize(items:, total:, next_page_token: OMIT, prev_page_token: OMIT, additional_properties: nil)
|
36
|
+
@items = items
|
37
|
+
@next_page_token = next_page_token if next_page_token != OMIT
|
38
|
+
@prev_page_token = prev_page_token if prev_page_token != OMIT
|
39
|
+
@total = total
|
40
|
+
@additional_properties = additional_properties
|
41
|
+
@_field_set = {
|
42
|
+
"items": items,
|
43
|
+
"next_page_token": next_page_token,
|
44
|
+
"prev_page_token": prev_page_token,
|
45
|
+
"total": total
|
46
|
+
}.reject do |_k, v|
|
47
|
+
v == OMIT
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Deserialize a JSON object to an instance of VisitsPage
|
52
|
+
#
|
53
|
+
# @param json_object [String]
|
54
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::VisitsPage]
|
55
|
+
def self.from_json(json_object:)
|
56
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
57
|
+
parsed_json = JSON.parse(json_object)
|
58
|
+
items = parsed_json["items"]&.map do |item|
|
59
|
+
item = item.to_json
|
60
|
+
CandidApiClient::PreEncounter::Appointments::V1::Types::Visit.from_json(json_object: item)
|
61
|
+
end
|
62
|
+
next_page_token = struct["next_page_token"]
|
63
|
+
prev_page_token = struct["prev_page_token"]
|
64
|
+
total = struct["total"]
|
65
|
+
new(
|
66
|
+
items: items,
|
67
|
+
next_page_token: next_page_token,
|
68
|
+
prev_page_token: prev_page_token,
|
69
|
+
total: total,
|
70
|
+
additional_properties: struct
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Serialize an instance of VisitsPage to a JSON object
|
75
|
+
#
|
76
|
+
# @return [String]
|
77
|
+
def to_json(*_args)
|
78
|
+
@_field_set&.to_json
|
79
|
+
end
|
80
|
+
|
81
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
82
|
+
# hash and check each fields type against the current object's property
|
83
|
+
# definitions.
|
84
|
+
#
|
85
|
+
# @param obj [Object]
|
86
|
+
# @return [Void]
|
87
|
+
def self.validate_raw(obj:)
|
88
|
+
obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
|
89
|
+
obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
|
90
|
+
obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.")
|
91
|
+
obj.total.is_a?(Integer) != false || raise("Passed value for field obj.total is not the expected type, validation failed.")
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "period"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module Common
|
10
|
+
module Types
|
11
|
+
# An external identifier for a patient
|
12
|
+
class ExternalIdentifier
|
13
|
+
# @return [String]
|
14
|
+
attr_reader :value
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :system
|
17
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Period]
|
18
|
+
attr_reader :period
|
19
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
20
|
+
attr_reader :additional_properties
|
21
|
+
# @return [Object]
|
22
|
+
attr_reader :_field_set
|
23
|
+
protected :_field_set
|
24
|
+
|
25
|
+
OMIT = Object.new
|
26
|
+
|
27
|
+
# @param value [String]
|
28
|
+
# @param system [String]
|
29
|
+
# @param period [CandidApiClient::PreEncounter::Common::Types::Period]
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier]
|
32
|
+
def initialize(value:, system:, period: OMIT, additional_properties: nil)
|
33
|
+
@value = value
|
34
|
+
@system = system
|
35
|
+
@period = period if period != OMIT
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = { "value": value, "system": system, "period": period }.reject do |_k, v|
|
38
|
+
v == OMIT
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Deserialize a JSON object to an instance of ExternalIdentifier
|
43
|
+
#
|
44
|
+
# @param json_object [String]
|
45
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier]
|
46
|
+
def self.from_json(json_object:)
|
47
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
48
|
+
parsed_json = JSON.parse(json_object)
|
49
|
+
value = struct["value"]
|
50
|
+
system = struct["system"]
|
51
|
+
if parsed_json["period"].nil?
|
52
|
+
period = nil
|
53
|
+
else
|
54
|
+
period = parsed_json["period"].to_json
|
55
|
+
period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
|
56
|
+
end
|
57
|
+
new(
|
58
|
+
value: value,
|
59
|
+
system: system,
|
60
|
+
period: period,
|
61
|
+
additional_properties: struct
|
62
|
+
)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Serialize an instance of ExternalIdentifier to a JSON object
|
66
|
+
#
|
67
|
+
# @return [String]
|
68
|
+
def to_json(*_args)
|
69
|
+
@_field_set&.to_json
|
70
|
+
end
|
71
|
+
|
72
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
73
|
+
# hash and check each fields type against the current object's property
|
74
|
+
# definitions.
|
75
|
+
#
|
76
|
+
# @param obj [Object]
|
77
|
+
# @return [Void]
|
78
|
+
def self.validate_raw(obj:)
|
79
|
+
obj.value.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
80
|
+
obj.system.is_a?(String) != false || raise("Passed value for field obj.system is not the expected type, validation failed.")
|
81
|
+
obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|