candidhealth 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +74 -0
  3. data/lib/candidhealth/charge_capture/v_1/client.rb +48 -48
  4. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +70 -56
  5. data/lib/candidhealth/commons/types/clearinghouse.rb +18 -0
  6. data/lib/candidhealth/commons/types/procedure_modifier.rb +11 -0
  7. data/lib/candidhealth/credentialing/v_2/client.rb +342 -8
  8. data/lib/candidhealth/credentialing/v_2/types/base_credentialing_span.rb +143 -0
  9. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span.rb +165 -0
  10. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span_page.rb +88 -0
  11. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +34 -34
  12. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider.rb +1 -1
  13. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb +1 -1
  14. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +1 -1
  15. data/lib/candidhealth/encounters/v_4/client.rb +3253 -2040
  16. data/lib/candidhealth/encounters/v_4/types/encounter.rb +111 -86
  17. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +39 -33
  18. data/lib/candidhealth/encounters/v_4/types/encounter_create.rb +796 -0
  19. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +131 -117
  20. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +70 -56
  21. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +29 -39
  22. data/lib/candidhealth/encounters/v_4/types/encounter_rendering_or_attending_provider_required_error.rb +55 -0
  23. data/lib/candidhealth/encounters/v_4/types/encounter_update.rb +736 -0
  24. data/lib/candidhealth/encounters_universal/types/universal_encounter_create.rb +944 -0
  25. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_base.rb +691 -0
  26. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter.rb +791 -0
  27. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter_base.rb +572 -0
  28. data/lib/candidhealth/encounters_universal/types/universal_encounter_update.rb +872 -0
  29. data/lib/candidhealth/encounters_universal/types/universal_encounter_update_base.rb +700 -0
  30. data/lib/candidhealth/fee_schedules/v_3/client.rb +57 -0
  31. data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +12 -0
  32. data/lib/candidhealth/financials/types/patient_transaction_source.rb +1 -0
  33. data/lib/candidhealth/health_care_code_information/client.rb +30 -0
  34. data/lib/candidhealth/health_care_code_information/v_1/client.rb +268 -0
  35. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis.rb +236 -0
  36. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_code_qualifier.rb +14 -0
  37. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_new.rb +206 -0
  38. data/lib/candidhealth/health_care_code_information/v_1/types/code_list_qualifier_code.rb +1068 -0
  39. data/lib/candidhealth/health_care_code_information/v_1/types/condition_code.rb +71 -0
  40. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information.rb +237 -0
  41. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_code_qualifier.rb +13 -0
  42. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_new.rb +207 -0
  43. data/lib/candidhealth/health_care_code_information/v_1/types/date_time_period_format_qualifier.rb +54 -0
  44. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group.rb +236 -0
  45. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_code_qualifier.rb +13 -0
  46. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_new.rb +206 -0
  47. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury.rb +245 -0
  48. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_code_qualifier.rb +14 -0
  49. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_new.rb +245 -0
  50. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information.rb +218 -0
  51. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_create.rb +225 -0
  52. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_get_all_response.rb +227 -0
  53. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_new.rb +188 -0
  54. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_update.rb +225 -0
  55. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_code.rb +71 -0
  56. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information.rb +249 -0
  57. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_code_qualifier.rb +13 -0
  58. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_new.rb +219 -0
  59. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code.rb +25 -0
  60. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code_qualifier.rb +13 -0
  61. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information.rb +252 -0
  62. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information_new.rb +222 -0
  63. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information.rb +245 -0
  64. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_code_qualifier.rb +14 -0
  65. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_new.rb +215 -0
  66. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information.rb +248 -0
  67. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_code_qualifier.rb +14 -0
  68. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_new.rb +218 -0
  69. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit.rb +236 -0
  70. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_code_qualifier.rb +14 -0
  71. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_new.rb +206 -0
  72. data/lib/candidhealth/health_care_code_information/v_1/types/present_on_admission_indicator_code.rb +17 -0
  73. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis.rb +245 -0
  74. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_code_qualifier.rb +14 -0
  75. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_new.rb +215 -0
  76. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information.rb +246 -0
  77. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_code_qualifier.rb +15 -0
  78. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_new.rb +216 -0
  79. data/lib/candidhealth/health_care_code_information/v_1/types/rd_8_date.rb +72 -0
  80. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_admitting_diagnosis.rb +69 -0
  81. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_diagnosis_related_group.rb +69 -0
  82. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_diagnosis.rb +69 -0
  83. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_procedure_information.rb +71 -0
  84. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information.rb +236 -0
  85. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information_new.rb +206 -0
  86. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_qualifier.rb +13 -0
  87. data/lib/candidhealth/health_care_code_information/v_1/types/value_code.rb +119 -0
  88. data/lib/candidhealth/health_care_code_information/v_1/types/value_code_qualifier.rb +13 -0
  89. data/lib/candidhealth/health_care_code_information/v_1/types/value_information.rb +245 -0
  90. data/lib/candidhealth/health_care_code_information/v_1/types/value_information_new.rb +215 -0
  91. data/lib/candidhealth/individual/types/patient.rb +6 -6
  92. data/lib/candidhealth/individual/types/patient_base.rb +6 -6
  93. data/lib/candidhealth/individual/types/patient_create.rb +6 -6
  94. data/lib/candidhealth/individual/types/patient_update.rb +6 -6
  95. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +6 -6
  96. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +2 -0
  97. data/lib/candidhealth/patient_ar/client.rb +30 -0
  98. data/lib/candidhealth/patient_ar/v_1/client.rb +161 -0
  99. data/lib/candidhealth/patient_ar/v_1/types/insurance_adjustment_info.rb +60 -0
  100. data/lib/candidhealth/patient_ar/v_1/types/insurance_payment_info.rb +60 -0
  101. data/lib/candidhealth/patient_ar/v_1/types/invalid_filters_error_type.rb +60 -0
  102. data/lib/candidhealth/patient_ar/v_1/types/inventory_record.rb +101 -0
  103. data/lib/candidhealth/patient_ar/v_1/types/invoice_itemization_response.rb +103 -0
  104. data/lib/candidhealth/patient_ar/v_1/types/list_inventory_paged_response.rb +77 -0
  105. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_adjustment_info.rb +60 -0
  106. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_payment_info.rb +60 -0
  107. data/lib/candidhealth/patient_ar/v_1/types/patient_adjustment_info.rb +60 -0
  108. data/lib/candidhealth/patient_ar/v_1/types/patient_ar_status.rb +14 -0
  109. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_allocation.rb +76 -0
  110. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_info.rb +75 -0
  111. data/lib/candidhealth/patient_ar/v_1/types/service_line_itemization.rb +210 -0
  112. data/lib/candidhealth/payers/client.rb +7 -0
  113. data/lib/candidhealth/payers/v_4/client.rb +137 -0
  114. data/lib/candidhealth/payers/v_4/types/clearinghouse_payer_info.rb +93 -0
  115. data/lib/candidhealth/payers/v_4/types/payer.rb +116 -0
  116. data/lib/candidhealth/payers/v_4/types/payer_ids.rb +107 -0
  117. data/lib/candidhealth/payers/v_4/types/payer_page.rb +88 -0
  118. data/lib/candidhealth/payers/v_4/types/support_state.rb +15 -0
  119. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
  120. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +3 -3
  121. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +204 -6
  122. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
  123. data/lib/candidhealth/pre_encounter/patients/v_1/types/inferred_patient_metadata.rb +80 -0
  124. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +33 -5
  125. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +33 -5
  126. data/lib/candidhealth/pre_encounter/patients/v_1/types/origination_detail.rb +104 -0
  127. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +32 -4
  128. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_source.rb +18 -0
  129. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +17 -0
  130. data/lib/candidhealth/pre_encounter/patients/v_1/types/specialization_category.rb +42 -0
  131. data/lib/candidhealth/service_lines/v_2/client.rb +252 -10
  132. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +28 -10
  133. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +52 -40
  134. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base.rb +251 -0
  135. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base_base.rb +243 -0
  136. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +48 -24
  137. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +58 -46
  138. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base.rb +273 -0
  139. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base_base.rb +265 -0
  140. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +64 -54
  141. data/lib/candidhealth/service_lines/v_2/types/service_line_update_base.rb +263 -0
  142. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create.rb +271 -0
  143. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create_standalone.rb +317 -0
  144. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_update.rb +307 -0
  145. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +2 -2
  146. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_base.rb +90 -0
  147. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_update.rb +112 -0
  148. data/lib/candidhealth.rb +21 -7
  149. data/lib/requests.rb +2 -2
  150. data/lib/types_export.rb +116 -13
  151. metadata +109 -2
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "support_state"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module Payers
9
+ module V4
10
+ module Types
11
+ class PayerIds
12
+ # @return [String] The payer ID for claim submission
13
+ attr_reader :claims_payer_id
14
+ # @return [String] The payer ID for eligibility
15
+ attr_reader :eligibility_payer_id
16
+ # @return [String] The payer ID for remittance
17
+ attr_reader :remittance_payer_id
18
+ # @return [CandidApiClient::Payers::V4::Types::SupportState] The support state for claims submission
19
+ attr_reader :claims_support
20
+ # @return [CandidApiClient::Payers::V4::Types::SupportState] The support state for eligibility
21
+ attr_reader :eligibility_support
22
+ # @return [CandidApiClient::Payers::V4::Types::SupportState] The support state for remittance
23
+ attr_reader :remittance_support
24
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
25
+ attr_reader :additional_properties
26
+ # @return [Object]
27
+ attr_reader :_field_set
28
+ protected :_field_set
29
+
30
+ OMIT = Object.new
31
+
32
+ # @param claims_payer_id [String] The payer ID for claim submission
33
+ # @param eligibility_payer_id [String] The payer ID for eligibility
34
+ # @param remittance_payer_id [String] The payer ID for remittance
35
+ # @param claims_support [CandidApiClient::Payers::V4::Types::SupportState] The support state for claims submission
36
+ # @param eligibility_support [CandidApiClient::Payers::V4::Types::SupportState] The support state for eligibility
37
+ # @param remittance_support [CandidApiClient::Payers::V4::Types::SupportState] The support state for remittance
38
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
39
+ # @return [CandidApiClient::Payers::V4::Types::PayerIds]
40
+ def initialize(claims_payer_id:, eligibility_payer_id:, remittance_payer_id:, claims_support:,
41
+ eligibility_support:, remittance_support:, additional_properties: nil)
42
+ @claims_payer_id = claims_payer_id
43
+ @eligibility_payer_id = eligibility_payer_id
44
+ @remittance_payer_id = remittance_payer_id
45
+ @claims_support = claims_support
46
+ @eligibility_support = eligibility_support
47
+ @remittance_support = remittance_support
48
+ @additional_properties = additional_properties
49
+ @_field_set = {
50
+ "claims_payer_id": claims_payer_id,
51
+ "eligibility_payer_id": eligibility_payer_id,
52
+ "remittance_payer_id": remittance_payer_id,
53
+ "claims_support": claims_support,
54
+ "eligibility_support": eligibility_support,
55
+ "remittance_support": remittance_support
56
+ }
57
+ end
58
+
59
+ # Deserialize a JSON object to an instance of PayerIds
60
+ #
61
+ # @param json_object [String]
62
+ # @return [CandidApiClient::Payers::V4::Types::PayerIds]
63
+ def self.from_json(json_object:)
64
+ struct = JSON.parse(json_object, object_class: OpenStruct)
65
+ claims_payer_id = struct["claims_payer_id"]
66
+ eligibility_payer_id = struct["eligibility_payer_id"]
67
+ remittance_payer_id = struct["remittance_payer_id"]
68
+ claims_support = struct["claims_support"]
69
+ eligibility_support = struct["eligibility_support"]
70
+ remittance_support = struct["remittance_support"]
71
+ new(
72
+ claims_payer_id: claims_payer_id,
73
+ eligibility_payer_id: eligibility_payer_id,
74
+ remittance_payer_id: remittance_payer_id,
75
+ claims_support: claims_support,
76
+ eligibility_support: eligibility_support,
77
+ remittance_support: remittance_support,
78
+ additional_properties: struct
79
+ )
80
+ end
81
+
82
+ # Serialize an instance of PayerIds to a JSON object
83
+ #
84
+ # @return [String]
85
+ def to_json(*_args)
86
+ @_field_set&.to_json
87
+ end
88
+
89
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
90
+ # hash and check each fields type against the current object's property
91
+ # definitions.
92
+ #
93
+ # @param obj [Object]
94
+ # @return [Void]
95
+ def self.validate_raw(obj:)
96
+ obj.claims_payer_id.is_a?(String) != false || raise("Passed value for field obj.claims_payer_id is not the expected type, validation failed.")
97
+ obj.eligibility_payer_id.is_a?(String) != false || raise("Passed value for field obj.eligibility_payer_id is not the expected type, validation failed.")
98
+ obj.remittance_payer_id.is_a?(String) != false || raise("Passed value for field obj.remittance_payer_id is not the expected type, validation failed.")
99
+ obj.claims_support.is_a?(CandidApiClient::Payers::V4::Types::SupportState) != false || raise("Passed value for field obj.claims_support is not the expected type, validation failed.")
100
+ obj.eligibility_support.is_a?(CandidApiClient::Payers::V4::Types::SupportState) != false || raise("Passed value for field obj.eligibility_support is not the expected type, validation failed.")
101
+ obj.remittance_support.is_a?(CandidApiClient::Payers::V4::Types::SupportState) != false || raise("Passed value for field obj.remittance_support is not the expected type, validation failed.")
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "payer"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module Payers
9
+ module V4
10
+ module Types
11
+ class PayerPage
12
+ # @return [Array<CandidApiClient::Payers::V4::Types::Payer>]
13
+ attr_reader :items
14
+ # @return [String]
15
+ attr_reader :prev_page_token
16
+ # @return [String]
17
+ attr_reader :next_page_token
18
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
19
+ attr_reader :additional_properties
20
+ # @return [Object]
21
+ attr_reader :_field_set
22
+ protected :_field_set
23
+
24
+ OMIT = Object.new
25
+
26
+ # @param items [Array<CandidApiClient::Payers::V4::Types::Payer>]
27
+ # @param prev_page_token [String]
28
+ # @param next_page_token [String]
29
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
+ # @return [CandidApiClient::Payers::V4::Types::PayerPage]
31
+ def initialize(items:, prev_page_token: OMIT, next_page_token: OMIT, additional_properties: nil)
32
+ @items = items
33
+ @prev_page_token = prev_page_token if prev_page_token != OMIT
34
+ @next_page_token = next_page_token if next_page_token != OMIT
35
+ @additional_properties = additional_properties
36
+ @_field_set = {
37
+ "items": items,
38
+ "prev_page_token": prev_page_token,
39
+ "next_page_token": next_page_token
40
+ }.reject do |_k, v|
41
+ v == OMIT
42
+ end
43
+ end
44
+
45
+ # Deserialize a JSON object to an instance of PayerPage
46
+ #
47
+ # @param json_object [String]
48
+ # @return [CandidApiClient::Payers::V4::Types::PayerPage]
49
+ def self.from_json(json_object:)
50
+ struct = JSON.parse(json_object, object_class: OpenStruct)
51
+ parsed_json = JSON.parse(json_object)
52
+ items = parsed_json["items"]&.map do |item|
53
+ item = item.to_json
54
+ CandidApiClient::Payers::V4::Types::Payer.from_json(json_object: item)
55
+ end
56
+ prev_page_token = struct["prev_page_token"]
57
+ next_page_token = struct["next_page_token"]
58
+ new(
59
+ items: items,
60
+ prev_page_token: prev_page_token,
61
+ next_page_token: next_page_token,
62
+ additional_properties: struct
63
+ )
64
+ end
65
+
66
+ # Serialize an instance of PayerPage to a JSON object
67
+ #
68
+ # @return [String]
69
+ def to_json(*_args)
70
+ @_field_set&.to_json
71
+ end
72
+
73
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
74
+ # hash and check each fields type against the current object's property
75
+ # definitions.
76
+ #
77
+ # @param obj [Object]
78
+ # @return [Void]
79
+ def self.validate_raw(obj:)
80
+ obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
81
+ obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.")
82
+ obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module Payers
5
+ module V4
6
+ module Types
7
+ class SupportState
8
+ NOT_SUPPORTED = "NOT_SUPPORTED"
9
+ SUPPORTED_ENROLLMENT_NOT_REQUIRED = "SUPPORTED_ENROLLMENT_NOT_REQUIRED"
10
+ SUPPORTED_ENROLLMENT_REQUIRED = "SUPPORTED_ENROLLMENT_REQUIRED"
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -176,7 +176,7 @@ module CandidApiClient
176
176
  # @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
