candidhealth 0.34.6 → 0.34.9
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/encounters/v_4/client.rb +32 -14
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +10 -2
- data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +10 -2
- data/lib/candidhealth/individual/types/patient.rb +13 -1
- data/lib/candidhealth/individual/types/patient_create.rb +13 -1
- data/lib/candidhealth/individual/types/patient_non_insurance_payer_info.rb +77 -0
- data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create.rb +70 -0
- data/lib/candidhealth/individual/types/patient_update.rb +16 -2
- data/lib/candidhealth/non_insurance_payers/v_1/client.rb +18 -2
- data/lib/candidhealth/non_insurance_payers/v_1/types/create_non_insurance_payer_request.rb +21 -2
- data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_address_update.rb +98 -0
- data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_update_request.rb +20 -2
- data/lib/candidhealth/pre_encounter/common/types/canonical_non_insurance_payer_association.rb +73 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +44 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +22 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +12 -4
- data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +24 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +24 -2
- data/lib/candidhealth/service_lines/v_2/client.rb +22 -2
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +30 -2
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +4 -0
- metadata +6 -2
@@ -3,6 +3,7 @@
|
|
3
3
|
require_relative "../../../common/types/human_name"
|
4
4
|
require "date"
|
5
5
|
require_relative "../../../common/types/sex"
|
6
|
+
require_relative "../../../common/types/address"
|
6
7
|
require "ostruct"
|
7
8
|
require "json"
|
8
9
|
|
@@ -18,6 +19,8 @@ module CandidApiClient
|
|
18
19
|
attr_reader :date_of_birth
|
19
20
|
# @return [CandidApiClient::PreEncounter::Common::Types::Sex]
|
20
21
|
attr_reader :biological_sex
|
22
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Address]
|
23
|
+
attr_reader :address
|
21
24
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
22
25
|
attr_reader :additional_properties
|
23
26
|
# @return [Object]
|
@@ -29,14 +32,23 @@ module CandidApiClient
|
|
29
32
|
# @param name [CandidApiClient::PreEncounter::Common::Types::HumanName]
|
30
33
|
# @param date_of_birth [Date]
|
31
34
|
# @param biological_sex [CandidApiClient::PreEncounter::Common::Types::Sex]
|
35
|
+
# @param address [CandidApiClient::PreEncounter::Common::Types::Address]
|
32
36
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
33
37
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Subscriber]
|
34
|
-
def initialize(name:, date_of_birth:, biological_sex:, additional_properties: nil)
|
38
|
+
def initialize(name:, date_of_birth:, biological_sex:, address: OMIT, additional_properties: nil)
|
35
39
|
@name = name
|
36
40
|
@date_of_birth = date_of_birth
|
37
41
|
@biological_sex = biological_sex
|
42
|
+
@address = address if address != OMIT
|
38
43
|
@additional_properties = additional_properties
|
39
|
-
@_field_set = {
|
44
|
+
@_field_set = {
|
45
|
+
"name": name,
|
46
|
+
"date_of_birth": date_of_birth,
|
47
|
+
"biological_sex": biological_sex,
|
48
|
+
"address": address
|
49
|
+
}.reject do |_k, v|
|
50
|
+
v == OMIT
|
51
|
+
end
|
40
52
|
end
|
41
53
|
|
42
54
|
# Deserialize a JSON object to an instance of Subscriber
|
@@ -54,10 +66,17 @@ module CandidApiClient
|
|
54
66
|
end
|
55
67
|
date_of_birth = (Date.parse(parsed_json["date_of_birth"]) unless parsed_json["date_of_birth"].nil?)
|
56
68
|
biological_sex = struct["biological_sex"]
|
69
|
+
if parsed_json["address"].nil?
|
70
|
+
address = nil
|
71
|
+
else
|
72
|
+
address = parsed_json["address"].to_json
|
73
|
+
address = CandidApiClient::PreEncounter::Common::Types::Address.from_json(json_object: address)
|
74
|
+
end
|
57
75
|
new(
|
58
76
|
name: name,
|
59
77
|
date_of_birth: date_of_birth,
|
60
78
|
biological_sex: biological_sex,
|
79
|
+
address: address,
|
61
80
|
additional_properties: struct
|
62
81
|
)
|
63
82
|
end
|
@@ -79,6 +98,7 @@ module CandidApiClient
|
|
79
98
|
CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
|
80
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.")
|
81
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
|
+
obj.address.nil? || CandidApiClient::PreEncounter::Common::Types::Address.validate_raw(obj: obj.address)
|
82
102
|
end
|
83
103
|
end
|
84
104
|
end
|
@@ -77,6 +77,7 @@ module CandidApiClient
|
|
77
77
|
# * :filing_order (Hash)
|
78
78
|
# * :coverages (Array<String>)
|
79
79
|
# * :non_insurance_payers (Array<String>)
|
80
|
+
# * :non_insurance_payer_associations (Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>)
|
80
81
|
# * :guarantor (Hash)
|
81
82
|
# * :name (Hash)
|
82
83
|
# * :family (String)
|
@@ -106,11 +107,12 @@ module CandidApiClient
|
|
106
107
|
# * :self_pay (Boolean)
|
107
108
|
# * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
|
108
109
|
# * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
|
110
|
+
# * :primary_service_facility_id (String)
|
109
111
|
# @param request_options [CandidApiClient::RequestOptions]
|
110
112
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
111
113
|
# @example
|
112
114
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
113
|
-
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }] })
|
115
|
+
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string", member_id: {"key":"value"} }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }], primary_service_facility_id: "string" })
|
114
116
|
def create(request:, skip_duplicate_check: nil, request_options: nil)
|
115
117
|
response = @request_client.conn.post do |req|
|
116
118
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -279,6 +281,7 @@ module CandidApiClient
|
|
279
281
|
# * :filing_order (Hash)
|
280
282
|
# * :coverages (Array<String>)
|
281
283
|
# * :non_insurance_payers (Array<String>)
|
284
|
+
# * :non_insurance_payer_associations (Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>)
|
282
285
|
# * :guarantor (Hash)
|
283
286
|
# * :name (Hash)
|
284
287
|
# * :family (String)
|
@@ -308,6 +311,7 @@ module CandidApiClient
|
|
308
311
|
# * :self_pay (Boolean)
|
309
312
|
# * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
|
310
313
|
# * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
|
314
|
+
# * :primary_service_facility_id (String)
|
311
315
|
# @param request_options [CandidApiClient::RequestOptions]
|
312
316
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
313
317
|
# @example
|
@@ -315,7 +319,7 @@ module CandidApiClient
|
|
315
319
|
# api.pre_encounter.patients.v_1.update(
|
316
320
|
# id: "string",
|
317
321
|
# version: "string",
|
318
|
-
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }] }
|
322
|
+
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string", member_id: {"key":"value"} }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }], primary_service_facility_id: "string" }
|
319
323
|
# )
|
320
324
|
def update(id:, version:, request:, request_options: nil)
|
321
325
|
response = @request_client.conn.put do |req|
|
@@ -486,6 +490,7 @@ module CandidApiClient
|
|
486
490
|
# * :filing_order (Hash)
|
487
491
|
# * :coverages (Array<String>)
|
488
492
|
# * :non_insurance_payers (Array<String>)
|
493
|
+
# * :non_insurance_payer_associations (Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>)
|
489
494
|
# * :guarantor (Hash)
|
490
495
|
# * :name (Hash)
|
491
496
|
# * :family (String)
|
@@ -515,11 +520,12 @@ module CandidApiClient
|
|
515
520
|
# * :self_pay (Boolean)
|
516
521
|
# * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
|
517
522
|
# * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
|
523
|
+
# * :primary_service_facility_id (String)
|
518
524
|
# @param request_options [CandidApiClient::RequestOptions]
|
519
525
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
520
526
|
# @example
|
521
527
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
522
|
-
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }] })
|
528
|
+
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string", member_id: {"key":"value"} }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }], primary_service_facility_id: "string" })
|
523
529
|
def create(request:, skip_duplicate_check: nil, request_options: nil)
|
524
530
|
Async do
|
525
531
|
response = @request_client.conn.post do |req|
|
@@ -696,6 +702,7 @@ module CandidApiClient
|
|
696
702
|
# * :filing_order (Hash)
|
697
703
|
# * :coverages (Array<String>)
|
698
704
|
# * :non_insurance_payers (Array<String>)
|
705
|
+
# * :non_insurance_payer_associations (Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>)
|
699
706
|
# * :guarantor (Hash)
|
700
707
|
# * :name (Hash)
|
701
708
|
# * :family (String)
|
@@ -725,6 +732,7 @@ module CandidApiClient
|
|
725
732
|
# * :self_pay (Boolean)
|
726
733
|
# * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
|
727
734
|
# * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
|
735
|
+
# * :primary_service_facility_id (String)
|
728
736
|
# @param request_options [CandidApiClient::RequestOptions]
|
729
737
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
730
738
|
# @example
|
@@ -732,7 +740,7 @@ module CandidApiClient
|
|
732
740
|
# api.pre_encounter.patients.v_1.update(
|
733
741
|
# id: "string",
|
734
742
|
# version: "string",
|
735
|
-
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }] }
|
743
|
+
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string", member_id: {"key":"value"} }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }], primary_service_facility_id: "string" }
|
736
744
|
# )
|
737
745
|
def update(id:, version:, request:, request_options: nil)
|
738
746
|
Async do
|
@@ -38,9 +38,9 @@ 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:, birth_date:, address:, telecom: OMIT, email: OMIT, additional_properties: nil)
|
42
42
|
@name = name
|
43
|
-
@telecom = telecom
|
43
|
+
@telecom = telecom if telecom != OMIT
|
44
44
|
@email = email if email != OMIT
|
45
45
|
@birth_date = birth_date
|
46
46
|
@address = address
|
@@ -108,7 +108,7 @@ module CandidApiClient
|
|
108
108
|
# @return [Void]
|
109
109
|
def self.validate_raw(obj:)
|
110
110
|
CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
|
111
|
-
CandidApiClient::PreEncounter::Common::Types::ContactPoint.validate_raw(obj: obj.telecom)
|
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
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)
|
@@ -15,6 +15,7 @@ require_relative "external_provenance"
|
|
15
15
|
require_relative "contact"
|
16
16
|
require_relative "../../../common/types/external_provider"
|
17
17
|
require_relative "filing_order"
|
18
|
+
require_relative "../../../common/types/canonical_non_insurance_payer_association"
|
18
19
|
require_relative "guarantor"
|
19
20
|
require_relative "authorization"
|
20
21
|
require_relative "referral"
|
@@ -84,6 +85,8 @@ module CandidApiClient
|
|
84
85
|
attr_reader :filing_order
|
85
86
|
# @return [Array<String>]
|
86
87
|
attr_reader :non_insurance_payers
|
88
|
+
# @return [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>]
|
89
|
+
attr_reader :non_insurance_payer_associations
|
87
90
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
88
91
|
attr_reader :guarantor
|
89
92
|
# @return [Boolean]
|
@@ -92,6 +95,8 @@ module CandidApiClient
|
|
92
95
|
attr_reader :authorizations
|
93
96
|
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
|
94
97
|
attr_reader :referrals
|
98
|
+
# @return [String]
|
99
|
+
attr_reader :primary_service_facility_id
|
95
100
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
96
101
|
attr_reader :additional_properties
|
97
102
|
# @return [Object]
|
@@ -130,14 +135,16 @@ module CandidApiClient
|
|
130
135
|
# @param general_practitioners [Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>]
|
131
136
|
# @param filing_order [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
|
132
137
|
# @param non_insurance_payers [Array<String>]
|
138
|
+
# @param non_insurance_payer_associations [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>]
|
133
139
|
# @param guarantor [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
134
140
|
# @param self_pay [Boolean]
|
135
141
|
# @param authorizations [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>]
|
136
142
|
# @param referrals [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
|
143
|
+
# @param primary_service_facility_id [String]
|
137
144
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
138
145
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatient]
|
139
146
|
def initialize(name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:,
|
140
|
-
primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: 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, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, additional_properties: nil)
|
147
|
+
primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: 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, additional_properties: nil)
|
141
148
|
@name = name
|
142
149
|
@other_names = other_names
|
143
150
|
@gender = gender if gender != OMIT
|
@@ -166,10 +173,14 @@ module CandidApiClient
|
|
166
173
|
@general_practitioners = general_practitioners
|
167
174
|
@filing_order = filing_order
|
168
175
|
@non_insurance_payers = non_insurance_payers if non_insurance_payers != OMIT
|
176
|
+
if non_insurance_payer_associations != OMIT
|
177
|
+
@non_insurance_payer_associations = non_insurance_payer_associations
|
178
|
+
end
|
169
179
|
@guarantor = guarantor if guarantor != OMIT
|
170
180
|
@self_pay = self_pay if self_pay != OMIT
|
171
181
|
@authorizations = authorizations if authorizations != OMIT
|
172
182
|
@referrals = referrals if referrals != OMIT
|
183
|
+
@primary_service_facility_id = primary_service_facility_id if primary_service_facility_id != OMIT
|
173
184
|
@additional_properties = additional_properties
|
174
185
|
@_field_set = {
|
175
186
|
"name": name,
|
@@ -198,10 +209,12 @@ module CandidApiClient
|
|
198
209
|
"general_practitioners": general_practitioners,
|
199
210
|
"filing_order": filing_order,
|
200
211
|
"non_insurance_payers": non_insurance_payers,
|
212
|
+
"non_insurance_payer_associations": non_insurance_payer_associations,
|
201
213
|
"guarantor": guarantor,
|
202
214
|
"self_pay": self_pay,
|
203
215
|
"authorizations": authorizations,
|
204
|
-
"referrals": referrals
|
216
|
+
"referrals": referrals,
|
217
|
+
"primary_service_facility_id": primary_service_facility_id
|
205
218
|
}.reject do |_k, v|
|
206
219
|
v == OMIT
|
207
220
|
end
|
@@ -280,6 +293,10 @@ module CandidApiClient
|
|
280
293
|
filing_order = CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.from_json(json_object: filing_order)
|
281
294
|
end
|
282
295
|
non_insurance_payers = struct["non_insurance_payers"]
|
296
|
+
non_insurance_payer_associations = parsed_json["non_insurance_payer_associations"]&.map do |item|
|
297
|
+
item = item.to_json
|
298
|
+
CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation.from_json(json_object: item)
|
299
|
+
end
|
283
300
|
if parsed_json["guarantor"].nil?
|
284
301
|
guarantor = nil
|
285
302
|
else
|
@@ -295,6 +312,7 @@ module CandidApiClient
|
|
295
312
|
item = item.to_json
|
296
313
|
CandidApiClient::PreEncounter::Patients::V1::Types::Referral.from_json(json_object: item)
|
297
314
|
end
|
315
|
+
primary_service_facility_id = struct["primary_service_facility_id"]
|
298
316
|
new(
|
299
317
|
name: name,
|
300
318
|
other_names: other_names,
|
@@ -322,10 +340,12 @@ module CandidApiClient
|
|
322
340
|
general_practitioners: general_practitioners,
|
323
341
|
filing_order: filing_order,
|
324
342
|
non_insurance_payers: non_insurance_payers,
|
343
|
+
non_insurance_payer_associations: non_insurance_payer_associations,
|
325
344
|
guarantor: guarantor,
|
326
345
|
self_pay: self_pay,
|
327
346
|
authorizations: authorizations,
|
328
347
|
referrals: referrals,
|
348
|
+
primary_service_facility_id: primary_service_facility_id,
|
329
349
|
additional_properties: struct
|
330
350
|
)
|
331
351
|
end
|
@@ -370,10 +390,12 @@ module CandidApiClient
|
|
370
390
|
obj.general_practitioners.is_a?(Array) != false || raise("Passed value for field obj.general_practitioners is not the expected type, validation failed.")
|
371
391
|
CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.validate_raw(obj: obj.filing_order)
|
372
392
|
obj.non_insurance_payers&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers is not the expected type, validation failed.")
|
393
|
+
obj.non_insurance_payer_associations&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payer_associations is not the expected type, validation failed.")
|
373
394
|
obj.guarantor.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.validate_raw(obj: obj.guarantor)
|
374
395
|
obj.self_pay&.is_a?(Boolean) != false || raise("Passed value for field obj.self_pay is not the expected type, validation failed.")
|
375
396
|
obj.authorizations&.is_a?(Array) != false || raise("Passed value for field obj.authorizations is not the expected type, validation failed.")
|
376
397
|
obj.referrals&.is_a?(Array) != false || raise("Passed value for field obj.referrals is not the expected type, validation failed.")
|
398
|
+
obj.primary_service_facility_id&.is_a?(String) != false || raise("Passed value for field obj.primary_service_facility_id is not the expected type, validation failed.")
|
377
399
|
end
|
378
400
|
end
|
379
401
|
end
|
@@ -15,6 +15,7 @@ require_relative "external_provenance"
|
|
15
15
|
require_relative "contact"
|
16
16
|
require_relative "../../../common/types/external_provider"
|
17
17
|
require_relative "filing_order"
|
18
|
+
require_relative "../../../common/types/canonical_non_insurance_payer_association"
|
18
19
|
require_relative "guarantor"
|
19
20
|
require_relative "authorization"
|
20
21
|
require_relative "referral"
|
@@ -103,6 +104,8 @@ module CandidApiClient
|
|
103
104
|
attr_reader :filing_order
|
104
105
|
# @return [Array<String>]
|
105
106
|
attr_reader :non_insurance_payers
|
107
|
+
# @return [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>]
|
108
|
+
attr_reader :non_insurance_payer_associations
|
106
109
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
107
110
|
attr_reader :guarantor
|
108
111
|
# @return [Boolean]
|
@@ -111,6 +114,8 @@ module CandidApiClient
|
|
111
114
|
attr_reader :authorizations
|
112
115
|
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
|
113
116
|
attr_reader :referrals
|
117
|
+
# @return [String]
|
118
|
+
attr_reader :primary_service_facility_id
|
114
119
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
115
120
|
attr_reader :additional_properties
|
116
121
|
# @return [Object]
|
@@ -161,14 +166,16 @@ module CandidApiClient
|
|
161
166
|
# @param general_practitioners [Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>]
|
162
167
|
# @param filing_order [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
|
163
168
|
# @param non_insurance_payers [Array<String>]
|
169
|
+
# @param non_insurance_payer_associations [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>]
|
164
170
|
# @param guarantor [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
165
171
|
# @param self_pay [Boolean]
|
166
172
|
# @param authorizations [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>]
|
167
173
|
# @param referrals [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
|
174
|
+
# @param primary_service_facility_id [String]
|
168
175
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
169
176
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
170
177
|
def initialize(id:, mrn:, organization_id:, deactivated:, version:, updated_at:, updating_user_id:, name:,
|
171
|
-
other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: 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, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, additional_properties: nil)
|
178
|
+
other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: 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, additional_properties: nil)
|
172
179
|
@id = id
|
173
180
|
@mrn = mrn
|
174
181
|
@organization_id = organization_id
|
@@ -204,10 +211,14 @@ module CandidApiClient
|
|
204
211
|
@general_practitioners = general_practitioners
|
205
212
|
@filing_order = filing_order
|
206
213
|
@non_insurance_payers = non_insurance_payers if non_insurance_payers != OMIT
|
214
|
+
if non_insurance_payer_associations != OMIT
|
215
|
+
@non_insurance_payer_associations = non_insurance_payer_associations
|
216
|
+
end
|
207
217
|
@guarantor = guarantor if guarantor != OMIT
|
208
218
|
@self_pay = self_pay if self_pay != OMIT
|
209
219
|
@authorizations = authorizations if authorizations != OMIT
|
210
220
|
@referrals = referrals if referrals != OMIT
|
221
|
+
@primary_service_facility_id = primary_service_facility_id if primary_service_facility_id != OMIT
|
211
222
|
@additional_properties = additional_properties
|
212
223
|
@_field_set = {
|
213
224
|
"id": id,
|
@@ -243,10 +254,12 @@ module CandidApiClient
|
|
243
254
|
"general_practitioners": general_practitioners,
|
244
255
|
"filing_order": filing_order,
|
245
256
|
"non_insurance_payers": non_insurance_payers,
|
257
|
+
"non_insurance_payer_associations": non_insurance_payer_associations,
|
246
258
|
"guarantor": guarantor,
|
247
259
|
"self_pay": self_pay,
|
248
260
|
"authorizations": authorizations,
|
249
|
-
"referrals": referrals
|
261
|
+
"referrals": referrals,
|
262
|
+
"primary_service_facility_id": primary_service_facility_id
|
250
263
|
}.reject do |_k, v|
|
251
264
|
v == OMIT
|
252
265
|
end
|
@@ -332,6 +345,10 @@ module CandidApiClient
|
|
332
345
|
filing_order = CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.from_json(json_object: filing_order)
|
333
346
|
end
|
334
347
|
non_insurance_payers = struct["non_insurance_payers"]
|
348
|
+
non_insurance_payer_associations = parsed_json["non_insurance_payer_associations"]&.map do |item|
|
349
|
+
item = item.to_json
|
350
|
+
CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation.from_json(json_object: item)
|
351
|
+
end
|
335
352
|
if parsed_json["guarantor"].nil?
|
336
353
|
guarantor = nil
|
337
354
|
else
|
@@ -347,6 +364,7 @@ module CandidApiClient
|
|
347
364
|
item = item.to_json
|
348
365
|
CandidApiClient::PreEncounter::Patients::V1::Types::Referral.from_json(json_object: item)
|
349
366
|
end
|
367
|
+
primary_service_facility_id = struct["primary_service_facility_id"]
|
350
368
|
new(
|
351
369
|
id: id,
|
352
370
|
mrn: mrn,
|
@@ -381,10 +399,12 @@ module CandidApiClient
|
|
381
399
|
general_practitioners: general_practitioners,
|
382
400
|
filing_order: filing_order,
|
383
401
|
non_insurance_payers: non_insurance_payers,
|
402
|
+
non_insurance_payer_associations: non_insurance_payer_associations,
|
384
403
|
guarantor: guarantor,
|
385
404
|
self_pay: self_pay,
|
386
405
|
authorizations: authorizations,
|
387
406
|
referrals: referrals,
|
407
|
+
primary_service_facility_id: primary_service_facility_id,
|
388
408
|
additional_properties: struct
|
389
409
|
)
|
390
410
|
end
|
@@ -436,10 +456,12 @@ module CandidApiClient
|
|
436
456
|
obj.general_practitioners.is_a?(Array) != false || raise("Passed value for field obj.general_practitioners is not the expected type, validation failed.")
|
437
457
|
CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.validate_raw(obj: obj.filing_order)
|
438
458
|
obj.non_insurance_payers&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers is not the expected type, validation failed.")
|
459
|
+
obj.non_insurance_payer_associations&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payer_associations is not the expected type, validation failed.")
|
439
460
|
obj.guarantor.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.validate_raw(obj: obj.guarantor)
|
440
461
|
obj.self_pay&.is_a?(Boolean) != false || raise("Passed value for field obj.self_pay is not the expected type, validation failed.")
|
441
462
|
obj.authorizations&.is_a?(Array) != false || raise("Passed value for field obj.authorizations is not the expected type, validation failed.")
|
442
463
|
obj.referrals&.is_a?(Array) != false || raise("Passed value for field obj.referrals is not the expected type, validation failed.")
|
464
|
+
obj.primary_service_facility_id&.is_a?(String) != false || raise("Passed value for field obj.primary_service_facility_id is not the expected type, validation failed.")
|
443
465
|
end
|
444
466
|
end
|
445
467
|
end
|
@@ -36,11 +36,21 @@ module CandidApiClient
|
|
36
36
|
# * :description (String)
|
37
37
|
# * :date_of_service (Date)
|
38
38
|
# * :end_date_of_service (Date)
|
39
|
+
# * :drug_identification (Hash)
|
40
|
+
# * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
|
41
|
+
# * :national_drug_code (String)
|
42
|
+
# * :national_drug_unit_count (String)
|
43
|
+
# * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
|
44
|
+
# * :link_sequence_number (String)
|
45
|
+
# * :pharmacy_prescription_number (String)
|
46
|
+
# * :conversion_formula (String)
|
47
|
+
# * :drug_description (String)
|
48
|
+
# * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
|
39
49
|
# @param request_options [CandidApiClient::RequestOptions]
|
40
50
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
41
51
|
# @example
|
42
52
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
43
|
-
# api.service_lines.v_2.create(request: { modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, procedure_code: "string", quantity: "string", units: MJ, claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
53
|
+
# api.service_lines.v_2.create(request: { modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, procedure_code: "string", quantity: "string", units: MJ, claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }] })
|
44
54
|
def create(request:, request_options: nil)
|
45
55
|
response = @request_client.conn.post do |req|
|
46
56
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -154,11 +164,21 @@ module CandidApiClient
|
|
154
164
|
# * :description (String)
|
155
165
|
# * :date_of_service (Date)
|
156
166
|
# * :end_date_of_service (Date)
|
167
|
+
# * :drug_identification (Hash)
|
168
|
+
# * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
|
169
|
+
# * :national_drug_code (String)
|
170
|
+
# * :national_drug_unit_count (String)
|
171
|
+
# * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
|
172
|
+
# * :link_sequence_number (String)
|
173
|
+
# * :pharmacy_prescription_number (String)
|
174
|
+
# * :conversion_formula (String)
|
175
|
+
# * :drug_description (String)
|
176
|
+
# * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
|
157
177
|
# @param request_options [CandidApiClient::RequestOptions]
|
158
178
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
159
179
|
# @example
|
160
180
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
161
|
-
# api.service_lines.v_2.create(request: { modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, procedure_code: "string", quantity: "string", units: MJ, claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
181
|
+
# api.service_lines.v_2.create(request: { modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, procedure_code: "string", quantity: "string", units: MJ, claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }] })
|
162
182
|
def create(request:, request_options: nil)
|
163
183
|
Async do
|
164
184
|
response = @request_client.conn.post do |req|
|