candidhealth 0.32.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/candidhealth/encounter_providers/client.rb +30 -0
- data/lib/candidhealth/encounter_providers/v_2/client.rb +789 -0
- data/lib/candidhealth/encounter_providers/v_2/types/initial_referring_provider_update.rb +132 -0
- data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider_update.rb +123 -0
- data/lib/candidhealth/encounter_providers/v_2/types/referring_provider_update.rb +123 -0
- data/lib/candidhealth/encounter_providers/v_2/types/supervising_provider_update.rb +123 -0
- data/lib/candidhealth.rb +7 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +4 -0
- metadata +7 -1
@@ -0,0 +1,132 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/street_address_long_zip"
|
4
|
+
require_relative "../../../commons/types/qualifier_code"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module CandidApiClient
|
9
|
+
module EncounterProviders
|
10
|
+
module V2
|
11
|
+
module Types
|
12
|
+
class InitialReferringProviderUpdate
|
13
|
+
# @return [String] A National Provider Identifier is a unique 10-digit identification
|
14
|
+
# number issued to health care providers in the United States
|
15
|
+
attr_reader :npi
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :taxonomy_code
|
18
|
+
# @return [CandidApiClient::Commons::Types::StreetAddressLongZip]
|
19
|
+
attr_reader :address
|
20
|
+
# @return [CandidApiClient::Commons::Types::QualifierCode]
|
21
|
+
attr_reader :qualifier
|
22
|
+
# @return [String] If the provider is an individual, this should be set instead of organization
|
23
|
+
# name
|
24
|
+
attr_reader :first_name
|
25
|
+
# @return [String] If the provider is an individual, this should be set instead of organization
|
26
|
+
# name
|
27
|
+
attr_reader :last_name
|
28
|
+
# @return [String] If the provider is an organization, this should be set instead of first + last
|
29
|
+
# name
|
30
|
+
attr_reader :organization_name
|
31
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
32
|
+
attr_reader :additional_properties
|
33
|
+
# @return [Object]
|
34
|
+
attr_reader :_field_set
|
35
|
+
protected :_field_set
|
36
|
+
|
37
|
+
OMIT = Object.new
|
38
|
+
|
39
|
+
# @param npi [String] A National Provider Identifier is a unique 10-digit identification
|
40
|
+
# number issued to health care providers in the United States
|
41
|
+
# @param taxonomy_code [String]
|
42
|
+
# @param address [CandidApiClient::Commons::Types::StreetAddressLongZip]
|
43
|
+
# @param qualifier [CandidApiClient::Commons::Types::QualifierCode]
|
44
|
+
# @param first_name [String] If the provider is an individual, this should be set instead of organization
|
45
|
+
# name
|
46
|
+
# @param last_name [String] If the provider is an individual, this should be set instead of organization
|
47
|
+
# name
|
48
|
+
# @param organization_name [String] If the provider is an organization, this should be set instead of first + last
|
49
|
+
# name
|
50
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
51
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdate]
|
52
|
+
def initialize(npi: OMIT, taxonomy_code: OMIT, address: OMIT, qualifier: OMIT, first_name: OMIT,
|
53
|
+
last_name: OMIT, organization_name: OMIT, additional_properties: nil)
|
54
|
+
@npi = npi if npi != OMIT
|
55
|
+
@taxonomy_code = taxonomy_code if taxonomy_code != OMIT
|
56
|
+
@address = address if address != OMIT
|
57
|
+
@qualifier = qualifier if qualifier != OMIT
|
58
|
+
@first_name = first_name if first_name != OMIT
|
59
|
+
@last_name = last_name if last_name != OMIT
|
60
|
+
@organization_name = organization_name if organization_name != OMIT
|
61
|
+
@additional_properties = additional_properties
|
62
|
+
@_field_set = {
|
63
|
+
"npi": npi,
|
64
|
+
"taxonomy_code": taxonomy_code,
|
65
|
+
"address": address,
|
66
|
+
"qualifier": qualifier,
|
67
|
+
"first_name": first_name,
|
68
|
+
"last_name": last_name,
|
69
|
+
"organization_name": organization_name
|
70
|
+
}.reject do |_k, v|
|
71
|
+
v == OMIT
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Deserialize a JSON object to an instance of InitialReferringProviderUpdate
|
76
|
+
#
|
77
|
+
# @param json_object [String]
|
78
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdate]
|
79
|
+
def self.from_json(json_object:)
|
80
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
81
|
+
parsed_json = JSON.parse(json_object)
|
82
|
+
npi = struct["npi"]
|
83
|
+
taxonomy_code = struct["taxonomy_code"]
|
84
|
+
if parsed_json["address"].nil?
|
85
|
+
address = nil
|
86
|
+
else
|
87
|
+
address = parsed_json["address"].to_json
|
88
|
+
address = CandidApiClient::Commons::Types::StreetAddressLongZip.from_json(json_object: address)
|
89
|
+
end
|
90
|
+
qualifier = struct["qualifier"]
|
91
|
+
first_name = struct["first_name"]
|
92
|
+
last_name = struct["last_name"]
|
93
|
+
organization_name = struct["organization_name"]
|
94
|
+
new(
|
95
|
+
npi: npi,
|
96
|
+
taxonomy_code: taxonomy_code,
|
97
|
+
address: address,
|
98
|
+
qualifier: qualifier,
|
99
|
+
first_name: first_name,
|
100
|
+
last_name: last_name,
|
101
|
+
organization_name: organization_name,
|
102
|
+
additional_properties: struct
|
103
|
+
)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Serialize an instance of InitialReferringProviderUpdate to a JSON object
|
107
|
+
#
|
108
|
+
# @return [String]
|
109
|
+
def to_json(*_args)
|
110
|
+
@_field_set&.to_json
|
111
|
+
end
|
112
|
+
|
113
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
114
|
+
# hash and check each fields type against the current object's property
|
115
|
+
# definitions.
|
116
|
+
#
|
117
|
+
# @param obj [Object]
|
118
|
+
# @return [Void]
|
119
|
+
def self.validate_raw(obj:)
|
120
|
+
obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.")
|
121
|
+
obj.taxonomy_code&.is_a?(String) != false || raise("Passed value for field obj.taxonomy_code is not the expected type, validation failed.")
|
122
|
+
obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressLongZip.validate_raw(obj: obj.address)
|
123
|
+
obj.qualifier&.is_a?(CandidApiClient::Commons::Types::QualifierCode) != false || raise("Passed value for field obj.qualifier is not the expected type, validation failed.")
|
124
|
+
obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
|
125
|
+
obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
|
126
|
+
obj.organization_name&.is_a?(String) != false || raise("Passed value for field obj.organization_name is not the expected type, validation failed.")
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/street_address_long_zip"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module EncounterProviders
|
9
|
+
module V2
|
10
|
+
module Types
|
11
|
+
class OrderingProviderUpdate
|
12
|
+
# @return [String] A National Provider Identifier is a unique 10-digit identification
|
13
|
+
# number issued to health care providers in the United States
|
14
|
+
attr_reader :npi
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :taxonomy_code
|
17
|
+
# @return [CandidApiClient::Commons::Types::StreetAddressLongZip]
|
18
|
+
attr_reader :address
|
19
|
+
# @return [String] If the provider is an individual, this should be set instead of organization
|
20
|
+
# name
|
21
|
+
attr_reader :first_name
|
22
|
+
# @return [String] If the provider is an individual, this should be set instead of organization
|
23
|
+
# name
|
24
|
+
attr_reader :last_name
|
25
|
+
# @return [String] If the provider is an organization, this should be set instead of first + last
|
26
|
+
# name
|
27
|
+
attr_reader :organization_name
|
28
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
attr_reader :additional_properties
|
30
|
+
# @return [Object]
|
31
|
+
attr_reader :_field_set
|
32
|
+
protected :_field_set
|
33
|
+
|
34
|
+
OMIT = Object.new
|
35
|
+
|
36
|
+
# @param npi [String] A National Provider Identifier is a unique 10-digit identification
|
37
|
+
# number issued to health care providers in the United States
|
38
|
+
# @param taxonomy_code [String]
|
39
|
+
# @param address [CandidApiClient::Commons::Types::StreetAddressLongZip]
|
40
|
+
# @param first_name [String] If the provider is an individual, this should be set instead of organization
|
41
|
+
# name
|
42
|
+
# @param last_name [String] If the provider is an individual, this should be set instead of organization
|
43
|
+
# name
|
44
|
+
# @param organization_name [String] If the provider is an organization, this should be set instead of first + last
|
45
|
+
# name
|
46
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
47
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::OrderingProviderUpdate]
|
48
|
+
def initialize(npi: OMIT, taxonomy_code: OMIT, address: OMIT, first_name: OMIT, last_name: OMIT,
|
49
|
+
organization_name: OMIT, additional_properties: nil)
|
50
|
+
@npi = npi if npi != OMIT
|
51
|
+
@taxonomy_code = taxonomy_code if taxonomy_code != OMIT
|
52
|
+
@address = address if address != OMIT
|
53
|
+
@first_name = first_name if first_name != OMIT
|
54
|
+
@last_name = last_name if last_name != OMIT
|
55
|
+
@organization_name = organization_name if organization_name != OMIT
|
56
|
+
@additional_properties = additional_properties
|
57
|
+
@_field_set = {
|
58
|
+
"npi": npi,
|
59
|
+
"taxonomy_code": taxonomy_code,
|
60
|
+
"address": address,
|
61
|
+
"first_name": first_name,
|
62
|
+
"last_name": last_name,
|
63
|
+
"organization_name": organization_name
|
64
|
+
}.reject do |_k, v|
|
65
|
+
v == OMIT
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Deserialize a JSON object to an instance of OrderingProviderUpdate
|
70
|
+
#
|
71
|
+
# @param json_object [String]
|
72
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::OrderingProviderUpdate]
|
73
|
+
def self.from_json(json_object:)
|
74
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
75
|
+
parsed_json = JSON.parse(json_object)
|
76
|
+
npi = struct["npi"]
|
77
|
+
taxonomy_code = struct["taxonomy_code"]
|
78
|
+
if parsed_json["address"].nil?
|
79
|
+
address = nil
|
80
|
+
else
|
81
|
+
address = parsed_json["address"].to_json
|
82
|
+
address = CandidApiClient::Commons::Types::StreetAddressLongZip.from_json(json_object: address)
|
83
|
+
end
|
84
|
+
first_name = struct["first_name"]
|
85
|
+
last_name = struct["last_name"]
|
86
|
+
organization_name = struct["organization_name"]
|
87
|
+
new(
|
88
|
+
npi: npi,
|
89
|
+
taxonomy_code: taxonomy_code,
|
90
|
+
address: address,
|
91
|
+
first_name: first_name,
|
92
|
+
last_name: last_name,
|
93
|
+
organization_name: organization_name,
|
94
|
+
additional_properties: struct
|
95
|
+
)
|
96
|
+
end
|
97
|
+
|
98
|
+
# Serialize an instance of OrderingProviderUpdate to a JSON object
|
99
|
+
#
|
100
|
+
# @return [String]
|
101
|
+
def to_json(*_args)
|
102
|
+
@_field_set&.to_json
|
103
|
+
end
|
104
|
+
|
105
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
106
|
+
# hash and check each fields type against the current object's property
|
107
|
+
# definitions.
|
108
|
+
#
|
109
|
+
# @param obj [Object]
|
110
|
+
# @return [Void]
|
111
|
+
def self.validate_raw(obj:)
|
112
|
+
obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.")
|
113
|
+
obj.taxonomy_code&.is_a?(String) != false || raise("Passed value for field obj.taxonomy_code is not the expected type, validation failed.")
|
114
|
+
obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressLongZip.validate_raw(obj: obj.address)
|
115
|
+
obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
|
116
|
+
obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
|
117
|
+
obj.organization_name&.is_a?(String) != false || raise("Passed value for field obj.organization_name is not the expected type, validation failed.")
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/street_address_long_zip"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module EncounterProviders
|
9
|
+
module V2
|
10
|
+
module Types
|
11
|
+
class ReferringProviderUpdate
|
12
|
+
# @return [String] A National Provider Identifier is a unique 10-digit identification
|
13
|
+
# number issued to health care providers in the United States
|
14
|
+
attr_reader :npi
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :taxonomy_code
|
17
|
+
# @return [CandidApiClient::Commons::Types::StreetAddressLongZip]
|
18
|
+
attr_reader :address
|
19
|
+
# @return [String] If the provider is an individual, this should be set instead of organization
|
20
|
+
# name
|
21
|
+
attr_reader :first_name
|
22
|
+
# @return [String] If the provider is an individual, this should be set instead of organization
|
23
|
+
# name
|
24
|
+
attr_reader :last_name
|
25
|
+
# @return [String] If the provider is an organization, this should be set instead of first + last
|
26
|
+
# name
|
27
|
+
attr_reader :organization_name
|
28
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
attr_reader :additional_properties
|
30
|
+
# @return [Object]
|
31
|
+
attr_reader :_field_set
|
32
|
+
protected :_field_set
|
33
|
+
|
34
|
+
OMIT = Object.new
|
35
|
+
|
36
|
+
# @param npi [String] A National Provider Identifier is a unique 10-digit identification
|
37
|
+
# number issued to health care providers in the United States
|
38
|
+
# @param taxonomy_code [String]
|
39
|
+
# @param address [CandidApiClient::Commons::Types::StreetAddressLongZip]
|
40
|
+
# @param first_name [String] If the provider is an individual, this should be set instead of organization
|
41
|
+
# name
|
42
|
+
# @param last_name [String] If the provider is an individual, this should be set instead of organization
|
43
|
+
# name
|
44
|
+
# @param organization_name [String] If the provider is an organization, this should be set instead of first + last
|
45
|
+
# name
|
46
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
47
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdate]
|
48
|
+
def initialize(npi: OMIT, taxonomy_code: OMIT, address: OMIT, first_name: OMIT, last_name: OMIT,
|
49
|
+
organization_name: OMIT, additional_properties: nil)
|
50
|
+
@npi = npi if npi != OMIT
|
51
|
+
@taxonomy_code = taxonomy_code if taxonomy_code != OMIT
|
52
|
+
@address = address if address != OMIT
|
53
|
+
@first_name = first_name if first_name != OMIT
|
54
|
+
@last_name = last_name if last_name != OMIT
|
55
|
+
@organization_name = organization_name if organization_name != OMIT
|
56
|
+
@additional_properties = additional_properties
|
57
|
+
@_field_set = {
|
58
|
+
"npi": npi,
|
59
|
+
"taxonomy_code": taxonomy_code,
|
60
|
+
"address": address,
|
61
|
+
"first_name": first_name,
|
62
|
+
"last_name": last_name,
|
63
|
+
"organization_name": organization_name
|
64
|
+
}.reject do |_k, v|
|
65
|
+
v == OMIT
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Deserialize a JSON object to an instance of ReferringProviderUpdate
|
70
|
+
#
|
71
|
+
# @param json_object [String]
|
72
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdate]
|
73
|
+
def self.from_json(json_object:)
|
74
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
75
|
+
parsed_json = JSON.parse(json_object)
|
76
|
+
npi = struct["npi"]
|
77
|
+
taxonomy_code = struct["taxonomy_code"]
|
78
|
+
if parsed_json["address"].nil?
|
79
|
+
address = nil
|
80
|
+
else
|
81
|
+
address = parsed_json["address"].to_json
|
82
|
+
address = CandidApiClient::Commons::Types::StreetAddressLongZip.from_json(json_object: address)
|
83
|
+
end
|
84
|
+
first_name = struct["first_name"]
|
85
|
+
last_name = struct["last_name"]
|
86
|
+
organization_name = struct["organization_name"]
|
87
|
+
new(
|
88
|
+
npi: npi,
|
89
|
+
taxonomy_code: taxonomy_code,
|
90
|
+
address: address,
|
91
|
+
first_name: first_name,
|
92
|
+
last_name: last_name,
|
93
|
+
organization_name: organization_name,
|
94
|
+
additional_properties: struct
|
95
|
+
)
|
96
|
+
end
|
97
|
+
|
98
|
+
# Serialize an instance of ReferringProviderUpdate to a JSON object
|
99
|
+
#
|
100
|
+
# @return [String]
|
101
|
+
def to_json(*_args)
|
102
|
+
@_field_set&.to_json
|
103
|
+
end
|
104
|
+
|
105
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
106
|
+
# hash and check each fields type against the current object's property
|
107
|
+
# definitions.
|
108
|
+
#
|
109
|
+
# @param obj [Object]
|
110
|
+
# @return [Void]
|
111
|
+
def self.validate_raw(obj:)
|
112
|
+
obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.")
|
113
|
+
obj.taxonomy_code&.is_a?(String) != false || raise("Passed value for field obj.taxonomy_code is not the expected type, validation failed.")
|
114
|
+
obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressLongZip.validate_raw(obj: obj.address)
|
115
|
+
obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
|
116
|
+
obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
|
117
|
+
obj.organization_name&.is_a?(String) != false || raise("Passed value for field obj.organization_name is not the expected type, validation failed.")
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/street_address_long_zip"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module EncounterProviders
|
9
|
+
module V2
|
10
|
+
module Types
|
11
|
+
class SupervisingProviderUpdate
|
12
|
+
# @return [String] A National Provider Identifier is a unique 10-digit identification
|
13
|
+
# number issued to health care providers in the United States
|
14
|
+
attr_reader :npi
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :taxonomy_code
|
17
|
+
# @return [CandidApiClient::Commons::Types::StreetAddressLongZip]
|
18
|
+
attr_reader :address
|
19
|
+
# @return [String] If the provider is an individual, this should be set instead of organization
|
20
|
+
# name
|
21
|
+
attr_reader :first_name
|
22
|
+
# @return [String] If the provider is an individual, this should be set instead of organization
|
23
|
+
# name
|
24
|
+
attr_reader :last_name
|
25
|
+
# @return [String] If the provider is an organization, this should be set instead of first + last
|
26
|
+
# name
|
27
|
+
attr_reader :organization_name
|
28
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
attr_reader :additional_properties
|
30
|
+
# @return [Object]
|
31
|
+
attr_reader :_field_set
|
32
|
+
protected :_field_set
|
33
|
+
|
34
|
+
OMIT = Object.new
|
35
|
+
|
36
|
+
# @param npi [String] A National Provider Identifier is a unique 10-digit identification
|
37
|
+
# number issued to health care providers in the United States
|
38
|
+
# @param taxonomy_code [String]
|
39
|
+
# @param address [CandidApiClient::Commons::Types::StreetAddressLongZip]
|
40
|
+
# @param first_name [String] If the provider is an individual, this should be set instead of organization
|
41
|
+
# name
|
42
|
+
# @param last_name [String] If the provider is an individual, this should be set instead of organization
|
43
|
+
# name
|
44
|
+
# @param organization_name [String] If the provider is an organization, this should be set instead of first + last
|
45
|
+
# name
|
46
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
47
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate]
|
48
|
+
def initialize(npi: OMIT, taxonomy_code: OMIT, address: OMIT, first_name: OMIT, last_name: OMIT,
|
49
|
+
organization_name: OMIT, additional_properties: nil)
|
50
|
+
@npi = npi if npi != OMIT
|
51
|
+
@taxonomy_code = taxonomy_code if taxonomy_code != OMIT
|
52
|
+
@address = address if address != OMIT
|
53
|
+
@first_name = first_name if first_name != OMIT
|
54
|
+
@last_name = last_name if last_name != OMIT
|
55
|
+
@organization_name = organization_name if organization_name != OMIT
|
56
|
+
@additional_properties = additional_properties
|
57
|
+
@_field_set = {
|
58
|
+
"npi": npi,
|
59
|
+
"taxonomy_code": taxonomy_code,
|
60
|
+
"address": address,
|
61
|
+
"first_name": first_name,
|
62
|
+
"last_name": last_name,
|
63
|
+
"organization_name": organization_name
|
64
|
+
}.reject do |_k, v|
|
65
|
+
v == OMIT
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Deserialize a JSON object to an instance of SupervisingProviderUpdate
|
70
|
+
#
|
71
|
+
# @param json_object [String]
|
72
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate]
|
73
|
+
def self.from_json(json_object:)
|
74
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
75
|
+
parsed_json = JSON.parse(json_object)
|
76
|
+
npi = struct["npi"]
|
77
|
+
taxonomy_code = struct["taxonomy_code"]
|
78
|
+
if parsed_json["address"].nil?
|
79
|
+
address = nil
|
80
|
+
else
|
81
|
+
address = parsed_json["address"].to_json
|
82
|
+
address = CandidApiClient::Commons::Types::StreetAddressLongZip.from_json(json_object: address)
|
83
|
+
end
|
84
|
+
first_name = struct["first_name"]
|
85
|
+
last_name = struct["last_name"]
|
86
|
+
organization_name = struct["organization_name"]
|
87
|
+
new(
|
88
|
+
npi: npi,
|
89
|
+
taxonomy_code: taxonomy_code,
|
90
|
+
address: address,
|
91
|
+
first_name: first_name,
|
92
|
+
last_name: last_name,
|
93
|
+
organization_name: organization_name,
|
94
|
+
additional_properties: struct
|
95
|
+
)
|
96
|
+
end
|
97
|
+
|
98
|
+
# Serialize an instance of SupervisingProviderUpdate to a JSON object
|
99
|
+
#
|
100
|
+
# @return [String]
|
101
|
+
def to_json(*_args)
|
102
|
+
@_field_set&.to_json
|
103
|
+
end
|
104
|
+
|
105
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
106
|
+
# hash and check each fields type against the current object's property
|
107
|
+
# definitions.
|
108
|
+
#
|
109
|
+
# @param obj [Object]
|
110
|
+
# @return [Void]
|
111
|
+
def self.validate_raw(obj:)
|
112
|
+
obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.")
|
113
|
+
obj.taxonomy_code&.is_a?(String) != false || raise("Passed value for field obj.taxonomy_code is not the expected type, validation failed.")
|
114
|
+
obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressLongZip.validate_raw(obj: obj.address)
|
115
|
+
obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
|
116
|
+
obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
|
117
|
+
obj.organization_name&.is_a?(String) != false || raise("Passed value for field obj.organization_name is not the expected type, validation failed.")
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
data/lib/candidhealth.rb
CHANGED
@@ -9,6 +9,7 @@ require_relative "candidhealth/billing_notes/client"
|
|
9
9
|
require_relative "candidhealth/contracts/client"
|
10
10
|
require_relative "candidhealth/custom_schemas/client"
|
11
11
|
require_relative "candidhealth/eligibility/client"
|
12
|
+
require_relative "candidhealth/encounter_providers/client"
|
12
13
|
require_relative "candidhealth/encounters/client"
|
13
14
|
require_relative "candidhealth/expected_network_status/client"
|
14
15
|
require_relative "candidhealth/exports/client"
|
@@ -49,6 +50,8 @@ module CandidApiClient
|
|
49
50
|
attr_reader :custom_schemas
|
50
51
|
# @return [CandidApiClient::Eligibility::Client]
|
51
52
|
attr_reader :eligibility
|
53
|
+
# @return [CandidApiClient::EncounterProviders::Client]
|
54
|
+
attr_reader :encounter_providers
|
52
55
|
# @return [CandidApiClient::Encounters::Client]
|
53
56
|
attr_reader :encounters
|
54
57
|
# @return [CandidApiClient::ExpectedNetworkStatus::Client]
|
@@ -135,6 +138,7 @@ module CandidApiClient
|
|
135
138
|
@contracts = CandidApiClient::Contracts::Client.new(request_client: @request_client)
|
136
139
|
@custom_schemas = CandidApiClient::CustomSchemas::Client.new(request_client: @request_client)
|
137
140
|
@eligibility = CandidApiClient::Eligibility::Client.new(request_client: @request_client)
|
141
|
+
@encounter_providers = CandidApiClient::EncounterProviders::Client.new(request_client: @request_client)
|
138
142
|
@encounters = CandidApiClient::Encounters::Client.new(request_client: @request_client)
|
139
143
|
@expected_network_status = CandidApiClient::ExpectedNetworkStatus::Client.new(request_client: @request_client)
|
140
144
|
@exports = CandidApiClient::Exports::Client.new(request_client: @request_client)
|
@@ -176,6 +180,8 @@ module CandidApiClient
|
|
176
180
|
attr_reader :custom_schemas
|
177
181
|
# @return [CandidApiClient::Eligibility::AsyncClient]
|
178
182
|
attr_reader :eligibility
|
183
|
+
# @return [CandidApiClient::EncounterProviders::AsyncClient]
|
184
|
+
attr_reader :encounter_providers
|
179
185
|
# @return [CandidApiClient::Encounters::AsyncClient]
|
180
186
|
attr_reader :encounters
|
181
187
|
# @return [CandidApiClient::ExpectedNetworkStatus::AsyncClient]
|
@@ -262,6 +268,7 @@ module CandidApiClient
|
|
262
268
|
@contracts = CandidApiClient::Contracts::AsyncClient.new(request_client: @async_request_client)
|
263
269
|
@custom_schemas = CandidApiClient::CustomSchemas::AsyncClient.new(request_client: @async_request_client)
|
264
270
|
@eligibility = CandidApiClient::Eligibility::AsyncClient.new(request_client: @async_request_client)
|
271
|
+
@encounter_providers = CandidApiClient::EncounterProviders::AsyncClient.new(request_client: @async_request_client)
|
265
272
|
@encounters = CandidApiClient::Encounters::AsyncClient.new(request_client: @async_request_client)
|
266
273
|
@expected_network_status = CandidApiClient::ExpectedNetworkStatus::AsyncClient.new(request_client: @async_request_client)
|
267
274
|
@exports = CandidApiClient::Exports::AsyncClient.new(request_client: @async_request_client)
|
data/lib/requests.rb
CHANGED
@@ -43,7 +43,7 @@ module CandidApiClient
|
|
43
43
|
|
44
44
|
# @return [Hash{String => String}]
|
45
45
|
def get_headers
|
46
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.33.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.33.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
@@ -29,9 +29,13 @@ require_relative "candidhealth/custom_schemas/v_1/types/schema_validation_error"
|
|
29
29
|
require_relative "candidhealth/encounter_providers/v_2/types/encounter_provider_base"
|
30
30
|
require_relative "candidhealth/encounter_providers/v_2/types/rendering_provider"
|
31
31
|
require_relative "candidhealth/encounter_providers/v_2/types/referring_provider"
|
32
|
+
require_relative "candidhealth/encounter_providers/v_2/types/referring_provider_update"
|
32
33
|
require_relative "candidhealth/encounter_providers/v_2/types/initial_referring_provider"
|
34
|
+
require_relative "candidhealth/encounter_providers/v_2/types/initial_referring_provider_update"
|
33
35
|
require_relative "candidhealth/encounter_providers/v_2/types/supervising_provider"
|
36
|
+
require_relative "candidhealth/encounter_providers/v_2/types/supervising_provider_update"
|
34
37
|
require_relative "candidhealth/encounter_providers/v_2/types/ordering_provider"
|
38
|
+
require_relative "candidhealth/encounter_providers/v_2/types/ordering_provider_update"
|
35
39
|
require_relative "candidhealth/encounter_providers/v_2/types/billing_provider"
|
36
40
|
require_relative "candidhealth/encounter_providers/v_2/types/encounter_provider"
|
37
41
|
require_relative "candidhealth/encounters/v_4/types/encounter_base"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: candidhealth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -174,14 +174,20 @@ files:
|
|
174
174
|
- lib/candidhealth/diagnoses/types/standalone_diagnosis_create.rb
|
175
175
|
- lib/candidhealth/eligibility/client.rb
|
176
176
|
- lib/candidhealth/eligibility/v_2/client.rb
|
177
|
+
- lib/candidhealth/encounter_providers/client.rb
|
178
|
+
- lib/candidhealth/encounter_providers/v_2/client.rb
|
177
179
|
- lib/candidhealth/encounter_providers/v_2/types/billing_provider.rb
|
178
180
|
- lib/candidhealth/encounter_providers/v_2/types/encounter_provider.rb
|
179
181
|
- lib/candidhealth/encounter_providers/v_2/types/encounter_provider_base.rb
|
180
182
|
- lib/candidhealth/encounter_providers/v_2/types/initial_referring_provider.rb
|
183
|
+
- lib/candidhealth/encounter_providers/v_2/types/initial_referring_provider_update.rb
|
181
184
|
- lib/candidhealth/encounter_providers/v_2/types/ordering_provider.rb
|
185
|
+
- lib/candidhealth/encounter_providers/v_2/types/ordering_provider_update.rb
|
182
186
|
- lib/candidhealth/encounter_providers/v_2/types/referring_provider.rb
|
187
|
+
- lib/candidhealth/encounter_providers/v_2/types/referring_provider_update.rb
|
183
188
|
- lib/candidhealth/encounter_providers/v_2/types/rendering_provider.rb
|
184
189
|
- lib/candidhealth/encounter_providers/v_2/types/supervising_provider.rb
|
190
|
+
- lib/candidhealth/encounter_providers/v_2/types/supervising_provider_update.rb
|
185
191
|
- lib/candidhealth/encounters/client.rb
|
186
192
|
- lib/candidhealth/encounters/v_4/client.rb
|
187
193
|
- lib/candidhealth/encounters/v_4/types/billable_status_type.rb
|