candidhealth 1.7.0 → 1.8.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/default/client.rb +34 -6
- data/lib/candidhealth/charge_capture/v_1/client.rb +48 -48
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +70 -56
- data/lib/candidhealth/commons/types/clearinghouse.rb +18 -0
- data/lib/candidhealth/commons/types/procedure_modifier.rb +11 -0
- data/lib/candidhealth/encounter_providers/v_2/types/billing_provider.rb +1 -1
- data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb +1 -1
- data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +1 -1
- data/lib/candidhealth/encounters/v_4/client.rb +3253 -2040
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +111 -86
- data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +39 -33
- data/lib/candidhealth/encounters/v_4/types/encounter_create.rb +796 -0
- data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +131 -117
- data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +70 -56
- data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +29 -39
- data/lib/candidhealth/encounters/v_4/types/encounter_rendering_or_attending_provider_required_error.rb +55 -0
- data/lib/candidhealth/encounters/v_4/types/encounter_update.rb +736 -0
- data/lib/candidhealth/encounters_universal/types/universal_encounter_create.rb +944 -0
- data/lib/candidhealth/encounters_universal/types/universal_encounter_create_base.rb +691 -0
- data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter.rb +791 -0
- data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter_base.rb +572 -0
- data/lib/candidhealth/encounters_universal/types/universal_encounter_update.rb +872 -0
- data/lib/candidhealth/encounters_universal/types/universal_encounter_update_base.rb +700 -0
- data/lib/candidhealth/fee_schedules/v_3/client.rb +57 -0
- data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +12 -0
- data/lib/candidhealth/financials/types/patient_transaction_source.rb +1 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_new.rb +206 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_new.rb +207 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_new.rb +206 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_new.rb +245 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_create.rb +225 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_new.rb +219 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information_new.rb +222 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_new.rb +215 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_new.rb +218 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_new.rb +206 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_new.rb +215 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_new.rb +216 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information_new.rb +206 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/value_information_new.rb +215 -0
- data/lib/candidhealth/individual/types/patient.rb +6 -6
- data/lib/candidhealth/individual/types/patient_base.rb +6 -6
- data/lib/candidhealth/individual/types/patient_create.rb +6 -6
- data/lib/candidhealth/individual/types/patient_update.rb +6 -6
- data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +6 -6
- data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +2 -0
- data/lib/candidhealth/payers/client.rb +7 -0
- data/lib/candidhealth/payers/v_4/client.rb +137 -0
- data/lib/candidhealth/payers/v_4/types/clearinghouse_payer_info.rb +93 -0
- data/lib/candidhealth/payers/v_4/types/payer.rb +116 -0
- data/lib/candidhealth/payers/v_4/types/payer_ids.rb +107 -0
- data/lib/candidhealth/payers/v_4/types/payer_page.rb +88 -0
- data/lib/candidhealth/payers/v_4/types/support_state.rb +15 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +3 -3
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +72 -6
- data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
- data/lib/candidhealth/pre_encounter/patients/v_1/types/inferred_patient_metadata.rb +80 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +19 -5
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +19 -5
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +18 -4
- data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +1 -0
- data/lib/candidhealth/service_lines/v_2/client.rb +252 -10
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +28 -10
- data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +52 -40
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_base.rb +251 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_base_base.rb +243 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +48 -24
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +58 -46
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base.rb +273 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base_base.rb +265 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +64 -54
- data/lib/candidhealth/service_lines/v_2/types/service_line_update_base.rb +263 -0
- data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create.rb +271 -0
- data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create_standalone.rb +317 -0
- data/lib/candidhealth/service_lines/v_2/types/universal_service_line_update.rb +307 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +2 -2
- data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_base.rb +90 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_update.rb +112 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +44 -4
- metadata +43 -2
@@ -0,0 +1,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "payer"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module Payers
|
9
|
+
module V4
|
10
|
+
module Types
|
11
|
+
class PayerPage
|
12
|
+
# @return [Array<CandidApiClient::Payers::V4::Types::Payer>]
|
13
|
+
attr_reader :items
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :prev_page_token
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :next_page_token
|
18
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
19
|
+
attr_reader :additional_properties
|
20
|
+
# @return [Object]
|
21
|
+
attr_reader :_field_set
|
22
|
+
protected :_field_set
|
23
|
+
|
24
|
+
OMIT = Object.new
|
25
|
+
|
26
|
+
# @param items [Array<CandidApiClient::Payers::V4::Types::Payer>]
|
27
|
+
# @param prev_page_token [String]
|
28
|
+
# @param next_page_token [String]
|
29
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
# @return [CandidApiClient::Payers::V4::Types::PayerPage]
|
31
|
+
def initialize(items:, prev_page_token: OMIT, next_page_token: OMIT, additional_properties: nil)
|
32
|
+
@items = items
|
33
|
+
@prev_page_token = prev_page_token if prev_page_token != OMIT
|
34
|
+
@next_page_token = next_page_token if next_page_token != OMIT
|
35
|
+
@additional_properties = additional_properties
|
36
|
+
@_field_set = {
|
37
|
+
"items": items,
|
38
|
+
"prev_page_token": prev_page_token,
|
39
|
+
"next_page_token": next_page_token
|
40
|
+
}.reject do |_k, v|
|
41
|
+
v == OMIT
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Deserialize a JSON object to an instance of PayerPage
|
46
|
+
#
|
47
|
+
# @param json_object [String]
|
48
|
+
# @return [CandidApiClient::Payers::V4::Types::PayerPage]
|
49
|
+
def self.from_json(json_object:)
|
50
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
51
|
+
parsed_json = JSON.parse(json_object)
|
52
|
+
items = parsed_json["items"]&.map do |item|
|
53
|
+
item = item.to_json
|
54
|
+
CandidApiClient::Payers::V4::Types::Payer.from_json(json_object: item)
|
55
|
+
end
|
56
|
+
prev_page_token = struct["prev_page_token"]
|
57
|
+
next_page_token = struct["next_page_token"]
|
58
|
+
new(
|
59
|
+
items: items,
|
60
|
+
prev_page_token: prev_page_token,
|
61
|
+
next_page_token: next_page_token,
|
62
|
+
additional_properties: struct
|
63
|
+
)
|
64
|
+
end
|
65
|
+
|
66
|
+
# Serialize an instance of PayerPage to a JSON object
|
67
|
+
#
|
68
|
+
# @return [String]
|
69
|
+
def to_json(*_args)
|
70
|
+
@_field_set&.to_json
|
71
|
+
end
|
72
|
+
|
73
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
74
|
+
# hash and check each fields type against the current object's property
|
75
|
+
# definitions.
|
76
|
+
#
|
77
|
+
# @param obj [Object]
|
78
|
+
# @return [Void]
|
79
|
+
def self.validate_raw(obj:)
|
80
|
+
obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
|
81
|
+
obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.")
|
82
|
+
obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module Payers
|
5
|
+
module V4
|
6
|
+
module Types
|
7
|
+
class SupportState
|
8
|
+
NOT_SUPPORTED = "NOT_SUPPORTED"
|
9
|
+
SUPPORTED_ENROLLMENT_NOT_REQUIRED = "SUPPORTED_ENROLLMENT_NOT_REQUIRED"
|
10
|
+
SUPPORTED_ENROLLMENT_REQUIRED = "SUPPORTED_ENROLLMENT_REQUIRED"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -176,7 +176,7 @@ module CandidApiClient
|
|
176
176
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
177
177
|
# @example
|
178
178
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
179
|
-
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL },
|
179
|
+
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true })
|
180
180
|
def create(request:, request_options: nil)
|
181
181
|
response = @request_client.conn.post do |req|
|
182
182
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -347,7 +347,7 @@ module CandidApiClient
|
|
347
347
|
# api.pre_encounter.coverages.v_1.update(
|
348
348
|
# id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
349
349
|
# version: "version",
|
350
|
-
# request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL },
|
350
|
+
# request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true }
|
351
351
|
# )
|
352
352
|
def update(id:, version:, request:, request_options: nil)
|
353
353
|
response = @request_client.conn.put do |req|
|
@@ -759,7 +759,7 @@ module CandidApiClient
|
|
759
759
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
760
760
|
# @example
|
761
761
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
762
|
-
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL },
|
762
|
+
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true })
|
763
763
|
def create(request:, request_options: nil)
|
764
764
|
Async do
|
765
765
|
response = @request_client.conn.post do |req|
|
@@ -932,7 +932,7 @@ module CandidApiClient
|
|
932
932
|
# api.pre_encounter.coverages.v_1.update(
|
933
933
|
# id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
934
934
|
# version: "version",
|
935
|
-
# request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL },
|
935
|
+
# request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true }
|
936
936
|
# )
|
937
937
|
def update(id:, version:, request:, request_options: nil)
|
938
938
|
Async do
|
@@ -35,9 +35,9 @@ module CandidApiClient
|
|
35
35
|
# @param address [CandidApiClient::PreEncounter::Common::Types::Address]
|
36
36
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
37
37
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Subscriber]
|
38
|
-
def initialize(name:,
|
38
|
+
def initialize(name:, biological_sex:, date_of_birth: OMIT, address: OMIT, additional_properties: nil)
|
39
39
|
@name = name
|
40
|
-
@date_of_birth = date_of_birth
|
40
|
+
@date_of_birth = date_of_birth if date_of_birth != OMIT
|
41
41
|
@biological_sex = biological_sex
|
42
42
|
@address = address if address != OMIT
|
43
43
|
@additional_properties = additional_properties
|
@@ -96,7 +96,7 @@ module CandidApiClient
|
|
96
96
|
# @return [Void]
|
97
97
|
def self.validate_raw(obj:)
|
98
98
|
CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
|
99
|
-
obj.date_of_birth
|
99
|
+
obj.date_of_birth&.is_a?(Date) != false || raise("Passed value for field obj.date_of_birth is not the expected type, validation failed.")
|
100
100
|
obj.biological_sex.is_a?(CandidApiClient::PreEncounter::Common::Types::Sex) != false || raise("Passed value for field obj.biological_sex is not the expected type, validation failed.")
|
101
101
|
obj.address.nil? || CandidApiClient::PreEncounter::Common::Types::Address.validate_raw(obj: obj.address)
|
102
102
|
end
|
@@ -139,11 +139,14 @@ module CandidApiClient
|
|
139
139
|
# * :fax (String)
|
140
140
|
# * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
|
141
141
|
# * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
|
142
|
+
# * :inferred_patient_metadata (Hash)
|
143
|
+
# * :inferred_encounter_id (String)
|
144
|
+
# * :inferred_encounter_latest_date_of_service (Date)
|
142
145
|
# @param request_options [CandidApiClient::RequestOptions]
|
143
146
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
144
147
|
# @example
|
145
148
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
146
|
-
# api.pre_encounter.patients.v_1.create(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }],
|
149
|
+
# api.pre_encounter.patients.v_1.create(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
|
147
150
|
def create(request:, skip_duplicate_check: nil, request_options: nil)
|
148
151
|
response = @request_client.conn.post do |req|
|
149
152
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -281,11 +284,14 @@ module CandidApiClient
|
|
281
284
|
# * :fax (String)
|
282
285
|
# * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
|
283
286
|
# * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
|
287
|
+
# * :inferred_patient_metadata (Hash)
|
288
|
+
# * :inferred_encounter_id (String)
|
289
|
+
# * :inferred_encounter_latest_date_of_service (Date)
|
284
290
|
# @param request_options [CandidApiClient::RequestOptions]
|
285
291
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
286
292
|
# @example
|
287
293
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
288
|
-
# api.pre_encounter.patients.v_1.create_with_mrn(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }],
|
294
|
+
# api.pre_encounter.patients.v_1.create_with_mrn(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, mrn: "mrn" })
|
289
295
|
def create_with_mrn(request:, skip_duplicate_check: nil, request_options: nil)
|
290
296
|
response = @request_client.conn.post do |req|
|
291
297
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -399,6 +405,29 @@ module CandidApiClient
|
|
399
405
|
CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: response.body)
|
400
406
|
end
|
401
407
|
|
408
|
+
# Gets a patient by mrn.
|
409
|
+
#
|
410
|
+
# @param mrn [String]
|
411
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
412
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
413
|
+
# @example
|
414
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
415
|
+
# api.pre_encounter.patients.v_1.get_by_mrn(mrn: "mrn")
|
416
|
+
def get_by_mrn(mrn:, request_options: nil)
|
417
|
+
response = @request_client.conn.get do |req|
|
418
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
419
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
420
|
+
req.headers = {
|
421
|
+
**(req.headers || {}),
|
422
|
+
**@request_client.get_headers,
|
423
|
+
**(request_options&.additional_headers || {})
|
424
|
+
}.compact
|
425
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
426
|
+
request_options: request_options)}/patients/v1/mrn/#{mrn}"
|
427
|
+
end
|
428
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: response.body)
|
429
|
+
end
|
430
|
+
|
402
431
|
# Gets a patient along with it's full history. The return list is ordered by
|
403
432
|
# version ascending.
|
404
433
|
#
|
@@ -544,6 +573,9 @@ module CandidApiClient
|
|
544
573
|
# * :fax (String)
|
545
574
|
# * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
|
546
575
|
# * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
|
576
|
+
# * :inferred_patient_metadata (Hash)
|
577
|
+
# * :inferred_encounter_id (String)
|
578
|
+
# * :inferred_encounter_latest_date_of_service (Date)
|
547
579
|
# @param request_options [CandidApiClient::RequestOptions]
|
548
580
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
549
581
|
# @example
|
@@ -551,7 +583,7 @@ module CandidApiClient
|
|
551
583
|
# api.pre_encounter.patients.v_1.update(
|
552
584
|
# id: "id",
|
553
585
|
# version: "version",
|
554
|
-
# request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }],
|
586
|
+
# request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
|
555
587
|
# )
|
556
588
|
def update(id:, version:, request:, request_options: nil)
|
557
589
|
response = @request_client.conn.put do |req|
|
@@ -806,11 +838,14 @@ module CandidApiClient
|
|
806
838
|
# * :fax (String)
|
807
839
|
# * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
|
808
840
|
# * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
|
841
|
+
# * :inferred_patient_metadata (Hash)
|
842
|
+
# * :inferred_encounter_id (String)
|
843
|
+
# * :inferred_encounter_latest_date_of_service (Date)
|
809
844
|
# @param request_options [CandidApiClient::RequestOptions]
|
810
845
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
811
846
|
# @example
|
812
847
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
813
|
-
# api.pre_encounter.patients.v_1.create(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }],
|
848
|
+
# api.pre_encounter.patients.v_1.create(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
|
814
849
|
def create(request:, skip_duplicate_check: nil, request_options: nil)
|
815
850
|
Async do
|
816
851
|
response = @request_client.conn.post do |req|
|
@@ -950,11 +985,14 @@ module CandidApiClient
|
|
950
985
|
# * :fax (String)
|
951
986
|
# * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
|
952
987
|
# * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
|
988
|
+
# * :inferred_patient_metadata (Hash)
|
989
|
+
# * :inferred_encounter_id (String)
|
990
|
+
# * :inferred_encounter_latest_date_of_service (Date)
|
953
991
|
# @param request_options [CandidApiClient::RequestOptions]
|
954
992
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
955
993
|
# @example
|
956
994
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
957
|
-
# api.pre_encounter.patients.v_1.create_with_mrn(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }],
|
995
|
+
# api.pre_encounter.patients.v_1.create_with_mrn(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, mrn: "mrn" })
|
958
996
|
def create_with_mrn(request:, skip_duplicate_check: nil, request_options: nil)
|
959
997
|
Async do
|
960
998
|
response = @request_client.conn.post do |req|
|
@@ -1076,6 +1114,31 @@ module CandidApiClient
|
|
1076
1114
|
end
|
1077
1115
|
end
|
1078
1116
|
|
1117
|
+
# Gets a patient by mrn.
|
1118
|
+
#
|
1119
|
+
# @param mrn [String]
|
1120
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
1121
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
1122
|
+
# @example
|
1123
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1124
|
+
# api.pre_encounter.patients.v_1.get_by_mrn(mrn: "mrn")
|
1125
|
+
def get_by_mrn(mrn:, request_options: nil)
|
1126
|
+
Async do
|
1127
|
+
response = @request_client.conn.get do |req|
|
1128
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1129
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1130
|
+
req.headers = {
|
1131
|
+
**(req.headers || {}),
|
1132
|
+
**@request_client.get_headers,
|
1133
|
+
**(request_options&.additional_headers || {})
|
1134
|
+
}.compact
|
1135
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
1136
|
+
request_options: request_options)}/patients/v1/mrn/#{mrn}"
|
1137
|
+
end
|
1138
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: response.body)
|
1139
|
+
end
|
1140
|
+
end
|
1141
|
+
|
1079
1142
|
# Gets a patient along with it's full history. The return list is ordered by
|
1080
1143
|
# version ascending.
|
1081
1144
|
#
|
@@ -1223,6 +1286,9 @@ module CandidApiClient
|
|
1223
1286
|
# * :fax (String)
|
1224
1287
|
# * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
|
1225
1288
|
# * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
|
1289
|
+
# * :inferred_patient_metadata (Hash)
|
1290
|
+
# * :inferred_encounter_id (String)
|
1291
|
+
# * :inferred_encounter_latest_date_of_service (Date)
|
1226
1292
|
# @param request_options [CandidApiClient::RequestOptions]
|
1227
1293
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
1228
1294
|
# @example
|
@@ -1230,7 +1296,7 @@ module CandidApiClient
|
|
1230
1296
|
# api.pre_encounter.patients.v_1.update(
|
1231
1297
|
# id: "id",
|
1232
1298
|
# version: "version",
|
1233
|
-
# request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }],
|
1299
|
+
# request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
|
1234
1300
|
# )
|
1235
1301
|
def update(id:, version:, request:, request_options: nil)
|
1236
1302
|
Async do
|
@@ -38,11 +38,11 @@ module CandidApiClient
|
|
38
38
|
# @param address [CandidApiClient::PreEncounter::Common::Types::Address]
|
39
39
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
40
40
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
41
|
-
def initialize(name:,
|
41
|
+
def initialize(name:, address:, telecom: OMIT, email: OMIT, birth_date: OMIT, additional_properties: nil)
|
42
42
|
@name = name
|
43
43
|
@telecom = telecom if telecom != OMIT
|
44
44
|
@email = email if email != OMIT
|
45
|
-
@birth_date = birth_date
|
45
|
+
@birth_date = birth_date if birth_date != OMIT
|
46
46
|
@address = address
|
47
47
|
@additional_properties = additional_properties
|
48
48
|
@_field_set = {
|
@@ -110,7 +110,7 @@ module CandidApiClient
|
|
110
110
|
CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
|
111
111
|
obj.telecom.nil? || CandidApiClient::PreEncounter::Common::Types::ContactPoint.validate_raw(obj: obj.telecom)
|
112
112
|
obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
|
113
|
-
obj.birth_date
|
113
|
+
obj.birth_date&.is_a?(Date) != false || raise("Passed value for field obj.birth_date is not the expected type, validation failed.")
|
114
114
|
CandidApiClient::PreEncounter::Common::Types::Address.validate_raw(obj: obj.address)
|
115
115
|
end
|
116
116
|
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "date"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module Patients
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class InferredPatientMetadata
|
13
|
+
# @return [String]
|
14
|
+
attr_reader :inferred_encounter_id
|
15
|
+
# @return [Date]
|
16
|
+
attr_reader :inferred_encounter_latest_date_of_service
|
17
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
|
+
attr_reader :additional_properties
|
19
|
+
# @return [Object]
|
20
|
+
attr_reader :_field_set
|
21
|
+
protected :_field_set
|
22
|
+
|
23
|
+
OMIT = Object.new
|
24
|
+
|
25
|
+
# @param inferred_encounter_id [String]
|
26
|
+
# @param inferred_encounter_latest_date_of_service [Date]
|
27
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::InferredPatientMetadata]
|
29
|
+
def initialize(inferred_encounter_id:, inferred_encounter_latest_date_of_service:,
|
30
|
+
additional_properties: nil)
|
31
|
+
@inferred_encounter_id = inferred_encounter_id
|
32
|
+
@inferred_encounter_latest_date_of_service = inferred_encounter_latest_date_of_service
|
33
|
+
@additional_properties = additional_properties
|
34
|
+
@_field_set = {
|
35
|
+
"inferred_encounter_id": inferred_encounter_id,
|
36
|
+
"inferred_encounter_latest_date_of_service": inferred_encounter_latest_date_of_service
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Deserialize a JSON object to an instance of InferredPatientMetadata
|
41
|
+
#
|
42
|
+
# @param json_object [String]
|
43
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::InferredPatientMetadata]
|
44
|
+
def self.from_json(json_object:)
|
45
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
46
|
+
parsed_json = JSON.parse(json_object)
|
47
|
+
inferred_encounter_id = struct["inferred_encounter_id"]
|
48
|
+
inferred_encounter_latest_date_of_service = unless parsed_json["inferred_encounter_latest_date_of_service"].nil?
|
49
|
+
Date.parse(parsed_json["inferred_encounter_latest_date_of_service"])
|
50
|
+
end
|
51
|
+
new(
|
52
|
+
inferred_encounter_id: inferred_encounter_id,
|
53
|
+
inferred_encounter_latest_date_of_service: inferred_encounter_latest_date_of_service,
|
54
|
+
additional_properties: struct
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Serialize an instance of InferredPatientMetadata to a JSON object
|
59
|
+
#
|
60
|
+
# @return [String]
|
61
|
+
def to_json(*_args)
|
62
|
+
@_field_set&.to_json
|
63
|
+
end
|
64
|
+
|
65
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
66
|
+
# hash and check each fields type against the current object's property
|
67
|
+
# definitions.
|
68
|
+
#
|
69
|
+
# @param obj [Object]
|
70
|
+
# @return [Void]
|
71
|
+
def self.validate_raw(obj:)
|
72
|
+
obj.inferred_encounter_id.is_a?(String) != false || raise("Passed value for field obj.inferred_encounter_id is not the expected type, validation failed.")
|
73
|
+
obj.inferred_encounter_latest_date_of_service.is_a?(Date) != false || raise("Passed value for field obj.inferred_encounter_latest_date_of_service is not the expected type, validation failed.")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -22,6 +22,7 @@ require_relative "authorization"
|
|
22
22
|
require_relative "referral"
|
23
23
|
require_relative "do_not_invoice_reason"
|
24
24
|
require_relative "origination_detail"
|
25
|
+
require_relative "inferred_patient_metadata"
|
25
26
|
require "ostruct"
|
26
27
|
require "json"
|
27
28
|
|
@@ -112,6 +113,8 @@ module CandidApiClient
|
|
112
113
|
attr_reader :tag_ids
|
113
114
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail] Information about the patient source, if applicable.
|
114
115
|
attr_reader :origination_detail
|
116
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::InferredPatientMetadata] Metadata for the patient used for patient inference from encounters.
|
117
|
+
attr_reader :inferred_patient_metadata
|
115
118
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
116
119
|
attr_reader :additional_properties
|
117
120
|
# @return [Object]
|
@@ -162,10 +165,11 @@ module CandidApiClient
|
|
162
165
|
# @param note_ids [Array<String>]
|
163
166
|
# @param tag_ids [Array<String>]
|
164
167
|
# @param origination_detail [CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail] Information about the patient source, if applicable.
|
168
|
+
# @param inferred_patient_metadata [CandidApiClient::PreEncounter::Patients::V1::Types::InferredPatientMetadata] Metadata for the patient used for patient inference from encounters.
|
165
169
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
166
170
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatient]
|
167
|
-
def initialize(name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:,
|
168
|
-
social_security_number: OMIT, sexual_orientation: OMIT, pronouns: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, do_not_invoice_reason: OMIT, note_ids: OMIT, tag_ids: OMIT, origination_detail: OMIT, additional_properties: nil)
|
171
|
+
def initialize(name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, other_telecoms:, contacts:, general_practitioners:, filing_order:, other_identifiers: OMIT, gender: OMIT,
|
172
|
+
social_security_number: OMIT, sexual_orientation: OMIT, pronouns: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, primary_telecom: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, do_not_invoice_reason: OMIT, note_ids: OMIT, tag_ids: OMIT, origination_detail: OMIT, inferred_patient_metadata: OMIT, additional_properties: nil)
|
169
173
|
@name = name
|
170
174
|
@other_names = other_names
|
171
175
|
@other_identifiers = other_identifiers if other_identifiers != OMIT
|
@@ -183,7 +187,7 @@ module CandidApiClient
|
|
183
187
|
@multiple_birth = multiple_birth if multiple_birth != OMIT
|
184
188
|
@primary_address = primary_address
|
185
189
|
@other_addresses = other_addresses
|
186
|
-
@primary_telecom = primary_telecom
|
190
|
+
@primary_telecom = primary_telecom if primary_telecom != OMIT
|
187
191
|
@other_telecoms = other_telecoms
|
188
192
|
@email = email if email != OMIT
|
189
193
|
if electronic_communication_opt_in != OMIT
|
@@ -208,6 +212,7 @@ module CandidApiClient
|
|
208
212
|
@note_ids = note_ids if note_ids != OMIT
|
209
213
|
@tag_ids = tag_ids if tag_ids != OMIT
|
210
214
|
@origination_detail = origination_detail if origination_detail != OMIT
|
215
|
+
@inferred_patient_metadata = inferred_patient_metadata if inferred_patient_metadata != OMIT
|
211
216
|
@additional_properties = additional_properties
|
212
217
|
@_field_set = {
|
213
218
|
"name": name,
|
@@ -247,7 +252,8 @@ module CandidApiClient
|
|
247
252
|
"do_not_invoice_reason": do_not_invoice_reason,
|
248
253
|
"note_ids": note_ids,
|
249
254
|
"tag_ids": tag_ids,
|
250
|
-
"origination_detail": origination_detail
|
255
|
+
"origination_detail": origination_detail,
|
256
|
+
"inferred_patient_metadata": inferred_patient_metadata
|
251
257
|
}.reject do |_k, v|
|
252
258
|
v == OMIT
|
253
259
|
end
|
@@ -360,6 +366,12 @@ module CandidApiClient
|
|
360
366
|
origination_detail = parsed_json["origination_detail"].to_json
|
361
367
|
origination_detail = CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail.from_json(json_object: origination_detail)
|
362
368
|
end
|
369
|
+
if parsed_json["inferred_patient_metadata"].nil?
|
370
|
+
inferred_patient_metadata = nil
|
371
|
+
else
|
372
|
+
inferred_patient_metadata = parsed_json["inferred_patient_metadata"].to_json
|
373
|
+
inferred_patient_metadata = CandidApiClient::PreEncounter::Patients::V1::Types::InferredPatientMetadata.from_json(json_object: inferred_patient_metadata)
|
374
|
+
end
|
363
375
|
new(
|
364
376
|
name: name,
|
365
377
|
other_names: other_names,
|
@@ -399,6 +411,7 @@ module CandidApiClient
|
|
399
411
|
note_ids: note_ids,
|
400
412
|
tag_ids: tag_ids,
|
401
413
|
origination_detail: origination_detail,
|
414
|
+
inferred_patient_metadata: inferred_patient_metadata,
|
402
415
|
additional_properties: struct
|
403
416
|
)
|
404
417
|
end
|
@@ -434,7 +447,7 @@ module CandidApiClient
|
|
434
447
|
obj.multiple_birth&.is_a?(Integer) != false || raise("Passed value for field obj.multiple_birth is not the expected type, validation failed.")
|
435
448
|
CandidApiClient::PreEncounter::Common::Types::Address.validate_raw(obj: obj.primary_address)
|
436
449
|
obj.other_addresses.is_a?(Array) != false || raise("Passed value for field obj.other_addresses is not the expected type, validation failed.")
|
437
|
-
CandidApiClient::PreEncounter::Common::Types::ContactPoint.validate_raw(obj: obj.primary_telecom)
|
450
|
+
obj.primary_telecom.nil? || CandidApiClient::PreEncounter::Common::Types::ContactPoint.validate_raw(obj: obj.primary_telecom)
|
438
451
|
obj.other_telecoms.is_a?(Array) != false || raise("Passed value for field obj.other_telecoms is not the expected type, validation failed.")
|
439
452
|
obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
|
440
453
|
obj.electronic_communication_opt_in&.is_a?(Boolean) != false || raise("Passed value for field obj.electronic_communication_opt_in is not the expected type, validation failed.")
|
@@ -455,6 +468,7 @@ module CandidApiClient
|
|
455
468
|
obj.note_ids&.is_a?(Array) != false || raise("Passed value for field obj.note_ids is not the expected type, validation failed.")
|
456
469
|
obj.tag_ids&.is_a?(Array) != false || raise("Passed value for field obj.tag_ids is not the expected type, validation failed.")
|
457
470
|
obj.origination_detail.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::OriginationDetail.validate_raw(obj: obj.origination_detail)
|
471
|
+
obj.inferred_patient_metadata.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::InferredPatientMetadata.validate_raw(obj: obj.inferred_patient_metadata)
|
458
472
|
end
|
459
473
|
end
|
460
474
|
end
|