177
177
  # @example
178
178
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
179
- # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true })
179
+ # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true })
180
180
  def create(request:, request_options: nil)
181
181
  response = @request_client.conn.post do |req|
182
182
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -347,7 +347,7 @@ module CandidApiClient
347
347
  # api.pre_encounter.coverages.v_1.update(
348
348
  # id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
349
349
  # version: "version",
350
- # request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true }
350
+ # request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true }
351
351
  # )
352
352
  def update(id:, version:, request:, request_options: nil)
353
353
  response = @request_client.conn.put do |req|
@@ -759,7 +759,7 @@ module CandidApiClient
759
759
  # @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
760
760
  # @example
761
761
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
762
- # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true })
762
+ # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true })
763
763
  def create(request:, request_options: nil)
764
764
  Async do
765
765
  response = @request_client.conn.post do |req|
@@ -932,7 +932,7 @@ module CandidApiClient
932
932
  # api.pre_encounter.coverages.v_1.update(
933
933
  # id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
934
934
  # version: "version",
935
- # request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true }
935
+ # request: { status: ACTIVE, subscriber: { name: { family: "family", given: ["given", "given"], use: USUAL }, biological_sex: FEMALE }, relationship: SELF, patient: "patient", insurance_plan: { member_id: "member_id", payer_id: "payer_id", payer_name: "payer_name" }, verified: true }
936
936
  # )
