candidhealth 1.0.0 → 1.3.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/auth/client.rb +7 -7
- data/lib/candidhealth/auth/{v_2 → default}/client.rb +39 -13
- data/lib/candidhealth/auth/{v_2 → default}/types/auth_get_token_response.rb +3 -3
- data/lib/candidhealth/auth/default/types/invalid_content_type_error_type.rb +60 -0
- data/lib/candidhealth/auth/{v_2 → default}/types/too_many_requests_error_type.rb +3 -3
- data/lib/candidhealth/billing_notes/v_2/types/billing_note_base_optional.rb +62 -0
- data/lib/candidhealth/charge_capture/v_1/client.rb +504 -482
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture.rb +17 -1
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +173 -173
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb +26 -2
- data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +58 -0
- data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional.rb +100 -0
- data/lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create_optional.rb +101 -0
- data/lib/candidhealth/commons/types/phone_number_optional.rb +71 -0
- data/lib/candidhealth/commons/types/procedure_modifier.rb +2 -0
- data/lib/candidhealth/commons/types/street_address_long_zip_optional.rb +107 -0
- data/lib/candidhealth/custom_schemas/v_1/types/schema_instance_optional.rb +78 -0
- data/lib/candidhealth/diagnoses/client.rb +23 -4
- data/lib/candidhealth/diagnoses/types/diagnosis.rb +21 -2
- data/lib/candidhealth/diagnoses/types/diagnosis_create.rb +25 -2
- data/lib/candidhealth/diagnoses/types/diagnosis_create_optional.rb +126 -0
- data/lib/candidhealth/diagnoses/types/standalone_diagnosis_create.rb +22 -2
- data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider_optional.rb +123 -0
- data/lib/candidhealth/encounters/v_4/client.rb +214 -208
- data/lib/candidhealth/encounters/v_4/types/claim_supplemental_information_optional.rb +86 -0
- data/lib/candidhealth/encounters/v_4/types/clinical_note_category_create_optional.rb +78 -0
- data/lib/candidhealth/encounters/v_4/types/clinical_note_optional.rb +93 -0
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +16 -4
- data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +4 -2
- data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +780 -0
- data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +1 -139
- data/lib/candidhealth/encounters/v_4/types/epsdt_referral_optional.rb +85 -0
- data/lib/candidhealth/encounters/v_4/types/intake_question_optional.rb +84 -0
- data/lib/candidhealth/encounters/v_4/types/intervention_optional.rb +114 -0
- data/lib/candidhealth/encounters/v_4/types/lab_optional.rb +80 -0
- data/lib/candidhealth/encounters/v_4/types/medication_optional.rb +108 -0
- data/lib/candidhealth/encounters/v_4/types/patient_history_category_optional.rb +78 -0
- data/lib/candidhealth/guarantor/v_1/types/guarantor_optional.rb +144 -0
- data/lib/candidhealth/individual/types/individual_base_optional.rb +78 -0
- data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create_optional.rb +89 -0
- data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +8 -8
- data/lib/candidhealth/individual/types/subscriber_base_optional.rb +118 -0
- data/lib/candidhealth/individual/types/subscriber_create_optional.rb +132 -0
- data/lib/candidhealth/insurance_adjudications/v_1/client.rb +2 -0
- data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_create.rb +9 -1
- data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create_optional.rb +167 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +13 -1
- data/lib/candidhealth/service_lines/v_2/types/drug_identification_optional.rb +126 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +239 -0
- data/lib/candidhealth/service_lines/v_2/types/test_result_optional.rb +73 -0
- data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_reason.rb +1 -0
- data/lib/candidhealth/write_offs/v_1/types/patient_write_off_reason.rb +1 -0
- data/lib/candidhealth/yes_no_indicator/types/yes_no_indicator.rb +14 -0
- data/lib/core/oauth.rb +2 -2
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +32 -3
- metadata +34 -5
@@ -4,6 +4,7 @@ require_relative "../../requests"
|
|
4
4
|
require_relative "types/standalone_diagnosis_create"
|
5
5
|
require_relative "types/diagnosis"
|
6
6
|
require_relative "types/diagnosis_type_code"
|
7
|
+
require_relative "../yes_no_indicator/types/yes_no_indicator"
|
7
8
|
require "async"
|
8
9
|
|
9
10
|
module CandidApiClient
|
@@ -24,6 +25,7 @@ module CandidApiClient
|
|
24
25
|
# * :name (String)
|
25
26
|
# * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
|
26
27
|
# * :code (String)
|
28
|
+
# * :present_on_admission_indicator (CandidApiClient::YesNoIndicator::Types::YesNoIndicator)
|
27
29
|
# @param request_options [CandidApiClient::RequestOptions]
|
28
30
|
# @return [CandidApiClient::Diagnoses::Types::Diagnosis]
|
29
31
|
# @example
|
@@ -62,12 +64,19 @@ module CandidApiClient
|
|
62
64
|
# - Digit or the letter `A` or `B`
|
63
65
|
# - (Optional) Period `.`
|
64
66
|
# - Up to 4 (or as few as 0) letters and digits
|
67
|
+
# @param present_on_admission_indicator [CandidApiClient::YesNoIndicator::Types::YesNoIndicator] For Institutional claims only.
|
68
|
+
# A "Y" indicates that the onset occurred prior to admission to the hospital.
|
69
|
+
# An "N" indicates that the onset did NOT occur prior to admission to the
|
70
|
+
# hospital.
|
71
|
+
# A "U" indicates that it is unknown whether the onset occurred prior to admission
|
72
|
+
# to the hospital or not.
|
65
73
|
# @param request_options [CandidApiClient::RequestOptions]
|
66
74
|
# @return [CandidApiClient::Diagnoses::Types::Diagnosis]
|
67
75
|
# @example
|
68
76
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
69
77
|
# api.diagnoses.update(diagnosis_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
70
|
-
def update(diagnosis_id:, name: nil, code_type: nil, code: nil,
|
78
|
+
def update(diagnosis_id:, name: nil, code_type: nil, code: nil, present_on_admission_indicator: nil,
|
79
|
+
request_options: nil)
|
71
80
|
response = @request_client.conn.patch do |req|
|
72
81
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
73
82
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -80,7 +89,8 @@ module CandidApiClient
|
|
80
89
|
**(request_options&.additional_body_parameters || {}),
|
81
90
|
name: name,
|
82
91
|
code_type: code_type,
|
83
|
-
code: code
|
92
|
+
code: code,
|
93
|
+
present_on_admission_indicator: present_on_admission_indicator
|
84
94
|
}.compact
|
85
95
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
86
96
|
request_options: request_options)}/api/diagnoses/v2/#{diagnosis_id}"
|
@@ -128,6 +138,7 @@ module CandidApiClient
|
|
128
138
|
# * :name (String)
|
129
139
|
# * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
|
130
140
|
# * :code (String)
|
141
|
+
# * :present_on_admission_indicator (CandidApiClient::YesNoIndicator::Types::YesNoIndicator)
|
131
142
|
# @param request_options [CandidApiClient::RequestOptions]
|
132
143
|
# @return [CandidApiClient::Diagnoses::Types::Diagnosis]
|
133
144
|
# @example
|
@@ -169,12 +180,19 @@ module CandidApiClient
|
|
169
180
|
# - Digit or the letter `A` or `B`
|
170
181
|
# - (Optional) Period `.`
|
171
182
|
# - Up to 4 (or as few as 0) letters and digits
|
183
|
+
# @param present_on_admission_indicator [CandidApiClient::YesNoIndicator::Types::YesNoIndicator] For Institutional claims only.
|
184
|
+
# A "Y" indicates that the onset occurred prior to admission to the hospital.
|
185
|
+
# An "N" indicates that the onset did NOT occur prior to admission to the
|
186
|
+
# hospital.
|
187
|
+
# A "U" indicates that it is unknown whether the onset occurred prior to admission
|
188
|
+
# to the hospital or not.
|
172
189
|
# @param request_options [CandidApiClient::RequestOptions]
|
173
190
|
# @return [CandidApiClient::Diagnoses::Types::Diagnosis]
|
174
191
|
# @example
|
175
192
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
176
193
|
# api.diagnoses.update(diagnosis_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
177
|
-
def update(diagnosis_id:, name: nil, code_type: nil, code: nil,
|
194
|
+
def update(diagnosis_id:, name: nil, code_type: nil, code: nil, present_on_admission_indicator: nil,
|
195
|
+
request_options: nil)
|
178
196
|
Async do
|
179
197
|
response = @request_client.conn.patch do |req|
|
180
198
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -188,7 +206,8 @@ module CandidApiClient
|
|
188
206
|
**(request_options&.additional_body_parameters || {}),
|
189
207
|
name: name,
|
190
208
|
code_type: code_type,
|
191
|
-
code: code
|
209
|
+
code: code,
|
210
|
+
present_on_admission_indicator: present_on_admission_indicator
|
192
211
|
}.compact
|
193
212
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
194
213
|
request_options: request_options)}/api/diagnoses/v2/#{diagnosis_id}"
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require "date"
|
4
4
|
require_relative "diagnosis_type_code"
|
5
|
+
require_relative "../../yes_no_indicator/types/yes_no_indicator"
|
5
6
|
require "ostruct"
|
6
7
|
require "json"
|
7
8
|
|
@@ -35,6 +36,13 @@ module CandidApiClient
|
|
35
36
|
# - (Optional) Period `.`
|
36
37
|
# - Up to 4 (or as few as 0) letters and digits
|
37
38
|
attr_reader :code
|
39
|
+
# @return [CandidApiClient::YesNoIndicator::Types::YesNoIndicator] For Institutional claims only.
|
40
|
+
# A "Y" indicates that the onset occurred prior to admission to the hospital.
|
41
|
+
# An "N" indicates that the onset did NOT occur prior to admission to the
|
42
|
+
# hospital.
|
43
|
+
# A "U" indicates that it is unknown whether the onset occurred prior to admission
|
44
|
+
# to the hospital or not.
|
45
|
+
attr_reader :present_on_admission_indicator
|
38
46
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
39
47
|
attr_reader :additional_properties
|
40
48
|
# @return [Object]
|
@@ -62,10 +70,16 @@ module CandidApiClient
|
|
62
70
|
# - Digit or the letter `A` or `B`
|
63
71
|
# - (Optional) Period `.`
|
64
72
|
# - Up to 4 (or as few as 0) letters and digits
|
73
|
+
# @param present_on_admission_indicator [CandidApiClient::YesNoIndicator::Types::YesNoIndicator] For Institutional claims only.
|
74
|
+
# A "Y" indicates that the onset occurred prior to admission to the hospital.
|
75
|
+
# An "N" indicates that the onset did NOT occur prior to admission to the
|
76
|
+
# hospital.
|
77
|
+
# A "U" indicates that it is unknown whether the onset occurred prior to admission
|
78
|
+
# to the hospital or not.
|
65
79
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
66
80
|
# @return [CandidApiClient::Diagnoses::Types::Diagnosis]
|
67
81
|
def initialize(diagnosis_id:, created_at:, updated_at:, encounter_id:, code_type:, code:, name: OMIT,
|
68
|
-
additional_properties: nil)
|
82
|
+
present_on_admission_indicator: OMIT, additional_properties: nil)
|
69
83
|
@diagnosis_id = diagnosis_id
|
70
84
|
@created_at = created_at
|
71
85
|
@updated_at = updated_at
|
@@ -73,6 +87,7 @@ module CandidApiClient
|
|
73
87
|
@name = name if name != OMIT
|
74
88
|
@code_type = code_type
|
75
89
|
@code = code
|
90
|
+
@present_on_admission_indicator = present_on_admission_indicator if present_on_admission_indicator != OMIT
|
76
91
|
@additional_properties = additional_properties
|
77
92
|
@_field_set = {
|
78
93
|
"diagnosis_id": diagnosis_id,
|
@@ -81,7 +96,8 @@ module CandidApiClient
|
|
81
96
|
"encounter_id": encounter_id,
|
82
97
|
"name": name,
|
83
98
|
"code_type": code_type,
|
84
|
-
"code": code
|
99
|
+
"code": code,
|
100
|
+
"present_on_admission_indicator": present_on_admission_indicator
|
85
101
|
}.reject do |_k, v|
|
86
102
|
v == OMIT
|
87
103
|
end
|
@@ -101,6 +117,7 @@ module CandidApiClient
|
|
101
117
|
name = struct["name"]
|
102
118
|
code_type = struct["code_type"]
|
103
119
|
code = struct["code"]
|
120
|
+
present_on_admission_indicator = struct["present_on_admission_indicator"]
|
104
121
|
new(
|
105
122
|
diagnosis_id: diagnosis_id,
|
106
123
|
created_at: created_at,
|
@@ -109,6 +126,7 @@ module CandidApiClient
|
|
109
126
|
name: name,
|
110
127
|
code_type: code_type,
|
111
128
|
code: code,
|
129
|
+
present_on_admission_indicator: present_on_admission_indicator,
|
112
130
|
additional_properties: struct
|
113
131
|
)
|
114
132
|
end
|
@@ -134,6 +152,7 @@ module CandidApiClient
|
|
134
152
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
135
153
|
obj.code_type.is_a?(CandidApiClient::Diagnoses::Types::DiagnosisTypeCode) != false || raise("Passed value for field obj.code_type is not the expected type, validation failed.")
|
136
154
|
obj.code.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
155
|
+
obj.present_on_admission_indicator&.is_a?(CandidApiClient::YesNoIndicator::Types::YesNoIndicator) != false || raise("Passed value for field obj.present_on_admission_indicator is not the expected type, validation failed.")
|
137
156
|
end
|
138
157
|
end
|
139
158
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "diagnosis_type_code"
|
4
|
+
require_relative "../../yes_no_indicator/types/yes_no_indicator"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
@@ -26,6 +27,13 @@ module CandidApiClient
|
|
26
27
|
# - (Optional) Period `.`
|
27
28
|
# - Up to 4 (or as few as 0) letters and digits
|
28
29
|
attr_reader :code
|
30
|
+
# @return [CandidApiClient::YesNoIndicator::Types::YesNoIndicator] For Institutional claims only.
|
31
|
+
# A "Y" indicates that the onset occurred prior to admission to the hospital.
|
32
|
+
# An "N" indicates that the onset did NOT occur prior to admission to the
|
33
|
+
# hospital.
|
34
|
+
# A "U" indicates that it is unknown whether the onset occurred prior to admission
|
35
|
+
# to the hospital or not.
|
36
|
+
attr_reader :present_on_admission_indicator
|
29
37
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
30
38
|
attr_reader :additional_properties
|
31
39
|
# @return [Object]
|
@@ -49,14 +57,26 @@ module CandidApiClient
|
|
49
57
|
# - Digit or the letter `A` or `B`
|
50
58
|
# - (Optional) Period `.`
|
51
59
|
# - Up to 4 (or as few as 0) letters and digits
|
60
|
+
# @param present_on_admission_indicator [CandidApiClient::YesNoIndicator::Types::YesNoIndicator] For Institutional claims only.
|
61
|
+
# A "Y" indicates that the onset occurred prior to admission to the hospital.
|
62
|
+
# An "N" indicates that the onset did NOT occur prior to admission to the
|
63
|
+
# hospital.
|
64
|
+
# A "U" indicates that it is unknown whether the onset occurred prior to admission
|
65
|
+
# to the hospital or not.
|
52
66
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
53
67
|
# @return [CandidApiClient::Diagnoses::Types::DiagnosisCreate]
|
54
|
-
def initialize(code_type:, code:, name: OMIT, additional_properties: nil)
|
68
|
+
def initialize(code_type:, code:, name: OMIT, present_on_admission_indicator: OMIT, additional_properties: nil)
|
55
69
|
@name = name if name != OMIT
|
56
70
|
@code_type = code_type
|
57
71
|
@code = code
|
72
|
+
@present_on_admission_indicator = present_on_admission_indicator if present_on_admission_indicator != OMIT
|
58
73
|
@additional_properties = additional_properties
|
59
|
-
@_field_set = {
|
74
|
+
@_field_set = {
|
75
|
+
"name": name,
|
76
|
+
"code_type": code_type,
|
77
|
+
"code": code,
|
78
|
+
"present_on_admission_indicator": present_on_admission_indicator
|
79
|
+
}.reject do |_k, v|
|
60
80
|
v == OMIT
|
61
81
|
end
|
62
82
|
end
|
@@ -70,10 +90,12 @@ module CandidApiClient
|
|
70
90
|
name = struct["name"]
|
71
91
|
code_type = struct["code_type"]
|
72
92
|
code = struct["code"]
|
93
|
+
present_on_admission_indicator = struct["present_on_admission_indicator"]
|
73
94
|
new(
|
74
95
|
name: name,
|
75
96
|
code_type: code_type,
|
76
97
|
code: code,
|
98
|
+
present_on_admission_indicator: present_on_admission_indicator,
|
77
99
|
additional_properties: struct
|
78
100
|
)
|
79
101
|
end
|
@@ -95,6 +117,7 @@ module CandidApiClient
|
|
95
117
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
96
118
|
obj.code_type.is_a?(CandidApiClient::Diagnoses::Types::DiagnosisTypeCode) != false || raise("Passed value for field obj.code_type is not the expected type, validation failed.")
|
97
119
|
obj.code.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
120
|
+
obj.present_on_admission_indicator&.is_a?(CandidApiClient::YesNoIndicator::Types::YesNoIndicator) != false || raise("Passed value for field obj.present_on_admission_indicator is not the expected type, validation failed.")
|
98
121
|
end
|
99
122
|
end
|
100
123
|
end
|
@@ -0,0 +1,126 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "diagnosis_type_code"
|
4
|
+
require_relative "../../yes_no_indicator/types/yes_no_indicator"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module CandidApiClient
|
9
|
+
module Diagnoses
|
10
|
+
module Types
|
11
|
+
class DiagnosisCreateOptional
|
12
|
+
# @return [String] Empty string not allowed.
|
13
|
+
attr_reader :name
|
14
|
+
# @return [CandidApiClient::Diagnoses::Types::DiagnosisTypeCode] Typically, providers submitting claims to Candid are using ICD-10 diagnosis
|
15
|
+
# codes. If you are using ICD-10 codes, the primary diagnosis code listed on the
|
16
|
+
# claim should use the ABK code_type. If more than one diagnosis is being
|
17
|
+
# submitted on a claim, please use ABF for the rest of the listed diagnoses. If
|
18
|
+
# you are using ICD-9 diagnosis codes, use BK and BF for the principal and
|
19
|
+
# following diagnosis code(s) respectively.
|
20
|
+
attr_reader :code_type
|
21
|
+
# @return [String] Empty string not allowed.
|
22
|
+
# Should be of the appropriate format for the provided `code_type`.
|
23
|
+
# Must obey the ICD-10 format if an ICD-10 code_type is provided, specifically:
|
24
|
+
# - Letter
|
25
|
+
# - Digit
|
26
|
+
# - Digit or the letter `A` or `B`
|
27
|
+
# - (Optional) Period `.`
|
28
|
+
# - Up to 4 (or as few as 0) letters and digits
|
29
|
+
attr_reader :code
|
30
|
+
# @return [CandidApiClient::YesNoIndicator::Types::YesNoIndicator] For Institutional claims only.
|
31
|
+
# A "Y" indicates that the onset occurred prior to admission to the hospital.
|
32
|
+
# An "N" indicates that the onset did NOT occur prior to admission to the
|
33
|
+
# hospital.
|
34
|
+
# A "U" indicates that it is unknown whether the onset occurred prior to admission
|
35
|
+
# to the hospital or not.
|
36
|
+
attr_reader :present_on_admission_indicator
|
37
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
38
|
+
attr_reader :additional_properties
|
39
|
+
# @return [Object]
|
40
|
+
attr_reader :_field_set
|
41
|
+
protected :_field_set
|
42
|
+
|
43
|
+
OMIT = Object.new
|
44
|
+
|
45
|
+
# @param name [String] Empty string not allowed.
|
46
|
+
# @param code_type [CandidApiClient::Diagnoses::Types::DiagnosisTypeCode] Typically, providers submitting claims to Candid are using ICD-10 diagnosis
|
47
|
+
# codes. If you are using ICD-10 codes, the primary diagnosis code listed on the
|
48
|
+
# claim should use the ABK code_type. If more than one diagnosis is being
|
49
|
+
# submitted on a claim, please use ABF for the rest of the listed diagnoses. If
|
50
|
+
# you are using ICD-9 diagnosis codes, use BK and BF for the principal and
|
51
|
+
# following diagnosis code(s) respectively.
|
52
|
+
# @param code [String] Empty string not allowed.
|
53
|
+
# Should be of the appropriate format for the provided `code_type`.
|
54
|
+
# Must obey the ICD-10 format if an ICD-10 code_type is provided, specifically:
|
55
|
+
# - Letter
|
56
|
+
# - Digit
|
57
|
+
# - Digit or the letter `A` or `B`
|
58
|
+
# - (Optional) Period `.`
|
59
|
+
# - Up to 4 (or as few as 0) letters and digits
|
60
|
+
# @param present_on_admission_indicator [CandidApiClient::YesNoIndicator::Types::YesNoIndicator] For Institutional claims only.
|
61
|
+
# A "Y" indicates that the onset occurred prior to admission to the hospital.
|
62
|
+
# An "N" indicates that the onset did NOT occur prior to admission to the
|
63
|
+
# hospital.
|
64
|
+
# A "U" indicates that it is unknown whether the onset occurred prior to admission
|
65
|
+
# to the hospital or not.
|
66
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
67
|
+
# @return [CandidApiClient::Diagnoses::Types::DiagnosisCreateOptional]
|
68
|
+
def initialize(name: OMIT, code_type: OMIT, code: OMIT, present_on_admission_indicator: OMIT,
|
69
|
+
additional_properties: nil)
|
70
|
+
@name = name if name != OMIT
|
71
|
+
@code_type = code_type if code_type != OMIT
|
72
|
+
@code = code if code != OMIT
|
73
|
+
@present_on_admission_indicator = present_on_admission_indicator if present_on_admission_indicator != OMIT
|
74
|
+
@additional_properties = additional_properties
|
75
|
+
@_field_set = {
|
76
|
+
"name": name,
|
77
|
+
"code_type": code_type,
|
78
|
+
"code": code,
|
79
|
+
"present_on_admission_indicator": present_on_admission_indicator
|
80
|
+
}.reject do |_k, v|
|
81
|
+
v == OMIT
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Deserialize a JSON object to an instance of DiagnosisCreateOptional
|
86
|
+
#
|
87
|
+
# @param json_object [String]
|
88
|
+
# @return [CandidApiClient::Diagnoses::Types::DiagnosisCreateOptional]
|
89
|
+
def self.from_json(json_object:)
|
90
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
91
|
+
name = struct["name"]
|
92
|
+
code_type = struct["code_type"]
|
93
|
+
code = struct["code"]
|
94
|
+
present_on_admission_indicator = struct["present_on_admission_indicator"]
|
95
|
+
new(
|
96
|
+
name: name,
|
97
|
+
code_type: code_type,
|
98
|
+
code: code,
|
99
|
+
present_on_admission_indicator: present_on_admission_indicator,
|
100
|
+
additional_properties: struct
|
101
|
+
)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Serialize an instance of DiagnosisCreateOptional to a JSON object
|
105
|
+
#
|
106
|
+
# @return [String]
|
107
|
+
def to_json(*_args)
|
108
|
+
@_field_set&.to_json
|
109
|
+
end
|
110
|
+
|
111
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
112
|
+
# hash and check each fields type against the current object's property
|
113
|
+
# definitions.
|
114
|
+
#
|
115
|
+
# @param obj [Object]
|
116
|
+
# @return [Void]
|
117
|
+
def self.validate_raw(obj:)
|
118
|
+
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
119
|
+
obj.code_type&.is_a?(CandidApiClient::Diagnoses::Types::DiagnosisTypeCode) != false || raise("Passed value for field obj.code_type is not the expected type, validation failed.")
|
120
|
+
obj.code&.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
121
|
+
obj.present_on_admission_indicator&.is_a?(CandidApiClient::YesNoIndicator::Types::YesNoIndicator) != false || raise("Passed value for field obj.present_on_admission_indicator is not the expected type, validation failed.")
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "diagnosis_type_code"
|
4
|
+
require_relative "../../yes_no_indicator/types/yes_no_indicator"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
@@ -28,6 +29,13 @@ module CandidApiClient
|
|
28
29
|
# - (Optional) Period `.`
|
29
30
|
# - Up to 4 (or as few as 0) letters and digits
|
30
31
|
attr_reader :code
|
32
|
+
# @return [CandidApiClient::YesNoIndicator::Types::YesNoIndicator] For Institutional claims only.
|
33
|
+
# A "Y" indicates that the onset occurred prior to admission to the hospital.
|
34
|
+
# An "N" indicates that the onset did NOT occur prior to admission to the
|
35
|
+
# hospital.
|
36
|
+
# A "U" indicates that it is unknown whether the onset occurred prior to admission
|
37
|
+
# to the hospital or not.
|
38
|
+
attr_reader :present_on_admission_indicator
|
31
39
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
32
40
|
attr_reader :additional_properties
|
33
41
|
# @return [Object]
|
@@ -52,19 +60,28 @@ module CandidApiClient
|
|
52
60
|
# - Digit or the letter `A` or `B`
|
53
61
|
# - (Optional) Period `.`
|
54
62
|
# - Up to 4 (or as few as 0) letters and digits
|
63
|
+
# @param present_on_admission_indicator [CandidApiClient::YesNoIndicator::Types::YesNoIndicator] For Institutional claims only.
|
64
|
+
# A "Y" indicates that the onset occurred prior to admission to the hospital.
|
65
|
+
# An "N" indicates that the onset did NOT occur prior to admission to the
|
66
|
+
# hospital.
|
67
|
+
# A "U" indicates that it is unknown whether the onset occurred prior to admission
|
68
|
+
# to the hospital or not.
|
55
69
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
56
70
|
# @return [CandidApiClient::Diagnoses::Types::StandaloneDiagnosisCreate]
|
57
|
-
def initialize(encounter_id:, code_type:, code:, name: OMIT,
|
71
|
+
def initialize(encounter_id:, code_type:, code:, name: OMIT, present_on_admission_indicator: OMIT,
|
72
|
+
additional_properties: nil)
|
58
73
|
@encounter_id = encounter_id
|
59
74
|
@name = name if name != OMIT
|
60
75
|
@code_type = code_type
|
61
76
|
@code = code
|
77
|
+
@present_on_admission_indicator = present_on_admission_indicator if present_on_admission_indicator != OMIT
|
62
78
|
@additional_properties = additional_properties
|
63
79
|
@_field_set = {
|
64
80
|
"encounter_id": encounter_id,
|
65
81
|
"name": name,
|
66
82
|
"code_type": code_type,
|
67
|
-
"code": code
|
83
|
+
"code": code,
|
84
|
+
"present_on_admission_indicator": present_on_admission_indicator
|
68
85
|
}.reject do |_k, v|
|
69
86
|
v == OMIT
|
70
87
|
end
|
@@ -80,11 +97,13 @@ module CandidApiClient
|
|
80
97
|
name = struct["name"]
|
81
98
|
code_type = struct["code_type"]
|
82
99
|
code = struct["code"]
|
100
|
+
present_on_admission_indicator = struct["present_on_admission_indicator"]
|
83
101
|
new(
|
84
102
|
encounter_id: encounter_id,
|
85
103
|
name: name,
|
86
104
|
code_type: code_type,
|
87
105
|
code: code,
|
106
|
+
present_on_admission_indicator: present_on_admission_indicator,
|
88
107
|
additional_properties: struct
|
89
108
|
)
|
90
109
|
end
|
@@ -107,6 +126,7 @@ module CandidApiClient
|
|
107
126
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
108
127
|
obj.code_type.is_a?(CandidApiClient::Diagnoses::Types::DiagnosisTypeCode) != false || raise("Passed value for field obj.code_type is not the expected type, validation failed.")
|
109
128
|
obj.code.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
129
|
+
obj.present_on_admission_indicator&.is_a?(CandidApiClient::YesNoIndicator::Types::YesNoIndicator) != false || raise("Passed value for field obj.present_on_admission_indicator is not the expected type, validation failed.")
|
110
130
|
end
|
111
131
|
end
|
112
132
|
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/street_address_long_zip_optional"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module EncounterProviders
|
9
|
+
module V2
|
10
|
+
module Types
|
11
|
+
class OrderingProviderOptional
|
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::StreetAddressLongZipOptional]
|
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::StreetAddressLongZipOptional]
|
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::OrderingProviderOptional]
|
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 OrderingProviderOptional
|
70
|
+
#
|
71
|
+
# @param json_object [String]
|
72
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::OrderingProviderOptional]
|
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::StreetAddressLongZipOptional.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 OrderingProviderOptional 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::StreetAddressLongZipOptional.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
|