candidhealth 0.27.0 → 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/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/requests.rb +2 -2
- data/lib/types_export.rb +22 -0
- metadata +26 -2
@@ -3,6 +3,8 @@
|
|
3
3
|
require_relative "../../../../requests"
|
4
4
|
require_relative "types/mutable_patient"
|
5
5
|
require_relative "types/patient"
|
6
|
+
require_relative "../../common/types/sort_direction"
|
7
|
+
require_relative "types/patient_page"
|
6
8
|
require "json"
|
7
9
|
require "date"
|
8
10
|
require "async"
|
@@ -77,7 +79,7 @@ module CandidApiClient
|
|
77
79
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
78
80
|
# @example
|
79
81
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
80
|
-
# api.pre_encounter.patients.v_1.create(request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
|
82
|
+
# api.pre_encounter.patients.v_1.create(request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { }, hipaa_authorization: true }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
|
81
83
|
def create(request:, request_options: nil)
|
82
84
|
response = @request_client.conn.post do |req|
|
83
85
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -94,6 +96,44 @@ module CandidApiClient
|
|
94
96
|
CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: response.body)
|
95
97
|
end
|
96
98
|
|
99
|
+
# Searches for patients that match the query parameters.
|
100
|
+
#
|
101
|
+
# @param page_token [String]
|
102
|
+
# @param limit [Integer]
|
103
|
+
# @param sort_field [String]
|
104
|
+
# @param sort_direction [CandidApiClient::PreEncounter::Common::Types::SortDirection] Defaults to ascending.
|
105
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
106
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PatientPage]
|
107
|
+
# @example
|
108
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
109
|
+
# api.pre_encounter.patients.v_1.get_multi(
|
110
|
+
# page_token: "string",
|
111
|
+
# limit: 1,
|
112
|
+
# sort_field: "string",
|
113
|
+
# sort_direction: ASC
|
114
|
+
# )
|
115
|
+
def get_multi(page_token: nil, limit: nil, sort_field: nil, sort_direction: nil, request_options: nil)
|
116
|
+
response = @request_client.conn.get do |req|
|
117
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
118
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
119
|
+
req.headers = {
|
120
|
+
**(req.headers || {}),
|
121
|
+
**@request_client.get_headers,
|
122
|
+
**(request_options&.additional_headers || {})
|
123
|
+
}.compact
|
124
|
+
req.params = {
|
125
|
+
**(request_options&.additional_query_parameters || {}),
|
126
|
+
"page_token": page_token,
|
127
|
+
"limit": limit,
|
128
|
+
"sort_field": sort_field,
|
129
|
+
"sort_direction": sort_direction
|
130
|
+
}.compact
|
131
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
132
|
+
request_options: request_options)}/patients/v1/get_multi"
|
133
|
+
end
|
134
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::PatientPage.from_json(json_object: response.body)
|
135
|
+
end
|
136
|
+
|
97
137
|
# Gets a patient.
|
98
138
|
#
|
99
139
|
# @param id [String]
|
@@ -145,8 +185,8 @@ module CandidApiClient
|
|
145
185
|
end
|
146
186
|
end
|
147
187
|
|
148
|
-
# Updates a patient. The path must contain the most recent version to prevent
|
149
|
-
#
|
188
|
+
# Updates a patient. The path must contain the most recent version to prevent race
|
189
|
+
# conditions. Updating historic versions is not supported.
|
150
190
|
#
|
151
191
|
# @param id [String]
|
152
192
|
# @param version [String]
|
@@ -206,7 +246,7 @@ module CandidApiClient
|
|
206
246
|
# api.pre_encounter.patients.v_1.update(
|
207
247
|
# id: "string",
|
208
248
|
# version: "string",
|
209
|
-
# request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
|
249
|
+
# request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { }, hipaa_authorization: true }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
|
210
250
|
# )
|
211
251
|
def update(id:, version:, request:, request_options: nil)
|
212
252
|
response = @request_client.conn.put do |req|
|
@@ -225,9 +265,9 @@ module CandidApiClient
|
|
225
265
|
end
|
226
266
|
|
227
267
|
# Sets a patient as deactivated. The path must contain the most recent version to
|
228
|
-
# prevent
|
229
|
-
# updates via PUT to the patient will "reactivate" the patient and set
|
230
|
-
# deactivated flag to false.
|
268
|
+
# prevent race conditions. Deactivating historic versions is not supported.
|
269
|
+
# Subsequent updates via PUT to the patient will "reactivate" the patient and set
|
270
|
+
# the deactivated flag to false.
|
231
271
|
#
|
232
272
|
# @param id [String]
|
233
273
|
# @param version [String]
|
@@ -250,15 +290,16 @@ module CandidApiClient
|
|
250
290
|
end
|
251
291
|
end
|
252
292
|
|
253
|
-
#
|
293
|
+
# Returns a list of Patients based on the search criteria.
|
254
294
|
#
|
255
|
-
# @param
|
295
|
+
# @param mrn [String]
|
296
|
+
# @param similar_name_ordering [String] A string that is used to order similar names in search results.
|
256
297
|
# @param request_options [CandidApiClient::RequestOptions]
|
257
298
|
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Patient>]
|
258
299
|
# @example
|
259
300
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
260
|
-
# api.pre_encounter.patients.v_1.search(
|
261
|
-
def search(
|
301
|
+
# api.pre_encounter.patients.v_1.search(mrn: "string", similar_name_ordering: "string")
|
302
|
+
def search(mrn: nil, similar_name_ordering: nil, request_options: nil)
|
262
303
|
response = @request_client.conn.get do |req|
|
263
304
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
264
305
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -269,7 +310,8 @@ module CandidApiClient
|
|
269
310
|
}.compact
|
270
311
|
req.params = {
|
271
312
|
**(request_options&.additional_query_parameters || {}),
|
272
|
-
"
|
313
|
+
"mrn": mrn,
|
314
|
+
"similar_name_ordering": similar_name_ordering
|
273
315
|
}.compact
|
274
316
|
req.url "#{@request_client.get_url(environment: PreEncounter,
|
275
317
|
request_options: request_options)}/patients/v1"
|
@@ -377,7 +419,7 @@ module CandidApiClient
|
|
377
419
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
378
420
|
# @example
|
379
421
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
380
|
-
# api.pre_encounter.patients.v_1.create(request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
|
422
|
+
# api.pre_encounter.patients.v_1.create(request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { }, hipaa_authorization: true }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
|
381
423
|
def create(request:, request_options: nil)
|
382
424
|
Async do
|
383
425
|
response = @request_client.conn.post do |req|
|
@@ -396,6 +438,46 @@ module CandidApiClient
|
|
396
438
|
end
|
397
439
|
end
|
398
440
|
|
441
|
+
# Searches for patients that match the query parameters.
|
442
|
+
#
|
443
|
+
# @param page_token [String]
|
444
|
+
# @param limit [Integer]
|
445
|
+
# @param sort_field [String]
|
446
|
+
# @param sort_direction [CandidApiClient::PreEncounter::Common::Types::SortDirection] Defaults to ascending.
|
447
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
448
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PatientPage]
|
449
|
+
# @example
|
450
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
451
|
+
# api.pre_encounter.patients.v_1.get_multi(
|
452
|
+
# page_token: "string",
|
453
|
+
# limit: 1,
|
454
|
+
# sort_field: "string",
|
455
|
+
# sort_direction: ASC
|
456
|
+
# )
|
457
|
+
def get_multi(page_token: nil, limit: nil, sort_field: nil, sort_direction: nil, request_options: nil)
|
458
|
+
Async do
|
459
|
+
response = @request_client.conn.get do |req|
|
460
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
461
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
462
|
+
req.headers = {
|
463
|
+
**(req.headers || {}),
|
464
|
+
**@request_client.get_headers,
|
465
|
+
**(request_options&.additional_headers || {})
|
466
|
+
}.compact
|
467
|
+
req.params = {
|
468
|
+
**(request_options&.additional_query_parameters || {}),
|
469
|
+
"page_token": page_token,
|
470
|
+
"limit": limit,
|
471
|
+
"sort_field": sort_field,
|
472
|
+
"sort_direction": sort_direction
|
473
|
+
}.compact
|
474
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
475
|
+
request_options: request_options)}/patients/v1/get_multi"
|
476
|
+
end
|
477
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::PatientPage.from_json(json_object: response.body)
|
478
|
+
end
|
479
|
+
end
|
480
|
+
|
399
481
|
# Gets a patient.
|
400
482
|
#
|
401
483
|
# @param id [String]
|
@@ -451,8 +533,8 @@ module CandidApiClient
|
|
451
533
|
end
|
452
534
|
end
|
453
535
|
|
454
|
-
# Updates a patient. The path must contain the most recent version to prevent
|
455
|
-
#
|
536
|
+
# Updates a patient. The path must contain the most recent version to prevent race
|
537
|
+
# conditions. Updating historic versions is not supported.
|
456
538
|
#
|
457
539
|
# @param id [String]
|
458
540
|
# @param version [String]
|
@@ -512,7 +594,7 @@ module CandidApiClient
|
|
512
594
|
# api.pre_encounter.patients.v_1.update(
|
513
595
|
# id: "string",
|
514
596
|
# version: "string",
|
515
|
-
# request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { } }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
|
597
|
+
# request: { name: { }, other_names: [{ }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { }, other_addresses: [{ }], primary_telecom: { }, other_telecoms: [{ }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { }, telecoms: [{ }], addresses: [{ }], period: { }, hipaa_authorization: true }], general_practitioners: [{ }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
|
516
598
|
# )
|
517
599
|
def update(id:, version:, request:, request_options: nil)
|
518
600
|
Async do
|
@@ -533,9 +615,9 @@ module CandidApiClient
|
|
533
615
|
end
|
534
616
|
|
535
617
|
# Sets a patient as deactivated. The path must contain the most recent version to
|
536
|
-
# prevent
|
537
|
-
# updates via PUT to the patient will "reactivate" the patient and set
|
538
|
-
# deactivated flag to false.
|
618
|
+
# prevent race conditions. Deactivating historic versions is not supported.
|
619
|
+
# Subsequent updates via PUT to the patient will "reactivate" the patient and set
|
620
|
+
# the deactivated flag to false.
|
539
621
|
#
|
540
622
|
# @param id [String]
|
541
623
|
# @param version [String]
|
@@ -560,15 +642,16 @@ module CandidApiClient
|
|
560
642
|
end
|
561
643
|
end
|
562
644
|
|
563
|
-
#
|
645
|
+
# Returns a list of Patients based on the search criteria.
|
564
646
|
#
|
565
|
-
# @param
|
647
|
+
# @param mrn [String]
|
648
|
+
# @param similar_name_ordering [String] A string that is used to order similar names in search results.
|
566
649
|
# @param request_options [CandidApiClient::RequestOptions]
|
567
650
|
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Patient>]
|
568
651
|
# @example
|
569
652
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
570
|
-
# api.pre_encounter.patients.v_1.search(
|
571
|
-
def search(
|
653
|
+
# api.pre_encounter.patients.v_1.search(mrn: "string", similar_name_ordering: "string")
|
654
|
+
def search(mrn: nil, similar_name_ordering: nil, request_options: nil)
|
572
655
|
Async do
|
573
656
|
response = @request_client.conn.get do |req|
|
574
657
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -580,7 +663,8 @@ module CandidApiClient
|
|
580
663
|
}.compact
|
581
664
|
req.params = {
|
582
665
|
**(request_options&.additional_query_parameters || {}),
|
583
|
-
"
|
666
|
+
"mrn": mrn,
|
667
|
+
"similar_name_ordering": similar_name_ordering
|
584
668
|
}.compact
|
585
669
|
req.url "#{@request_client.get_url(environment: PreEncounter,
|
586
670
|
request_options: request_options)}/patients/v1"
|
@@ -24,6 +24,8 @@ module CandidApiClient
|
|
24
24
|
attr_reader :addresses
|
25
25
|
# @return [CandidApiClient::PreEncounter::Common::Types::Period]
|
26
26
|
attr_reader :period
|
27
|
+
# @return [Boolean]
|
28
|
+
attr_reader :hipaa_authorization
|
27
29
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
28
30
|
attr_reader :additional_properties
|
29
31
|
# @return [Object]
|
@@ -37,21 +39,25 @@ module CandidApiClient
|
|
37
39
|
# @param telecoms [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>]
|
38
40
|
# @param addresses [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
|
39
41
|
# @param period [CandidApiClient::PreEncounter::Common::Types::Period]
|
42
|
+
# @param hipaa_authorization [Boolean]
|
40
43
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
41
44
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Contact]
|
42
|
-
def initialize(relationship:, name:, telecoms:, addresses:, period: OMIT,
|
45
|
+
def initialize(relationship:, name:, telecoms:, addresses:, period: OMIT, hipaa_authorization: OMIT,
|
46
|
+
additional_properties: nil)
|
43
47
|
@relationship = relationship
|
44
48
|
@name = name
|
45
49
|
@telecoms = telecoms
|
46
50
|
@addresses = addresses
|
47
51
|
@period = period if period != OMIT
|
52
|
+
@hipaa_authorization = hipaa_authorization if hipaa_authorization != OMIT
|
48
53
|
@additional_properties = additional_properties
|
49
54
|
@_field_set = {
|
50
55
|
"relationship": relationship,
|
51
56
|
"name": name,
|
52
57
|
"telecoms": telecoms,
|
53
58
|
"addresses": addresses,
|
54
|
-
"period": period
|
59
|
+
"period": period,
|
60
|
+
"hipaa_authorization": hipaa_authorization
|
55
61
|
}.reject do |_k, v|
|
56
62
|
v == OMIT
|
57
63
|
end
|
@@ -85,12 +91,14 @@ module CandidApiClient
|
|
85
91
|
period = parsed_json["period"].to_json
|
86
92
|
period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
|
87
93
|
end
|
94
|
+
hipaa_authorization = struct["hipaa_authorization"]
|
88
95
|
new(
|
89
96
|
relationship: relationship,
|
90
97
|
name: name,
|
91
98
|
telecoms: telecoms,
|
92
99
|
addresses: addresses,
|
93
100
|
period: period,
|
101
|
+
hipaa_authorization: hipaa_authorization,
|
94
102
|
additional_properties: struct
|
95
103
|
)
|
96
104
|
end
|
@@ -114,6 +122,7 @@ module CandidApiClient
|
|
114
122
|
obj.telecoms.is_a?(Array) != false || raise("Passed value for field obj.telecoms is not the expected type, validation failed.")
|
115
123
|
obj.addresses.is_a?(Array) != false || raise("Passed value for field obj.addresses is not the expected type, validation failed.")
|
116
124
|
obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
|
125
|
+
obj.hipaa_authorization&.is_a?(Boolean) != false || raise("Passed value for field obj.hipaa_authorization is not the expected type, validation failed.")
|
117
126
|
end
|
118
127
|
end
|
119
128
|
end
|
@@ -29,7 +29,8 @@ module CandidApiClient
|
|
29
29
|
# contexts.
|
30
30
|
attr_reader :id
|
31
31
|
# @return [String] The medical record number for the patient. Human-friendly Candid generated MRNs
|
32
|
-
# are of the form
|
32
|
+
# are of the form "YYMMDDXXXX", where "YYYYMMDD" is the date of patient creation
|
33
|
+
# and "XXXX" is a zero-padded incrementing integer.
|
33
34
|
attr_reader :mrn
|
34
35
|
# @return [String] The organization that owns this patient.
|
35
36
|
attr_reader :organization_id
|
@@ -108,7 +109,8 @@ module CandidApiClient
|
|
108
109
|
# @param id [String] The unique UUID identifier for a Patient. Patient ID is used in machine
|
109
110
|
# contexts.
|
110
111
|
# @param mrn [String] The medical record number for the patient. Human-friendly Candid generated MRNs
|
111
|
-
# are of the form
|
112
|
+
# are of the form "YYMMDDXXXX", where "YYYYMMDD" is the date of patient creation
|
113
|
+
# and "XXXX" is a zero-padded incrementing integer.
|
112
114
|
# @param organization_id [String] The organization that owns this patient.
|
113
115
|
# @param deactivated [Boolean] True if the patient is deactivated. Deactivated patients are not returned in
|
114
116
|
# search results but are returned in all other endpoints including scan.
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "patient"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module Patients
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class PatientPage
|
13
|
+
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Patient>]
|
14
|
+
attr_reader :items
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :next_page_token
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :prev_page_token
|
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 items [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Patient>]
|
28
|
+
# @param next_page_token [String]
|
29
|
+
# @param prev_page_token [String]
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PatientPage]
|
32
|
+
def initialize(items:, next_page_token: OMIT, prev_page_token: OMIT, additional_properties: nil)
|
33
|
+
@items = items
|
34
|
+
@next_page_token = next_page_token if next_page_token != OMIT
|
35
|
+
@prev_page_token = prev_page_token if prev_page_token != OMIT
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = {
|
38
|
+
"items": items,
|
39
|
+
"next_page_token": next_page_token,
|
40
|
+
"prev_page_token": prev_page_token
|
41
|
+
}.reject do |_k, v|
|
42
|
+
v == OMIT
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Deserialize a JSON object to an instance of PatientPage
|
47
|
+
#
|
48
|
+
# @param json_object [String]
|
49
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PatientPage]
|
50
|
+
def self.from_json(json_object:)
|
51
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
52
|
+
parsed_json = JSON.parse(json_object)
|
53
|
+
items = parsed_json["items"]&.map do |item|
|
54
|
+
item = item.to_json
|
55
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: item)
|
56
|
+
end
|
57
|
+
next_page_token = struct["next_page_token"]
|
58
|
+
prev_page_token = struct["prev_page_token"]
|
59
|
+
new(
|
60
|
+
items: items,
|
61
|
+
next_page_token: next_page_token,
|
62
|
+
prev_page_token: prev_page_token,
|
63
|
+
additional_properties: struct
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Serialize an instance of PatientPage to a JSON object
|
68
|
+
#
|
69
|
+
# @return [String]
|
70
|
+
def to_json(*_args)
|
71
|
+
@_field_set&.to_json
|
72
|
+
end
|
73
|
+
|
74
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
75
|
+
# hash and check each fields type against the current object's property
|
76
|
+
# definitions.
|
77
|
+
#
|
78
|
+
# @param obj [Object]
|
79
|
+
# @return [Void]
|
80
|
+
def self.validate_raw(obj:)
|
81
|
+
obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
|
82
|
+
obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
|
83
|
+
obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.")
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
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.28.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.28.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
@@ -252,6 +252,24 @@ require_relative "candidhealth/x_12/v_1/types/claim_adjustment_reason_code"
|
|
252
252
|
require_relative "candidhealth/x_12/v_1/types/remittance_advice_remark_code"
|
253
253
|
require_relative "candidhealth/x_12/v_1/types/carc"
|
254
254
|
require_relative "candidhealth/x_12/v_1/types/rarc"
|
255
|
+
require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment_work_queue"
|
256
|
+
require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment_sort_field"
|
257
|
+
require_relative "candidhealth/pre_encounter/appointments/v_1/types/universal_service_identifier"
|
258
|
+
require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment_reason"
|
259
|
+
require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment_type"
|
260
|
+
require_relative "candidhealth/pre_encounter/appointments/v_1/types/service"
|
261
|
+
require_relative "candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment"
|
262
|
+
require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment"
|
263
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata"
|
264
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response"
|
265
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check"
|
266
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_status"
|
267
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_value"
|
268
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_benefits"
|
269
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_coverage"
|
270
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details"
|
271
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_coverage"
|
272
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_coverage_details"
|
255
273
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/subscriber"
|
256
274
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_status"
|
257
275
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/network_type"
|
@@ -259,12 +277,14 @@ require_relative "candidhealth/pre_encounter/coverages/v_1/types/insurance_plan"
|
|
259
277
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage"
|
260
278
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage"
|
261
279
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code"
|
280
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_type_code"
|
262
281
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/marital_status"
|
263
282
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/external_provenance"
|
264
283
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/contact"
|
265
284
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/filing_order"
|
266
285
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/mutable_patient"
|
267
286
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/patient"
|
287
|
+
require_relative "candidhealth/pre_encounter/patients/v_1/types/patient_page"
|
268
288
|
require_relative "candidhealth/claims/types/claim"
|
269
289
|
require_relative "candidhealth/claims/types/claim_status"
|
270
290
|
require_relative "candidhealth/commons/types/primitive"
|
@@ -366,8 +386,10 @@ require_relative "candidhealth/pre_encounter/common/types/address"
|
|
366
386
|
require_relative "candidhealth/pre_encounter/common/types/period"
|
367
387
|
require_relative "candidhealth/pre_encounter/common/types/contact_point_use"
|
368
388
|
require_relative "candidhealth/pre_encounter/common/types/contact_point"
|
389
|
+
require_relative "candidhealth/pre_encounter/common/types/resource_page"
|
369
390
|
require_relative "candidhealth/pre_encounter/common/types/error_base"
|
370
391
|
require_relative "candidhealth/pre_encounter/common/types/not_found_error_body"
|
371
392
|
require_relative "candidhealth/pre_encounter/common/types/version_conflict_error_body"
|
372
393
|
require_relative "candidhealth/pre_encounter/common/types/external_provider_type"
|
373
394
|
require_relative "candidhealth/pre_encounter/common/types/external_provider"
|
395
|
+
require_relative "candidhealth/pre_encounter/common/types/sort_direction"
|
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.28.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-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -412,6 +412,16 @@ files:
|
|
412
412
|
- lib/candidhealth/payers/v_3/types/payer_identifier.rb
|
413
413
|
- lib/candidhealth/payers/v_3/types/payer_info.rb
|
414
414
|
- lib/candidhealth/payers/v_3/types/payer_page.rb
|
415
|
+
- lib/candidhealth/pre_encounter/appointments/client.rb
|
416
|
+
- lib/candidhealth/pre_encounter/appointments/v_1/client.rb
|
417
|
+
- lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb
|
418
|
+
- lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_reason.rb
|
419
|
+
- lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_sort_field.rb
|
420
|
+
- lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_type.rb
|
421
|
+
- lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_work_queue.rb
|
422
|
+
- lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb
|
423
|
+
- lib/candidhealth/pre_encounter/appointments/v_1/types/service.rb
|
424
|
+
- lib/candidhealth/pre_encounter/appointments/v_1/types/universal_service_identifier.rb
|
415
425
|
- lib/candidhealth/pre_encounter/client.rb
|
416
426
|
- lib/candidhealth/pre_encounter/common/types/address.rb
|
417
427
|
- lib/candidhealth/pre_encounter/common/types/address_use.rb
|
@@ -429,17 +439,30 @@ files:
|
|
429
439
|
- lib/candidhealth/pre_encounter/common/types/period.rb
|
430
440
|
- lib/candidhealth/pre_encounter/common/types/race.rb
|
431
441
|
- lib/candidhealth/pre_encounter/common/types/relationship.rb
|
442
|
+
- lib/candidhealth/pre_encounter/common/types/resource_page.rb
|
432
443
|
- lib/candidhealth/pre_encounter/common/types/sex.rb
|
433
444
|
- lib/candidhealth/pre_encounter/common/types/sexual_orientation.rb
|
445
|
+
- lib/candidhealth/pre_encounter/common/types/sort_direction.rb
|
434
446
|
- lib/candidhealth/pre_encounter/common/types/version_conflict_error_body.rb
|
435
447
|
- lib/candidhealth/pre_encounter/coverages/client.rb
|
436
448
|
- lib/candidhealth/pre_encounter/coverages/v_1/client.rb
|
437
449
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb
|
450
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_benefits.rb
|
451
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response.rb
|
438
452
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_status.rb
|
453
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value.rb
|
454
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check.rb
|
455
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata.rb
|
456
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_status.rb
|
439
457
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb
|
440
458
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code.rb
|
441
459
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb
|
442
460
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/network_type.rb
|
461
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage.rb
|
462
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb
|
463
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage.rb
|
464
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage_details.rb
|
465
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/service_type_code.rb
|
443
466
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb
|
444
467
|
- lib/candidhealth/pre_encounter/patients/client.rb
|
445
468
|
- lib/candidhealth/pre_encounter/patients/v_1/client.rb
|
@@ -449,6 +472,7 @@ files:
|
|
449
472
|
- lib/candidhealth/pre_encounter/patients/v_1/types/marital_status.rb
|
450
473
|
- lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb
|
451
474
|
- lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb
|
475
|
+
- lib/candidhealth/pre_encounter/patients/v_1/types/patient_page.rb
|
452
476
|
- lib/candidhealth/remits/v_1/types/payee.rb
|
453
477
|
- lib/candidhealth/remits/v_1/types/payee_identifier.rb
|
454
478
|
- lib/candidhealth/service_facility/client.rb
|