937
937
  def update(id:, version:, request:, request_options: nil)
938
938
  Async do
@@ -35,9 +35,9 @@ module CandidApiClient
35
35
  # @param address [CandidApiClient::PreEncounter::Common::Types::Address]
36
36
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
37
37
  # @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Subscriber]
38
- def initialize(name:, date_of_birth:, biological_sex:, address: OMIT, additional_properties: nil)
38
+ def initialize(name:, biological_sex:, date_of_birth: OMIT, address: OMIT, additional_properties: nil)
39
39
  @name = name
40
- @date_of_birth = date_of_birth
40
+ @date_of_birth = date_of_birth if date_of_birth != OMIT
41
41
  @biological_sex = biological_sex
42
42
  @address = address if address != OMIT
43
43
  @additional_properties = additional_properties
@@ -96,7 +96,7 @@ module CandidApiClient
96
96
  # @return [Void]
97
97
  def self.validate_raw(obj:)
98
98
  CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
99
- obj.date_of_birth.is_a?(Date) != false || raise("Passed value for field obj.date_of_birth is not the expected type, validation failed.")
99
+ obj.date_of_birth&.is_a?(Date) != false || raise("Passed value for field obj.date_of_birth is not the expected type, validation failed.")
100
100
  obj.biological_sex.is_a?(CandidApiClient::PreEncounter::Common::Types::Sex) != false || raise("Passed value for field obj.biological_sex is not the expected type, validation failed.")
