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
@@ -13,10 +13,10 @@ module CandidApiClient
13
13
  # @return [String] The ID used to identify this individual in your system. For example, your
14
14
  # internal patient ID or an EHR patient ID.
15
15
  attr_reader :external_id
16
- # @return [Date] Box 3 on the CMS-1500 claim form. The date format should be in ISO 8601 date;
17
- # formatted YYYY-MM-DD (i.e. 2012-02-01)
16
+ # @return [Date] Box 3 on the CMS-1500 claim form or Form Locator 10 on a UB-04 claim form. The
17
+ # date format should be in ISO 8601 date; formatted YYYY-MM-DD (i.e. 2012-02-01)
18
18
  attr_reader :date_of_birth
19
- # @return [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form.
19
+ # @return [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form or Form Locator 9 on a UB-04 claim form.
20
20
  attr_reader :address
21
21
  # @return [String]
22
22
  attr_reader :first_name
@@ -34,9 +34,9 @@ module CandidApiClient
34
34
 
35
35
  # @param external_id [String] The ID used to identify this individual in your system. For example, your
36
36
  # internal patient ID or an EHR patient ID.
37
- # @param date_of_birth [Date] Box 3 on the CMS-1500 claim form. The date format should be in ISO 8601 date;
38
- # formatted YYYY-MM-DD (i.e. 2012-02-01)
39
- # @param address [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form.
37
+ # @param date_of_birth [Date] Box 3 on the CMS-1500 claim form or Form Locator 10 on a UB-04 claim form. The
38
+ # date format should be in ISO 8601 date; formatted YYYY-MM-DD (i.e. 2012-02-01)
39
+ # @param address [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form or Form Locator 9 on a UB-04 claim form.
40
40
  # @param first_name [String]
41
41
  # @param last_name [String]
42
42
  # @param gender [CandidApiClient::Individual::Types::Gender]
@@ -27,10 +27,10 @@ module CandidApiClient
27
27
  # @return [String] The ID used to identify this individual in your system. For example, your
28
28
  # internal patient ID or an EHR patient ID.
29
29
  attr_reader :external_id
30
- # @return [Date] Box 3 on the CMS-1500 claim form. The date format should be in ISO 8601 date;
31
- # formatted YYYY-MM-DD (i.e. 2012-02-01)
30
+ # @return [Date] Box 3 on the CMS-1500 claim form or Form Locator 10 on a UB-04 claim form. The
31
+ # date format should be in ISO 8601 date; formatted YYYY-MM-DD (i.e. 2012-02-01)
32
32
  attr_reader :date_of_birth
33
- # @return [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form.
33
+ # @return [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form or Form Locator 9 on a UB-04 claim form.
34
34
  attr_reader :address
35
35
  # @return [String]
36
36
  attr_reader :first_name
@@ -54,9 +54,9 @@ module CandidApiClient
54
54
  # @param email_consent [Boolean] Defaults to false
55
55
  # @param external_id [String] The ID used to identify this individual in your system. For example, your
56
56
  # internal patient ID or an EHR patient ID.
57
- # @param date_of_birth [Date] Box 3 on the CMS-1500 claim form. The date format should be in ISO 8601 date;
58
- # formatted YYYY-MM-DD (i.e. 2012-02-01)
59
- # @param address [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form.
57
+ # @param date_of_birth [Date] Box 3 on the CMS-1500 claim form or Form Locator 10 on a UB-04 claim form. The
58
+ # date format should be in ISO 8601 date; formatted YYYY-MM-DD (i.e. 2012-02-01)
59
+ # @param address [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form or Form Locator 9 on a UB-04 claim form.
60
60
  # @param first_name [String]
61
61
  # @param last_name [String]
62
62
  # @param gender [CandidApiClient::Individual::Types::Gender]
@@ -21,10 +21,10 @@ module CandidApiClient
21
21
  # @return [String] The ID used to identify this individual in your system. For example, your
22
22
  # internal patient ID or an EHR patient ID.
23
23
  attr_reader :external_id
24
- # @return [Date] Box 3 on the CMS-1500 claim form. The date format should be in ISO 8601 date;
25
- # formatted YYYY-MM-DD (i.e. 2012-02-01)
24
+ # @return [Date] Box 3 on the CMS-1500 claim form or Form Locator 10 on a UB-04 claim form. The
25
+ # date format should be in ISO 8601 date; formatted YYYY-MM-DD (i.e. 2012-02-01)
26
26
  attr_reader :date_of_birth
