candidhealth 0.39.5 → 0.39.7
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/charge_capture/v_1/client.rb +8 -0
- data/lib/candidhealth/commons/types/procedure_modifier.rb +1 -0
- data/lib/candidhealth/encounters/v_4/client.rb +12 -4
- data/lib/candidhealth/encounters/v_4/types/payer_plan_group_payer_does_not_match_insurance_card_error.rb +77 -0
- data/lib/candidhealth/fee_schedules/v_3/client.rb +16 -4
- data/lib/candidhealth/fee_schedules/v_3/types/dimension_match.rb +16 -2
- data/lib/candidhealth/fee_schedules/v_3/types/dimensions.rb +16 -2
- data/lib/candidhealth/fee_schedules/v_3/types/match_payer_plan_groups.rb +85 -0
- data/lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb +15 -2
- data/lib/candidhealth/fee_schedules/v_3/types/payer_plan_group_does_not_match_rate_payer_error.rb +75 -0
- data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +39 -14
- data/lib/candidhealth/insurance_cards/v_2/types/insurance_card.rb +10 -2
- data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb +10 -2
- data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb +10 -2
- data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +27 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +98 -4
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +2 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +2 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/visit.rb +96 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/visits_page.rb +98 -0
- data/lib/candidhealth/pre_encounter/common/types/external_identifier.rb +87 -0
- data/lib/candidhealth/pre_encounter/common/types/external_provider.rb +10 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +89 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/address.rb +118 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefits_related_entity.rb +11 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverages_page.rb +98 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/expanded_member_info.rb +133 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +10 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code.rb +1 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/member_info.rb +93 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_metadata.rb +38 -3
- data/lib/candidhealth/pre_encounter/eligibility_checks/client.rb +32 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +116 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check.rb +119 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_request.rb +135 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_response.rb +15 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/encounter.rb +83 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/individual_provider.rb +81 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/organization_provider.rb +74 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/parsed_response.rb +99 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/provider.rb +66 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/request_correction.rb +79 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_item.rb +5 -5
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +70 -14
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +14 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +14 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +13 -1
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +19 -0
- metadata +23 -2
@@ -0,0 +1,99 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../coverages/v_1/types/eligibility_status"
|
4
|
+
require_relative "../../../coverages/v_1/types/plan_metadata"
|
5
|
+
require_relative "../../../coverages/v_1/types/coverage_benefits"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module PreEncounter
|
11
|
+
module EligibilityChecks
|
12
|
+
module V1
|
13
|
+
module Types
|
14
|
+
class ParsedResponse
|
15
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityStatus]
|
16
|
+
attr_reader :eligibility_status
|
17
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::PlanMetadata]
|
18
|
+
attr_reader :plan_metadata
|
19
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits]
|
20
|
+
attr_reader :benefits
|
21
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
+
attr_reader :additional_properties
|
23
|
+
# @return [Object]
|
24
|
+
attr_reader :_field_set
|
25
|
+
protected :_field_set
|
26
|
+
|
27
|
+
OMIT = Object.new
|
28
|
+
|
29
|
+
# @param eligibility_status [CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityStatus]
|
30
|
+
# @param plan_metadata [CandidApiClient::PreEncounter::Coverages::V1::Types::PlanMetadata]
|
31
|
+
# @param benefits [CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits]
|
32
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
33
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::ParsedResponse]
|
34
|
+
def initialize(eligibility_status:, plan_metadata: OMIT, benefits: OMIT, additional_properties: nil)
|
35
|
+
@eligibility_status = eligibility_status
|
36
|
+
@plan_metadata = plan_metadata if plan_metadata != OMIT
|
37
|
+
@benefits = benefits if benefits != OMIT
|
38
|
+
@additional_properties = additional_properties
|
39
|
+
@_field_set = {
|
40
|
+
"eligibility_status": eligibility_status,
|
41
|
+
"plan_metadata": plan_metadata,
|
42
|
+
"benefits": benefits
|
43
|
+
}.reject do |_k, v|
|
44
|
+
v == OMIT
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Deserialize a JSON object to an instance of ParsedResponse
|
49
|
+
#
|
50
|
+
# @param json_object [String]
|
51
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::ParsedResponse]
|
52
|
+
def self.from_json(json_object:)
|
53
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
54
|
+
parsed_json = JSON.parse(json_object)
|
55
|
+
eligibility_status = struct["eligibility_status"]
|
56
|
+
if parsed_json["plan_metadata"].nil?
|
57
|
+
plan_metadata = nil
|
58
|
+
else
|
59
|
+
plan_metadata = parsed_json["plan_metadata"].to_json
|
60
|
+
plan_metadata = CandidApiClient::PreEncounter::Coverages::V1::Types::PlanMetadata.from_json(json_object: plan_metadata)
|
61
|
+
end
|
62
|
+
if parsed_json["benefits"].nil?
|
63
|
+
benefits = nil
|
64
|
+
else
|
65
|
+
benefits = parsed_json["benefits"].to_json
|
66
|
+
benefits = CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits.from_json(json_object: benefits)
|
67
|
+
end
|
68
|
+
new(
|
69
|
+
eligibility_status: eligibility_status,
|
70
|
+
plan_metadata: plan_metadata,
|
71
|
+
benefits: benefits,
|
72
|
+
additional_properties: struct
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
# Serialize an instance of ParsedResponse to a JSON object
|
77
|
+
#
|
78
|
+
# @return [String]
|
79
|
+
def to_json(*_args)
|
80
|
+
@_field_set&.to_json
|
81
|
+
end
|
82
|
+
|
83
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
84
|
+
# hash and check each fields type against the current object's property
|
85
|
+
# definitions.
|
86
|
+
#
|
87
|
+
# @param obj [Object]
|
88
|
+
# @return [Void]
|
89
|
+
def self.validate_raw(obj:)
|
90
|
+
obj.eligibility_status.is_a?(CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityStatus) != false || raise("Passed value for field obj.eligibility_status is not the expected type, validation failed.")
|
91
|
+
obj.plan_metadata.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::PlanMetadata.validate_raw(obj: obj.plan_metadata)
|
92
|
+
obj.benefits.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits.validate_raw(obj: obj.benefits)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
require_relative "individual_provider"
|
5
|
+
require_relative "organization_provider"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module EligibilityChecks
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class Provider
|
13
|
+
# Deserialize a JSON object to an instance of Provider
|
14
|
+
#
|
15
|
+
# @param json_object [String]
|
16
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::Provider]
|
17
|
+
def self.from_json(json_object:)
|
18
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
19
|
+
begin
|
20
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::IndividualProvider.validate_raw(obj: struct)
|
21
|
+
unless json_object.nil?
|
22
|
+
return CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::IndividualProvider.from_json(json_object: json_object)
|
23
|
+
end
|
24
|
+
|
25
|
+
return nil
|
26
|
+
rescue StandardError
|
27
|
+
# noop
|
28
|
+
end
|
29
|
+
begin
|
30
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::OrganizationProvider.validate_raw(obj: struct)
|
31
|
+
unless json_object.nil?
|
32
|
+
return CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::OrganizationProvider.from_json(json_object: json_object)
|
33
|
+
end
|
34
|
+
|
35
|
+
return nil
|
36
|
+
rescue StandardError
|
37
|
+
# noop
|
38
|
+
end
|
39
|
+
struct
|
40
|
+
end
|
41
|
+
|
42
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
43
|
+
# hash and check each fields type against the current object's property
|
44
|
+
# definitions.
|
45
|
+
#
|
46
|
+
# @param obj [Object]
|
47
|
+
# @return [Void]
|
48
|
+
def self.validate_raw(obj:)
|
49
|
+
begin
|
50
|
+
return CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::IndividualProvider.validate_raw(obj: obj)
|
51
|
+
rescue StandardError
|
52
|
+
# noop
|
53
|
+
end
|
54
|
+
begin
|
55
|
+
return CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::OrganizationProvider.validate_raw(obj: obj)
|
56
|
+
rescue StandardError
|
57
|
+
# noop
|
58
|
+
end
|
59
|
+
raise("Passed value matched no type within the union, validation failed.")
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PreEncounter
|
8
|
+
module EligibilityChecks
|
9
|
+
module V1
|
10
|
+
module Types
|
11
|
+
class RequestCorrection
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :property
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :request_value
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :corrected_value
|
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 property [String]
|
27
|
+
# @param request_value [String]
|
28
|
+
# @param corrected_value [String]
|
29
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::RequestCorrection]
|
31
|
+
def initialize(property:, request_value:, corrected_value:, additional_properties: nil)
|
32
|
+
@property = property
|
33
|
+
@request_value = request_value
|
34
|
+
@corrected_value = corrected_value
|
35
|
+
@additional_properties = additional_properties
|
36
|
+
@_field_set = { "property": property, "request_value": request_value, "corrected_value": corrected_value }
|
37
|
+
end
|
38
|
+
|
39
|
+
# Deserialize a JSON object to an instance of RequestCorrection
|
40
|
+
#
|
41
|
+
# @param json_object [String]
|
42
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::RequestCorrection]
|
43
|
+
def self.from_json(json_object:)
|
44
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
45
|
+
property = struct["property"]
|
46
|
+
request_value = struct["request_value"]
|
47
|
+
corrected_value = struct["corrected_value"]
|
48
|
+
new(
|
49
|
+
property: property,
|
50
|
+
request_value: request_value,
|
51
|
+
corrected_value: corrected_value,
|
52
|
+
additional_properties: struct
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Serialize an instance of RequestCorrection to a JSON object
|
57
|
+
#
|
58
|
+
# @return [String]
|
59
|
+
def to_json(*_args)
|
60
|
+
@_field_set&.to_json
|
61
|
+
end
|
62
|
+
|
63
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
64
|
+
# hash and check each fields type against the current object's property
|
65
|
+
# definitions.
|
66
|
+
#
|
67
|
+
# @param obj [Object]
|
68
|
+
# @return [Void]
|
69
|
+
def self.validate_raw(obj:)
|
70
|
+
obj.property.is_a?(String) != false || raise("Passed value for field obj.property is not the expected type, validation failed.")
|
71
|
+
obj.request_value.is_a?(String) != false || raise("Passed value for field obj.request_value is not the expected type, validation failed.")
|
72
|
+
obj.corrected_value.is_a?(String) != false || raise("Passed value for field obj.corrected_value is not the expected type, validation failed.")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../../../appointments/v_1/types/appointment"
|
4
|
-
require_relative "../../../patients/v_1/types/
|
4
|
+
require_relative "../../../patients/v_1/types/mutable_patient_with_mrn"
|
5
5
|
require_relative "../../../coverages/v_1/types/mutable_coverage"
|
6
6
|
require_relative "../../../appointments/v_1/types/universal_service_identifier"
|
7
7
|
require "ostruct"
|
@@ -15,7 +15,7 @@ module CandidApiClient
|
|
15
15
|
class AppointmentListItem
|
16
16
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
|
17
17
|
attr_reader :appointment
|
18
|
-
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::
|
18
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn]
|
19
19
|
attr_reader :patient
|
20
20
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage]
|
21
21
|
attr_reader :primary_coverage
|
@@ -30,7 +30,7 @@ module CandidApiClient
|
|
30
30
|
OMIT = Object.new
|
31
31
|
|
32
32
|
# @param appointment [CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment]
|
33
|
-
# @param patient [CandidApiClient::PreEncounter::Patients::V1::Types::
|
33
|
+
# @param patient [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn]
|
34
34
|
# @param primary_coverage [CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage]
|
35
35
|
# @param primary_service_type [CandidApiClient::PreEncounter::Appointments::V1::Types::UniversalServiceIdentifier]
|
36
36
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -69,7 +69,7 @@ module CandidApiClient
|
|
69
69
|
patient = nil
|
70
70
|
else
|
71
71
|
patient = parsed_json["patient"].to_json
|
72
|
-
patient = CandidApiClient::PreEncounter::Patients::V1::Types::
|
72
|
+
patient = CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn.from_json(json_object: patient)
|
73
73
|
end
|
74
74
|
if parsed_json["primary_coverage"].nil?
|
75
75
|
primary_coverage = nil
|
@@ -102,7 +102,7 @@ module CandidApiClient
|
|
102
102
|
# @return [Void]
|
103
103
|
def self.validate_raw(obj:)
|
104
104
|
CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment.validate_raw(obj: obj.appointment)
|
105
|
-
CandidApiClient::PreEncounter::Patients::V1::Types::
|
105
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn.validate_raw(obj: obj.patient)
|
106
106
|
obj.primary_coverage.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage.validate_raw(obj: obj.primary_coverage)
|
107
107
|
obj.primary_service_type&.is_a?(CandidApiClient::PreEncounter::Appointments::V1::Types::UniversalServiceIdentifier) != false || raise("Passed value for field obj.primary_service_type is not the expected type, validation failed.")
|
108
108
|
end
|
@@ -37,6 +37,7 @@ module CandidApiClient
|
|
37
37
|
# * :start (Date)
|
38
38
|
# * :end_ (Date)
|
39
39
|
# * :other_names (Array<CandidApiClient::PreEncounter::Common::Types::HumanName>)
|
40
|
+
# * :other_identifiers (Array<CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier>)
|
40
41
|
# * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
|
41
42
|
# * :birth_date (Date)
|
42
43
|
# * :social_security_number (String)
|
@@ -116,7 +117,7 @@ module CandidApiClient
|
|
116
117
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
117
118
|
# @example
|
118
119
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
119
|
-
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] })
|
120
|
+
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], other_identifiers: [{ value: "string", system: "string" }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] })
|
120
121
|
def create(request:, skip_duplicate_check: nil, request_options: nil)
|
121
122
|
response = @request_client.conn.post do |req|
|
122
123
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -153,6 +154,7 @@ module CandidApiClient
|
|
153
154
|
# * :start (Date)
|
154
155
|
# * :end_ (Date)
|
155
156
|
# * :other_names (Array<CandidApiClient::PreEncounter::Common::Types::HumanName>)
|
157
|
+
# * :other_identifiers (Array<CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier>)
|
156
158
|
# * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
|
157
159
|
# * :birth_date (Date)
|
158
160
|
# * :social_security_number (String)
|
@@ -232,7 +234,7 @@ module CandidApiClient
|
|
232
234
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
233
235
|
# @example
|
234
236
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
235
|
-
# api.pre_encounter.patients.v_1.create_with_mrn(skip_duplicate_check: true, request: { mrn: "string", name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] })
|
237
|
+
# api.pre_encounter.patients.v_1.create_with_mrn(skip_duplicate_check: true, request: { mrn: "string", name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], other_identifiers: [{ value: "string", system: "string" }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] })
|
236
238
|
def create_with_mrn(request:, skip_duplicate_check: nil, request_options: nil)
|
237
239
|
response = @request_client.conn.post do |req|
|
238
240
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -360,6 +362,7 @@ module CandidApiClient
|
|
360
362
|
# * :start (Date)
|
361
363
|
# * :end_ (Date)
|
362
364
|
# * :other_names (Array<CandidApiClient::PreEncounter::Common::Types::HumanName>)
|
365
|
+
# * :other_identifiers (Array<CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier>)
|
363
366
|
# * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
|
364
367
|
# * :birth_date (Date)
|
365
368
|
# * :social_security_number (String)
|
@@ -442,7 +445,7 @@ module CandidApiClient
|
|
442
445
|
# api.pre_encounter.patients.v_1.update(
|
443
446
|
# id: "string",
|
444
447
|
# version: "string",
|
445
|
-
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] }
|
448
|
+
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], other_identifiers: [{ value: "string", system: "string" }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] }
|
446
449
|
# )
|
447
450
|
def update(id:, version:, request:, request_options: nil)
|
448
451
|
response = @request_client.conn.put do |req|
|
@@ -460,10 +463,9 @@ module CandidApiClient
|
|
460
463
|
CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: response.body)
|
461
464
|
end
|
462
465
|
|
463
|
-
# Sets a patient as deactivated. The path must contain the most recent version
|
464
|
-
# prevent race conditions. Deactivating historic versions is not
|
465
|
-
#
|
466
|
-
# the deactivated flag to false.
|
466
|
+
# Sets a patient as deactivated. The path must contain the most recent version
|
467
|
+
# plus 1 to prevent race conditions. Deactivating historic versions is not
|
468
|
+
# supported.
|
467
469
|
#
|
468
470
|
# @param id [String]
|
469
471
|
# @param version [String]
|
@@ -486,6 +488,31 @@ module CandidApiClient
|
|
486
488
|
end
|
487
489
|
end
|
488
490
|
|
491
|
+
# Removes the deactivated flag for a patient. The path must contain the most
|
492
|
+
# recent version plus 1 to prevent race conditions. Reactivating historic versions
|
493
|
+
# is not supported.
|
494
|
+
#
|
495
|
+
# @param id [String]
|
496
|
+
# @param version [String]
|
497
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
498
|
+
# @return [Void]
|
499
|
+
# @example
|
500
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
501
|
+
# api.pre_encounter.patients.v_1.reactivate(id: "string", version: "string")
|
502
|
+
def reactivate(id:, version:, request_options: nil)
|
503
|
+
@request_client.conn.patch do |req|
|
504
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
505
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
506
|
+
req.headers = {
|
507
|
+
**(req.headers || {}),
|
508
|
+
**@request_client.get_headers,
|
509
|
+
**(request_options&.additional_headers || {})
|
510
|
+
}.compact
|
511
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
512
|
+
request_options: request_options)}/patients/v1/#{id}/#{version}"
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
489
516
|
# Returns a list of Patients based on the search criteria.
|
490
517
|
#
|
491
518
|
# @param mrn [String]
|
@@ -572,6 +599,7 @@ module CandidApiClient
|
|
572
599
|
# * :start (Date)
|
573
600
|
# * :end_ (Date)
|
574
601
|
# * :other_names (Array<CandidApiClient::PreEncounter::Common::Types::HumanName>)
|
602
|
+
# * :other_identifiers (Array<CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier>)
|
575
603
|
# * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
|
576
604
|
# * :birth_date (Date)
|
577
605
|
# * :social_security_number (String)
|
@@ -651,7 +679,7 @@ module CandidApiClient
|
|
651
679
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
652
680
|
# @example
|
653
681
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
654
|
-
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] })
|
682
|
+
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], other_identifiers: [{ value: "string", system: "string" }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] })
|
655
683
|
def create(request:, skip_duplicate_check: nil, request_options: nil)
|
656
684
|
Async do
|
657
685
|
response = @request_client.conn.post do |req|
|
@@ -690,6 +718,7 @@ module CandidApiClient
|
|
690
718
|
# * :start (Date)
|
691
719
|
# * :end_ (Date)
|
692
720
|
# * :other_names (Array<CandidApiClient::PreEncounter::Common::Types::HumanName>)
|
721
|
+
# * :other_identifiers (Array<CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier>)
|
693
722
|
# * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
|
694
723
|
# * :birth_date (Date)
|
695
724
|
# * :social_security_number (String)
|
@@ -769,7 +798,7 @@ module CandidApiClient
|
|
769
798
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
770
799
|
# @example
|
771
800
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
772
|
-
# api.pre_encounter.patients.v_1.create_with_mrn(skip_duplicate_check: true, request: { mrn: "string", name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] })
|
801
|
+
# api.pre_encounter.patients.v_1.create_with_mrn(skip_duplicate_check: true, request: { mrn: "string", name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], other_identifiers: [{ value: "string", system: "string" }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] })
|
773
802
|
def create_with_mrn(request:, skip_duplicate_check: nil, request_options: nil)
|
774
803
|
Async do
|
775
804
|
response = @request_client.conn.post do |req|
|
@@ -905,6 +934,7 @@ module CandidApiClient
|
|
905
934
|
# * :start (Date)
|
906
935
|
# * :end_ (Date)
|
907
936
|
# * :other_names (Array<CandidApiClient::PreEncounter::Common::Types::HumanName>)
|
937
|
+
# * :other_identifiers (Array<CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier>)
|
908
938
|
# * :gender (CandidApiClient::PreEncounter::Common::Types::Gender)
|
909
939
|
# * :birth_date (Date)
|
910
940
|
# * :social_security_number (String)
|
@@ -987,7 +1017,7 @@ module CandidApiClient
|
|
987
1017
|
# api.pre_encounter.patients.v_1.update(
|
988
1018
|
# id: "string",
|
989
1019
|
# version: "string",
|
990
|
-
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] }
|
1020
|
+
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { } }], other_identifiers: [{ value: "string", system: "string" }], 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: { } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], primary_telecom: { value: "string", use: HOME }, other_telecoms: [{ value: "string", use: HOME }], 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: { } }, telecoms: [{ value: "string", use: HOME }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } }], period: { }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], non_insurance_payer_associations: [{ id: "string" }], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, telecom: { value: "string", use: HOME }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: { }, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: 1, period: { }, notes: "string" }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME }], addresses: , period: { }, canonical_id: "string", fax: "string" }, referral_number: "string" }], primary_service_facility_id: "string", do_not_invoice_reason: BANKRUPTCY, note_ids: ["string"], tag_ids: ["string"] }
|
991
1021
|
# )
|
992
1022
|
def update(id:, version:, request:, request_options: nil)
|
993
1023
|
Async do
|
@@ -1007,10 +1037,9 @@ module CandidApiClient
|
|
1007
1037
|
end
|
1008
1038
|
end
|
1009
1039
|
|
1010
|
-
# Sets a patient as deactivated. The path must contain the most recent version
|
1011
|
-
# prevent race conditions. Deactivating historic versions is not
|
1012
|
-
#
|
1013
|
-
# the deactivated flag to false.
|
1040
|
+
# Sets a patient as deactivated. The path must contain the most recent version
|
1041
|
+
# plus 1 to prevent race conditions. Deactivating historic versions is not
|
1042
|
+
# supported.
|
1014
1043
|
#
|
1015
1044
|
# @param id [String]
|
1016
1045
|
# @param version [String]
|
@@ -1035,6 +1064,33 @@ module CandidApiClient
|
|
1035
1064
|
end
|
1036
1065
|
end
|
1037
1066
|
|
1067
|
+
# Removes the deactivated flag for a patient. The path must contain the most
|
1068
|
+
# recent version plus 1 to prevent race conditions. Reactivating historic versions
|
1069
|
+
# is not supported.
|
1070
|
+
#
|
1071
|
+
# @param id [String]
|
1072
|
+
# @param version [String]
|
1073
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
1074
|
+
# @return [Void]
|
1075
|
+
# @example
|
1076
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1077
|
+
# api.pre_encounter.patients.v_1.reactivate(id: "string", version: "string")
|
1078
|
+
def reactivate(id:, version:, request_options: nil)
|
1079
|
+
Async do
|
1080
|
+
@request_client.conn.patch do |req|
|
1081
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1082
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1083
|
+
req.headers = {
|
1084
|
+
**(req.headers || {}),
|
1085
|
+
**@request_client.get_headers,
|
1086
|
+
**(request_options&.additional_headers || {})
|
1087
|
+
}.compact
|
1088
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
1089
|
+
request_options: request_options)}/patients/v1/#{id}/#{version}"
|
1090
|
+
end
|
1091
|
+
end
|
1092
|
+
end
|
1093
|
+
|
1038
1094
|
# Returns a list of Patients based on the search criteria.
|
1039
1095
|
#
|
1040
1096
|
# @param mrn [String]
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../../../common/types/human_name"
|
4
|
+
require_relative "../../../common/types/external_identifier"
|
4
5
|
require_relative "../../../common/types/gender"
|
5
6
|
require "date"
|
6
7
|
require_relative "../../../common/types/sex"
|
@@ -34,6 +35,8 @@ module CandidApiClient
|
|
34
35
|
attr_reader :name
|
35
36
|
# @return [Array<CandidApiClient::PreEncounter::Common::Types::HumanName>] Other names for the patient.
|
36
37
|
attr_reader :other_names
|
38
|
+
# @return [Array<CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier>] Other identifiers for the patient.
|
39
|
+
attr_reader :other_identifiers
|
37
40
|
# @return [CandidApiClient::PreEncounter::Common::Types::Gender]
|
38
41
|
attr_reader :gender
|
39
42
|
# @return [Date]
|
@@ -114,6 +117,7 @@ module CandidApiClient
|
|
114
117
|
|
115
118
|
# @param name [CandidApiClient::PreEncounter::Common::Types::HumanName]
|
116
119
|
# @param other_names [Array<CandidApiClient::PreEncounter::Common::Types::HumanName>] Other names for the patient.
|
120
|
+
# @param other_identifiers [Array<CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier>] Other identifiers for the patient.
|
117
121
|
# @param gender [CandidApiClient::PreEncounter::Common::Types::Gender]
|
118
122
|
# @param birth_date [Date]
|
119
123
|
# @param social_security_number [String]
|
@@ -153,10 +157,11 @@ module CandidApiClient
|
|
153
157
|
# @param tag_ids [Array<String>]
|
154
158
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
155
159
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatient]
|
156
|
-
def initialize(name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:,
|
157
|
-
|
160
|
+
def initialize(name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, other_identifiers: OMIT, gender: OMIT,
|
161
|
+
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, do_not_invoice_reason: OMIT, note_ids: OMIT, tag_ids: OMIT, additional_properties: nil)
|
158
162
|
@name = name
|
159
163
|
@other_names = other_names
|
164
|
+
@other_identifiers = other_identifiers if other_identifiers != OMIT
|
160
165
|
@gender = gender if gender != OMIT
|
161
166
|
@birth_date = birth_date
|
162
167
|
@social_security_number = social_security_number if social_security_number != OMIT
|
@@ -198,6 +203,7 @@ module CandidApiClient
|
|
198
203
|
@_field_set = {
|
199
204
|
"name": name,
|
200
205
|
"other_names": other_names,
|
206
|
+
"other_identifiers": other_identifiers,
|
201
207
|
"gender": gender,
|
202
208
|
"birth_date": birth_date,
|
203
209
|
"social_security_number": social_security_number,
|
@@ -253,6 +259,10 @@ module CandidApiClient
|
|
253
259
|
item = item.to_json
|
254
260
|
CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: item)
|
255
261
|
end
|
262
|
+
other_identifiers = parsed_json["other_identifiers"]&.map do |item|
|
263
|
+
item = item.to_json
|
264
|
+
CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier.from_json(json_object: item)
|
265
|
+
end
|
256
266
|
gender = struct["gender"]
|
257
267
|
birth_date = (Date.parse(parsed_json["birth_date"]) unless parsed_json["birth_date"].nil?)
|
258
268
|
social_security_number = struct["social_security_number"]
|
@@ -335,6 +345,7 @@ module CandidApiClient
|
|
335
345
|
new(
|
336
346
|
name: name,
|
337
347
|
other_names: other_names,
|
348
|
+
other_identifiers: other_identifiers,
|
338
349
|
gender: gender,
|
339
350
|
birth_date: birth_date,
|
340
351
|
social_security_number: social_security_number,
|
@@ -388,6 +399,7 @@ module CandidApiClient
|
|
388
399
|
def self.validate_raw(obj:)
|
389
400
|
CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
|
390
401
|
obj.other_names.is_a?(Array) != false || raise("Passed value for field obj.other_names is not the expected type, validation failed.")
|
402
|
+
obj.other_identifiers&.is_a?(Array) != false || raise("Passed value for field obj.other_identifiers is not the expected type, validation failed.")
|
391
403
|
obj.gender&.is_a?(CandidApiClient::PreEncounter::Common::Types::Gender) != false || raise("Passed value for field obj.gender is not the expected type, validation failed.")
|
392
404
|
obj.birth_date.is_a?(Date) != false || raise("Passed value for field obj.birth_date is not the expected type, validation failed.")
|
393
405
|
obj.social_security_number&.is_a?(String) != false || raise("Passed value for field obj.social_security_number is not the expected type, validation failed.")
|