101
101
  obj.address.nil? || CandidApiClient::PreEncounter::Common::Types::Address.validate_raw(obj: obj.address)
102
102
  end
@@ -117,11 +117,36 @@ module CandidApiClient
117
117
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
118
118
  # * :note_ids (Array<String>)
119
119
  # * :tag_ids (Array<String>)
120
+ # * :origination_detail (Hash)
121
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
122
+ # * :referring_provider (Hash)
123
+ # * :name (Hash)
124
+ # * :family (String)
125
+ # * :given (Array<String>)
126
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
127
+ # * :period (Hash)
128
+ # * :start (Date)
129
+ # * :end_ (Date)
130
+ # * :suffix (String)
131
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
132
+ # * :npi (String)
133
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
134
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
135
+ # * :period (Hash)
136
+ # * :start (Date)
137
+ # * :end_ (Date)
138
+ # * :canonical_id (String)
139
+ # * :fax (String)
140
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
141
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
142
+ # * :inferred_patient_metadata (Hash)
143
+ # * :inferred_encounter_id (String)
144
+ # * :inferred_encounter_latest_date_of_service (Date)
120
145
  # @param request_options [CandidApiClient::RequestOptions]
121
146
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
122
147
  # @example
123
148
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
124
- # api.pre_encounter.patients.v_1.create(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], primary_telecom: { value: "value", use: HOME }, other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
149
+ # api.pre_encounter.patients.v_1.create(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
125
150
  def create(request:, skip_duplicate_check: nil, request_options: nil)