27
- # @return [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form.
27
+ # @return [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form or Form Locator 9 on a UB-04 claim form.
28
28
  attr_reader :address
29
29
  # @return [Array<CandidApiClient::Commons::Types::PhoneNumber>]
30
30
  attr_reader :phone_numbers
@@ -53,9 +53,9 @@ module CandidApiClient
53
53
  # @param gender [CandidApiClient::Individual::Types::Gender]
54
54
  # @param external_id [String] The ID used to identify this individual in your system. For example, your
55
55
  # internal patient ID or an EHR patient ID.
56
- # @param date_of_birth [Date] Box 3 on the CMS-1500 claim form. The date format should be in ISO 8601 date;
57
- # formatted YYYY-MM-DD (i.e. 2012-02-01)
58
- # @param address [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form.
56
+ # @param date_of_birth [Date] Box 3 on the CMS-1500 claim form or Form Locator 10 on a UB-04 claim form. The
57
+ # date format should be in ISO 8601 date; formatted YYYY-MM-DD (i.e. 2012-02-01)
58
+ # @param address [CandidApiClient::Commons::Types::StreetAddressShortZip] Box 5 on the CMS-1500 claim form or Form Locator 9 on a UB-04 claim form.
59
59
  # @param phone_numbers [Array<CandidApiClient::Commons::Types::PhoneNumber>]
60
60
  # @param phone_consent [Boolean]
61
61
  # @param email [String]
@@ -21,10 +21,10 @@ module CandidApiClient
21
21
  # @return [String] The ID used to identify this individual in your system. For example, your
22
22
  # internal patient ID or an EHR patient ID.
23
23
  attr_reader :external_id
24
- # @return [Date] Box 3 on the CMS-1500 claim form. The date format should be in ISO 8601 date;
25
- # formatted YYYY-MM-DD (i.e. 2012-02-01)
24
+ # @return [Date] Box 3 on the CMS-1500 claim form or Form Locator 10 on a UB-04 claim form. The
25
+ # date format should be in ISO 8601 date; formatted YYYY-MM-DD (i.e. 2012-02-01)
26
26
  attr_reader :date_of_birth
27
- # @return [CandidApiClient::Commons::Types::StreetAddressShortZipOptional] Box 5 on the CMS-1500 claim form.
27
+ # @return [CandidApiClient::Commons::Types::StreetAddressShortZipOptional] Box 5 on the CMS-1500 claim form or Form Locator 9 on a UB-04 claim form.
28
28
  attr_reader :address
29
29
  # @return [Array<CandidApiClient::Commons::Types::PhoneNumberOptional>]
30
30
  attr_reader :phone_numbers
@@ -53,9 +53,9 @@ module CandidApiClient
53
53
  # @param gender [CandidApiClient::Individual::Types::Gender]
54
54
  # @param external_id [String] The ID used to identify this individual in your system. For example, your
55
55
  # internal patient ID or an EHR patient ID.
56
- # @param date_of_birth [Date] Box 3 on the CMS-1500 claim form. The date format should be in ISO 8601 date;
57
- # formatted YYYY-MM-DD (i.e. 2012-02-01)
58
- # @param address [CandidApiClient::Commons::Types::StreetAddressShortZipOptional] Box 5 on the CMS-1500 claim form.
56
+ # @param date_of_birth [Date] Box 3 on the CMS-1500 claim form or Form Locator 10 on a UB-04 claim form. The
57
+ # date format should be in ISO 8601 date; formatted YYYY-MM-DD (i.e. 2012-02-01)
58
+ # @param address [CandidApiClient::Commons::Types::StreetAddressShortZipOptional] Box 5 on the CMS-1500 claim form or Form Locator 9 on a UB-04 claim form.
59
59
  # @param phone_numbers [Array<CandidApiClient::Commons::Types::PhoneNumberOptional>]
60
60
  # @param phone_consent [Boolean]
61
61
  # @param email [String]
@@ -104,6 +104,8 @@ module CandidApiClient
104
104
  NP_C = "NP-C"
105
105
  PA_C = "PA-C"
106
106
  AMFT = "AMFT"
107
+ CDN = "CDN"
108
+ CNS = "CNS"
107
109
  end
108
110
  end
