candidhealth 0.35.1 → 0.35.2
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/credentialing/v_2/client.rb +18 -6
- data/lib/candidhealth/pre_encounter/common/types/{not_found_error_body.rb → error_base_4_xx.rb} +16 -14
- data/lib/candidhealth/pre_encounter/common/types/version_conflict_error_body.rb +13 -11
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +2 -2
- data/lib/candidhealth/x_12/v_1/types/rarc.rb +1 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +1 -5
- metadata +3 -7
- data/lib/candidhealth/pre_encounter/common/types/error_base.rb +0 -60
- data/lib/candidhealth/pre_encounter/patients/v_1/types/invalid_mrn_error_body.rb +0 -72
- data/lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patient.rb +0 -72
- data/lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patients_error_body.rb +0 -84
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa540971de2f66292e9c032827b1414c52b67ef20ac20c63903b4b985f2d37f4
|
4
|
+
data.tar.gz: 391cdb4f9b8ae154e1c72851e3cd8a962f9bd2910875935481462ae67d6dda2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 181f2f66cce5f5650b4e443bfa316ecfa2a56a5f5b9b6afeae8d373cef2bdad1fddae6030521231fe4605e47db964a4cb771f61c3c6a40b9d4b3b92451f62567
|
7
|
+
data.tar.gz: eefe71988e38d5fbcd6aa78fcf5cf9d5b3c05dcdecabe415e73c73ce71c5339a27cf1c67638d80cdd4457817264fa082a0658c1ca33fa1ad722c484058473b2a
|
@@ -94,8 +94,12 @@ module CandidApiClient
|
|
94
94
|
# @param limit [Integer] Maximum number of entities per page, defaults to 100.
|
95
95
|
# @param page_token [String]
|
96
96
|
# @param payer_uuid [String] Filter by payer.
|
97
|
-
# @param
|
98
|
-
#
|
97
|
+
# @param provider_id [String] Filter to a particular provider. Use in conjunction as_rendering_provider and
|
98
|
+
# as_contracting_provider.
|
99
|
+
# @param as_rendering_provider [Boolean] Filter to credentialing spans where the provider is a rendering provider. To use
|
100
|
+
# this filter provider_id is required.
|
101
|
+
# @param as_contracting_provider [Boolean] Filter to credentialing spans where the provider is a contracting provider. To
|
102
|
+
# use this filter provider_id is required.
|
99
103
|
# @param request_options [CandidApiClient::RequestOptions]
|
100
104
|
# @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage]
|
101
105
|
# @example
|
@@ -104,10 +108,11 @@ module CandidApiClient
|
|
104
108
|
# limit: 1,
|
105
109
|
# page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
|
106
110
|
# payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
111
|
+
# provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
107
112
|
# as_rendering_provider: true,
|
108
113
|
# as_contracting_provider: true
|
109
114
|
# )
|
110
|
-
def get_all(limit: nil, page_token: nil, payer_uuid: nil, as_rendering_provider: nil,
|
115
|
+
def get_all(limit: nil, page_token: nil, payer_uuid: nil, provider_id: nil, as_rendering_provider: nil,
|
111
116
|
as_contracting_provider: nil, request_options: nil)
|
112
117
|
response = @request_client.conn.get do |req|
|
113
118
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -122,6 +127,7 @@ module CandidApiClient
|
|
122
127
|
"limit": limit,
|
123
128
|
"page_token": page_token,
|
124
129
|
"payer_uuid": payer_uuid,
|
130
|
+
"provider_id": provider_id,
|
125
131
|
"as_rendering_provider": as_rendering_provider,
|
126
132
|
"as_contracting_provider": as_contracting_provider
|
127
133
|
}.compact
|
@@ -291,8 +297,12 @@ module CandidApiClient
|
|
291
297
|
# @param limit [Integer] Maximum number of entities per page, defaults to 100.
|
292
298
|
# @param page_token [String]
|
293
299
|
# @param payer_uuid [String] Filter by payer.
|
294
|
-
# @param
|
295
|
-
#
|
300
|
+
# @param provider_id [String] Filter to a particular provider. Use in conjunction as_rendering_provider and
|
301
|
+
# as_contracting_provider.
|
302
|
+
# @param as_rendering_provider [Boolean] Filter to credentialing spans where the provider is a rendering provider. To use
|
303
|
+
# this filter provider_id is required.
|
304
|
+
# @param as_contracting_provider [Boolean] Filter to credentialing spans where the provider is a contracting provider. To
|
305
|
+
# use this filter provider_id is required.
|
296
306
|
# @param request_options [CandidApiClient::RequestOptions]
|
297
307
|
# @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage]
|
298
308
|
# @example
|
@@ -301,10 +311,11 @@ module CandidApiClient
|
|
301
311
|
# limit: 1,
|
302
312
|
# page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
|
303
313
|
# payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
314
|
+
# provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
304
315
|
# as_rendering_provider: true,
|
305
316
|
# as_contracting_provider: true
|
306
317
|
# )
|
307
|
-
def get_all(limit: nil, page_token: nil, payer_uuid: nil, as_rendering_provider: nil,
|
318
|
+
def get_all(limit: nil, page_token: nil, payer_uuid: nil, provider_id: nil, as_rendering_provider: nil,
|
308
319
|
as_contracting_provider: nil, request_options: nil)
|
309
320
|
Async do
|
310
321
|
response = @request_client.conn.get do |req|
|
@@ -320,6 +331,7 @@ module CandidApiClient
|
|
320
331
|
"limit": limit,
|
321
332
|
"page_token": page_token,
|
322
333
|
"payer_uuid": payer_uuid,
|
334
|
+
"provider_id": provider_id,
|
323
335
|
"as_rendering_provider": as_rendering_provider,
|
324
336
|
"as_contracting_provider": as_contracting_provider
|
325
337
|
}.compact
|
data/lib/candidhealth/pre_encounter/common/types/{not_found_error_body.rb → error_base_4_xx.rb}
RENAMED
@@ -7,11 +7,11 @@ module CandidApiClient
|
|
7
7
|
module PreEncounter
|
8
8
|
module Common
|
9
9
|
module Types
|
10
|
-
class
|
11
|
-
# @return [String]
|
12
|
-
attr_reader :code
|
10
|
+
class ErrorBase4Xx
|
13
11
|
# @return [String]
|
14
12
|
attr_reader :message
|
13
|
+
# @return [Object]
|
14
|
+
attr_reader :data
|
15
15
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
16
|
attr_reader :additional_properties
|
17
17
|
# @return [Object]
|
@@ -20,33 +20,35 @@ module CandidApiClient
|
|
20
20
|
|
21
21
|
OMIT = Object.new
|
22
22
|
|
23
|
-
# @param code [String]
|
24
23
|
# @param message [String]
|
24
|
+
# @param data [Object]
|
25
25
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
-
# @return [CandidApiClient::PreEncounter::Common::Types::
|
27
|
-
def initialize(
|
28
|
-
@code = code
|
26
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ErrorBase4Xx]
|
27
|
+
def initialize(message:, data: OMIT, additional_properties: nil)
|
29
28
|
@message = message
|
29
|
+
@data = data if data != OMIT
|
30
30
|
@additional_properties = additional_properties
|
31
|
-
@_field_set = { "
|
31
|
+
@_field_set = { "message": message, "data": data }.reject do |_k, v|
|
32
|
+
v == OMIT
|
33
|
+
end
|
32
34
|
end
|
33
35
|
|
34
|
-
# Deserialize a JSON object to an instance of
|
36
|
+
# Deserialize a JSON object to an instance of ErrorBase4Xx
|
35
37
|
#
|
36
38
|
# @param json_object [String]
|
37
|
-
# @return [CandidApiClient::PreEncounter::Common::Types::
|
39
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ErrorBase4Xx]
|
38
40
|
def self.from_json(json_object:)
|
39
41
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
40
|
-
code = struct["code"]
|
41
42
|
message = struct["message"]
|
43
|
+
data = struct["data"]
|
42
44
|
new(
|
43
|
-
code: code,
|
44
45
|
message: message,
|
46
|
+
data: data,
|
45
47
|
additional_properties: struct
|
46
48
|
)
|
47
49
|
end
|
48
50
|
|
49
|
-
# Serialize an instance of
|
51
|
+
# Serialize an instance of ErrorBase4Xx to a JSON object
|
50
52
|
#
|
51
53
|
# @return [String]
|
52
54
|
def to_json(*_args)
|
@@ -60,8 +62,8 @@ module CandidApiClient
|
|
60
62
|
# @param obj [Object]
|
61
63
|
# @return [Void]
|
62
64
|
def self.validate_raw(obj:)
|
63
|
-
obj.code.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
64
65
|
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
66
|
+
obj.data&.is_a?(Object) != false || raise("Passed value for field obj.data is not the expected type, validation failed.")
|
65
67
|
end
|
66
68
|
end
|
67
69
|
end
|
@@ -8,12 +8,12 @@ module CandidApiClient
|
|
8
8
|
module Common
|
9
9
|
module Types
|
10
10
|
class VersionConflictErrorBody
|
11
|
-
# @return [String]
|
12
|
-
attr_reader :code
|
13
11
|
# @return [Integer]
|
14
12
|
attr_reader :latest_version
|
15
13
|
# @return [String]
|
16
14
|
attr_reader :message
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :data
|
17
17
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
18
|
attr_reader :additional_properties
|
19
19
|
# @return [Object]
|
@@ -22,17 +22,19 @@ module CandidApiClient
|
|
22
22
|
|
23
23
|
OMIT = Object.new
|
24
24
|
|
25
|
-
# @param code [String]
|
26
25
|
# @param latest_version [Integer]
|
27
26
|
# @param message [String]
|
27
|
+
# @param data [Object]
|
28
28
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
29
|
# @return [CandidApiClient::PreEncounter::Common::Types::VersionConflictErrorBody]
|
30
|
-
def initialize(
|
31
|
-
@
|
32
|
-
@latest_version = latest_version
|
30
|
+
def initialize(message:, latest_version: OMIT, data: OMIT, additional_properties: nil)
|
31
|
+
@latest_version = latest_version if latest_version != OMIT
|
33
32
|
@message = message
|
33
|
+
@data = data if data != OMIT
|
34
34
|
@additional_properties = additional_properties
|
35
|
-
@_field_set = { "
|
35
|
+
@_field_set = { "latest_version": latest_version, "message": message, "data": data }.reject do |_k, v|
|
36
|
+
v == OMIT
|
37
|
+
end
|
36
38
|
end
|
37
39
|
|
38
40
|
# Deserialize a JSON object to an instance of VersionConflictErrorBody
|
@@ -41,13 +43,13 @@ module CandidApiClient
|
|
41
43
|
# @return [CandidApiClient::PreEncounter::Common::Types::VersionConflictErrorBody]
|
42
44
|
def self.from_json(json_object:)
|
43
45
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
44
|
-
code = struct["code"]
|
45
46
|
latest_version = struct["latest_version"]
|
46
47
|
message = struct["message"]
|
48
|
+
data = struct["data"]
|
47
49
|
new(
|
48
|
-
code: code,
|
49
50
|
latest_version: latest_version,
|
50
51
|
message: message,
|
52
|
+
data: data,
|
51
53
|
additional_properties: struct
|
52
54
|
)
|
53
55
|
end
|
@@ -66,9 +68,9 @@ module CandidApiClient
|
|
66
68
|
# @param obj [Object]
|
67
69
|
# @return [Void]
|
68
70
|
def self.validate_raw(obj:)
|
69
|
-
obj.
|
70
|
-
obj.latest_version.is_a?(Integer) != false || raise("Passed value for field obj.latest_version is not the expected type, validation failed.")
|
71
|
+
obj.latest_version&.is_a?(Integer) != false || raise("Passed value for field obj.latest_version is not the expected type, validation failed.")
|
71
72
|
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
73
|
+
obj.data&.is_a?(Object) != false || raise("Passed value for field obj.data is not the expected type, validation failed.")
|
72
74
|
end
|
73
75
|
end
|
74
76
|
end
|
@@ -136,7 +136,7 @@ module CandidApiClient
|
|
136
136
|
end
|
137
137
|
|
138
138
|
# Adds a patient and hydrates their MRN with a pre-existing MRN. Once this patient
|
139
|
-
# is created their MRN will not be editable.
|
139
|
+
# is created their MRN will not be editable. BadRequestError is returned when the
|
140
140
|
# MRN is greater than 20 characters. VersionConflictError is returned when the
|
141
141
|
# patient's external ID is already in use.
|
142
142
|
#
|
@@ -667,7 +667,7 @@ module CandidApiClient
|
|
667
667
|
end
|
668
668
|
|
669
669
|
# Adds a patient and hydrates their MRN with a pre-existing MRN. Once this patient
|
670
|
-
# is created their MRN will not be editable.
|
670
|
+
# is created their MRN will not be editable. BadRequestError is returned when the
|
671
671
|
# MRN is greater than 20 characters. VersionConflictError is returned when the
|
672
672
|
# patient's external ID is already in use.
|
673
673
|
#
|
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.35.
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.35.2" }
|
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.35.
|
90
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.35.2" }
|
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
@@ -312,9 +312,6 @@ require_relative "candidhealth/pre_encounter/patients/v_1/types/mutable_patient"
|
|
312
312
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn"
|
313
313
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/patient"
|
314
314
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/patient_page"
|
315
|
-
require_relative "candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patient"
|
316
|
-
require_relative "candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patients_error_body"
|
317
|
-
require_relative "candidhealth/pre_encounter/patients/v_1/types/invalid_mrn_error_body"
|
318
315
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/authorization_unit"
|
319
316
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/authorization"
|
320
317
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/referral"
|
@@ -428,8 +425,7 @@ require_relative "candidhealth/pre_encounter/common/types/period"
|
|
428
425
|
require_relative "candidhealth/pre_encounter/common/types/contact_point_use"
|
429
426
|
require_relative "candidhealth/pre_encounter/common/types/contact_point"
|
430
427
|
require_relative "candidhealth/pre_encounter/common/types/resource_page"
|
431
|
-
require_relative "candidhealth/pre_encounter/common/types/
|
432
|
-
require_relative "candidhealth/pre_encounter/common/types/not_found_error_body"
|
428
|
+
require_relative "candidhealth/pre_encounter/common/types/error_base_4_xx"
|
433
429
|
require_relative "candidhealth/pre_encounter/common/types/version_conflict_error_body"
|
434
430
|
require_relative "candidhealth/pre_encounter/common/types/additional_payer_information"
|
435
431
|
require_relative "candidhealth/pre_encounter/common/types/external_provider_type"
|
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.35.
|
4
|
+
version: 0.35.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -475,14 +475,13 @@ files:
|
|
475
475
|
- lib/candidhealth/pre_encounter/common/types/contact_point.rb
|
476
476
|
- lib/candidhealth/pre_encounter/common/types/contact_point_use.rb
|
477
477
|
- lib/candidhealth/pre_encounter/common/types/disability_status.rb
|
478
|
-
- lib/candidhealth/pre_encounter/common/types/
|
478
|
+
- lib/candidhealth/pre_encounter/common/types/error_base_4_xx.rb
|
479
479
|
- lib/candidhealth/pre_encounter/common/types/ethnicity.rb
|
480
480
|
- lib/candidhealth/pre_encounter/common/types/external_provider.rb
|
481
481
|
- lib/candidhealth/pre_encounter/common/types/external_provider_type.rb
|
482
482
|
- lib/candidhealth/pre_encounter/common/types/gender.rb
|
483
483
|
- lib/candidhealth/pre_encounter/common/types/human_name.rb
|
484
484
|
- lib/candidhealth/pre_encounter/common/types/name_use.rb
|
485
|
-
- lib/candidhealth/pre_encounter/common/types/not_found_error_body.rb
|
486
485
|
- lib/candidhealth/pre_encounter/common/types/period.rb
|
487
486
|
- lib/candidhealth/pre_encounter/common/types/race.rb
|
488
487
|
- lib/candidhealth/pre_encounter/common/types/relationship.rb
|
@@ -534,14 +533,11 @@ files:
|
|
534
533
|
- lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb
|
535
534
|
- lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb
|
536
535
|
- lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb
|
537
|
-
- lib/candidhealth/pre_encounter/patients/v_1/types/invalid_mrn_error_body.rb
|
538
536
|
- lib/candidhealth/pre_encounter/patients/v_1/types/marital_status.rb
|
539
537
|
- lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb
|
540
538
|
- lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb
|
541
539
|
- lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb
|
542
540
|
- lib/candidhealth/pre_encounter/patients/v_1/types/patient_page.rb
|
543
|
-
- lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patient.rb
|
544
|
-
- lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patients_error_body.rb
|
545
541
|
- lib/candidhealth/pre_encounter/patients/v_1/types/referral.rb
|
546
542
|
- lib/candidhealth/remits/v_1/types/payee.rb
|
547
543
|
- lib/candidhealth/remits/v_1/types/payee_identifier.rb
|
@@ -1,60 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "ostruct"
|
4
|
-
require "json"
|
5
|
-
|
6
|
-
module CandidApiClient
|
7
|
-
module PreEncounter
|
8
|
-
module Common
|
9
|
-
module Types
|
10
|
-
class ErrorBase
|
11
|
-
# @return [String]
|
12
|
-
attr_reader :message
|
13
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
-
attr_reader :additional_properties
|
15
|
-
# @return [Object]
|
16
|
-
attr_reader :_field_set
|
17
|
-
protected :_field_set
|
18
|
-
|
19
|
-
OMIT = Object.new
|
20
|
-
|
21
|
-
# @param message [String]
|
22
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
-
# @return [CandidApiClient::PreEncounter::Common::Types::ErrorBase]
|
24
|
-
def initialize(message:, additional_properties: nil)
|
25
|
-
@message = message
|
26
|
-
@additional_properties = additional_properties
|
27
|
-
@_field_set = { "message": message }
|
28
|
-
end
|
29
|
-
|
30
|
-
# Deserialize a JSON object to an instance of ErrorBase
|
31
|
-
#
|
32
|
-
# @param json_object [String]
|
33
|
-
# @return [CandidApiClient::PreEncounter::Common::Types::ErrorBase]
|
34
|
-
def self.from_json(json_object:)
|
35
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
-
message = struct["message"]
|
37
|
-
new(message: message, additional_properties: struct)
|
38
|
-
end
|
39
|
-
|
40
|
-
# Serialize an instance of ErrorBase to a JSON object
|
41
|
-
#
|
42
|
-
# @return [String]
|
43
|
-
def to_json(*_args)
|
44
|
-
@_field_set&.to_json
|
45
|
-
end
|
46
|
-
|
47
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
-
# hash and check each fields type against the current object's property
|
49
|
-
# definitions.
|
50
|
-
#
|
51
|
-
# @param obj [Object]
|
52
|
-
# @return [Void]
|
53
|
-
def self.validate_raw(obj:)
|
54
|
-
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
@@ -1,72 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "ostruct"
|
4
|
-
require "json"
|
5
|
-
|
6
|
-
module CandidApiClient
|
7
|
-
module PreEncounter
|
8
|
-
module Patients
|
9
|
-
module V1
|
10
|
-
module Types
|
11
|
-
class InvalidMrnErrorBody
|
12
|
-
# @return [String]
|
13
|
-
attr_reader :code
|
14
|
-
# @return [String]
|
15
|
-
attr_reader :message
|
16
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
-
attr_reader :additional_properties
|
18
|
-
# @return [Object]
|
19
|
-
attr_reader :_field_set
|
20
|
-
protected :_field_set
|
21
|
-
|
22
|
-
OMIT = Object.new
|
23
|
-
|
24
|
-
# @param code [String]
|
25
|
-
# @param message [String]
|
26
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
-
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::InvalidMrnErrorBody]
|
28
|
-
def initialize(code:, message:, additional_properties: nil)
|
29
|
-
@code = code
|
30
|
-
@message = message
|
31
|
-
@additional_properties = additional_properties
|
32
|
-
@_field_set = { "code": code, "message": message }
|
33
|
-
end
|
34
|
-
|
35
|
-
# Deserialize a JSON object to an instance of InvalidMrnErrorBody
|
36
|
-
#
|
37
|
-
# @param json_object [String]
|
38
|
-
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::InvalidMrnErrorBody]
|
39
|
-
def self.from_json(json_object:)
|
40
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
-
code = struct["code"]
|
42
|
-
message = struct["message"]
|
43
|
-
new(
|
44
|
-
code: code,
|
45
|
-
message: message,
|
46
|
-
additional_properties: struct
|
47
|
-
)
|
48
|
-
end
|
49
|
-
|
50
|
-
# Serialize an instance of InvalidMrnErrorBody to a JSON object
|
51
|
-
#
|
52
|
-
# @return [String]
|
53
|
-
def to_json(*_args)
|
54
|
-
@_field_set&.to_json
|
55
|
-
end
|
56
|
-
|
57
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
58
|
-
# hash and check each fields type against the current object's property
|
59
|
-
# definitions.
|
60
|
-
#
|
61
|
-
# @param obj [Object]
|
62
|
-
# @return [Void]
|
63
|
-
def self.validate_raw(obj:)
|
64
|
-
obj.code.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
65
|
-
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
@@ -1,72 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "ostruct"
|
4
|
-
require "json"
|
5
|
-
|
6
|
-
module CandidApiClient
|
7
|
-
module PreEncounter
|
8
|
-
module Patients
|
9
|
-
module V1
|
10
|
-
module Types
|
11
|
-
class PotentialDuplicatePatient
|
12
|
-
# @return [String]
|
13
|
-
attr_reader :existing_patient_id
|
14
|
-
# @return [String]
|
15
|
-
attr_reader :existing_patient_mrn
|
16
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
-
attr_reader :additional_properties
|
18
|
-
# @return [Object]
|
19
|
-
attr_reader :_field_set
|
20
|
-
protected :_field_set
|
21
|
-
|
22
|
-
OMIT = Object.new
|
23
|
-
|
24
|
-
# @param existing_patient_id [String]
|
25
|
-
# @param existing_patient_mrn [String]
|
26
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
-
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatient]
|
28
|
-
def initialize(existing_patient_id:, existing_patient_mrn:, additional_properties: nil)
|
29
|
-
@existing_patient_id = existing_patient_id
|
30
|
-
@existing_patient_mrn = existing_patient_mrn
|
31
|
-
@additional_properties = additional_properties
|
32
|
-
@_field_set = { "existing_patient_id": existing_patient_id, "existing_patient_mrn": existing_patient_mrn }
|
33
|
-
end
|
34
|
-
|
35
|
-
# Deserialize a JSON object to an instance of PotentialDuplicatePatient
|
36
|
-
#
|
37
|
-
# @param json_object [String]
|
38
|
-
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatient]
|
39
|
-
def self.from_json(json_object:)
|
40
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
-
existing_patient_id = struct["existing_patient_id"]
|
42
|
-
existing_patient_mrn = struct["existing_patient_mrn"]
|
43
|
-
new(
|
44
|
-
existing_patient_id: existing_patient_id,
|
45
|
-
existing_patient_mrn: existing_patient_mrn,
|
46
|
-
additional_properties: struct
|
47
|
-
)
|
48
|
-
end
|
49
|
-
|
50
|
-
# Serialize an instance of PotentialDuplicatePatient to a JSON object
|
51
|
-
#
|
52
|
-
# @return [String]
|
53
|
-
def to_json(*_args)
|
54
|
-
@_field_set&.to_json
|
55
|
-
end
|
56
|
-
|
57
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
58
|
-
# hash and check each fields type against the current object's property
|
59
|
-
# definitions.
|
60
|
-
#
|
61
|
-
# @param obj [Object]
|
62
|
-
# @return [Void]
|
63
|
-
def self.validate_raw(obj:)
|
64
|
-
obj.existing_patient_id.is_a?(String) != false || raise("Passed value for field obj.existing_patient_id is not the expected type, validation failed.")
|
65
|
-
obj.existing_patient_mrn.is_a?(String) != false || raise("Passed value for field obj.existing_patient_mrn is not the expected type, validation failed.")
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
data/lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patients_error_body.rb
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "potential_duplicate_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 PotentialDuplicatePatientsErrorBody
|
13
|
-
# @return [String]
|
14
|
-
attr_reader :code
|
15
|
-
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatient>]
|
16
|
-
attr_reader :potential_duplicates
|
17
|
-
# @return [String]
|
18
|
-
attr_reader :message
|
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 code [String]
|
28
|
-
# @param potential_duplicates [Array<CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatient>]
|
29
|
-
# @param message [String]
|
30
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
-
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatientsErrorBody]
|
32
|
-
def initialize(code:, potential_duplicates:, message:, additional_properties: nil)
|
33
|
-
@code = code
|
34
|
-
@potential_duplicates = potential_duplicates
|
35
|
-
@message = message
|
36
|
-
@additional_properties = additional_properties
|
37
|
-
@_field_set = { "code": code, "potential_duplicates": potential_duplicates, "message": message }
|
38
|
-
end
|
39
|
-
|
40
|
-
# Deserialize a JSON object to an instance of PotentialDuplicatePatientsErrorBody
|
41
|
-
#
|
42
|
-
# @param json_object [String]
|
43
|
-
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatientsErrorBody]
|
44
|
-
def self.from_json(json_object:)
|
45
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
46
|
-
parsed_json = JSON.parse(json_object)
|
47
|
-
code = struct["code"]
|
48
|
-
potential_duplicates = parsed_json["potential_duplicates"]&.map do |item|
|
49
|
-
item = item.to_json
|
50
|
-
CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatient.from_json(json_object: item)
|
51
|
-
end
|
52
|
-
message = struct["message"]
|
53
|
-
new(
|
54
|
-
code: code,
|
55
|
-
potential_duplicates: potential_duplicates,
|
56
|
-
message: message,
|
57
|
-
additional_properties: struct
|
58
|
-
)
|
59
|
-
end
|
60
|
-
|
61
|
-
# Serialize an instance of PotentialDuplicatePatientsErrorBody to a JSON object
|
62
|
-
#
|
63
|
-
# @return [String]
|
64
|
-
def to_json(*_args)
|
65
|
-
@_field_set&.to_json
|
66
|
-
end
|
67
|
-
|
68
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
69
|
-
# hash and check each fields type against the current object's property
|
70
|
-
# definitions.
|
71
|
-
#
|
72
|
-
# @param obj [Object]
|
73
|
-
# @return [Void]
|
74
|
-
def self.validate_raw(obj:)
|
75
|
-
obj.code.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
76
|
-
obj.potential_duplicates.is_a?(Array) != false || raise("Passed value for field obj.potential_duplicates is not the expected type, validation failed.")
|
77
|
-
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|