126
151
  response = @request_client.conn.post do |req|
127
152
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -237,11 +262,36 @@ module CandidApiClient
237
262
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
238
263
  # * :note_ids (Array<String>)
239
264
  # * :tag_ids (Array<String>)
265
+ # * :origination_detail (Hash)
266
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
267
+ # * :referring_provider (Hash)
268
+ # * :name (Hash)
269
+ # * :family (String)
270
+ # * :given (Array<String>)
271
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
272
+ # * :period (Hash)
273
+ # * :start (Date)
274
+ # * :end_ (Date)
275
+ # * :suffix (String)
276
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
277
+ # * :npi (String)
278
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
279
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
280
+ # * :period (Hash)
281
+ # * :start (Date)
282
+ # * :end_ (Date)
283
+ # * :canonical_id (String)
284
+ # * :fax (String)
285
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
286
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
287
+ # * :inferred_patient_metadata (Hash)
288
+ # * :inferred_encounter_id (String)
289
+ # * :inferred_encounter_latest_date_of_service (Date)
240
290
  # @param request_options [CandidApiClient::RequestOptions]
241
291
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
242
292
  # @example
243
293
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
244
- # api.pre_encounter.patients.v_1.create_with_mrn(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], primary_telecom: { value: "value", use: HOME }, other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, mrn: "mrn" })
294
+ # api.pre_encounter.patients.v_1.create_with_mrn(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, mrn: "mrn" })
245
295
  def create_with_mrn(request:, skip_duplicate_check: nil, request_options: nil)