109
111
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../requests"
4
+ require_relative "v_1/client"
5
+
6
+ module CandidApiClient
7
+ module PatientAr
8
+ class Client
9
+ # @return [CandidApiClient::PatientAr::V1::V1Client]
10
+ attr_reader :v_1
11
+
12
+ # @param request_client [CandidApiClient::RequestClient]
13
+ # @return [CandidApiClient::PatientAr::Client]
14
+ def initialize(request_client:)
15
+ @v_1 = CandidApiClient::PatientAr::V1::V1Client.new(request_client: request_client)
16
+ end
17
+ end
18
+
19
+ class AsyncClient
20
+ # @return [CandidApiClient::PatientAr::V1::AsyncV1Client]
21
+ attr_reader :v_1
22
+
23
+ # @param request_client [CandidApiClient::AsyncRequestClient]
24
+ # @return [CandidApiClient::PatientAr::AsyncClient]
25
+ def initialize(request_client:)
26
+ @v_1 = CandidApiClient::PatientAr::V1::AsyncV1Client.new(request_client: request_client)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,161 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../requests"
4
+ require "date"
5
+ require_relative "types/list_inventory_paged_response"
6
+ require_relative "types/invoice_itemization_response"
7
+ require "async"
8
+
9
+ module CandidApiClient
10
+ module PatientAr
11
+ module V1
12
+ class V1Client
13
+ # @return [CandidApiClient::RequestClient]
14
+ attr_reader :request_client
15
+
16
+ # @param request_client [CandidApiClient::RequestClient]
17
+ # @return [CandidApiClient::PatientAr::V1::V1Client]
18
+ def initialize(request_client:)
19
+ @request_client = request_client
20
+ end
21
+
22
+ # NOTE: This service is in-development and can only be used by select partners.
23
+ # Please contact Candid Health to request access.
24
+ # Retrieve a list of inventory records based on the provided filters. Each
25
+ # inventory record provides the latest invoiceable status of the associated claim.
26
+ # The response is paginated, and the `page_token` can be used to retrieve
27
+ # subsequent pages. Initial requests should not include `page_token`.
28
+ #
29
+ # @param since [DateTime] Timestamp to filter records since, inclusive
30
+ # @param limit [Integer] Maximum number of records to return, default is 100
31
+ # @param page_token [String]
32
+ # @param request_options [CandidApiClient::RequestOptions]
33
+ # @return [CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse]
34
+ # @example
35
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
36
+ # api.patient_ar.v_1.list_inventory
37
+ def list_inventory(since: nil, limit: nil, page_token: nil, request_options: nil)
38
+ response = @request_client.conn.get do |req|
39
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
40
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
41
+ req.headers = {
42
+ **(req.headers || {}),
43
+ **@request_client.get_headers,
44
+ **(request_options&.additional_headers || {})
45
+ }.compact
46
+ req.params = {
47
+ **(request_options&.additional_query_parameters || {}),
48
+ "since": since,
49
+ "limit": limit,
50
+ "page_token": page_token
51
+ }.compact
52
+ req.url "#{@request_client.get_url(environment: CandidApi,
53
+ request_options: request_options)}/api/patient-ar/v1/inventory"
54
+ end
55
+ CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse.from_json(json_object: response.body)
56
+ end
57
+
58
+ # NOTE: This service is in-development and can only be used by select partners.
59
+ # Please contact Candid Health to request access.
60
+ # Provides detailed itemization of invoice data for a specific claim.
61
+ #
62
+ # @param claim_id [String]
63
+ # @param request_options [CandidApiClient::RequestOptions]
64
+ # @return [CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse]
65
+ # @example
66
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
67
+ # api.patient_ar.v_1.itemize(claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
68
+ def itemize(claim_id:, request_options: nil)
69
+ response = @request_client.conn.get do |req|
70
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
71
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
72
+ req.headers = {
73
+ **(req.headers || {}),
74
+ **@request_client.get_headers,
75
+ **(request_options&.additional_headers || {})
76
+ }.compact
77
+ req.url "#{@request_client.get_url(environment: CandidApi,
78
+ request_options: request_options)}/api/patient-ar/v1/invoice-itemization/#{claim_id}"
79
+ end
80
+ CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse.from_json(json_object: response.body)
81
+ end
82
+ end
83
+
84
+ class AsyncV1Client
85
+ # @return [CandidApiClient::AsyncRequestClient]
86
+ attr_reader :request_client
87
+
88
+ # @param request_client [CandidApiClient::AsyncRequestClient]
89
+ # @return [CandidApiClient::PatientAr::V1::AsyncV1Client]
90
+ def initialize(request_client:)
91
+ @request_client = request_client
92
+ end
93
+
94
+ # NOTE: This service is in-development and can only be used by select partners.
95
+ # Please contact Candid Health to request access.
96
+ # Retrieve a list of inventory records based on the provided filters. Each
97
+ # inventory record provides the latest invoiceable status of the associated claim.
98
+ # The response is paginated, and the `page_token` can be used to retrieve
99
+ # subsequent pages. Initial requests should not include `page_token`.
100
+ #
101
+ # @param since [DateTime] Timestamp to filter records since, inclusive
102
+ # @param limit [Integer] Maximum number of records to return, default is 100
103
+ # @param page_token [String]
104
+ # @param request_options [CandidApiClient::RequestOptions]
105
+ # @return [CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse]
106
+ # @example
107
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
108
+ # api.patient_ar.v_1.list_inventory
109
+ def list_inventory(since: nil, limit: nil, page_token: nil, request_options: nil)
110
+ Async do
111
+ response = @request_client.conn.get do |req|
112
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
113
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
114
+ req.headers = {
115
+ **(req.headers || {}),
116
+ **@request_client.get_headers,
117
+ **(request_options&.additional_headers || {})
118
+ }.compact
119
+ req.params = {
120
+ **(request_options&.additional_query_parameters || {}),
121
+ "since": since,
122
+ "limit": limit,
123
+ "page_token": page_token
124
+ }.compact
125
+ req.url "#{@request_client.get_url(environment: CandidApi,
126
+ request_options: request_options)}/api/patient-ar/v1/inventory"
127
+ end
128
+ CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse.from_json(json_object: response.body)
129
+ end
130
+ end
131
+
132
+ # NOTE: This service is in-development and can only be used by select partners.
133
+ # Please contact Candid Health to request access.
134
+ # Provides detailed itemization of invoice data for a specific claim.
135
+ #
136
+ # @param claim_id [String]
137
+ # @param request_options [CandidApiClient::RequestOptions]
138
+ # @return [CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse]
139
+ # @example
140
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
141
+ # api.patient_ar.v_1.itemize(claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
142
+ def itemize(claim_id:, request_options: nil)
143
+ Async do
144
+ response = @request_client.conn.get do |req|
145
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
146
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
147
+ req.headers = {
148
+ **(req.headers || {}),
149
+ **@request_client.get_headers,
150
+ **(request_options&.additional_headers || {})
151
+ }.compact
152
+ req.url "#{@request_client.get_url(environment: CandidApi,
153
+ request_options: request_options)}/api/patient-ar/v1/invoice-itemization/#{claim_id}"
154
+ end
155
+ CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse.from_json(json_object: response.body)
156
+ end
157
+ end
158
+ end
159
+ end
160
+ end
161
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module CandidApiClient
7
+ module PatientAr
8
+ module V1
9
+ module Types
10
+ class InsuranceAdjustmentInfo
11
+ # @return [Integer] The total amount of insurance adjustments in cents for the service line.
12
+ attr_reader :total_adjustment_cents
13
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
14
+ attr_reader :additional_properties
15
+ # @return [Object]
16
+ attr_reader :_field_set
17
+ protected :_field_set
18
+
19
+ OMIT = Object.new
20
+
21
+ # @param total_adjustment_cents [Integer] The total amount of insurance adjustments in cents for the service line.
22
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
23
+ # @return [CandidApiClient::PatientAr::V1::Types::InsuranceAdjustmentInfo]
24
+ def initialize(total_adjustment_cents:, additional_properties: nil)
25
+ @total_adjustment_cents = total_adjustment_cents
26
+ @additional_properties = additional_properties
27
+ @_field_set = { "total_adjustment_cents": total_adjustment_cents }
28
+ end
29
+
30
+ # Deserialize a JSON object to an instance of InsuranceAdjustmentInfo
31
+ #
32
+ # @param json_object [String]
33
+ # @return [CandidApiClient::PatientAr::V1::Types::InsuranceAdjustmentInfo]
34
+ def self.from_json(json_object:)
35
+ struct = JSON.parse(json_object, object_class: OpenStruct)
36
+ total_adjustment_cents = struct["total_adjustment_cents"]
37
+ new(total_adjustment_cents: total_adjustment_cents, additional_properties: struct)
38
+ end
39
+
40
+ # Serialize an instance of InsuranceAdjustmentInfo to a JSON object
41
+ #
42
+ # @return [String]
43
+ def to_json(*_args)
44
+ @_field_set&.to_json
45
+ end
46
+
47
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
48
+ # hash and check each fields type against the current object's property
49
+ # definitions.
50
+ #
51
+ # @param obj [Object]
52
+ # @return [Void]
53
+ def self.validate_raw(obj:)
54
+ obj.total_adjustment_cents.is_a?(Integer) != false || raise("Passed value for field obj.total_adjustment_cents is not the expected type, validation failed.")
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module CandidApiClient
7
+ module PatientAr
8
+ module V1
9
+ module Types
10
+ class InsurancePaymentInfo
11
+ # @return [Integer] The total amount of insurance payments in cents for the service line.
12
+ attr_reader :total_payment_cents
13
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
14
+ attr_reader :additional_properties
15
+ # @return [Object]
16
+ attr_reader :_field_set
17
+ protected :_field_set
18
+
19
+ OMIT = Object.new
20
+
21
+ # @param total_payment_cents [Integer] The total amount of insurance payments in cents for the service line.
22
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
23
+ # @return [CandidApiClient::PatientAr::V1::Types::InsurancePaymentInfo]
24
+ def initialize(total_payment_cents:, additional_properties: nil)
25
+ @total_payment_cents = total_payment_cents
26
+ @additional_properties = additional_properties
27
+ @_field_set = { "total_payment_cents": total_payment_cents }
28
+ end
29
+
30
+ # Deserialize a JSON object to an instance of InsurancePaymentInfo
31
+ #
32
+ # @param json_object [String]
33
+ # @return [CandidApiClient::PatientAr::V1::Types::InsurancePaymentInfo]
34
+ def self.from_json(json_object:)
35
+ struct = JSON.parse(json_object, object_class: OpenStruct)
36
+ total_payment_cents = struct["total_payment_cents"]
37
+ new(total_payment_cents: total_payment_cents, additional_properties: struct)
38
+ end
39
+
40
+ # Serialize an instance of InsurancePaymentInfo to a JSON object
41
+ #
42
+ # @return [String]
43
+ def to_json(*_args)
44
+ @_field_set&.to_json
45
+ end
46
+
47
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
48
+ # hash and check each fields type against the current object's property
49
+ # definitions.
50
+ #
51
+ # @param obj [Object]
52
+ # @return [Void]
53
+ def self.validate_raw(obj:)
54
+ obj.total_payment_cents.is_a?(Integer) != false || raise("Passed value for field obj.total_payment_cents is not the expected type, validation failed.")
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module CandidApiClient
7
+ module PatientAr
8
+ module V1
9
+ module Types
10
+ class InvalidFiltersErrorType
11
+ # @return [String]
12
+ attr_reader :message
13
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
14
+ attr_reader :additional_properties
15
+ # @return [Object]
16
+ attr_reader :_field_set
17
+ protected :_field_set
18
+
19
+ OMIT = Object.new
20
+
21
+ # @param message [String]
22
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
23
+ # @return [CandidApiClient::PatientAr::V1::Types::InvalidFiltersErrorType]
24
+ def initialize(message:, additional_properties: nil)
25
+ @message = message
26
+ @additional_properties = additional_properties
27
+ @_field_set = { "message": message }
28
+ end
29
+
30
+ # Deserialize a JSON object to an instance of InvalidFiltersErrorType
31
+ #
32
+ # @param json_object [String]
33
+ # @return [CandidApiClient::PatientAr::V1::Types::InvalidFiltersErrorType]
34
+ def self.from_json(json_object:)
35
+ struct = JSON.parse(json_object, object_class: OpenStruct)
36
+ message = struct["message"]
37
+ new(message: message, additional_properties: struct)
38
+ end
39
+
40
+ # Serialize an instance of InvalidFiltersErrorType to a JSON object
41
+ #
42
+ # @return [String]
43
+ def to_json(*_args)
44
+ @_field_set&.to_json
45
+ end
46
+
47
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
48
+ # hash and check each fields type against the current object's property
49
+ # definitions.
50
+ #
51
+ # @param obj [Object]
52
+ # @return [Void]
53
+ def self.validate_raw(obj:)
54
+ obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,101 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "date"
4
+ require_relative "patient_ar_status"
5
+ require "ostruct"
6
+ require "json"
7
+
8
+ module CandidApiClient
9
+ module PatientAr
10
+ module V1
11
+ module Types
12
+ class InventoryRecord
13
+ # @return [String]
14
+ attr_reader :claim_id
15
+ # @return [String]
16
+ attr_reader :encounter_id
17
+ # @return [DateTime]
18
+ attr_reader :timestamp
19
+ # @return [String]
20
+ attr_reader :patient_external_id
21
+ # @return [CandidApiClient::PatientAr::V1::Types::PatientArStatus]
22
+ attr_reader :patient_ar_status
23
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
24
+ attr_reader :additional_properties
25
+ # @return [Object]
26
+ attr_reader :_field_set
27
+ protected :_field_set
28
+
29
+ OMIT = Object.new
30
+
31
+ # @param claim_id [String]
32
+ # @param encounter_id [String]
33
+ # @param timestamp [DateTime]
34
+ # @param patient_external_id [String]
35
+ # @param patient_ar_status [CandidApiClient::PatientAr::V1::Types::PatientArStatus]
36
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
37
+ # @return [CandidApiClient::PatientAr::V1::Types::InventoryRecord]
38
+ def initialize(claim_id:, encounter_id:, timestamp:, patient_external_id:, patient_ar_status:,
39
+ additional_properties: nil)
40
+ @claim_id = claim_id
41
+ @encounter_id = encounter_id
42
+ @timestamp = timestamp
43
+ @patient_external_id = patient_external_id
44
+ @patient_ar_status = patient_ar_status
45
+ @additional_properties = additional_properties
46
+ @_field_set = {
47
+ "claim_id": claim_id,
48
+ "encounter_id": encounter_id,
49
+ "timestamp": timestamp,
50
+ "patient_external_id": patient_external_id,
51
+ "patient_ar_status": patient_ar_status
52
+ }
53
+ end
54
+
55
+ # Deserialize a JSON object to an instance of InventoryRecord
56
+ #
57
+ # @param json_object [String]
58
+ # @return [CandidApiClient::PatientAr::V1::Types::InventoryRecord]
59
+ def self.from_json(json_object:)
60
+ struct = JSON.parse(json_object, object_class: OpenStruct)
61
+ parsed_json = JSON.parse(json_object)
62
+ claim_id = struct["claim_id"]
63
+ encounter_id = struct["encounter_id"]
64
+ timestamp = (DateTime.parse(parsed_json["timestamp"]) unless parsed_json["timestamp"].nil?)
65
+ patient_external_id = struct["patient_external_id"]
66
+ patient_ar_status = struct["patient_ar_status"]
67
+ new(
68
+ claim_id: claim_id,
69
+ encounter_id: encounter_id,
70
+ timestamp: timestamp,
71
+ patient_external_id: patient_external_id,
72
+ patient_ar_status: patient_ar_status,
73
+ additional_properties: struct
74
+ )
75
+ end
76
+
77
+ # Serialize an instance of InventoryRecord to a JSON object
78
+ #
79
+ # @return [String]
80
+ def to_json(*_args)
81
+ @_field_set&.to_json
82
+ end
83
+
84
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
85
+ # hash and check each fields type against the current object's property
86
+ # definitions.
87
+ #
88
+ # @param obj [Object]
89
+ # @return [Void]
90
+ def self.validate_raw(obj:)
91
+ obj.claim_id.is_a?(String) != false || raise("Passed value for field obj.claim_id is not the expected type, validation failed.")
92
+ obj.encounter_id.is_a?(String) != false || raise("Passed value for field obj.encounter_id is not the expected type, validation failed.")
93
+ obj.timestamp.is_a?(DateTime) != false || raise("Passed value for field obj.timestamp is not the expected type, validation failed.")
94
+ obj.patient_external_id.is_a?(String) != false || raise("Passed value for field obj.patient_external_id is not the expected type, validation failed.")
95
+ obj.patient_ar_status.is_a?(CandidApiClient::PatientAr::V1::Types::PatientArStatus) != false || raise("Passed value for field obj.patient_ar_status is not the expected type, validation failed.")
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end