246
296
  response = @request_client.conn.post do |req|
247
297
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -355,6 +405,29 @@ module CandidApiClient
355
405
  CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: response.body)
356
406
  end
357
407
 
408
+ # Gets a patient by mrn.
409
+ #
410
+ # @param mrn [String]
411
+ # @param request_options [CandidApiClient::RequestOptions]
412
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
413
+ # @example
414
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
415
+ # api.pre_encounter.patients.v_1.get_by_mrn(mrn: "mrn")
416
+ def get_by_mrn(mrn:, request_options: nil)
417
+ response = @request_client.conn.get do |req|
418
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
419
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
420
+ req.headers = {
421
+ **(req.headers || {}),
422
+ **@request_client.get_headers,
423
+ **(request_options&.additional_headers || {})
424
+ }.compact
425
+ req.url "#{@request_client.get_url(environment: PreEncounter,
426
+ request_options: request_options)}/patients/v1/mrn/#{mrn}"
427
+ end
428
+ CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: response.body)
429
+ end
430
+
358
431
  # Gets a patient along with it's full history. The return list is ordered by
359
432
  # version ascending.
360
433
  #
@@ -478,6 +551,31 @@ module CandidApiClient
478
551
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
479
552
  # * :note_ids (Array<String>)
480
553
  # * :tag_ids (Array<String>)
554
+ # * :origination_detail (Hash)
555
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
556
+ # * :referring_provider (Hash)
557
+ # * :name (Hash)
558
+ # * :family (String)
559
+ # * :given (Array<String>)
560
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
561
+ # * :period (Hash)
562
+ # * :start (Date)
563
+ # * :end_ (Date)
564
+ # * :suffix (String)
565
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
566
+ # * :npi (String)
567
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
568
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
569
+ # * :period (Hash)
570
+ # * :start (Date)
571
+ # * :end_ (Date)
572
+ # * :canonical_id (String)
573
+ # * :fax (String)
574
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
575
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
576
+ # * :inferred_patient_metadata (Hash)
577
+ # * :inferred_encounter_id (String)
578
+ # * :inferred_encounter_latest_date_of_service (Date)
481
579
  # @param request_options [CandidApiClient::RequestOptions]
482
580
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
483
581
  # @example
@@ -485,7 +583,7 @@ module CandidApiClient
485
583
  # api.pre_encounter.patients.v_1.update(
486
584
  # id: "id",
487
585
  # version: "version",
488
- # request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], primary_telecom: { value: "value", use: HOME }, other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
586
+ # request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
489
587
  # )
490
588
  def update(id:, version:, request:, request_options: nil)
491
589
  response = @request_client.conn.put do |req|
@@ -718,11 +816,36 @@ module CandidApiClient
718
816
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
719
817
  # * :note_ids (Array<String>)
720
818
  # * :tag_ids (Array<String>)
819
+ # * :origination_detail (Hash)
820
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
821
+ # * :referring_provider (Hash)
822
+ # * :name (Hash)
823
+ # * :family (String)
824
+ # * :given (Array<String>)
825
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
826
+ # * :period (Hash)
827
+ # * :start (Date)
828
+ # * :end_ (Date)
829
+ # * :suffix (String)
830
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
831
+ # * :npi (String)
832
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
833
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
834
+ # * :period (Hash)
835
+ # * :start (Date)
836
+ # * :end_ (Date)
837
+ # * :canonical_id (String)
838
+ # * :fax (String)
839
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
840
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
841
+ # * :inferred_patient_metadata (Hash)
842
+ # * :inferred_encounter_id (String)
843
+ # * :inferred_encounter_latest_date_of_service (Date)
721
844
  # @param request_options [CandidApiClient::RequestOptions]
722
845
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
723
846
  # @example
724
847
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
725
- # api.pre_encounter.patients.v_1.create(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], primary_telecom: { value: "value", use: HOME }, other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
848
+ # api.pre_encounter.patients.v_1.create(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } })
726
849
  def create(request:, skip_duplicate_check: nil, request_options: nil)
727
850
  Async do
728
851
  response = @request_client.conn.post do |req|
@@ -840,11 +963,36 @@ module CandidApiClient
840
963
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
841
964
  # * :note_ids (Array<String>)
842
965
  # * :tag_ids (Array<String>)
966
+ # * :origination_detail (Hash)
967
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
968
+ # * :referring_provider (Hash)
969
+ # * :name (Hash)
970
+ # * :family (String)
971
+ # * :given (Array<String>)
972
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
973
+ # * :period (Hash)
974
+ # * :start (Date)
975
+ # * :end_ (Date)
976
+ # * :suffix (String)
977
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
978
+ # * :npi (String)
979
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
980
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
981
+ # * :period (Hash)
982
+ # * :start (Date)
983
+ # * :end_ (Date)
984
+ # * :canonical_id (String)
985
+ # * :fax (String)
986
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
987
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
988
+ # * :inferred_patient_metadata (Hash)
989
+ # * :inferred_encounter_id (String)
990
+ # * :inferred_encounter_latest_date_of_service (Date)
843
991
  # @param request_options [CandidApiClient::RequestOptions]
844
992
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
845
993
  # @example
846
994
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
847
- # api.pre_encounter.patients.v_1.create_with_mrn(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], primary_telecom: { value: "value", use: HOME }, other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, mrn: "mrn" })
995
+ # api.pre_encounter.patients.v_1.create_with_mrn(request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, mrn: "mrn" })
848
996
  def create_with_mrn(request:, skip_duplicate_check: nil, request_options: nil)
849
997
  Async do
850
998
  response = @request_client.conn.post do |req|
@@ -966,6 +1114,31 @@ module CandidApiClient
966
1114
  end
967
1115
  end
968
1116
 
1117
+ # Gets a patient by mrn.
1118
+ #
1119
+ # @param mrn [String]
1120
+ # @param request_options [CandidApiClient::RequestOptions]
1121
+ # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
1122
+ # @example
1123
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1124
+ # api.pre_encounter.patients.v_1.get_by_mrn(mrn: "mrn")
1125
+ def get_by_mrn(mrn:, request_options: nil)
1126
+ Async do
1127
+ response = @request_client.conn.get do |req|
1128
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1129
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1130
+ req.headers = {
1131
+ **(req.headers || {}),
1132
+ **@request_client.get_headers,
1133
+ **(request_options&.additional_headers || {})
1134
+ }.compact
1135
+ req.url "#{@request_client.get_url(environment: PreEncounter,
1136
+ request_options: request_options)}/patients/v1/mrn/#{mrn}"
1137
+ end
1138
+ CandidApiClient::PreEncounter::Patients::V1::Types::Patient.from_json(json_object: response.body)
1139
+ end
1140
+ end
1141
+
969
1142
  # Gets a patient along with it's full history. The return list is ordered by
970
1143
  # version ascending.
971
1144
  #
@@ -1091,6 +1264,31 @@ module CandidApiClient
1091
1264
  # * :do_not_invoice_reason (CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason)
1092
1265
  # * :note_ids (Array<String>)
1093
1266
  # * :tag_ids (Array<String>)
1267
+ # * :origination_detail (Hash)
1268
+ # * :referral_source (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralSource)
1269
+ # * :referring_provider (Hash)
1270
+ # * :name (Hash)
1271
+ # * :family (String)
1272
+ # * :given (Array<String>)
1273
+ # * :use (CandidApiClient::PreEncounter::Common::Types::NameUse)
1274
+ # * :period (Hash)
1275
+ # * :start (Date)
1276
+ # * :end_ (Date)
1277
+ # * :suffix (String)
1278
+ # * :type (CandidApiClient::PreEncounter::Common::Types::ExternalProviderType)
1279
+ # * :npi (String)
1280
+ # * :telecoms (Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>)
1281
+ # * :addresses (Array<CandidApiClient::PreEncounter::Common::Types::Address>)
1282
+ # * :period (Hash)
1283
+ # * :start (Date)
1284
+ # * :end_ (Date)
1285
+ # * :canonical_id (String)
1286
+ # * :fax (String)
1287
+ # * :specialization_categories (Array<CandidApiClient::PreEncounter::Patients::V1::Types::SpecializationCategory>)
1288
+ # * :referral_type (CandidApiClient::PreEncounter::Patients::V1::Types::ReferralType)
1289
+ # * :inferred_patient_metadata (Hash)
1290
+ # * :inferred_encounter_id (String)
1291
+ # * :inferred_encounter_latest_date_of_service (Date)
1094
1292
  # @param request_options [CandidApiClient::RequestOptions]
1095
1293
  # @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
1096
1294
  # @example
@@ -1098,7 +1296,7 @@ module CandidApiClient
1098
1296
  # api.pre_encounter.patients.v_1.update(
1099
1297
  # id: "id",
1100
1298
  # version: "version",
1101
- # request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], primary_telecom: { value: "value", use: HOME }, other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
1299
+ # request: { name: { family: "family", given: ["given", "given"], use: USUAL }, other_names: [{ family: "family", given: ["given", "given"], use: USUAL }, { family: "family", given: ["given", "given"], use: USUAL }], birth_date: DateTime.parse(2023-01-15), biological_sex: FEMALE, primary_address: { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, other_addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }], other_telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], contacts: [{ relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }, { relationship: [SELF, SELF], name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }], addresses: [{ use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }, { use: HOME, line: ["line", "line"], city: "city", state: "state", postal_code: "postal_code", country: "country" }] }], general_practitioners: [{ name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }, { name: { family: "family", given: ["given", "given"], use: USUAL }, telecoms: [{ value: "value", use: HOME }, { value: "value", use: HOME }] }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] } }
1102
1300
  # )
1103
1301
  def update(id:, version:, request:, request_options: nil)
1104
1302
  Async do