candidhealth 0.0.0 → 0.17.1

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 (703) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/client.rb +9 -11
  3. data/lib/candidhealth/auth/v_2/client.rb +90 -0
  4. data/lib/candidhealth/auth/v_2/types/auth_get_token_request.rb +54 -0
  5. data/lib/candidhealth/auth/v_2/types/auth_get_token_response.rb +59 -0
  6. data/lib/candidhealth/auth/v_2/types/too_many_requests_error_type.rb +49 -0
  7. data/lib/candidhealth/billing_notes/client.rb +6 -8
  8. data/lib/candidhealth/billing_notes/v_2/client.rb +21 -133
  9. data/lib/candidhealth/billing_notes/v_2/types/billing_note.rb +72 -95
  10. data/lib/candidhealth/billing_notes/v_2/types/billing_note_base.rb +33 -44
  11. data/lib/candidhealth/billing_notes/v_2/types/billing_note_id.rb +9 -0
  12. data/lib/candidhealth/claim_submission/v_1/types/claim_frequency_type_code.rb +5 -6
  13. data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create.rb +49 -81
  14. data/lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create.rb +56 -78
  15. data/lib/candidhealth/claims/types/claim.rb +80 -114
  16. data/lib/candidhealth/claims/types/claim_status.rb +17 -19
  17. data/lib/candidhealth/commons/types/claim_adjustment_group_codes.rb +11 -14
  18. data/lib/candidhealth/commons/types/claim_id.rb +7 -0
  19. data/lib/candidhealth/commons/types/claim_submission_payer_responsibility_type.rb +4 -6
  20. data/lib/candidhealth/commons/types/date.rb +7 -0
  21. data/lib/candidhealth/commons/types/date_range_optional_end.rb +40 -57
  22. data/lib/candidhealth/commons/types/decimal.rb +7 -0
  23. data/lib/candidhealth/commons/types/delay_reason_code.rb +17 -19
  24. data/lib/candidhealth/commons/types/email.rb +7 -0
  25. data/lib/candidhealth/commons/types/emr_payer_crosswalk.rb +4 -6
  26. data/lib/candidhealth/commons/types/encounter_external_id.rb +7 -0
  27. data/lib/candidhealth/commons/types/encounter_id.rb +7 -0
  28. data/lib/candidhealth/commons/types/entity_not_found_error_message.rb +34 -45
  29. data/lib/candidhealth/commons/types/error_message.rb +7 -0
  30. data/lib/candidhealth/commons/types/facility_type_code.rb +55 -58
  31. data/lib/candidhealth/commons/types/http_service_unavailable_error_message.rb +34 -47
  32. data/lib/candidhealth/commons/types/insurance_type_code.rb +73 -76
  33. data/lib/candidhealth/commons/types/invoice_id.rb +7 -0
  34. data/lib/candidhealth/commons/types/link_url.rb +7 -0
  35. data/lib/candidhealth/commons/types/npi.rb +7 -0
  36. data/lib/candidhealth/commons/types/organization_id.rb +7 -0
  37. data/lib/candidhealth/commons/types/organization_not_authorized_error_message.rb +34 -46
  38. data/lib/candidhealth/commons/types/page_token.rb +7 -0
  39. data/lib/candidhealth/commons/types/patient_external_id.rb +7 -0
  40. data/lib/candidhealth/commons/types/patient_relationship_to_insured_code_all.rb +26 -28
  41. data/lib/candidhealth/commons/types/phone_number.rb +39 -55
  42. data/lib/candidhealth/commons/types/phone_number_type.rb +5 -7
  43. data/lib/candidhealth/commons/types/procedure_modifier.rb +389 -403
  44. data/lib/candidhealth/commons/types/provider_id.rb +7 -0
  45. data/lib/candidhealth/commons/types/region_national.rb +29 -39
  46. data/lib/candidhealth/commons/types/region_states.rb +34 -45
  47. data/lib/candidhealth/commons/types/regions.rb +72 -78
  48. data/lib/candidhealth/commons/types/removable_date_range_optional_end.rb +71 -77
  49. data/lib/candidhealth/commons/types/request_validation_error.rb +39 -57
  50. data/lib/candidhealth/commons/types/resource_page.rb +40 -57
  51. data/lib/candidhealth/commons/types/service_line_id.rb +7 -0
  52. data/lib/candidhealth/commons/types/service_line_units.rb +4 -6
  53. data/lib/candidhealth/commons/types/sort_direction.rb +4 -6
  54. data/lib/candidhealth/commons/types/source_of_payment_code.rb +25 -28
  55. data/lib/candidhealth/commons/types/state.rb +64 -66
  56. data/lib/candidhealth/commons/types/street_address_base.rb +61 -84
  57. data/lib/candidhealth/commons/types/street_address_long_zip.rb +68 -93
  58. data/lib/candidhealth/commons/types/street_address_short_zip.rb +68 -93
  59. data/lib/candidhealth/commons/types/task_assignment_id.rb +7 -0
  60. data/lib/candidhealth/commons/types/task_id.rb +7 -0
  61. data/lib/candidhealth/commons/types/task_note_id.rb +7 -0
  62. data/lib/candidhealth/commons/types/tax_id.rb +7 -0
  63. data/lib/candidhealth/commons/types/unauthorized_error_message.rb +34 -47
  64. data/lib/candidhealth/commons/types/unprocessable_entity_error_message.rb +34 -47
  65. data/lib/candidhealth/commons/types/updates_disabled_due_to_external_system_integration_error_message.rb +34 -49
  66. data/lib/candidhealth/commons/types/user_id.rb +7 -0
  67. data/lib/candidhealth/commons/types/work_queue_id.rb +7 -0
  68. data/lib/candidhealth/contracts/client.rb +6 -8
  69. data/lib/candidhealth/contracts/v_2/client.rb +131 -239
  70. data/lib/candidhealth/contracts/v_2/types/authorized_signatory.rb +67 -92
  71. data/lib/candidhealth/contracts/v_2/types/authorized_signatory_update.rb +70 -76
  72. data/lib/candidhealth/contracts/v_2/types/contract.rb +141 -178
  73. data/lib/candidhealth/contracts/v_2/types/contract_base.rb +106 -134
  74. data/lib/candidhealth/contracts/v_2/types/contract_id.rb +9 -0
  75. data/lib/candidhealth/contracts/v_2/types/contract_is_linked_to_fee_schedule_error.rb +33 -44
  76. data/lib/candidhealth/contracts/v_2/types/contract_status.rb +4 -6
  77. data/lib/candidhealth/contracts/v_2/types/contract_with_providers.rb +152 -191
  78. data/lib/candidhealth/contracts/v_2/types/contracting_provider_id.rb +9 -0
  79. data/lib/candidhealth/contracts/v_2/types/contracts_page.rb +47 -70
  80. data/lib/candidhealth/contracts/v_2/types/date_update.rb +71 -76
  81. data/lib/candidhealth/contracts/v_2/types/insurance_types.rb +80 -86
  82. data/lib/candidhealth/contracts/v_2/types/regions_update.rb +70 -76
  83. data/lib/candidhealth/contracts/v_2/types/rendering_providerid.rb +9 -0
  84. data/lib/candidhealth/diagnoses/types/diagnosis.rb +91 -145
  85. data/lib/candidhealth/diagnoses/types/diagnosis_create.rb +58 -111
  86. data/lib/candidhealth/diagnoses/types/diagnosis_id.rb +7 -0
  87. data/lib/candidhealth/diagnoses/types/diagnosis_type_code.rb +12 -14
  88. data/lib/candidhealth/diagnoses/types/standalone_diagnosis_create.rb +64 -120
  89. data/lib/candidhealth/eligibility/client.rb +6 -8
  90. data/lib/candidhealth/eligibility/v_2/client.rb +70 -272
  91. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider.rb +86 -139
  92. data/lib/candidhealth/encounter_providers/v_2/types/encounter_provider.rb +85 -141
  93. data/lib/candidhealth/encounter_providers/v_2/types/encounter_provider_base.rb +44 -73
  94. data/lib/candidhealth/encounter_providers/v_2/types/provider_id.rb +9 -0
  95. data/lib/candidhealth/encounter_providers/v_2/types/referring_provider.rb +73 -105
  96. data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider.rb +73 -105
  97. data/lib/candidhealth/encounters/client.rb +6 -8
  98. data/lib/candidhealth/encounters/v_4/client.rb +502 -1828
  99. data/lib/candidhealth/encounters/v_4/types/billable_status_type.rb +3 -5
  100. data/lib/candidhealth/encounters/v_4/types/cash_pay_payer_error_message.rb +33 -44
  101. data/lib/candidhealth/encounters/v_4/types/clinical_note.rb +50 -76
  102. data/lib/candidhealth/encounters/v_4/types/clinical_note_category.rb +45 -70
  103. data/lib/candidhealth/encounters/v_4/types/clinical_note_category_create.rb +40 -57
  104. data/lib/candidhealth/encounters/v_4/types/coding_attribution_type.rb +5 -7
  105. data/lib/candidhealth/encounters/v_4/types/encounter.rb +472 -849
  106. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +248 -334
  107. data/lib/candidhealth/encounters/v_4/types/encounter_external_id_uniqueness_error_type.rb +34 -47
  108. data/lib/candidhealth/encounters/v_4/types/encounter_guarantor_missing_contact_info_error_type.rb +33 -46
  109. data/lib/candidhealth/encounters/v_4/types/encounter_owner_of_next_action_type.rb +5 -7
  110. data/lib/candidhealth/encounters/v_4/types/encounter_page.rb +47 -70
  111. data/lib/candidhealth/encounters/v_4/types/encounter_patient_control_number_uniqueness_error_type.rb +33 -46
  112. data/lib/candidhealth/encounters/v_4/types/encounter_sort_options.rb +5 -7
  113. data/lib/candidhealth/encounters/v_4/types/encounter_submission_origin_type.rb +3 -5
  114. data/lib/candidhealth/encounters/v_4/types/intake_follow_up.rb +44 -63
  115. data/lib/candidhealth/encounters/v_4/types/intake_follow_up_id.rb +9 -0
  116. data/lib/candidhealth/encounters/v_4/types/intake_question.rb +46 -66
  117. data/lib/candidhealth/encounters/v_4/types/intake_question_id.rb +9 -0
  118. data/lib/candidhealth/encounters/v_4/types/intake_response_and_follow_ups.rb +40 -59
  119. data/lib/candidhealth/encounters/v_4/types/intervention.rb +66 -92
  120. data/lib/candidhealth/encounters/v_4/types/intervention_category.rb +5 -7
  121. data/lib/candidhealth/encounters/v_4/types/lab.rb +43 -63
  122. data/lib/candidhealth/encounters/v_4/types/lab_code_type.rb +3 -5
  123. data/lib/candidhealth/encounters/v_4/types/medication.rb +68 -92
  124. data/lib/candidhealth/encounters/v_4/types/note_category.rb +15 -17
  125. data/lib/candidhealth/encounters/v_4/types/patient_history_category.rb +40 -57
  126. data/lib/candidhealth/encounters/v_4/types/patient_history_category_enum.rb +5 -7
  127. data/lib/candidhealth/encounters/v_4/types/prior_authorization_number.rb +9 -0
  128. data/lib/candidhealth/encounters/v_4/types/responsible_party_type.rb +4 -6
  129. data/lib/candidhealth/encounters/v_4/types/rx_cui.rb +9 -0
  130. data/lib/candidhealth/encounters/v_4/types/service_authorization_exception_code.rb +10 -14
  131. data/lib/candidhealth/encounters/v_4/types/synchronicity_type.rb +3 -5
  132. data/lib/candidhealth/encounters/v_4/types/vitals.rb +62 -100
  133. data/lib/candidhealth/era/types/era.rb +46 -62
  134. data/lib/candidhealth/era/types/era_base.rb +40 -55
  135. data/lib/candidhealth/era/types/era_id.rb +7 -0
  136. data/lib/candidhealth/era/types/era_not_fully_processed_error_message.rb +40 -55
  137. data/lib/candidhealth/era_commons/types/claim_status_code_create.rb +12 -14
  138. data/lib/candidhealth/expected_network_status/client.rb +10 -16
  139. data/lib/candidhealth/expected_network_status/v_1/client.rb +29 -70
  140. data/lib/candidhealth/expected_network_status/v_1/types/expected_network_status.rb +4 -6
  141. data/lib/candidhealth/expected_network_status/v_1/types/expected_network_status_response.rb +49 -69
  142. data/lib/candidhealth/expected_network_status/v_2/client.rb +69 -108
  143. data/lib/candidhealth/expected_network_status/v_2/types/compute_all_in_network_providers_request.rb +96 -129
  144. data/lib/candidhealth/expected_network_status/v_2/types/compute_all_in_network_providers_response.rb +47 -62
  145. data/lib/candidhealth/expected_network_status/v_2/types/compute_all_in_network_rendering_providers_result.rb +82 -89
  146. data/lib/candidhealth/expected_network_status/v_2/types/expected_network_status_check_error_message.rb +33 -45
  147. data/lib/candidhealth/expected_network_status/v_2/types/expected_network_status_request_v_2.rb +96 -129
  148. data/lib/candidhealth/expected_network_status/v_2/types/expected_network_status_response_v_2.rb +44 -59
  149. data/lib/candidhealth/expected_network_status/v_2/types/expected_network_status_subscriber_information.rb +49 -68
  150. data/lib/candidhealth/expected_network_status/v_2/types/expected_network_status_v_2.rb +82 -88
  151. data/lib/candidhealth/expected_network_status/v_2/types/explanation.rb +9 -11
  152. data/lib/candidhealth/expected_network_status/v_2/types/in_network_rendering_providers_detail.rb +51 -66
  153. data/lib/candidhealth/expected_network_status/v_2/types/in_network_status.rb +41 -57
  154. data/lib/candidhealth/expected_network_status/v_2/types/indeterminate_network_status.rb +57 -76
  155. data/lib/candidhealth/expected_network_status/v_2/types/insurance_type.rb +43 -59
  156. data/lib/candidhealth/expected_network_status/v_2/types/insurance_type_codes.rb +80 -89
  157. data/lib/candidhealth/expected_network_status/v_2/types/line_of_business.rb +4 -6
  158. data/lib/candidhealth/expected_network_status/v_2/types/network_status_check_id.rb +9 -0
  159. data/lib/candidhealth/expected_network_status/v_2/types/out_of_network_status.rb +50 -65
  160. data/lib/candidhealth/expected_network_status/v_2/types/service_type.rb +42 -44
  161. data/lib/candidhealth/exports/client.rb +6 -8
  162. data/lib/candidhealth/exports/v_3/client.rb +48 -98
  163. data/lib/candidhealth/exports/v_3/types/get_exports_response.rb +58 -79
  164. data/lib/candidhealth/financials/types/account_type.rb +4 -7
  165. data/lib/candidhealth/financials/types/allocation.rb +43 -60
  166. data/lib/candidhealth/financials/types/allocation_create.rb +45 -63
  167. data/lib/candidhealth/financials/types/allocation_target.rb +95 -115
  168. data/lib/candidhealth/financials/types/allocation_target_create.rb +98 -127
  169. data/lib/candidhealth/financials/types/billing_provider_allocation_target.rb +35 -45
  170. data/lib/candidhealth/financials/types/claim_allocation_target.rb +41 -55
  171. data/lib/candidhealth/financials/types/invoice_update.rb +72 -77
  172. data/lib/candidhealth/financials/types/note_update.rb +71 -77
  173. data/lib/candidhealth/financials/types/patient_transaction_source.rb +9 -11
  174. data/lib/candidhealth/financials/types/refund_reason.rb +3 -5
  175. data/lib/candidhealth/financials/types/refund_reason_update.rb +71 -77
  176. data/lib/candidhealth/financials/types/service_line_allocation_target.rb +48 -62
  177. data/lib/candidhealth/guarantor/client.rb +6 -8
  178. data/lib/candidhealth/guarantor/v_1/client.rb +116 -139
  179. data/lib/candidhealth/guarantor/v_1/types/encounter_has_existing_guarantor_error_type.rb +33 -45
  180. data/lib/candidhealth/guarantor/v_1/types/guarantor.rb +100 -131
  181. data/lib/candidhealth/guarantor/v_1/types/guarantor_base.rb +65 -89
  182. data/lib/candidhealth/guarantor/v_1/types/guarantor_create.rb +93 -123
  183. data/lib/candidhealth/guarantor/v_1/types/guarantor_id.rb +9 -0
  184. data/lib/candidhealth/identifiers/types/identifier.rb +64 -85
  185. data/lib/candidhealth/identifiers/types/identifier_base.rb +53 -77
  186. data/lib/candidhealth/identifiers/types/identifier_code.rb +4 -6
  187. data/lib/candidhealth/identifiers/types/identifier_create.rb +53 -77
  188. data/lib/candidhealth/identifiers/types/identifier_id.rb +7 -0
  189. data/lib/candidhealth/identifiers/types/identifier_update.rb +65 -86
  190. data/lib/candidhealth/identifiers/types/identifier_value.rb +72 -78
  191. data/lib/candidhealth/identifiers/types/medicaid_provider_identifier.rb +39 -55
  192. data/lib/candidhealth/identifiers/types/medicare_provider_identifier.rb +39 -55
  193. data/lib/candidhealth/identifiers/types/updatable_identifier.rb +84 -89
  194. data/lib/candidhealth/individual/types/gender.rb +7 -9
  195. data/lib/candidhealth/individual/types/individual_base.rb +44 -62
  196. data/lib/candidhealth/individual/types/individual_id.rb +7 -0
  197. data/lib/candidhealth/individual/types/patient.rb +108 -169
  198. data/lib/candidhealth/individual/types/patient_base.rb +73 -101
  199. data/lib/candidhealth/individual/types/patient_create.rb +101 -157
  200. data/lib/candidhealth/individual/types/subscriber.rb +91 -119
  201. data/lib/candidhealth/individual/types/subscriber_base.rb +74 -99
  202. data/lib/candidhealth/individual/types/subscriber_create.rb +84 -111
  203. data/lib/candidhealth/insurance_adjudications/client.rb +6 -8
  204. data/lib/candidhealth/insurance_adjudications/v_1/client.rb +47 -110
  205. data/lib/candidhealth/insurance_adjudications/v_1/types/claim_adjudication.rb +81 -106
  206. data/lib/candidhealth/insurance_adjudications/v_1/types/claim_adjudication_create.rb +74 -98
  207. data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication.rb +80 -104
  208. data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_create.rb +87 -129
  209. data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_id.rb +9 -0
  210. data/lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication.rb +91 -121
  211. data/lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb +84 -113
  212. data/lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_id.rb +9 -0
  213. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card.rb +105 -148
  214. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb +55 -84
  215. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb +104 -148
  216. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_id.rb +9 -0
  217. data/lib/candidhealth/insurance_payments/client.rb +6 -8
  218. data/lib/candidhealth/insurance_payments/v_1/client.rb +175 -78
  219. data/lib/candidhealth/insurance_payments/v_1/types/insurance_payment.rb +77 -101
  220. data/lib/candidhealth/insurance_payments/v_1/types/insurance_payment_create.rb +91 -0
  221. data/lib/candidhealth/insurance_payments/v_1/types/insurance_payment_id.rb +9 -0
  222. data/lib/candidhealth/insurance_payments/v_1/types/insurance_payment_sort_field.rb +4 -6
  223. data/lib/candidhealth/insurance_payments/v_1/types/insurance_payments_page.rb +47 -70
  224. data/lib/candidhealth/insurance_refunds/client.rb +6 -8
  225. data/lib/candidhealth/insurance_refunds/v_1/client.rb +108 -200
  226. data/lib/candidhealth/insurance_refunds/v_1/types/insurance_refund.rb +83 -109
  227. data/lib/candidhealth/insurance_refunds/v_1/types/insurance_refund_create.rb +76 -101
  228. data/lib/candidhealth/insurance_refunds/v_1/types/insurance_refund_id.rb +9 -0
  229. data/lib/candidhealth/insurance_refunds/v_1/types/insurance_refund_sort_field.rb +5 -7
  230. data/lib/candidhealth/insurance_refunds/v_1/types/insurance_refunds_page.rb +47 -70
  231. data/lib/candidhealth/invoices/types/invoice.rb +117 -152
  232. data/lib/candidhealth/invoices/types/invoice_item.rb +40 -55
  233. data/lib/candidhealth/invoices/types/invoice_status.rb +7 -10
  234. data/lib/candidhealth/organization_providers/client.rb +6 -8
  235. data/lib/candidhealth/organization_providers/v_2/types/address_type.rb +2 -4
  236. data/lib/candidhealth/organization_providers/v_2/types/employment_status.rb +3 -5
  237. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +69 -102
  238. data/lib/candidhealth/organization_providers/v_2/types/organization_provider.rb +138 -189
  239. data/lib/candidhealth/organization_providers/v_2/types/organization_provider_address.rb +42 -59
  240. data/lib/candidhealth/organization_providers/v_2/types/organization_provider_base.rb +112 -157
  241. data/lib/candidhealth/organization_providers/v_2/types/organization_provider_id.rb +9 -0
  242. data/lib/candidhealth/organization_providers/v_2/types/organization_provider_sort_options.rb +5 -7
  243. data/lib/candidhealth/organization_providers/v_2/types/provider_type.rb +3 -5
  244. data/lib/candidhealth/organization_providers/v_3/client.rb +80 -166
  245. data/lib/candidhealth/organization_providers/v_3/types/organization_provider_create_v_2.rb +124 -171
  246. data/lib/candidhealth/organization_providers/v_3/types/organization_provider_page_v_2.rb +47 -70
  247. data/lib/candidhealth/organization_providers/v_3/types/organization_provider_update_v_2.rb +121 -169
  248. data/lib/candidhealth/organization_providers/v_3/types/organization_provider_v_2.rb +131 -179
  249. data/lib/candidhealth/organization_service_facilities/client.rb +6 -8
  250. data/lib/candidhealth/organization_service_facilities/v_2/client.rb +90 -186
  251. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility.rb +111 -149
  252. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility_create.rb +104 -141
  253. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility_id.rb +9 -0
  254. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility_page.rb +47 -70
  255. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility_update.rb +104 -141
  256. data/lib/candidhealth/organization_service_facilities/v_2/types/service_facility_mode.rb +3 -5
  257. data/lib/candidhealth/organization_service_facilities/v_2/types/service_facility_operational_status.rb +7 -9
  258. data/lib/candidhealth/organization_service_facilities/v_2/types/service_facility_physical_type.rb +15 -17
  259. data/lib/candidhealth/organization_service_facilities/v_2/types/service_facility_status.rb +4 -6
  260. data/lib/candidhealth/organization_service_facilities/v_2/types/service_facility_type.rb +124 -126
  261. data/lib/candidhealth/patient_payments/client.rb +6 -8
  262. data/lib/candidhealth/patient_payments/v_3/types/patient_payment.rb +111 -143
  263. data/lib/candidhealth/patient_payments/v_3/types/patient_payment_id.rb +9 -0
  264. data/lib/candidhealth/patient_payments/v_3/types/patient_payment_source.rb +10 -12
  265. data/lib/candidhealth/patient_payments/v_3/types/patient_payment_status.rb +12 -14
  266. data/lib/candidhealth/patient_payments/v_4/client.rb +103 -200
  267. data/lib/candidhealth/patient_payments/v_4/types/patient_payment.rb +100 -129
  268. data/lib/candidhealth/patient_payments/v_4/types/patient_payment_id.rb +9 -0
  269. data/lib/candidhealth/patient_payments/v_4/types/patient_payment_sort_field.rb +5 -7
  270. data/lib/candidhealth/patient_payments/v_4/types/patient_payments_page.rb +47 -70
  271. data/lib/candidhealth/patient_refunds/client.rb +6 -8
  272. data/lib/candidhealth/patient_refunds/v_1/client.rb +107 -204
  273. data/lib/candidhealth/patient_refunds/v_1/types/patient_refund.rb +106 -137
  274. data/lib/candidhealth/patient_refunds/v_1/types/patient_refund_id.rb +9 -0
  275. data/lib/candidhealth/patient_refunds/v_1/types/patient_refund_sort_field.rb +6 -8
  276. data/lib/candidhealth/patient_refunds/v_1/types/patient_refunds_page.rb +47 -70
  277. data/lib/candidhealth/payers/client.rb +6 -8
  278. data/lib/candidhealth/payers/v_3/client.rb +32 -73
  279. data/lib/candidhealth/payers/v_3/types/payer.rb +44 -115
  280. data/lib/candidhealth/payers/v_3/types/payer_id.rb +9 -0
  281. data/lib/candidhealth/payers/v_3/types/payer_identifier.rb +72 -77
  282. data/lib/candidhealth/payers/v_3/types/payer_info.rb +40 -54
  283. data/lib/candidhealth/payers/v_3/types/payer_name.rb +9 -0
  284. data/lib/candidhealth/payers/v_3/types/payer_page.rb +47 -70
  285. data/lib/candidhealth/payers/v_3/types/payer_uuid.rb +9 -0
  286. data/lib/candidhealth/remits/v_1/types/payee.rb +42 -59
  287. data/lib/candidhealth/remits/v_1/types/payee_identifier.rb +80 -84
  288. data/lib/candidhealth/service_facility/client.rb +52 -61
  289. data/lib/candidhealth/service_facility/types/encounter_service_facility.rb +62 -104
  290. data/lib/candidhealth/service_facility/types/encounter_service_facility_base.rb +57 -108
  291. data/lib/candidhealth/service_facility/types/service_facility_id.rb +7 -0
  292. data/lib/candidhealth/service_lines/v_2/types/denial_reason_content.rb +31 -35
  293. data/lib/candidhealth/service_lines/v_2/types/drug_identification.rb +68 -108
  294. data/lib/candidhealth/service_lines/v_2/types/measurement_unit_code.rb +6 -8
  295. data/lib/candidhealth/service_lines/v_2/types/service_id_qualifier.rb +8 -10
  296. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +199 -437
  297. data/lib/candidhealth/service_lines/v_2/types/service_line_adjustment.rb +62 -85
  298. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +99 -226
  299. data/lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb +35 -49
  300. data/lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb +44 -60
  301. data/lib/candidhealth/tags/types/tag.rb +51 -69
  302. data/lib/candidhealth/tags/types/tag_color_enum.rb +12 -14
  303. data/lib/candidhealth/tags/types/tag_create.rb +45 -62
  304. data/lib/candidhealth/tags/types/tag_id.rb +7 -0
  305. data/lib/candidhealth/tasks/client.rb +6 -8
  306. data/lib/candidhealth/tasks/commons/types/task_category.rb +42 -46
  307. data/lib/candidhealth/tasks/commons/types/task_status.rb +9 -11
  308. data/lib/candidhealth/tasks/commons/types/task_type.rb +14 -16
  309. data/lib/candidhealth/tasks/v_3/client.rb +96 -180
  310. data/lib/candidhealth/tasks/v_3/types/task.rb +146 -201
  311. data/lib/candidhealth/tasks/v_3/types/task_action.rb +47 -66
  312. data/lib/candidhealth/tasks/v_3/types/task_action_execution_method.rb +59 -65
  313. data/lib/candidhealth/tasks/v_3/types/task_action_type.rb +3 -5
  314. data/lib/candidhealth/tasks/v_3/types/task_actions.rb +35 -47
  315. data/lib/candidhealth/tasks/v_3/types/task_assignment.rb +40 -59
  316. data/lib/candidhealth/tasks/v_3/types/task_create_v_3.rb +77 -100
  317. data/lib/candidhealth/tasks/v_3/types/task_note.rb +62 -83
  318. data/lib/candidhealth/tasks/v_3/types/task_page.rb +47 -70
  319. data/lib/candidhealth/tasks/v_3/types/task_sort_options.rb +23 -25
  320. data/lib/candidhealth/tasks/v_3/types/task_update_v_3.rb +49 -68
  321. data/lib/candidhealth/tasks/v_3/types/task_updated_to_deprecated_status_error_type.rb +33 -47
  322. data/lib/candidhealth/write_offs/client.rb +6 -8
  323. data/lib/candidhealth/write_offs/v_1/client.rb +83 -244
  324. data/lib/candidhealth/write_offs/v_1/types/create_write_offs_response.rb +35 -47
  325. data/lib/candidhealth/write_offs/v_1/types/insurance_write_off.rb +97 -127
  326. data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_create.rb +78 -103
  327. data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_reason.rb +16 -20
  328. data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_target.rb +81 -84
  329. data/lib/candidhealth/write_offs/v_1/types/patient_write_off.rb +84 -127
  330. data/lib/candidhealth/write_offs/v_1/types/patient_write_off_create.rb +65 -87
  331. data/lib/candidhealth/write_offs/v_1/types/patient_write_off_reason.rb +10 -15
  332. data/lib/candidhealth/write_offs/v_1/types/write_off.rb +71 -90
  333. data/lib/candidhealth/write_offs/v_1/types/write_off_create.rb +71 -90
  334. data/lib/candidhealth/write_offs/v_1/types/write_off_id.rb +9 -0
  335. data/lib/candidhealth/write_offs/v_1/types/write_off_sort_field.rb +4 -6
  336. data/lib/candidhealth/write_offs/v_1/types/write_offs_page.rb +47 -70
  337. data/lib/candidhealth/x_12/v_1/types/carc.rb +403 -406
  338. data/lib/candidhealth/x_12/v_1/types/claim_adjustment_reason_code.rb +44 -61
  339. data/lib/candidhealth/x_12/v_1/types/rarc.rb +1061 -1190
  340. data/lib/candidhealth/x_12/v_1/types/remittance_advice_remark_code.rb +33 -44
  341. data/lib/candidhealth.rb +87 -287
  342. data/lib/environment.rb +2 -12
  343. data/lib/requests.rb +48 -101
  344. data/lib/types_export.rb +56 -305
  345. metadata +62 -397
  346. data/lib/candidhealth/auth/default/client.rb +0 -169
  347. data/lib/candidhealth/auth/default/types/auth_get_token_response.rb +0 -77
  348. data/lib/candidhealth/auth/default/types/invalid_content_type_error_type.rb +0 -60
  349. data/lib/candidhealth/auth/default/types/too_many_requests_error_type.rb +0 -60
  350. data/lib/candidhealth/billing_notes/v_2/types/billing_note_base_optional.rb +0 -62
  351. data/lib/candidhealth/charge_capture/client.rb +0 -30
  352. data/lib/candidhealth/charge_capture/v_1/client.rb +0 -1601
  353. data/lib/candidhealth/charge_capture/v_1/types/charge_capture.rb +0 -175
  354. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +0 -780
  355. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb +0 -138
  356. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_page.rb +0 -96
  357. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb +0 -80
  358. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_sort_field.rb +0 -14
  359. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_status.rb +0 -17
  360. data/lib/candidhealth/charge_capture/v_1/types/charge_external_id_conflict_error_message.rb +0 -62
  361. data/lib/candidhealth/charge_capture_bundles/client.rb +0 -30
  362. data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +0 -356
  363. data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb +0 -132
  364. data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_page.rb +0 -88
  365. data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_sort_field.rb +0 -13
  366. data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_status.rb +0 -18
  367. data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_summary.rb +0 -100
  368. data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional.rb +0 -100
  369. data/lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create_optional.rb +0 -101
  370. data/lib/candidhealth/clinical_trials/v_1/types/clinical_trial.rb +0 -109
  371. data/lib/candidhealth/clinical_trials/v_1/types/clinical_trial_phase.rb +0 -15
  372. data/lib/candidhealth/clinical_trials/v_1/types/mutable_clinical_trial.rb +0 -84
  373. data/lib/candidhealth/commons/types/billing_provider_commercial_license_type.rb +0 -20
  374. data/lib/candidhealth/commons/types/entity_conflict_error_message.rb +0 -58
  375. data/lib/candidhealth/commons/types/epsdt_referral_condition_indicator_code.rb +0 -14
  376. data/lib/candidhealth/commons/types/intended_submission_medium.rb +0 -15
  377. data/lib/candidhealth/commons/types/network_type.rb +0 -31
  378. data/lib/candidhealth/commons/types/next_responsible_party.rb +0 -16
  379. data/lib/candidhealth/commons/types/phone_number_optional.rb +0 -71
  380. data/lib/candidhealth/commons/types/primitive.rb +0 -17
  381. data/lib/candidhealth/commons/types/qualifier_code.rb +0 -14
  382. data/lib/candidhealth/commons/types/street_address_long_zip_optional.rb +0 -107
  383. data/lib/candidhealth/commons/types/street_address_optional_base.rb +0 -99
  384. data/lib/candidhealth/commons/types/street_address_short_zip_optional.rb +0 -107
  385. data/lib/candidhealth/contracts/v_2/types/contract_invalid_expiration_date_error.rb +0 -60
  386. data/lib/candidhealth/contracts/v_2/types/contract_sort_field.rb +0 -18
  387. data/lib/candidhealth/credentialing/client.rb +0 -30
  388. data/lib/candidhealth/credentialing/v_2/client.rb +0 -384
  389. data/lib/candidhealth/credentialing/v_2/types/credentialing_span_status.rb +0 -17
  390. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +0 -196
  391. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span_page.rb +0 -88
  392. data/lib/candidhealth/custom_schemas/client.rb +0 -30
  393. data/lib/candidhealth/custom_schemas/v_1/client.rb +0 -291
  394. data/lib/candidhealth/custom_schemas/v_1/types/key_with_name_already_exists_error.rb +0 -71
  395. data/lib/candidhealth/custom_schemas/v_1/types/schema.rb +0 -91
  396. data/lib/candidhealth/custom_schemas/v_1/types/schema_field.rb +0 -71
  397. data/lib/candidhealth/custom_schemas/v_1/types/schema_get_multi_response.rb +0 -65
  398. data/lib/candidhealth/custom_schemas/v_1/types/schema_instance.rb +0 -76
  399. data/lib/candidhealth/custom_schemas/v_1/types/schema_instance_optional.rb +0 -78
  400. data/lib/candidhealth/custom_schemas/v_1/types/schema_validation_error.rb +0 -100
  401. data/lib/candidhealth/custom_schemas/v_1/types/schema_validation_failure.rb +0 -65
  402. data/lib/candidhealth/custom_schemas/v_1/types/schema_with_name_already_exists_error.rb +0 -70
  403. data/lib/candidhealth/diagnoses/client.rb +0 -243
  404. data/lib/candidhealth/diagnoses/types/diagnosis_create_optional.rb +0 -126
  405. data/lib/candidhealth/diagnoses/types/diagnosis_not_found_error.rb +0 -70
  406. data/lib/candidhealth/encounter_attachments/client.rb +0 -30
  407. data/lib/candidhealth/encounter_attachments/v_1/client.rb +0 -193
  408. data/lib/candidhealth/encounter_attachments/v_1/types/base_attachment.rb +0 -98
  409. data/lib/candidhealth/encounter_attachments/v_1/types/encounter_attachment.rb +0 -115
  410. data/lib/candidhealth/encounter_attachments/v_1/types/encounter_attachment_type.rb +0 -15
  411. data/lib/candidhealth/encounter_providers/client.rb +0 -30
  412. data/lib/candidhealth/encounter_providers/v_2/client.rb +0 -789
  413. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb +0 -157
  414. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +0 -160
  415. data/lib/candidhealth/encounter_providers/v_2/types/initial_referring_provider.rb +0 -132
  416. data/lib/candidhealth/encounter_providers/v_2/types/initial_referring_provider_update.rb +0 -132
  417. data/lib/candidhealth/encounter_providers/v_2/types/initial_referring_provider_update_with_optional_address.rb +0 -134
  418. data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider.rb +0 -123
  419. data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider_optional.rb +0 -123
  420. data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider_update.rb +0 -123
  421. data/lib/candidhealth/encounter_providers/v_2/types/referring_provider_update.rb +0 -123
  422. data/lib/candidhealth/encounter_providers/v_2/types/referring_provider_update_with_optional_address.rb +0 -125
  423. data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider_update.rb +0 -123
  424. data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider_update_with_optional_address.rb +0 -125
  425. data/lib/candidhealth/encounter_providers/v_2/types/supervising_provider.rb +0 -123
  426. data/lib/candidhealth/encounter_providers/v_2/types/supervising_provider_update.rb +0 -123
  427. data/lib/candidhealth/encounter_providers/v_2/types/supervising_provider_update_with_optional_address.rb +0 -125
  428. data/lib/candidhealth/encounters/v_4/types/claim_supplemental_information.rb +0 -86
  429. data/lib/candidhealth/encounters/v_4/types/claim_supplemental_information_optional.rb +0 -86
  430. data/lib/candidhealth/encounters/v_4/types/clinical_note_category_create_optional.rb +0 -78
  431. data/lib/candidhealth/encounters/v_4/types/clinical_note_optional.rb +0 -93
  432. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +0 -629
  433. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +0 -780
  434. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +0 -380
  435. data/lib/candidhealth/encounters/v_4/types/epsdt_referral.rb +0 -85
  436. data/lib/candidhealth/encounters/v_4/types/epsdt_referral_optional.rb +0 -85
  437. data/lib/candidhealth/encounters/v_4/types/intake_question_optional.rb +0 -84
  438. data/lib/candidhealth/encounters/v_4/types/intervention_optional.rb +0 -114
  439. data/lib/candidhealth/encounters/v_4/types/invalid_tag_names_error_type.rb +0 -60
  440. data/lib/candidhealth/encounters/v_4/types/key_does_not_exist_error.rb +0 -70
  441. data/lib/candidhealth/encounters/v_4/types/lab_optional.rb +0 -80
  442. data/lib/candidhealth/encounters/v_4/types/medication_optional.rb +0 -108
  443. data/lib/candidhealth/encounters/v_4/types/multiple_instances_for_schema_error.rb +0 -60
  444. data/lib/candidhealth/encounters/v_4/types/patient_history_category_optional.rb +0 -78
  445. data/lib/candidhealth/encounters/v_4/types/payer_plan_group_payer_does_not_match_insurance_card_error.rb +0 -77
  446. data/lib/candidhealth/encounters/v_4/types/report_transmission_code.rb +0 -14
  447. data/lib/candidhealth/encounters/v_4/types/report_type_code.rb +0 -73
  448. data/lib/candidhealth/encounters/v_4/types/schema_does_not_exist_error.rb +0 -60
  449. data/lib/candidhealth/encounters/v_4/types/schema_instance_validation_error.rb +0 -139
  450. data/lib/candidhealth/encounters/v_4/types/schema_instance_validation_failure.rb +0 -65
  451. data/lib/candidhealth/encounters/v_4/types/schema_unauthorized_access_error.rb +0 -60
  452. data/lib/candidhealth/encounters/v_4/types/value_does_not_match_key_type_error.rb +0 -90
  453. data/lib/candidhealth/encounters/v_4/types/vitals_update.rb +0 -116
  454. data/lib/candidhealth/expected_network_status/v_2/types/empty_object.rb +0 -53
  455. data/lib/candidhealth/external_payment_account_config/client.rb +0 -30
  456. data/lib/candidhealth/external_payment_account_config/v_1/client.rb +0 -89
  457. data/lib/candidhealth/external_payment_account_config/v_1/types/external_payment_account_config.rb +0 -70
  458. data/lib/candidhealth/external_payment_account_config/v_1/types/external_payment_account_config_page.rb +0 -88
  459. data/lib/candidhealth/fee_schedules/client.rb +0 -30
  460. data/lib/candidhealth/fee_schedules/v_3/client.rb +0 -703
  461. data/lib/candidhealth/fee_schedules/v_3/types/dimension_match.rb +0 -200
  462. data/lib/candidhealth/fee_schedules/v_3/types/dimension_name.rb +0 -16
  463. data/lib/candidhealth/fee_schedules/v_3/types/dimensions.rb +0 -179
  464. data/lib/candidhealth/fee_schedules/v_3/types/dimensions_page.rb +0 -88
  465. data/lib/candidhealth/fee_schedules/v_3/types/match_cpt_code.rb +0 -78
  466. data/lib/candidhealth/fee_schedules/v_3/types/match_date.rb +0 -82
  467. data/lib/candidhealth/fee_schedules/v_3/types/match_facility_type_code.rb +0 -81
  468. data/lib/candidhealth/fee_schedules/v_3/types/match_geo.rb +0 -93
  469. data/lib/candidhealth/fee_schedules/v_3/types/match_license_type.rb +0 -81
  470. data/lib/candidhealth/fee_schedules/v_3/types/match_modifiers.rb +0 -85
  471. data/lib/candidhealth/fee_schedules/v_3/types/match_network_types.rb +0 -85
  472. data/lib/candidhealth/fee_schedules/v_3/types/match_payer.rb +0 -78
  473. data/lib/candidhealth/fee_schedules/v_3/types/match_payer_plan_groups.rb +0 -85
  474. data/lib/candidhealth/fee_schedules/v_3/types/match_provider.rb +0 -80
  475. data/lib/candidhealth/fee_schedules/v_3/types/match_result.rb +0 -77
  476. data/lib/candidhealth/fee_schedules/v_3/types/match_test_result.rb +0 -83
  477. data/lib/candidhealth/fee_schedules/v_3/types/new_rate.rb +0 -81
  478. data/lib/candidhealth/fee_schedules/v_3/types/new_rate_version.rb +0 -88
  479. data/lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb +0 -180
  480. data/lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb +0 -90
  481. data/lib/candidhealth/fee_schedules/v_3/types/payer_plan_group_does_not_match_rate_payer_error.rb +0 -75
  482. data/lib/candidhealth/fee_schedules/v_3/types/payer_threshold.rb +0 -93
  483. data/lib/candidhealth/fee_schedules/v_3/types/payer_thresholds_page.rb +0 -87
  484. data/lib/candidhealth/fee_schedules/v_3/types/rate.rb +0 -121
  485. data/lib/candidhealth/fee_schedules/v_3/types/rate_entry.rb +0 -96
  486. data/lib/candidhealth/fee_schedules/v_3/types/rate_upload.rb +0 -100
  487. data/lib/candidhealth/fee_schedules/v_3/types/rate_upload_with_possible_errors.rb +0 -100
  488. data/lib/candidhealth/fee_schedules/v_3/types/rates_page.rb +0 -88
  489. data/lib/candidhealth/fee_schedules/v_3/types/threshold_match.rb +0 -97
  490. data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +0 -160
  491. data/lib/candidhealth/financials/types/appointment_allocation_target.rb +0 -68
  492. data/lib/candidhealth/financials/types/appointment_by_id_and_patient_external_id.rb +0 -68
  493. data/lib/candidhealth/guarantor/v_1/types/guarantor_optional.rb +0 -144
  494. data/lib/candidhealth/guarantor/v_1/types/guarantor_update.rb +0 -144
  495. data/lib/candidhealth/import_invoice/client.rb +0 -30
  496. data/lib/candidhealth/import_invoice/v_1/client.rb +0 -320
  497. data/lib/candidhealth/import_invoice/v_1/types/create_import_invoice_request.rb +0 -143
  498. data/lib/candidhealth/import_invoice/v_1/types/import_invoice.rb +0 -165
  499. data/lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb +0 -109
  500. data/lib/candidhealth/import_invoice/v_1/types/import_invoices_page.rb +0 -88
  501. data/lib/candidhealth/import_invoice/v_1/types/invoice_item_info_update.rb +0 -80
  502. data/lib/candidhealth/import_invoice/v_1/types/invoice_item_update_type.rb +0 -14
  503. data/lib/candidhealth/individual/types/individual_base_optional.rb +0 -78
  504. data/lib/candidhealth/individual/types/patient_clinical_trial_info.rb +0 -80
  505. data/lib/candidhealth/individual/types/patient_clinical_trial_info_create.rb +0 -73
  506. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info.rb +0 -92
  507. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create.rb +0 -86
  508. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create_optional.rb +0 -89
  509. data/lib/candidhealth/individual/types/patient_update.rb +0 -179
  510. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +0 -179
  511. data/lib/candidhealth/individual/types/subscriber_base_optional.rb +0 -118
  512. data/lib/candidhealth/individual/types/subscriber_create_optional.rb +0 -132
  513. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create_optional.rb +0 -167
  514. data/lib/candidhealth/invoices/v_2/types/claim_invoice_item.rb +0 -70
  515. data/lib/candidhealth/invoices/v_2/types/claim_invoice_item_info.rb +0 -85
  516. data/lib/candidhealth/invoices/v_2/types/invoice.rb +0 -173
  517. data/lib/candidhealth/invoices/v_2/types/invoice_destination.rb +0 -17
  518. data/lib/candidhealth/invoices/v_2/types/invoice_destination_metadata.rb +0 -95
  519. data/lib/candidhealth/invoices/v_2/types/invoice_info.rb +0 -85
  520. data/lib/candidhealth/invoices/v_2/types/invoice_item_attribution_create.rb +0 -110
  521. data/lib/candidhealth/invoices/v_2/types/invoice_item_create.rb +0 -77
  522. data/lib/candidhealth/invoices/v_2/types/invoice_item_info.rb +0 -78
  523. data/lib/candidhealth/invoices/v_2/types/invoice_sort_field.rb +0 -18
  524. data/lib/candidhealth/invoices/v_2/types/invoice_status.rb +0 -18
  525. data/lib/candidhealth/invoices/v_2/types/service_line_invoice_item.rb +0 -70
  526. data/lib/candidhealth/invoices/v_2/types/unattributed_invoice_item.rb +0 -60
  527. data/lib/candidhealth/medication_dispense/client.rb +0 -30
  528. data/lib/candidhealth/medication_dispense/v_1/client.rb +0 -114
  529. data/lib/candidhealth/medication_dispense/v_1/types/medication_dispense_create.rb +0 -142
  530. data/lib/candidhealth/non_insurance_payer_payments/client.rb +0 -30
  531. data/lib/candidhealth/non_insurance_payer_payments/v_1/client.rb +0 -344
  532. data/lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payment.rb +0 -138
  533. data/lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payment_create.rb +0 -124
  534. data/lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payment_sort_field.rb +0 -14
  535. data/lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page.rb +0 -88
  536. data/lib/candidhealth/non_insurance_payer_refunds/client.rb +0 -30
  537. data/lib/candidhealth/non_insurance_payer_refunds/v_1/client.rb +0 -371
  538. data/lib/candidhealth/non_insurance_payer_refunds/v_1/types/non_insurance_payer_refund.rb +0 -147
  539. data/lib/candidhealth/non_insurance_payer_refunds/v_1/types/non_insurance_payer_refund_create.rb +0 -133
  540. data/lib/candidhealth/non_insurance_payer_refunds/v_1/types/non_insurance_payer_refund_sort_field.rb +0 -14
  541. data/lib/candidhealth/non_insurance_payer_refunds/v_1/types/non_insurance_payer_refunds_page.rb +0 -88
  542. data/lib/candidhealth/non_insurance_payers/client.rb +0 -30
  543. data/lib/candidhealth/non_insurance_payers/v_1/client.rb +0 -377
  544. data/lib/candidhealth/non_insurance_payers/v_1/types/create_non_insurance_payer_request.rb +0 -111
  545. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer.rb +0 -127
  546. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_address_update.rb +0 -98
  547. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_category_update.rb +0 -97
  548. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_description_update.rb +0 -97
  549. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_page.rb +0 -88
  550. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_sort_field.rb +0 -16
  551. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_update_request.rb +0 -110
  552. data/lib/candidhealth/non_insurance_payers/v_1/types/toggle_non_insurance_payer_enablement_request.rb +0 -62
  553. data/lib/candidhealth/payer_plan_groups/client.rb +0 -30
  554. data/lib/candidhealth/payer_plan_groups/v_1/client.rb +0 -356
  555. data/lib/candidhealth/payer_plan_groups/v_1/types/mutable_payer_plan_group.rb +0 -78
  556. data/lib/candidhealth/payer_plan_groups/v_1/types/payer_plan_group.rb +0 -114
  557. data/lib/candidhealth/payer_plan_groups/v_1/types/payer_plan_group_already_exists_error.rb +0 -70
  558. data/lib/candidhealth/payer_plan_groups/v_1/types/payer_plan_group_page.rb +0 -88
  559. data/lib/candidhealth/payer_plan_groups/v_1/types/payer_plan_group_sort_field.rb +0 -15
  560. data/lib/candidhealth/pre_encounter/appointments/client.rb +0 -32
  561. data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +0 -580
  562. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +0 -283
  563. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_status.rb +0 -18
  564. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_work_queue.rb +0 -18
  565. data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +0 -231
  566. data/lib/candidhealth/pre_encounter/appointments/v_1/types/service.rb +0 -82
  567. data/lib/candidhealth/pre_encounter/appointments/v_1/types/universal_service_identifier.rb +0 -18
  568. data/lib/candidhealth/pre_encounter/appointments/v_1/types/visit.rb +0 -96
  569. data/lib/candidhealth/pre_encounter/appointments/v_1/types/visits_page.rb +0 -98
  570. data/lib/candidhealth/pre_encounter/client.rb +0 -30
  571. data/lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb +0 -92
  572. data/lib/candidhealth/pre_encounter/common/types/address.rb +0 -123
  573. data/lib/candidhealth/pre_encounter/common/types/address_use.rb +0 -17
  574. data/lib/candidhealth/pre_encounter/common/types/base_model.rb +0 -104
  575. data/lib/candidhealth/pre_encounter/common/types/canonical_clinical_trial_association.rb +0 -86
  576. data/lib/candidhealth/pre_encounter/common/types/canonical_non_insurance_payer_association.rb +0 -103
  577. data/lib/candidhealth/pre_encounter/common/types/contact_point.rb +0 -87
  578. data/lib/candidhealth/pre_encounter/common/types/contact_point_use.rb +0 -17
  579. data/lib/candidhealth/pre_encounter/common/types/disability_status.rb +0 -14
  580. data/lib/candidhealth/pre_encounter/common/types/error_base_4_xx.rb +0 -72
  581. data/lib/candidhealth/pre_encounter/common/types/ethnicity.rb +0 -16
  582. data/lib/candidhealth/pre_encounter/common/types/external_identifier.rb +0 -87
  583. data/lib/candidhealth/pre_encounter/common/types/external_provider.rb +0 -146
  584. data/lib/candidhealth/pre_encounter/common/types/external_provider_type.rb +0 -15
  585. data/lib/candidhealth/pre_encounter/common/types/gender.rb +0 -21
  586. data/lib/candidhealth/pre_encounter/common/types/human_name.rb +0 -107
  587. data/lib/candidhealth/pre_encounter/common/types/name_use.rb +0 -19
  588. data/lib/candidhealth/pre_encounter/common/types/period.rb +0 -74
  589. data/lib/candidhealth/pre_encounter/common/types/race.rb +0 -21
  590. data/lib/candidhealth/pre_encounter/common/types/relationship.rb +0 -17
  591. data/lib/candidhealth/pre_encounter/common/types/resource_page.rb +0 -83
  592. data/lib/candidhealth/pre_encounter/common/types/sex.rb +0 -16
  593. data/lib/candidhealth/pre_encounter/common/types/sexual_orientation.rb +0 -19
  594. data/lib/candidhealth/pre_encounter/common/types/sort_direction.rb +0 -14
  595. data/lib/candidhealth/pre_encounter/common/types/version_conflict_error_body.rb +0 -79
  596. data/lib/candidhealth/pre_encounter/coverages/client.rb +0 -32
  597. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +0 -1206
  598. data/lib/candidhealth/pre_encounter/coverages/v_1/types/address.rb +0 -118
  599. data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefit_type.rb +0 -24
  600. data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefits_related_entity.rb +0 -108
  601. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +0 -225
  602. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_benefits.rb +0 -109
  603. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_details.rb +0 -104
  604. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response.rb +0 -87
  605. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_level.rb +0 -19
  606. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_status.rb +0 -20
  607. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value.rb +0 -94
  608. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value_unit.rb +0 -17
  609. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverages_page.rb +0 -98
  610. data/lib/candidhealth/pre_encounter/coverages/v_1/types/expanded_member_info.rb +0 -133
  611. data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +0 -165
  612. data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code.rb +0 -86
  613. data/lib/candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check.rb +0 -83
  614. data/lib/candidhealth/pre_encounter/coverages/v_1/types/member_info.rb +0 -111
  615. data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +0 -171
  616. data/lib/candidhealth/pre_encounter/coverages/v_1/types/network_type.rb +0 -38
  617. data/lib/candidhealth/pre_encounter/coverages/v_1/types/payer_plan_group_fields.rb +0 -92
  618. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage.rb +0 -113
  619. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb +0 -176
  620. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_date.rb +0 -87
  621. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_metadata.rb +0 -167
  622. data/lib/candidhealth/pre_encounter/coverages/v_1/types/related_entity_contact.rb +0 -74
  623. data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage.rb +0 -122
  624. data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage_details.rb +0 -124
  625. data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_type_code.rb +0 -203
  626. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +0 -108
  627. data/lib/candidhealth/pre_encounter/eligibility_checks/client.rb +0 -32
  628. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +0 -264
  629. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/batch_eligibility_response.rb +0 -75
  630. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check.rb +0 -131
  631. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error.rb +0 -80
  632. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_details.rb +0 -112
  633. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_source.rb +0 -17
  634. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_metadata.rb +0 -103
  635. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_page.rb +0 -98
  636. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_status.rb +0 -18
  637. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_request.rb +0 -151
  638. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_response.rb +0 -15
  639. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_status.rb +0 -18
  640. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/encounter.rb +0 -83
  641. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/individual_provider.rb +0 -81
  642. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/organization_provider.rb +0 -74
  643. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/parsed_response.rb +0 -99
  644. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/provider.rb +0 -66
  645. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/request_correction.rb +0 -79
  646. data/lib/candidhealth/pre_encounter/images/client.rb +0 -32
  647. data/lib/candidhealth/pre_encounter/images/v_1/client.rb +0 -359
  648. data/lib/candidhealth/pre_encounter/images/v_1/types/coverage_association.rb +0 -74
  649. data/lib/candidhealth/pre_encounter/images/v_1/types/coverage_image_side.rb +0 -16
  650. data/lib/candidhealth/pre_encounter/images/v_1/types/image.rb +0 -188
  651. data/lib/candidhealth/pre_encounter/images/v_1/types/image_status.rb +0 -17
  652. data/lib/candidhealth/pre_encounter/images/v_1/types/mutable_image.rb +0 -125
  653. data/lib/candidhealth/pre_encounter/images/v_1/types/patient_association.rb +0 -75
  654. data/lib/candidhealth/pre_encounter/lists/client.rb +0 -32
  655. data/lib/candidhealth/pre_encounter/lists/v_1/client.rb +0 -187
  656. data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_item.rb +0 -114
  657. data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_page.rb +0 -98
  658. data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_item.rb +0 -104
  659. data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_page.rb +0 -98
  660. data/lib/candidhealth/pre_encounter/notes/client.rb +0 -32
  661. data/lib/candidhealth/pre_encounter/notes/v_1/client.rb +0 -257
  662. data/lib/candidhealth/pre_encounter/notes/v_1/types/mutable_note.rb +0 -86
  663. data/lib/candidhealth/pre_encounter/notes/v_1/types/note.rb +0 -149
  664. data/lib/candidhealth/pre_encounter/patients/client.rb +0 -32
  665. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +0 -1240
  666. data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +0 -170
  667. data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization_unit.rb +0 -16
  668. data/lib/candidhealth/pre_encounter/patients/v_1/types/contact.rb +0 -132
  669. data/lib/candidhealth/pre_encounter/patients/v_1/types/do_not_invoice_reason.rb +0 -18
  670. data/lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb +0 -73
  671. data/lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb +0 -63
  672. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +0 -121
  673. data/lib/candidhealth/pre_encounter/patients/v_1/types/marital_status.rb +0 -26
  674. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +0 -450
  675. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +0 -457
  676. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +0 -516
  677. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient_page.rb +0 -98
  678. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral.rb +0 -106
  679. data/lib/candidhealth/pre_encounter/tags/client.rb +0 -32
  680. data/lib/candidhealth/pre_encounter/tags/v_1/client.rb +0 -311
  681. data/lib/candidhealth/pre_encounter/tags/v_1/types/mutable_tag.rb +0 -63
  682. data/lib/candidhealth/pre_encounter/tags/v_1/types/tag.rb +0 -123
  683. data/lib/candidhealth/pre_encounter/tags/v_1/types/tag_page.rb +0 -98
  684. data/lib/candidhealth/service_facility/types/encounter_service_facility_update.rb +0 -111
  685. data/lib/candidhealth/service_facility/types/encounter_service_facility_update_with_optional_address.rb +0 -113
  686. data/lib/candidhealth/service_lines/client.rb +0 -30
  687. data/lib/candidhealth/service_lines/v_2/client.rb +0 -313
  688. data/lib/candidhealth/service_lines/v_2/types/drug_identification_optional.rb +0 -126
  689. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +0 -247
  690. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +0 -293
  691. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +0 -285
  692. data/lib/candidhealth/service_lines/v_2/types/test_result.rb +0 -71
  693. data/lib/candidhealth/service_lines/v_2/types/test_result_optional.rb +0 -73
  694. data/lib/candidhealth/service_lines/v_2/types/test_result_type.rb +0 -15
  695. data/lib/candidhealth/superbills/client.rb +0 -30
  696. data/lib/candidhealth/superbills/v_1/client.rb +0 -123
  697. data/lib/candidhealth/superbills/v_1/types/superbill.rb +0 -108
  698. data/lib/candidhealth/superbills/v_1/types/superbill_response.rb +0 -65
  699. data/lib/candidhealth/write_offs/v_1/types/non_insurance_payer_write_off.rb +0 -143
  700. data/lib/candidhealth/write_offs/v_1/types/non_insurance_payer_write_off_create.rb +0 -113
  701. data/lib/candidhealth/yes_no_indicator/types/yes_no_indicator.rb +0 -14
  702. data/lib/core/file_utilities.rb +0 -26
  703. data/lib/core/oauth.rb +0 -62
@@ -3,12 +3,19 @@
3
3
  require_relative "../../../requests"
4
4
  require_relative "../../claims/types/claim_status"
5
5
  require_relative "types/encounter_sort_options"
6
+ require_relative "../../commons/types/page_token"
7
+ require_relative "../../commons/types/date"
8
+ require_relative "../../commons/types/encounter_external_id"
6
9
  require "date"
10
+ require_relative "../../tags/types/tag_id"
11
+ require_relative "../../commons/types/work_queue_id"
7
12
  require_relative "types/billable_status_type"
8
13
  require_relative "types/responsible_party_type"
9
14
  require_relative "types/encounter_owner_of_next_action_type"
10
15
  require_relative "types/encounter_page"
16
+ require_relative "../../commons/types/encounter_id"
11
17
  require_relative "types/encounter"
18
+ require_relative "types/prior_authorization_number"
12
19
  require_relative "types/medication"
13
20
  require_relative "types/vitals"
14
21
  require_relative "types/intervention"
@@ -16,13 +23,10 @@ require_relative "../../commons/types/street_address_long_zip"
16
23
  require_relative "types/synchronicity_type"
17
24
  require_relative "types/service_authorization_exception_code"
18
25
  require_relative "../../commons/types/delay_reason_code"
19
- require "ostruct"
20
26
  require_relative "../../individual/types/patient_create"
21
27
  require_relative "../../encounter_providers/v_2/types/billing_provider"
22
28
  require_relative "../../encounter_providers/v_2/types/rendering_provider"
23
29
  require_relative "../../encounter_providers/v_2/types/referring_provider"
24
- require_relative "../../encounter_providers/v_2/types/initial_referring_provider"
25
- require_relative "../../encounter_providers/v_2/types/supervising_provider"
26
30
  require_relative "../../service_facility/types/encounter_service_facility_base"
27
31
  require_relative "../../individual/types/subscriber_create"
28
32
  require_relative "../../diagnoses/types/diagnosis_create"
@@ -33,85 +37,47 @@ require_relative "types/patient_history_category"
33
37
  require_relative "../../service_lines/v_2/types/service_line_create"
34
38
  require_relative "../../guarantor/v_1/types/guarantor_create"
35
39
  require_relative "../../claim_submission/v_1/types/external_claim_submission_create"
36
- require_relative "../../custom_schemas/v_1/types/schema_instance"
37
- require_relative "types/epsdt_referral"
38
- require_relative "types/claim_supplemental_information"
39
- require_relative "types/encounter_create_from_pre_encounter"
40
- require_relative "types/vitals_update"
41
- require_relative "../../guarantor/v_1/types/guarantor_update"
42
- require_relative "../../encounter_providers/v_2/types/initial_referring_provider_update"
43
- require_relative "../../encounter_providers/v_2/types/referring_provider_update"
44
- require_relative "../../individual/types/patient_update"
45
- require_relative "../../encounter_providers/v_2/types/rendering_provider_update"
46
- require_relative "../../service_facility/types/encounter_service_facility_update"
47
- require_relative "../../encounter_providers/v_2/types/supervising_provider_update"
48
- require_relative "../../encounter_providers/v_2/types/billing_provider_update"
40
+ require_relative "../../diagnoses/types/diagnosis_id"
49
41
  require "async"
50
42
 
51
43
  module CandidApiClient
52
44
  module Encounters
53
45
  module V4
54
46
  class V4Client
55
- # @return [CandidApiClient::RequestClient]
56
47
  attr_reader :request_client
57
48
 
58
- # @param request_client [CandidApiClient::RequestClient]
59
- # @return [CandidApiClient::Encounters::V4::V4Client]
49
+ # @param request_client [RequestClient]
50
+ # @return [Encounters::V4::V4Client]
60
51
  def initialize(request_client:)
52
+ # @type [RequestClient]
61
53
  @request_client = request_client
62
54
  end
63
55
 
64
56
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
65
- # @param claim_status [CandidApiClient::Claims::Types::ClaimStatus] Indicates the current status of an insurance claim within the billing process.
66
- # @param sort [CandidApiClient::Encounters::V4::Types::EncounterSortOptions] Defaults to created_at:desc.
67
- # @param page_token [String]
68
- # @param date_of_service_min [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
69
- # @param date_of_service_max [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
57
+ # @param claim_status [Claims::ClaimStatus] Indicates the current status of an insurance claim within the billing process.
58
+ # @param sort [Encounters::V4::EncounterSortOptions] Defaults to created_at:desc.
59
+ # @param page_token [Commons::PAGE_TOKEN]
60
+ # @param date_of_service_min [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
61
+ # @param date_of_service_max [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
70
62
  # @param primary_payer_names [String] Comma delimited string.
71
- # @param search_term [String] Filter by any of the following fields: encounter_id, claim_id, patient
72
- # external_id,
73
- # patient date of birth, patient first name, patient last name,
74
- # or encounter external id.
75
- # @param external_id [String] Filter to an exact match on encounter external_id, if one exists.
76
- # @param diagnoses_updated_since [DateTime] ISO 8601 timestamp; ideally in UTC (although not required):
77
- # 2019-08-24T14:15:22Z.
78
- # @param tag_ids [String] Filter by name of tags on encounters.
79
- # @param work_queue_id [String]
80
- # @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
81
- # Examples for when this should be set to NOT_BILLABLE include if the Encounter
82
- # has not occurred yet or if there is no intention of ever billing the
83
- # responsible_party.
84
- # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
85
- # SELF_PAY if you intend to bill self pay/cash pay.
86
- # @param owner_of_next_action [CandidApiClient::Encounters::V4::Types::EncounterOwnerOfNextActionType] The party who is responsible for taking the next action on an Encounter, as
87
- # defined by ownership of open Tasks.
88
- # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
89
- # @param request_options [CandidApiClient::RequestOptions]
90
- # @return [CandidApiClient::Encounters::V4::Types::EncounterPage]
91
- # @example
92
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
93
- # api.encounters.v_4.get_all(
94
- # limit: 100,
95
- # claim_status: BILLER_RECEIVED,
96
- # sort: CREATED_AT_ASC,
97
- # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
98
- # date_of_service_min: DateTime.parse(2019-08-24),
99
- # date_of_service_max: DateTime.parse(2019-08-25),
100
- # primary_payer_names: "Medicare,Medicaid",
101
- # search_term: "doe",
102
- # external_id: "123456",
103
- # diagnoses_updated_since: DateTime.parse(2019-08-24T14:15:22.000Z)
104
- # )
63
+ # @param search_term [String] Filter by any of the following fields: encounter_id, claim_id, patient external_id,
64
+ # patient date of birth, patient first name, patient last name,
65
+ # or encounter external id.
66
+ # @param external_id [Commons::ENCOUNTER_EXTERNAL_ID] Filter to an exact match on encounter external_id, if one exists.
67
+ # @param diagnoses_updated_since [DateTime] ISO 8601 timestamp; ideally in UTC (although not required): 2019-08-24T14:15:22Z.
68
+ # @param tag_ids [Tags::TAG_ID] Filter by name of tags on encounters.
69
+ # @param work_queue_id [Commons::WORK_QUEUE_ID]
70
+ # @param billable_status [Encounters::V4::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party. Examples for when this should be set to NOT_BILLABLE include if the Encounter has not occurred yet or if there is no intention of ever billing the responsible_party.
71
+ # @param responsible_party [Encounters::V4::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use SELF_PAY if you intend to bill self pay/cash pay.
72
+ # @param owner_of_next_action [Encounters::V4::EncounterOwnerOfNextActionType] The party who is responsible for taking the next action on an Encounter, as defined by ownership of open Tasks.
73
+ # @param request_options [RequestOptions]
74
+ # @return [Encounters::V4::EncounterPage]
105
75
  def get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil,
106
- date_of_service_max: nil, primary_payer_names: nil, search_term: nil, external_id: nil, diagnoses_updated_since: nil, tag_ids: nil, work_queue_id: nil, billable_status: nil, responsible_party: nil, owner_of_next_action: nil, patient_external_id: nil, request_options: nil)
107
- response = @request_client.conn.get do |req|
76
+ date_of_service_max: nil, primary_payer_names: nil, search_term: nil, external_id: nil, diagnoses_updated_since: nil, tag_ids: nil, work_queue_id: nil, billable_status: nil, responsible_party: nil, owner_of_next_action: nil, request_options: nil)
77
+ response = @request_client.conn.get("/api/encounters/v4") do |req|
108
78
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
109
79
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
110
- req.headers = {
111
- **(req.headers || {}),
112
- **@request_client.get_headers,
113
- **(request_options&.additional_headers || {})
114
- }.compact
80
+ req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
115
81
  req.params = {
116
82
  **(request_options&.additional_query_parameters || {}),
117
83
  "limit": limit,
@@ -128,235 +94,158 @@ module CandidApiClient
128
94
  "work_queue_id": work_queue_id,
129
95
  "billable_status": billable_status,
130
96
  "responsible_party": responsible_party,
131
- "owner_of_next_action": owner_of_next_action,
132
- "patient_external_id": patient_external_id
97
+ "owner_of_next_action": owner_of_next_action
133
98
  }.compact
134
- req.url "#{@request_client.get_url(environment: CandidApi,
135
- request_options: request_options)}/api/encounters/v4"
136
99
  end
137
- CandidApiClient::Encounters::V4::Types::EncounterPage.from_json(json_object: response.body)
100
+ Encounters::V4::EncounterPage.from_json(json_object: response.body)
138
101
  end
139
102
 
140
- # @param encounter_id [String]
141
- # @param request_options [CandidApiClient::RequestOptions]
142
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
143
- # @example
144
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
145
- # api.encounters.v_4.get(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
103
+ # @param encounter_id [Commons::ENCOUNTER_ID]
104
+ # @param request_options [RequestOptions]
105
+ # @return [Encounters::V4::Encounter]
146
106
  def get(encounter_id:, request_options: nil)
147
- response = @request_client.conn.get do |req|
107
+ response = @request_client.conn.get("/api/encounters/v4/#{encounter_id}") do |req|
148
108
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
149
109
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
150
- req.headers = {
151
- **(req.headers || {}),
152
- **@request_client.get_headers,
153
- **(request_options&.additional_headers || {})
154
- }.compact
155
- req.url "#{@request_client.get_url(environment: CandidApi,
156
- request_options: request_options)}/api/encounters/v4/#{encounter_id}"
110
+ req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
157
111
  end
158
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
112
+ Encounters::V4::Encounter.from_json(json_object: response.body)
159
113
  end
160
114
 
161
- # @param external_id [String] A client-specified unique ID to associate with this encounter;
162
- # for example, your internal encounter ID or a Dr. Chrono encounter ID.
163
- # This field should not contain PHI.
164
- # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
165
- # This date must be the local date in the timezone where the service occurred.
166
- # Box 24a on the CMS-1500 claim form.
167
- # If service occurred over a range of dates, this should be the start date.
168
- # date_of_service must be defined on either the encounter or the service lines but
169
- # not both.
170
- # If there are greater than zero service lines, it is recommended to specify
171
- # date_of_service on the service_line instead of on the encounter to prepare for
172
- # future API versions.
173
- # @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
174
- # This date must be the local date in the timezone where the service occurred.
175
- # If omitted, the Encounter is assumed to be for a single day.
176
- # Must not be temporally before the date_of_service field.
177
- # If there are greater than zero service lines, it is recommended to specify
178
- # end_date_of_service on the service_line instead of on the encounter to prepare
179
- # for future API versions.
115
+ # @param external_id [Commons::ENCOUNTER_EXTERNAL_ID] A client-specified unique ID to associate with this encounter;
116
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
117
+ # This field should not contain PHI.
118
+ # @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
119
+ # This date must be the local date in the timezone where the service occurred.
120
+ # Box 24a on the CMS-1500 claim form.
121
+ # If service occurred over a range of dates, this should be the start date.
122
+ # @param end_date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
123
+ # This date must be the local date in the timezone where the service occurred.
124
+ # If omitted, the Encounter is assumed to be for a single day.
125
+ # Must not be temporally before the date_of_service field.
126
+ # @param prior_authorization_number [Encounters::V4::PRIOR_AUTHORIZATION_NUMBER] Box 23 on the CMS-1500 claim form.
180
127
  # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
181
- # for billing purpose.
182
- # Box 12 on the CMS-1500 claim form.
128
+ # for billing purpose.
129
+ # Box 12 on the CMS-1500 claim form.
183
130
  # @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you,
184
- # not them. If false, patient may receive reimbursement.
185
- # Box 13 on the CMS-1500 claim form.
131
+ # not them. If false, patient may receive reimbursement.
132
+ # Box 13 on the CMS-1500 claim form.
186
133
  # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
187
- # to be made to you, not them.
188
- # Box 27 on the CMS-1500 claim form.
189
- # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
190
- # Headaches").
191
- # @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
134
+ # to be made to you, not them.
135
+ # Box 27 on the CMS-1500 claim form.
136
+ # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture - Headaches").
137
+ # @param existing_medications [Array<Hash>] Request of type Array<Encounters::V4::Medication>, as a Hash
192
138
  # * :name (String)
193
- # * :rx_cui (String)
139
+ # * :rx_cui (Encounters::V4::RX_CUI)
194
140
  # * :dosage (String)
195
141
  # * :dosage_form (String)
196
142
  # * :frequency (String)
197
143
  # * :as_needed (Boolean)
198
- # @param vitals [Hash] Request of type CandidApiClient::Encounters::V4::Types::Vitals, as a Hash
144
+ # @param vitals [Hash] Request of type Encounters::V4::Vitals, as a Hash
199
145
  # * :height_in (Integer)
200
146
  # * :weight_lbs (Integer)
201
147
  # * :blood_pressure_systolic_mmhg (Integer)
202
148
  # * :blood_pressure_diastolic_mmhg (Integer)
203
149
  # * :body_temperature_f (Float)
204
- # * :hemoglobin_gdl (Float)
205
- # * :hematocrit_pct (Float)
206
- # @param interventions [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Intervention>, as a Hash
150
+ # @param interventions [Array<Hash>] Request of type Array<Encounters::V4::Intervention>, as a Hash
207
151
  # * :name (String)
208
- # * :category (CandidApiClient::Encounters::V4::Types::InterventionCategory)
152
+ # * :category (Encounters::V4::InterventionCategory)
209
153
  # * :description (String)
210
154
  # * :medication (Hash)
211
155
  # * :name (String)
212
- # * :rx_cui (String)
156
+ # * :rx_cui (Encounters::V4::RX_CUI)
213
157
  # * :dosage (String)
214
158
  # * :dosage_form (String)
215
159
  # * :frequency (String)
216
160
  # * :as_needed (Boolean)
217
- # * :labs (Array<CandidApiClient::Encounters::V4::Types::Lab>)
218
- # @param pay_to_address [Hash] Specifies the address to which payments for the claim should be sent.Request of type CandidApiClient::Commons::Types::StreetAddressLongZip, as a Hash
161
+ # * :labs (Array<Encounters::V4::Lab>)
162
+ # @param pay_to_address [Hash] Specifies the address to which payments for the claim should be sent.Request of type Commons::StreetAddressLongZip, as a Hash
219
163
  # * :zip_plus_four_code (String)
220
164
  # * :address_1 (String)
221
165
  # * :address_2 (String)
222
166
  # * :city (String)
223
- # * :state (CandidApiClient::Commons::Types::State)
167
+ # * :state (Commons::State)
224
168
  # * :zip_code (String)
225
- # @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
226
- # Asynchronous encounters occur when providers and patients communicate online
227
- # using
228
- # forms, instant messaging, or other pre-recorded digital mediums.
229
- # Synchronous encounters occur in live, real-time settings where the patient
230
- # interacts
231
- # directly with the provider, such as over video or a phone call.
232
- # @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
233
- # Examples for when this should be set to NOT_BILLABLE include
234
- # if the Encounter has not occurred yet or if there is no intention of ever
235
- # billing the responsible_party.
169
+ # @param synchronicity [Encounters::V4::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
170
+ # Asynchronous encounters occur when providers and patients communicate online using
171
+ # forms, instant messaging, or other pre-recorded digital mediums.
172
+ # Synchronous encounters occur in live, real-time settings where the patient interacts
173
+ # directly with the provider, such as over video or a phone call.
174
+ # @param billable_status [Encounters::V4::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
175
+ # Examples for when this should be set to NOT_BILLABLE include
176
+ # if the Encounter has not occurred yet or if there is no intention of ever billing the responsible_party.
177
+ # @param responsible_party [Encounters::V4::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
236
178
  # @param additional_information [String] Defines additional information on the claim needed by the payer.
237
- # Box 19 on the CMS-1500 claim form.
238
- # @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
239
- # Required when mandated by government law or regulation to obtain authorization
240
- # for specific service(s) but, for the
241
- # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
242
- # the service was performed without
243
- # obtaining the authorization.
244
- # @param admission_date [Date] 837p Loop2300 DTP*435, CMS-1500 Box 18
245
- # Required on all ambulance claims when the patient was known to be admitted to
246
- # the hospital.
247
- # OR
248
- # Required on all claims involving inpatient medical visits.
249
- # @param discharge_date [Date] 837p Loop2300 DTP*096, CMS-1500 Box 18
250
- # Required for inpatient claims when the patient was discharged from the facility
251
- # and the discharge date is known.
252
- # @param onset_of_current_illness_or_symptom_date [Date] 837p Loop2300 DTP*431, CMS-1500 Box 14
253
- # Required for the initial medical service or visit performed in response to a
254
- # medical emergency when the date is available and is different than the date of
255
- # service.
256
- # OR
257
- # This date is the onset of acute symptoms for the current illness or condition.
258
- # @param last_menstrual_period_date [Date] 837p Loop2300 DTP*484, CMS-1500 Box 14
259
- # Required when, in the judgment of the provider, the services on this claim are
260
- # related to the patient's pregnancy.
261
- # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
262
- # Code indicating the reason why a request was delayed
179
+ # Box 19 on the CMS-1500 claim form.
180
+ # @param service_authorization_exception_code [Encounters::V4::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
181
+ # Required when mandated by government law or regulation to obtain authorization for specific service(s) but, for the
182
+ # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode, the service was performed without
183
+ # obtaining the authorization.
184
+ # @param admission_date [Commons::DATE] 837p Loop2300 DTP\*435, CMS-1500 Box 18
185
+ # Required on all ambulance claims when the patient was known to be admitted to the hospital.
186
+ # OR
187
+ # Required on all claims involving inpatient medical visits.
188
+ # @param discharge_date [Commons::DATE] 837p Loop2300 DTP\*096, CMS-1500 Box 18
189
+ # Required for inpatient claims when the patient was discharged from the facility and the discharge date is known.
190
+ # @param onset_of_current_illness_or_symptom_date [Commons::DATE] 837p Loop2300 DTP\*431, CMS-1500 Box 14
191
+ # Required for the initial medical service or visit performed in response to a medical emergency when the date is available and is different than the date of service.
192
+ # OR
193
+ # This date is the onset of acute symptoms for the current illness or condition.
194
+ # @param last_menstrual_period_date [Commons::DATE] 837p Loop2300 DTP\*484, CMS-1500 Box 14
195
+ # Required when, in the judgment of the provider, the services on this claim are related to the patient's pregnancy.
196
+ # @param delay_reason_code [Commons::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
197
+ # Code indicating the reason why a request was delayed
263
198
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
264
- # @param _field_set [Object]
265
- # @param patient [Hash] Contains the identification information of the individual receiving medical
266
- # services.Request of type CandidApiClient::Individual::Types::PatientCreate, as a Hash
267
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
199
+ # @param patient [Hash] Contains the identification information of the individual receiving medical services.Request of type Individual::PatientCreate, as a Hash
200
+ # * :phone_numbers (Array<Commons::PhoneNumber>)
268
201
  # * :phone_consent (Boolean)
269
- # * :email (String)
270
- # * :non_insurance_payers (Array<String>)
271
- # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
202
+ # * :email (Commons::EMAIL)
272
203
  # * :email_consent (Boolean)
273
204
  # * :external_id (String)
274
- # * :date_of_birth (Date)
205
+ # * :date_of_birth (Commons::DATE)
275
206
  # * :address (Hash)
276
207
  # * :zip_plus_four_code (String)
277
208
  # * :address_1 (String)
278
209
  # * :address_2 (String)
279
210
  # * :city (String)
280
- # * :state (CandidApiClient::Commons::Types::State)
211
+ # * :state (Commons::State)
281
212
  # * :zip_code (String)
282
213
  # * :first_name (String)
283
214
  # * :last_name (String)
284
- # * :gender (CandidApiClient::Individual::Types::Gender)
285
- # @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
286
- # Billing provider may be, but is not necessarily, the same person/NPI as the
287
- # rendering provider. From a payer's perspective, this represents the person or
288
- # entity being reimbursed. When a contract exists with the target payer, the
289
- # billing provider should be the entity contracted with the payer. In some
290
- # circumstances, this will be an individual provider. In that case, submit that
291
- # provider's NPI and the tax ID (TIN) that the provider gave to the payer during
292
- # contracting. In other cases, the billing entity will be a medical group. If so,
293
- # submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim form.Request of type CandidApiClient::EncounterProviders::V2::Types::BillingProvider, as a Hash
215
+ # * :gender (Individual::Gender)
216
+ # @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim. Billing provider may be, but is not necessarily, the same person/NPI as the rendering provider. From a payer's perspective, this represents the person or entity being reimbursed. When a contract exists with the target payer, the billing provider should be the entity contracted with the payer. In some circumstances, this will be an individual provider. In that case, submit that provider's NPI and the tax ID (TIN) that the provider gave to the payer during contracting. In other cases, the billing entity will be a medical group. If so, submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim form.Request of type EncounterProviders::V2::BillingProvider, as a Hash
294
217
  # * :address (Hash)
295
218
  # * :zip_plus_four_code (String)
296
219
  # * :address_1 (String)
297
220
  # * :address_2 (String)
298
221
  # * :city (String)
299
- # * :state (CandidApiClient::Commons::Types::State)
222
+ # * :state (Commons::State)
300
223
  # * :zip_code (String)
301
224
  # * :tax_id (String)
302
225
  # * :npi (String)
303
226
  # * :taxonomy_code (String)
304
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
305
- # * :first_name (String)
306
- # * :last_name (String)
307
- # * :organization_name (String)
308
- # @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner,
309
- # etc. -- performing the service.
310
- # For telehealth services, the rendering provider performs the visit, asynchronous
311
- # communication, or other service. The rendering provider address should generally
312
- # be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProvider, as a Hash
313
- # * :npi (String)
314
- # * :taxonomy_code (String)
315
- # * :address (Hash)
316
- # * :zip_plus_four_code (String)
317
- # * :address_1 (String)
318
- # * :address_2 (String)
319
- # * :city (String)
320
- # * :state (CandidApiClient::Commons::Types::State)
321
- # * :zip_code (String)
322
227
  # * :first_name (String)
323
228
  # * :last_name (String)
324
229
  # * :organization_name (String)
325
- # @param referring_provider [Hash] The final provider who referred the services that were rendered.
326
- # All physicians who order services or refer Medicare beneficiaries must
327
- # report this data.Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProvider, as a Hash
328
- # * :npi (String)
329
- # * :taxonomy_code (String)
230
+ # @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner, etc. -- performing the service.
231
+ # For telehealth services, the rendering provider performs the visit, asynchronous communication, or other service. The rendering provider address should generally be the same as the service facility address.Request of type EncounterProviders::V2::RenderingProvider, as a Hash
330
232
  # * :address (Hash)
331
233
  # * :zip_plus_four_code (String)
332
234
  # * :address_1 (String)
333
235
  # * :address_2 (String)
334
236
  # * :city (String)
335
- # * :state (CandidApiClient::Commons::Types::State)
237
+ # * :state (Commons::State)
336
238
  # * :zip_code (String)
337
- # * :first_name (String)
338
- # * :last_name (String)
339
- # * :organization_name (String)
340
- # @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
341
- # this loop to
342
- # indicate the initial referral from the primary care provider or whatever
343
- # provider wrote the initial referral for this patient's episode of care being
344
- # billed/reported in this transaction.Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider, as a Hash
345
239
  # * :npi (String)
346
240
  # * :taxonomy_code (String)
347
- # * :address (Hash)
348
- # * :zip_plus_four_code (String)
349
- # * :address_1 (String)
350
- # * :address_2 (String)
351
- # * :city (String)
352
- # * :state (CandidApiClient::Commons::Types::State)
353
- # * :zip_code (String)
354
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
355
241
  # * :first_name (String)
356
242
  # * :last_name (String)
357
243
  # * :organization_name (String)
358
- # @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
359
- # required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider, as a Hash
244
+ # @param referring_provider [Hash] The provider who referred the services that were rendered.
245
+ # All physicians who order services or refer Medicare beneficiaries must
246
+ # report this data.
247
+ # If a claim involves multiple referring physicians, create a separate
248
+ # encounter for each physician.Request of type EncounterProviders::V2::ReferringProvider, as a Hash
360
249
  # * :npi (String)
361
250
  # * :taxonomy_code (String)
362
251
  # * :address (Hash)
@@ -364,20 +253,12 @@ module CandidApiClient
364
253
  # * :address_1 (String)
365
254
  # * :address_2 (String)
366
255
  # * :city (String)
367
- # * :state (CandidApiClient::Commons::Types::State)
256
+ # * :state (Commons::State)
368
257
  # * :zip_code (String)
369
258
  # * :first_name (String)
370
259
  # * :last_name (String)
371
260
  # * :organization_name (String)
372
- # @param service_facility [Hash] Encounter Service facility is typically the location a medical service was
373
- # rendered, such as a provider office or hospital. For telehealth, service
374
- # facility can represent the provider's location when the service was delivered
375
- # (e.g., home), or the location where an in-person visit would have taken place,
376
- # whichever is easier to identify. If the provider is in-network, service facility
377
- # may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
378
- # for an in-network claim to be successfully adjudicated, the service facility
379
- # address listed on claims must match what was provided to the payer during the
380
- # credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase, as a Hash
261
+ # @param service_facility [Hash] Encounter Service facility is typically the location a medical service was rendered, such as a provider office or hospital. For telehealth, service facility can represent the provider's location when the service was delivered (e.g., home), or the location where an in-person visit would have taken place, whichever is easier to identify. If the provider is in-network, service facility may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that for an in-network claim to be successfully adjudicated, the service facility address listed on claims must match what was provided to the payer during the credentialing process.Request of type ServiceFacility::EncounterServiceFacilityBase, as a Hash
381
262
  # * :organization_name (String)
382
263
  # * :npi (String)
383
264
  # * :address (Hash)
@@ -385,44 +266,12 @@ module CandidApiClient
385
266
  # * :address_1 (String)
386
267
  # * :address_2 (String)
387
268
  # * :city (String)
388
- # * :state (CandidApiClient::Commons::Types::State)
389
- # * :zip_code (String)
390
- # * :secondary_identification (String)
391
- # @param subscriber_primary [Hash] Subscriber_primary is required when responsible_party is INSURANCE_PAY (i.e.
392
- # when the claim should be billed to insurance).
393
- # These are not required fields when responsible_party is SELF_PAY (i.e. when the
394
- # claim should be billed to the patient).
395
- # However, if you collect this for patients, even self-pay, we recommend including
396
- # it when sending encounters to Candid.
397
- # Note: Cash Pay is no longer a valid payer_id in v4, please use responsible party
398
- # to define self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
399
- # * :insurance_card (Hash)
400
- # * :member_id (String)
401
- # * :payer_name (String)
402
- # * :payer_id (String)
403
- # * :rx_bin (String)
404
- # * :rx_pcn (String)
405
- # * :image_url_front (String)
406
- # * :image_url_back (String)
407
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
408
- # * :group_number (String)
409
- # * :plan_name (String)
410
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
411
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
412
- # * :payer_plan_group_id (String)
413
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
414
- # * :date_of_birth (Date)
415
- # * :address (Hash)
416
- # * :zip_plus_four_code (String)
417
- # * :address_1 (String)
418
- # * :address_2 (String)
419
- # * :city (String)
420
- # * :state (CandidApiClient::Commons::Types::State)
269
+ # * :state (Commons::State)
421
270
  # * :zip_code (String)
422
- # * :first_name (String)
423
- # * :last_name (String)
424
- # * :gender (CandidApiClient::Individual::Types::Gender)
425
- # @param subscriber_secondary [Hash] Please always include this when you have it, even for self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
271
+ # @param subscriber_primary [Hash] Subscriber_primary is required when responsible_party is INSURANCE_PAY (i.e. when the claim should be billed to insurance).
272
+ # These are not required fields when responsible_party is SELF_PAY (i.e. when the claim should be billed to the patient).
273
+ # However, if you collect this for patients, even self-pay, we recommend including it when sending encounters to Candid.
274
+ # Note: Cash Pay is no longer a valid payer_id in v4, please use responsible party to define self-pay claims.Request of type Individual::SubscriberCreate, as a Hash
426
275
  # * :insurance_card (Hash)
427
276
  # * :member_id (String)
428
277
  # * :payer_name (String)
@@ -431,25 +280,24 @@ module CandidApiClient
431
280
  # * :rx_pcn (String)
432
281
  # * :image_url_front (String)
433
282
  # * :image_url_back (String)
434
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
283
+ # * :emr_payer_crosswalk (Commons::EmrPayerCrosswalk)
435
284
  # * :group_number (String)
436
285
  # * :plan_name (String)
437
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
438
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
439
- # * :payer_plan_group_id (String)
440
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
441
- # * :date_of_birth (Date)
286
+ # * :plan_type (Commons::SourceOfPaymentCode)
287
+ # * :insurance_type (Commons::InsuranceTypeCode)
288
+ # * :patient_relationship_to_subscriber_code (Commons::PatientRelationshipToInsuredCodeAll)
289
+ # * :date_of_birth (Commons::DATE)
442
290
  # * :address (Hash)
443
291
  # * :zip_plus_four_code (String)
444
292
  # * :address_1 (String)
445
293
  # * :address_2 (String)
446
294
  # * :city (String)
447
- # * :state (CandidApiClient::Commons::Types::State)
295
+ # * :state (Commons::State)
448
296
  # * :zip_code (String)
449
297
  # * :first_name (String)
450
298
  # * :last_name (String)
451
- # * :gender (CandidApiClient::Individual::Types::Gender)
452
- # @param subscriber_tertiary [Hash] Please always include this when you have it, even for self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
299
+ # * :gender (Individual::Gender)
300
+ # @param subscriber_secondary [Hash] Please always include this when you have it, even for self-pay claims.Request of type Individual::SubscriberCreate, as a Hash
453
301
  # * :insurance_card (Hash)
454
302
  # * :member_id (String)
455
303
  # * :payer_name (String)
@@ -458,92 +306,61 @@ module CandidApiClient
458
306
  # * :rx_pcn (String)
459
307
  # * :image_url_front (String)
460
308
  # * :image_url_back (String)
461
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
309
+ # * :emr_payer_crosswalk (Commons::EmrPayerCrosswalk)
462
310
  # * :group_number (String)
463
311
  # * :plan_name (String)
464
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
465
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
466
- # * :payer_plan_group_id (String)
467
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
468
- # * :date_of_birth (Date)
312
+ # * :plan_type (Commons::SourceOfPaymentCode)
313
+ # * :insurance_type (Commons::InsuranceTypeCode)
314
+ # * :patient_relationship_to_subscriber_code (Commons::PatientRelationshipToInsuredCodeAll)
315
+ # * :date_of_birth (Commons::DATE)
469
316
  # * :address (Hash)
470
317
  # * :zip_plus_four_code (String)
471
318
  # * :address_1 (String)
472
319
  # * :address_2 (String)
473
320
  # * :city (String)
474
- # * :state (CandidApiClient::Commons::Types::State)
321
+ # * :state (Commons::State)
475
322
  # * :zip_code (String)
476
323
  # * :first_name (String)
477
324
  # * :last_name (String)
478
- # * :gender (CandidApiClient::Individual::Types::Gender)
479
- # @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
480
- # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
481
- # @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
482
- # diagnoses
483
- # may be submitted at this time, and coders will later prioritize the 12 that will
484
- # be
485
- # submitted to the payor.Request of type Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>, as a Hash
325
+ # * :gender (Individual::Gender)
326
+ # @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses
327
+ # may be submitted at this time, and coders will later prioritize the 12 that will be
328
+ # submitted to the payor.Request of type Array<Diagnoses::DiagnosisCreate>, as a Hash
486
329
  # * :name (String)
487
- # * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
330
+ # * :code_type (Diagnoses::DiagnosisTypeCode)
488
331
  # * :code (String)
489
- # * :present_on_admission_indicator (CandidApiClient::YesNoIndicator::Types::YesNoIndicator)
490
- # @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during
491
- # patient encounters. Please note that medical records for appeals should be sent
492
- # using the Encounter Attachments API.Request of type Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>, as a Hash
493
- # * :category (CandidApiClient::Encounters::V4::Types::NoteCategory)
494
- # * :notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNote>)
332
+ # @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during patient encounters.Request of type Array<Encounters::V4::ClinicalNoteCategoryCreate>, as a Hash
333
+ # * :category (Encounters::V4::NoteCategory)
334
+ # * :notes (Array<Encounters::V4::ClinicalNote>)
495
335
  # @param billing_notes [Array<Hash>] Spot to store misc, human-readable, notes about this encounter to be used
496
- # in the billing process.Request of type Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>, as a Hash
336
+ # in the billing process.Request of type Array<BillingNotes::V2::BillingNoteBase>, as a Hash
497
337
  # * :text (String)
498
- # @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
499
- # telemedicine, 11 for in-person. Full list
500
- # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
501
- # @param patient_histories [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>, as a Hash
502
- # * :category (CandidApiClient::Encounters::V4::Types::PatientHistoryCategoryEnum)
503
- # * :questions (Array<CandidApiClient::Encounters::V4::Types::IntakeQuestion>)
338
+ # @param place_of_service_code [Commons::FacilityTypeCode] Box 24B on the CMS-1500 claim form. Line-level place of service is not currently supported. 02 for telemedicine, 11 for in-person. Full list [here](https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
339
+ # @param patient_histories [Array<Hash>] Request of type Array<Encounters::V4::PatientHistoryCategory>, as a Hash
340
+ # * :category (Encounters::V4::PatientHistoryCategoryEnum)
341
+ # * :questions (Array<Encounters::V4::IntakeQuestion>)
504
342
  # @param service_lines [Array<Hash>] Each service line must be linked to a diagnosis. Concretely,
505
- # `service_line.diagnosis_pointers`must contain at least one entry which should be
506
- # in bounds of the diagnoses list field.Request of type Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>, as a Hash
507
- # * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
508
- # * :has_epsdt_indicator (Boolean)
509
- # * :has_family_planning_indicator (Boolean)
343
+ # `service_line.diagnosis_pointers`must contain at least one entry which should be
344
+ # in bounds of the diagnoses list field.Request of type Array<ServiceLines::V2::ServiceLineCreate>, as a Hash
345
+ # * :modifiers (Array<Commons::ProcedureModifier>)
510
346
  # * :procedure_code (String)
511
- # * :quantity (String)
512
- # * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
347
+ # * :quantity (Commons::DECIMAL)
348
+ # * :units (Commons::ServiceLineUnits)
513
349
  # * :charge_amount_cents (Integer)
514
350
  # * :diagnosis_pointers (Array<Integer>)
515
351
  # * :drug_identification (Hash)
516
- # * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
352
+ # * :service_id_qualifier (ServiceLines::V2::ServiceIdQualifier)
517
353
  # * :national_drug_code (String)
518
354
  # * :national_drug_unit_count (String)
519
- # * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
355
+ # * :measurement_unit_code (ServiceLines::V2::MeasurementUnitCode)
520
356
  # * :link_sequence_number (String)
521
357
  # * :pharmacy_prescription_number (String)
522
- # * :conversion_formula (String)
523
- # * :drug_description (String)
524
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
358
+ # * :place_of_service_code (Commons::FacilityTypeCode)
525
359
  # * :description (String)
526
- # * :date_of_service (Date)
527
- # * :end_date_of_service (Date)
528
- # * :ordering_provider (Hash)
529
- # * :npi (String)
530
- # * :taxonomy_code (String)
531
- # * :address (Hash)
532
- # * :zip_plus_four_code (String)
533
- # * :address_1 (String)
534
- # * :address_2 (String)
535
- # * :city (String)
536
- # * :state (CandidApiClient::Commons::Types::State)
537
- # * :zip_code (String)
538
- # * :first_name (String)
539
- # * :last_name (String)
540
- # * :organization_name (String)
541
- # * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
542
- # * :note (String)
543
- # @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorCreate, as a Hash
544
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
360
+ # @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type Guarantor::V1::GuarantorCreate, as a Hash
361
+ # * :phone_numbers (Array<Commons::PhoneNumber>)
545
362
  # * :phone_consent (Boolean)
546
- # * :email (String)
363
+ # * :email (Commons::EMAIL)
547
364
  # * :email_consent (Boolean)
548
365
  # * :first_name (String)
549
366
  # * :last_name (String)
@@ -554,60 +371,28 @@ module CandidApiClient
554
371
  # * :address_1 (String)
555
372
  # * :address_2 (String)
556
373
  # * :city (String)
557
- # * :state (CandidApiClient::Commons::Types::State)
374
+ # * :state (Commons::State)
558
375
  # * :zip_code (String)
559
- # @param external_claim_submission [Hash] To be included for claims that have been submitted outside of Candid.
560
- # Candid supports posting remits and payments to these claims and working them
561
- # in-platform (e.g. editing, resubmitting).Request of type CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate, as a Hash
376
+ # @param external_claim_submission [Hash] ***This field is in beta.***
377
+ # To be included for claims that have been submitted outside of Candid.
378
+ # Candid supports posting remits and payments to these claims and working them in-platform (e.g. editing, resubmitting).Request of type ClaimSubmission::V1::ExternalClaimSubmissionCreate, as a Hash
562
379
  # * :claim_created_at (DateTime)
563
380
  # * :patient_control_number (String)
564
- # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
565
- # @param tag_ids [Array<String>] Names of tags that should be on the encounter.
566
- # @param schema_instances [Array<Hash>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
567
- # Multiple schema
568
- # instances cannot be created for the same schema on an encounter.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
569
- # * :schema_id (String)
570
- # * :content (Hash{String => Object})
571
- # @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
572
- # @param epsdt_referral [Hash] Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
573
- # 837P formRequest of type CandidApiClient::Encounters::V4::Types::EpsdtReferral, as a Hash
574
- # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
575
- # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
576
- # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
577
- # @param claim_supplemental_information [Array<Hash>] Refers to Loop 2300 - Segment PWK on the 837P form. No more than 10 entries are
578
- # permitted.Request of type Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>, as a Hash
579
- # * :attachment_report_type_code (CandidApiClient::Encounters::V4::Types::ReportTypeCode)
580
- # * :attachment_transmission_code (CandidApiClient::Encounters::V4::Types::ReportTransmissionCode)
581
- # * :attachment_control_number (String)
582
- # @param secondary_payer_carrier_code [String] When Medicaid is billed as the secondary payer the Carrier Code is used to
583
- # identify the primary payer. This is required for certain states.
584
- # @param request_options [CandidApiClient::RequestOptions]
585
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
586
- # @example
587
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
588
- # api.encounters.v_4.create(
589
- # patient: { first_name: "first_name", last_name: "last_name", gender: MALE, external_id: "external_id", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code" } },
590
- # billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" },
591
- # rendering_provider: { npi: "npi" },
592
- # responsible_party: INSURANCE_PAY,
593
- # diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }],
594
- # place_of_service_code: PHARMACY
595
- # )
596
- def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
597
- provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, subscriber_tertiary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, referral_number: nil, epsdt_referral: nil, claim_supplemental_information: nil, secondary_payer_carrier_code: nil, request_options: nil)
598
- response = @request_client.conn.post do |req|
381
+ # * :submission_records (Array<ClaimSubmission::V1::ClaimSubmissionRecordCreate>)
382
+ # @param request_options [RequestOptions]
383
+ # @return [Encounters::V4::Encounter]
384
+ def create(external_id:, date_of_service:, patient_authorized_release:, benefits_assigned_to_provider:,
385
+ provider_accepts_assignment:, billable_status:, responsible_party:, patient:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, end_date_of_service: nil, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, referring_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, request_options: nil)
386
+ response = @request_client.conn.post("/api/encounters/v4") do |req|
599
387
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
600
388
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
601
- req.headers = {
602
- **(req.headers || {}),
603
- **@request_client.get_headers,
604
- **(request_options&.additional_headers || {})
605
- }.compact
389
+ req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
606
390
  req.body = {
607
391
  **(request_options&.additional_body_parameters || {}),
608
392
  external_id: external_id,
609
393
  date_of_service: date_of_service,
610
394
  end_date_of_service: end_date_of_service,
395
+ prior_authorization_number: prior_authorization_number,
611
396
  patient_authorized_release: patient_authorized_release,
612
397
  benefits_assigned_to_provider: benefits_assigned_to_provider,
613
398
  provider_accepts_assignment: provider_accepts_assignment,
@@ -618,6 +403,7 @@ module CandidApiClient
618
403
  pay_to_address: pay_to_address,
619
404
  synchronicity: synchronicity,
620
405
  billable_status: billable_status,
406
+ responsible_party: responsible_party,
621
407
  additional_information: additional_information,
622
408
  service_authorization_exception_code: service_authorization_exception_code,
623
409
  admission_date: admission_date,
@@ -626,19 +412,13 @@ module CandidApiClient
626
412
  last_menstrual_period_date: last_menstrual_period_date,
627
413
  delay_reason_code: delay_reason_code,
628
414
  additional_properties: additional_properties,
629
- _field_set: _field_set,
630
415
  patient: patient,
631
416
  billing_provider: billing_provider,
632
417
  rendering_provider: rendering_provider,
633
418
  referring_provider: referring_provider,
634
- initial_referring_provider: initial_referring_provider,
635
- supervising_provider: supervising_provider,
636
419
  service_facility: service_facility,
637
420
  subscriber_primary: subscriber_primary,
638
421
  subscriber_secondary: subscriber_secondary,
639
- subscriber_tertiary: subscriber_tertiary,
640
- prior_authorization_number: prior_authorization_number,
641
- responsible_party: responsible_party,
642
422
  diagnoses: diagnoses,
643
423
  clinical_notes: clinical_notes,
644
424
  billing_notes: billing_notes,
@@ -646,341 +426,47 @@ module CandidApiClient
646
426
  patient_histories: patient_histories,
647
427
  service_lines: service_lines,
648
428
  guarantor: guarantor,
649
- external_claim_submission: external_claim_submission,
650
- tag_ids: tag_ids,
651
- schema_instances: schema_instances,
652
- referral_number: referral_number,
653
- epsdt_referral: epsdt_referral,
654
- claim_supplemental_information: claim_supplemental_information,
655
- secondary_payer_carrier_code: secondary_payer_carrier_code
429
+ external_claim_submission: external_claim_submission
656
430
  }.compact
657
- req.url "#{@request_client.get_url(environment: CandidApi,
658
- request_options: request_options)}/api/encounters/v4"
659
431
  end
660
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
432
+ Encounters::V4::Encounter.from_json(json_object: response.body)
661
433
  end
662
434
 
663
- # Create an encounter from a pre-encounter patient and appointment. This endpoint
664
- # is intended to be used by consumers who are managing
665
- # patients and appointments in the pre-encounter service and is currently under
666
- # development. Consumers who are not taking advantage
667
- # of the pre-encounter service should use the standard create endpoint.
668
- # The endpoint will create an encounter from the provided fields, pulling
669
- # information from the provided patient and appointment objects
670
- # where applicable. In particular, the following fields are populated from the
671
- # patient and appointment objects:
672
- # - Patient
673
- # - Referring Provider
674
- # - Subscriber Primary
675
- # - Subscriber Secondary
676
- # - Referral Number
677
- # - Responsible Party
678
- # - Guarantor
679
- # Utilizing this endpoint opts you into automatic updating of the encounter when
680
- # the patient or appointment is updated, assuming the
681
- # encounter has not already been submitted or adjudicated.
682
- #
683
- # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreateFromPreEncounter, as a Hash
684
- # * :pre_encounter_patient_id (String)
685
- # * :pre_encounter_appointment_ids (Array<String>)
686
- # * :billing_provider (Hash)
687
- # * :address (Hash)
688
- # * :zip_plus_four_code (String)
689
- # * :address_1 (String)
690
- # * :address_2 (String)
691
- # * :city (String)
692
- # * :state (CandidApiClient::Commons::Types::State)
693
- # * :zip_code (String)
694
- # * :tax_id (String)
695
- # * :npi (String)
696
- # * :taxonomy_code (String)
697
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
698
- # * :first_name (String)
699
- # * :last_name (String)
700
- # * :organization_name (String)
701
- # * :rendering_provider (Hash)
702
- # * :npi (String)
703
- # * :taxonomy_code (String)
704
- # * :address (Hash)
705
- # * :zip_plus_four_code (String)
706
- # * :address_1 (String)
707
- # * :address_2 (String)
708
- # * :city (String)
709
- # * :state (CandidApiClient::Commons::Types::State)
710
- # * :zip_code (String)
711
- # * :first_name (String)
712
- # * :last_name (String)
713
- # * :organization_name (String)
714
- # * :initial_referring_provider (Hash)
715
- # * :npi (String)
716
- # * :taxonomy_code (String)
717
- # * :address (Hash)
718
- # * :zip_plus_four_code (String)
719
- # * :address_1 (String)
720
- # * :address_2 (String)
721
- # * :city (String)
722
- # * :state (CandidApiClient::Commons::Types::State)
723
- # * :zip_code (String)
724
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
725
- # * :first_name (String)
726
- # * :last_name (String)
727
- # * :organization_name (String)
728
- # * :supervising_provider (Hash)
729
- # * :npi (String)
730
- # * :taxonomy_code (String)
731
- # * :address (Hash)
732
- # * :zip_plus_four_code (String)
733
- # * :address_1 (String)
734
- # * :address_2 (String)
735
- # * :city (String)
736
- # * :state (CandidApiClient::Commons::Types::State)
737
- # * :zip_code (String)
738
- # * :first_name (String)
739
- # * :last_name (String)
740
- # * :organization_name (String)
741
- # * :service_facility (Hash)
742
- # * :organization_name (String)
743
- # * :npi (String)
744
- # * :address (Hash)
745
- # * :zip_plus_four_code (String)
746
- # * :address_1 (String)
747
- # * :address_2 (String)
748
- # * :city (String)
749
- # * :state (CandidApiClient::Commons::Types::State)
750
- # * :zip_code (String)
751
- # * :secondary_identification (String)
752
- # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
753
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
754
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
755
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
756
- # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
757
- # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
758
- # * :external_claim_submission (Hash)
759
- # * :claim_created_at (DateTime)
760
- # * :patient_control_number (String)
761
- # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
762
- # * :tag_ids (Array<String>)
763
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
764
- # * :external_id (String)
765
- # * :date_of_service (Date)
766
- # * :end_date_of_service (Date)
767
- # * :patient_authorized_release (Boolean)
768
- # * :benefits_assigned_to_provider (Boolean)
769
- # * :provider_accepts_assignment (Boolean)
770
- # * :appointment_type (String)
771
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
772
- # * :vitals (Hash)
773
- # * :height_in (Integer)
774
- # * :weight_lbs (Integer)
775
- # * :blood_pressure_systolic_mmhg (Integer)
776
- # * :blood_pressure_diastolic_mmhg (Integer)
777
- # * :body_temperature_f (Float)
778
- # * :hemoglobin_gdl (Float)
779
- # * :hematocrit_pct (Float)
780
- # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
781
- # * :pay_to_address (Hash)
782
- # * :zip_plus_four_code (String)
783
- # * :address_1 (String)
784
- # * :address_2 (String)
785
- # * :city (String)
786
- # * :state (CandidApiClient::Commons::Types::State)
787
- # * :zip_code (String)
788
- # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
789
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
790
- # * :additional_information (String)
791
- # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
792
- # * :admission_date (Date)
793
- # * :discharge_date (Date)
794
- # * :onset_of_current_illness_or_symptom_date (Date)
795
- # * :last_menstrual_period_date (Date)
796
- # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
797
- # @param request_options [CandidApiClient::RequestOptions]
798
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
799
- # @example
800
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
801
- # api.encounters.v_4.create_from_pre_encounter_patient(request: { external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE, pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" }, rendering_provider: { npi: "npi" }, diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }], place_of_service_code: PHARMACY })
802
- def create_from_pre_encounter_patient(request:, request_options: nil)
803
- response = @request_client.conn.post do |req|
804
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
805
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
806
- req.headers = {
807
- **(req.headers || {}),
808
- **@request_client.get_headers,
809
- **(request_options&.additional_headers || {})
810
- }.compact
811
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
812
- req.url "#{@request_client.get_url(environment: CandidApi,
813
- request_options: request_options)}/api/encounters/v4/create-from-pre-encounter"
814
- end
815
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
816
- end
817
-
818
- # @param encounter_id [String]
819
- # @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you, not
820
- # them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim
821
- # form.
822
- # @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
823
- # @param external_id [String] A client-specified unique ID to associate with this encounter;
824
- # for example, your internal encounter ID or a Dr. Chrono encounter ID.
825
- # This field should not contain PHI.
826
- # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
827
- # This date must be the local date in the timezone where the service occurred.
828
- # Box 24a on the CMS-1500 claim form.
829
- # If service occurred over a range of dates, this should be the start date.
830
- # If service lines have distinct date_of_service values, updating the encounter's
831
- # date_of_service will fail. If all service line date_of_service values are the
832
- # same, updating the encounter's date_of_service will update all service line
833
- # date_of_service values.
834
- # @param tag_ids [Array<String>] Names of tags that should be on the encounter. Note all tags on encounter will
835
- # be overridden with this list.
836
- # @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
837
- # Examples for when this should be set to NOT_BILLABLE include if the Encounter
838
- # has not occurred yet or if there is no intention of ever billing the
839
- # responsible_party.
840
- # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
841
- # SELF_PAY if you intend to bill self pay/cash pay.
842
- # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments to
843
- # be made to you, not them. Box 27 on the CMS-1500 claim form.
844
- # @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter. Asynchronous
845
- # encounters occur when providers and patients communicate online using forms,
846
- # instant messaging, or other pre-recorded digital mediums. Synchronous encounters
847
- # occur in live, real-time settings where the patient interacts directly with the
848
- # provider, such as over video or a phone call.
849
- # @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
850
- # telemedicine, 11 for in-person. Full list
851
- # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
852
- # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
853
- # Headaches").
854
- # @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
855
- # This date must be the local date in the timezone where the service occurred.
856
- # If omitted, the Encounter is assumed to be for a single day.
857
- # Must not be temporally before the date_of_service field.
858
- # If service lines have distinct end_date_of_service values, updating the
859
- # encounter's end_date_of_service will fail. If all service line
860
- # end_date_of_service values are the same, updating the encounter's
861
- # end_date_of_service will update all service line date_of_service values.
862
- # @param additional_information [String] Defines additional information on the claim needed by the payer.
863
- # Box 19 on the CMS-1500 claim form.
864
- # @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
865
- # Required when mandated by government law or regulation to obtain authorization
866
- # for specific service(s) but, for the
867
- # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
868
- # the service was performed without
869
- # obtaining the authorization.
870
- # @param admission_date [Date] 837p Loop2300 DTP*435, CMS-1500 Box 18
871
- # Required on all ambulance claims when the patient was known to be admitted to
872
- # the hospital.
873
- # OR
874
- # Required on all claims involving inpatient medical visits.
875
- # @param discharge_date [Date] 837p Loop2300 DTP*096, CMS-1500 Box 18
876
- # Required for inpatient claims when the patient was discharged from the facility
877
- # and the discharge date is known.
878
- # @param onset_of_current_illness_or_symptom_date [Date] 837p Loop2300 DTP*431, CMS-1500 Box 14
879
- # Required for the initial medical service or visit performed in response to a
880
- # medical emergency when the date is available and is different than the date of
881
- # service.
882
- # OR
883
- # This date is the onset of acute symptoms for the current illness or condition.
884
- # @param last_menstrual_period_date [Date] 837p Loop2300 DTP*484, CMS-1500 Box 14
885
- # Required when, in the judgment of the provider, the services on this claim are
886
- # related to the patient's pregnancy.de
887
- # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
888
- # Code indicating the reason why a request was delayed
889
- # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
890
- # for billing purpose.
891
- # Box 12 on the CMS-1500 claim form.
892
- # @param vitals [Hash] If a vitals entity already exists for the encounter, then all values will be
893
- # updated to the provided values.
894
- # Otherwise, a new vitals object will be created for the encounter.Request of type CandidApiClient::Encounters::V4::Types::VitalsUpdate, as a Hash
895
- # * :height_in (Integer)
896
- # * :weight_lbs (Integer)
897
- # * :blood_pressure_systolic_mmhg (Integer)
898
- # * :blood_pressure_diastolic_mmhg (Integer)
899
- # * :body_temperature_f (Float)
900
- # * :hemoglobin_gdl (Float)
901
- # * :hematocrit_pct (Float)
902
- # @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
903
- # @param secondary_payer_carrier_code [String] When Medicaid is billed as the secondary payer the Carrier Code is used to
904
- # identify the primary payer. This is required for certain states.
905
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
906
- # @param _field_set [Object]
907
- # @param epsdt_referral [Hash] Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
908
- # 837P formRequest of type CandidApiClient::Encounters::V4::Types::EpsdtReferral, as a Hash
909
- # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
910
- # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
911
- # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
912
- # @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during
913
- # patient encounters. Please note that medical records for appeals should be sent
914
- # using the Encounter Attachments API.Request of type Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>, as a Hash
915
- # * :category (CandidApiClient::Encounters::V4::Types::NoteCategory)
916
- # * :notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNote>)
917
- # @param claim_supplemental_information [Array<Hash>] Refers to Loop 2300 - Segment PWK on the 837P form. No more than 10 entries are
918
- # permitted.Request of type Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>, as a Hash
919
- # * :attachment_report_type_code (CandidApiClient::Encounters::V4::Types::ReportTypeCode)
920
- # * :attachment_transmission_code (CandidApiClient::Encounters::V4::Types::ReportTransmissionCode)
921
- # * :attachment_control_number (String)
922
- # @param schema_instances [Array<Hash>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
923
- # Multiple schema
924
- # instances cannot be created for the same schema on an encounter. Updating schema
925
- # instances utilizes PUT
926
- # semantics, so the schema instances on the encounter will be set to whatever
927
- # inputs are provided. If null
928
- # is provided as an input, then the encounter's schema instances will be cleared.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
929
- # * :schema_id (String)
930
- # * :content (Hash{String => Object})
931
- # @param existing_medications [Array<Hash>] Existing medications that should be on the encounter.
932
- # Note all current existing medications on encounter will be overridden with this
933
- # list.Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
934
- # * :name (String)
935
- # * :rx_cui (String)
936
- # * :dosage (String)
937
- # * :dosage_form (String)
938
- # * :frequency (String)
939
- # * :as_needed (Boolean)
940
- # @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorUpdate, as a Hash
941
- # * :first_name (String)
942
- # * :last_name (String)
943
- # * :external_id (String)
944
- # * :date_of_birth (Date)
945
- # * :address (Hash)
946
- # * :zip_plus_four_code (String)
947
- # * :address_1 (String)
948
- # * :address_2 (String)
949
- # * :city (String)
950
- # * :state (CandidApiClient::Commons::Types::State)
951
- # * :zip_code (String)
952
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
953
- # * :phone_consent (Boolean)
954
- # * :email (String)
955
- # * :email_consent (Boolean)
956
- # @param subscriber_primary [Hash] Contains details of the primary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
957
- # * :insurance_card (Hash)
958
- # * :member_id (String)
959
- # * :payer_name (String)
960
- # * :payer_id (String)
961
- # * :rx_bin (String)
962
- # * :rx_pcn (String)
963
- # * :image_url_front (String)
964
- # * :image_url_back (String)
965
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
966
- # * :group_number (String)
967
- # * :plan_name (String)
968
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
969
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
970
- # * :payer_plan_group_id (String)
971
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
972
- # * :date_of_birth (Date)
973
- # * :address (Hash)
974
- # * :zip_plus_four_code (String)
975
- # * :address_1 (String)
976
- # * :address_2 (String)
977
- # * :city (String)
978
- # * :state (CandidApiClient::Commons::Types::State)
979
- # * :zip_code (String)
980
- # * :first_name (String)
981
- # * :last_name (String)
982
- # * :gender (CandidApiClient::Individual::Types::Gender)
983
- # @param subscriber_secondary [Hash] Contains details of the secondary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
435
+ # @param encounter_id [Commons::ENCOUNTER_ID]
436
+ # @param prior_authorization_number [Encounters::V4::PRIOR_AUTHORIZATION_NUMBER] Box 23 on the CMS-1500 claim form.
437
+ # @param external_id [Commons::ENCOUNTER_EXTERNAL_ID] A client-specified unique ID to associate with this encounter;
438
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
439
+ # This field should not contain PHI.
440
+ # @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
441
+ # This date must be the local date in the timezone where the service occurred.
442
+ # Box 24a on the CMS-1500 claim form.
443
+ # If service occurred over a range of dates, this should be the start date.
444
+ # @param diagnosis_ids [Array<Diagnoses::DIAGNOSIS_ID>] Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses
445
+ # may be submitted at this time, and coders will later prioritize the 12 that will be
446
+ # submitted to the payor.
447
+ # @param tag_ids [Array<Tags::TAG_ID>] Names of tags that should be on the encounter.
448
+ # @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during patient encounters.Request of type Array<Encounters::V4::ClinicalNoteCategoryCreate>, as a Hash
449
+ # * :category (Encounters::V4::NoteCategory)
450
+ # * :notes (Array<Encounters::V4::ClinicalNote>)
451
+ # @param pay_to_address [Hash] Specifies the address to which payments for the claim should be sent.Request of type Commons::StreetAddressLongZip, as a Hash
452
+ # * :zip_plus_four_code (String)
453
+ # * :address_1 (String)
454
+ # * :address_2 (String)
455
+ # * :city (String)
456
+ # * :state (Commons::State)
457
+ # * :zip_code (String)
458
+ # @param billable_status [Encounters::V4::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party. Examples for when this should be set to NOT_BILLABLE include if the Encounter has not occurred yet or if there is no intention of ever billing the responsible_party.
459
+ # @param responsible_party [Encounters::V4::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use SELF_PAY if you intend to bill self pay/cash pay.
460
+ # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments to be made to you, not them. Box 27 on the CMS-1500 claim form.
461
+ # @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you, not them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim form.
462
+ # @param synchronicity [Encounters::V4::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter. Asynchronous encounters occur when providers and patients communicate online using forms, instant messaging, or other pre-recorded digital mediums. Synchronous encounters occur in live, real-time settings where the patient interacts directly with the provider, such as over video or a phone call.
463
+ # @param place_of_service_code [Commons::FacilityTypeCode] Box 24B on the CMS-1500 claim form. Line-level place of service is not currently supported. 02 for telemedicine, 11 for in-person. Full list [here](https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
464
+ # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture - Headaches").
465
+ # @param end_date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
466
+ # This date must be the local date in the timezone where the service occurred.
467
+ # If omitted, the Encounter is assumed to be for a single day.
468
+ # Must not be temporally before the date_of_service field.
469
+ # @param subscriber_primary [Hash] Contains details of the primary insurance subscriber.Request of type Individual::SubscriberCreate, as a Hash
984
470
  # * :insurance_card (Hash)
985
471
  # * :member_id (String)
986
472
  # * :payer_name (String)
@@ -989,25 +475,24 @@ module CandidApiClient
989
475
  # * :rx_pcn (String)
990
476
  # * :image_url_front (String)
991
477
  # * :image_url_back (String)
992
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
478
+ # * :emr_payer_crosswalk (Commons::EmrPayerCrosswalk)
993
479
  # * :group_number (String)
994
480
  # * :plan_name (String)
995
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
996
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
997
- # * :payer_plan_group_id (String)
998
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
999
- # * :date_of_birth (Date)
481
+ # * :plan_type (Commons::SourceOfPaymentCode)
482
+ # * :insurance_type (Commons::InsuranceTypeCode)
483
+ # * :patient_relationship_to_subscriber_code (Commons::PatientRelationshipToInsuredCodeAll)
484
+ # * :date_of_birth (Commons::DATE)
1000
485
  # * :address (Hash)
1001
486
  # * :zip_plus_four_code (String)
1002
487
  # * :address_1 (String)
1003
488
  # * :address_2 (String)
1004
489
  # * :city (String)
1005
- # * :state (CandidApiClient::Commons::Types::State)
490
+ # * :state (Commons::State)
1006
491
  # * :zip_code (String)
1007
492
  # * :first_name (String)
1008
493
  # * :last_name (String)
1009
- # * :gender (CandidApiClient::Individual::Types::Gender)
1010
- # @param subscriber_tertiary [Hash] Contains details of the tertiary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
494
+ # * :gender (Individual::Gender)
495
+ # @param subscriber_secondary [Hash] Contains details of the secondary insurance subscriber.Request of type Individual::SubscriberCreate, as a Hash
1011
496
  # * :insurance_card (Hash)
1012
497
  # * :member_id (String)
1013
498
  # * :payer_name (String)
@@ -1016,296 +501,119 @@ module CandidApiClient
1016
501
  # * :rx_pcn (String)
1017
502
  # * :image_url_front (String)
1018
503
  # * :image_url_back (String)
1019
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
504
+ # * :emr_payer_crosswalk (Commons::EmrPayerCrosswalk)
1020
505
  # * :group_number (String)
1021
506
  # * :plan_name (String)
1022
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1023
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1024
- # * :payer_plan_group_id (String)
1025
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1026
- # * :date_of_birth (Date)
1027
- # * :address (Hash)
1028
- # * :zip_plus_four_code (String)
1029
- # * :address_1 (String)
1030
- # * :address_2 (String)
1031
- # * :city (String)
1032
- # * :state (CandidApiClient::Commons::Types::State)
1033
- # * :zip_code (String)
1034
- # * :first_name (String)
1035
- # * :last_name (String)
1036
- # * :gender (CandidApiClient::Individual::Types::Gender)
1037
- # @param pay_to_address [Hash] Specifies the address to which payments for the claim should be sent.Request of type CandidApiClient::Commons::Types::StreetAddressLongZip, as a Hash
1038
- # * :zip_plus_four_code (String)
1039
- # * :address_1 (String)
1040
- # * :address_2 (String)
1041
- # * :city (String)
1042
- # * :state (CandidApiClient::Commons::Types::State)
1043
- # * :zip_code (String)
1044
- # @param diagnosis_ids [Array<String>] Ideally, this field should contain no more than 12 diagnoses. However, more
1045
- # diagnoses
1046
- # may be submitted at this time, and coders will later prioritize the 12 that will
1047
- # be
1048
- # submitted to the payor.
1049
- # @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
1050
- # this loop to
1051
- # indicate the initial referral from the primary care provider or whatever
1052
- # provider wrote the initial referral for this patient's episode of care being
1053
- # billed/reported in this transaction.Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdate, as a Hash
1054
- # * :npi (String)
1055
- # * :taxonomy_code (String)
1056
- # * :address (Hash)
1057
- # * :zip_plus_four_code (String)
1058
- # * :address_1 (String)
1059
- # * :address_2 (String)
1060
- # * :city (String)
1061
- # * :state (CandidApiClient::Commons::Types::State)
1062
- # * :zip_code (String)
1063
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
1064
- # * :first_name (String)
1065
- # * :last_name (String)
1066
- # * :organization_name (String)
1067
- # @param referring_provider [Hash] The final provider who referred the services that were rendered.
1068
- # All physicians who order services or refer Medicare beneficiaries must
1069
- # report this data.Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdate, as a Hash
1070
- # * :npi (String)
1071
- # * :taxonomy_code (String)
1072
- # * :address (Hash)
1073
- # * :zip_plus_four_code (String)
1074
- # * :address_1 (String)
1075
- # * :address_2 (String)
1076
- # * :city (String)
1077
- # * :state (CandidApiClient::Commons::Types::State)
1078
- # * :zip_code (String)
1079
- # * :first_name (String)
1080
- # * :last_name (String)
1081
- # * :organization_name (String)
1082
- # @param patient [Hash] Contains the identification information of the individual receiving medical
1083
- # services.Request of type CandidApiClient::Individual::Types::PatientUpdate, as a Hash
1084
- # * :first_name (String)
1085
- # * :last_name (String)
1086
- # * :gender (CandidApiClient::Individual::Types::Gender)
1087
- # * :external_id (String)
1088
- # * :date_of_birth (Date)
1089
- # * :address (Hash)
1090
- # * :zip_plus_four_code (String)
1091
- # * :address_1 (String)
1092
- # * :address_2 (String)
1093
- # * :city (String)
1094
- # * :state (CandidApiClient::Commons::Types::State)
1095
- # * :zip_code (String)
1096
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
1097
- # * :phone_consent (Boolean)
1098
- # * :email (String)
1099
- # * :email_consent (Boolean)
1100
- # * :non_insurance_payers (Array<String>)
1101
- # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
1102
- # @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner,
1103
- # etc. -- performing the service.
1104
- # For telehealth services, the rendering provider performs the visit, asynchronous
1105
- # communication, or other service. The rendering provider address should generally
1106
- # be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProviderUpdate, as a Hash
1107
- # * :npi (String)
1108
- # * :taxonomy_code (String)
507
+ # * :plan_type (Commons::SourceOfPaymentCode)
508
+ # * :insurance_type (Commons::InsuranceTypeCode)
509
+ # * :patient_relationship_to_subscriber_code (Commons::PatientRelationshipToInsuredCodeAll)
510
+ # * :date_of_birth (Commons::DATE)
1109
511
  # * :address (Hash)
1110
512
  # * :zip_plus_four_code (String)
1111
513
  # * :address_1 (String)
1112
514
  # * :address_2 (String)
1113
515
  # * :city (String)
1114
- # * :state (CandidApiClient::Commons::Types::State)
516
+ # * :state (Commons::State)
1115
517
  # * :zip_code (String)
1116
518
  # * :first_name (String)
1117
519
  # * :last_name (String)
1118
- # * :organization_name (String)
1119
- # @param service_facility [Hash] Encounter Service facility is typically the location a medical service was
1120
- # rendered, such as a provider office or hospital. For telehealth, service
1121
- # facility can represent the provider's location when the service was delivered
1122
- # (e.g., home), or the location where an in-person visit would have taken place,
1123
- # whichever is easier to identify. If the provider is in-network, service facility
1124
- # may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
1125
- # for an in-network claim to be successfully adjudicated, the service facility
1126
- # address listed on claims must match what was provided to the payer during the
1127
- # credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate, as a Hash
1128
- # * :organization_name (String)
1129
- # * :npi (String)
1130
- # * :address (Hash)
1131
- # * :zip_plus_four_code (String)
1132
- # * :address_1 (String)
1133
- # * :address_2 (String)
1134
- # * :city (String)
1135
- # * :state (CandidApiClient::Commons::Types::State)
1136
- # * :zip_code (String)
1137
- # * :secondary_identification (String)
1138
- # @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
1139
- # required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate, as a Hash
1140
- # * :npi (String)
1141
- # * :taxonomy_code (String)
1142
- # * :address (Hash)
1143
- # * :zip_plus_four_code (String)
1144
- # * :address_1 (String)
1145
- # * :address_2 (String)
1146
- # * :city (String)
1147
- # * :state (CandidApiClient::Commons::Types::State)
1148
- # * :zip_code (String)
1149
- # * :first_name (String)
1150
- # * :last_name (String)
1151
- # * :organization_name (String)
1152
- # @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
1153
- # Billing provider may be, but is not necessarily, the same person/NPI as the
1154
- # rendering provider. From a payer's perspective, this represents the person or
1155
- # entity being reimbursed. When a contract exists with the target payer, the
1156
- # billing provider should be the entity contracted with the payer. In some
1157
- # circumstances, this will be an individual provider. In that case, submit that
1158
- # provider's NPI and the tax ID (TIN) that the provider gave to the payer during
1159
- # contracting. In other cases, the billing entity will be a medical group. If so,
1160
- # submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim form.Request of type CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdate, as a Hash
1161
- # * :address (Hash)
1162
- # * :zip_plus_four_code (String)
1163
- # * :address_1 (String)
1164
- # * :address_2 (String)
1165
- # * :city (String)
1166
- # * :state (CandidApiClient::Commons::Types::State)
1167
- # * :zip_code (String)
1168
- # * :tax_id (String)
1169
- # * :npi (String)
1170
- # * :taxonomy_code (String)
1171
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
1172
- # * :first_name (String)
1173
- # * :last_name (String)
1174
- # * :organization_name (String)
1175
- # @param place_of_service_code_as_submitted [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
1176
- # telemedicine, 11 for in-person. Full list
1177
- # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
1178
- # @param request_options [CandidApiClient::RequestOptions]
1179
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1180
- # @example
1181
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1182
- # api.encounters.v_4.update(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
1183
- def update(encounter_id:, benefits_assigned_to_provider: nil, prior_authorization_number: nil,
1184
- external_id: nil, date_of_service: nil, tag_ids: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient_authorized_release: nil, vitals: nil, referral_number: nil, secondary_payer_carrier_code: nil, additional_properties: nil, _field_set: nil, epsdt_referral: nil, clinical_notes: nil, claim_supplemental_information: nil, schema_instances: nil, existing_medications: nil, guarantor: nil, subscriber_primary: nil, subscriber_secondary: nil, subscriber_tertiary: nil, pay_to_address: nil, diagnosis_ids: nil, initial_referring_provider: nil, referring_provider: nil, patient: nil, rendering_provider: nil, service_facility: nil, supervising_provider: nil, billing_provider: nil, place_of_service_code_as_submitted: nil, request_options: nil)
1185
- response = @request_client.conn.patch do |req|
520
+ # * :gender (Individual::Gender)
521
+ # @param additional_information [String] Defines additional information on the claim needed by the payer.
522
+ # Box 19 on the CMS-1500 claim form.
523
+ # @param service_authorization_exception_code [Encounters::V4::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
524
+ # Required when mandated by government law or regulation to obtain authorization for specific service(s) but, for the
525
+ # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode, the service was performed without
526
+ # obtaining the authorization.
527
+ # @param admission_date [Commons::DATE] 837p Loop2300 DTP*435, CMS-1500 Box 18
528
+ # Required on all ambulance claims when the patient was known to be admitted to the hospital.
529
+ # OR
530
+ # Required on all claims involving inpatient medical visits.
531
+ # @param discharge_date [Commons::DATE] 837p Loop2300 DTP*096, CMS-1500 Box 18
532
+ # Required for inpatient claims when the patient was discharged from the facility and the discharge date is known.
533
+ # @param onset_of_current_illness_or_symptom_date [Commons::DATE] 837p Loop2300 DTP*431, CMS-1500 Box 14
534
+ # Required for the initial medical service or visit performed in response to a medical emergency when the date is available and is different than the date of service.
535
+ # OR
536
+ # This date is the onset of acute symptoms for the current illness or condition.
537
+ # @param last_menstrual_period_date [Commons::DATE] 837p Loop2300 DTP*484, CMS-1500 Box 14
538
+ # Required when, in the judgment of the provider, the services on this claim are related to the patient's pregnancy.
539
+ # @param delay_reason_code [Commons::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
540
+ # Code indicating the reason why a request was delayed
541
+ # @param request_options [RequestOptions]
542
+ # @return [Encounters::V4::Encounter]
543
+ def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
544
+ diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, request_options: nil)
545
+ response = @request_client.conn.patch("/api/encounters/v4/#{encounter_id}") do |req|
1186
546
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1187
547
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1188
- req.headers = {
1189
- **(req.headers || {}),
1190
- **@request_client.get_headers,
1191
- **(request_options&.additional_headers || {})
1192
- }.compact
548
+ req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
1193
549
  req.body = {
1194
550
  **(request_options&.additional_body_parameters || {}),
1195
- benefits_assigned_to_provider: benefits_assigned_to_provider,
1196
551
  prior_authorization_number: prior_authorization_number,
1197
552
  external_id: external_id,
1198
553
  date_of_service: date_of_service,
554
+ diagnosis_ids: diagnosis_ids,
1199
555
  tag_ids: tag_ids,
556
+ clinical_notes: clinical_notes,
557
+ pay_to_address: pay_to_address,
1200
558
  billable_status: billable_status,
1201
559
  responsible_party: responsible_party,
1202
560
  provider_accepts_assignment: provider_accepts_assignment,
561
+ benefits_assigned_to_provider: benefits_assigned_to_provider,
1203
562
  synchronicity: synchronicity,
1204
563
  place_of_service_code: place_of_service_code,
1205
564
  appointment_type: appointment_type,
1206
565
  end_date_of_service: end_date_of_service,
566
+ subscriber_primary: subscriber_primary,
567
+ subscriber_secondary: subscriber_secondary,
1207
568
  additional_information: additional_information,
1208
569
  service_authorization_exception_code: service_authorization_exception_code,
1209
570
  admission_date: admission_date,
1210
571
  discharge_date: discharge_date,
1211
572
  onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
1212
573
  last_menstrual_period_date: last_menstrual_period_date,
1213
- delay_reason_code: delay_reason_code,
1214
- patient_authorized_release: patient_authorized_release,
1215
- vitals: vitals,
1216
- referral_number: referral_number,
1217
- secondary_payer_carrier_code: secondary_payer_carrier_code,
1218
- additional_properties: additional_properties,
1219
- _field_set: _field_set,
1220
- epsdt_referral: epsdt_referral,
1221
- clinical_notes: clinical_notes,
1222
- claim_supplemental_information: claim_supplemental_information,
1223
- schema_instances: schema_instances,
1224
- existing_medications: existing_medications,
1225
- guarantor: guarantor,
1226
- subscriber_primary: subscriber_primary,
1227
- subscriber_secondary: subscriber_secondary,
1228
- subscriber_tertiary: subscriber_tertiary,
1229
- pay_to_address: pay_to_address,
1230
- diagnosis_ids: diagnosis_ids,
1231
- initial_referring_provider: initial_referring_provider,
1232
- referring_provider: referring_provider,
1233
- patient: patient,
1234
- rendering_provider: rendering_provider,
1235
- service_facility: service_facility,
1236
- supervising_provider: supervising_provider,
1237
- billing_provider: billing_provider,
1238
- place_of_service_code_as_submitted: place_of_service_code_as_submitted
574
+ delay_reason_code: delay_reason_code
1239
575
  }.compact
1240
- req.url "#{@request_client.get_url(environment: CandidApi,
1241
- request_options: request_options)}/api/encounters/v4/#{encounter_id}"
1242
576
  end
1243
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
577
+ Encounters::V4::Encounter.from_json(json_object: response.body)
1244
578
  end
1245
579
  end
1246
580
 
1247
581
  class AsyncV4Client
1248
- # @return [CandidApiClient::AsyncRequestClient]
1249
582
  attr_reader :request_client
1250
583
 
1251
- # @param request_client [CandidApiClient::AsyncRequestClient]
1252
- # @return [CandidApiClient::Encounters::V4::AsyncV4Client]
584
+ # @param request_client [AsyncRequestClient]
585
+ # @return [Encounters::V4::AsyncV4Client]
1253
586
  def initialize(request_client:)
587
+ # @type [AsyncRequestClient]
1254
588
  @request_client = request_client
1255
589
  end
1256
590
 
1257
591
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
1258
- # @param claim_status [CandidApiClient::Claims::Types::ClaimStatus] Indicates the current status of an insurance claim within the billing process.
1259
- # @param sort [CandidApiClient::Encounters::V4::Types::EncounterSortOptions] Defaults to created_at:desc.
1260
- # @param page_token [String]
1261
- # @param date_of_service_min [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
1262
- # @param date_of_service_max [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
592
+ # @param claim_status [Claims::ClaimStatus] Indicates the current status of an insurance claim within the billing process.
593
+ # @param sort [Encounters::V4::EncounterSortOptions] Defaults to created_at:desc.
594
+ # @param page_token [Commons::PAGE_TOKEN]
595
+ # @param date_of_service_min [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
596
+ # @param date_of_service_max [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
1263
597
  # @param primary_payer_names [String] Comma delimited string.
1264
- # @param search_term [String] Filter by any of the following fields: encounter_id, claim_id, patient
1265
- # external_id,
1266
- # patient date of birth, patient first name, patient last name,
1267
- # or encounter external id.
1268
- # @param external_id [String] Filter to an exact match on encounter external_id, if one exists.
1269
- # @param diagnoses_updated_since [DateTime] ISO 8601 timestamp; ideally in UTC (although not required):
1270
- # 2019-08-24T14:15:22Z.
1271
- # @param tag_ids [String] Filter by name of tags on encounters.
1272
- # @param work_queue_id [String]
1273
- # @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
1274
- # Examples for when this should be set to NOT_BILLABLE include if the Encounter
1275
- # has not occurred yet or if there is no intention of ever billing the
1276
- # responsible_party.
1277
- # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
1278
- # SELF_PAY if you intend to bill self pay/cash pay.
1279
- # @param owner_of_next_action [CandidApiClient::Encounters::V4::Types::EncounterOwnerOfNextActionType] The party who is responsible for taking the next action on an Encounter, as
1280
- # defined by ownership of open Tasks.
1281
- # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
1282
- # @param request_options [CandidApiClient::RequestOptions]
1283
- # @return [CandidApiClient::Encounters::V4::Types::EncounterPage]
1284
- # @example
1285
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1286
- # api.encounters.v_4.get_all(
1287
- # limit: 100,
1288
- # claim_status: BILLER_RECEIVED,
1289
- # sort: CREATED_AT_ASC,
1290
- # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
1291
- # date_of_service_min: DateTime.parse(2019-08-24),
1292
- # date_of_service_max: DateTime.parse(2019-08-25),
1293
- # primary_payer_names: "Medicare,Medicaid",
1294
- # search_term: "doe",
1295
- # external_id: "123456",
1296
- # diagnoses_updated_since: DateTime.parse(2019-08-24T14:15:22.000Z)
1297
- # )
598
+ # @param search_term [String] Filter by any of the following fields: encounter_id, claim_id, patient external_id,
599
+ # patient date of birth, patient first name, patient last name,
600
+ # or encounter external id.
601
+ # @param external_id [Commons::ENCOUNTER_EXTERNAL_ID] Filter to an exact match on encounter external_id, if one exists.
602
+ # @param diagnoses_updated_since [DateTime] ISO 8601 timestamp; ideally in UTC (although not required): 2019-08-24T14:15:22Z.
603
+ # @param tag_ids [Tags::TAG_ID] Filter by name of tags on encounters.
604
+ # @param work_queue_id [Commons::WORK_QUEUE_ID]
605
+ # @param billable_status [Encounters::V4::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party. Examples for when this should be set to NOT_BILLABLE include if the Encounter has not occurred yet or if there is no intention of ever billing the responsible_party.
606
+ # @param responsible_party [Encounters::V4::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use SELF_PAY if you intend to bill self pay/cash pay.
607
+ # @param owner_of_next_action [Encounters::V4::EncounterOwnerOfNextActionType] The party who is responsible for taking the next action on an Encounter, as defined by ownership of open Tasks.
608
+ # @param request_options [RequestOptions]
609
+ # @return [Encounters::V4::EncounterPage]
1298
610
  def get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil,
1299
- date_of_service_max: nil, primary_payer_names: nil, search_term: nil, external_id: nil, diagnoses_updated_since: nil, tag_ids: nil, work_queue_id: nil, billable_status: nil, responsible_party: nil, owner_of_next_action: nil, patient_external_id: nil, request_options: nil)
611
+ date_of_service_max: nil, primary_payer_names: nil, search_term: nil, external_id: nil, diagnoses_updated_since: nil, tag_ids: nil, work_queue_id: nil, billable_status: nil, responsible_party: nil, owner_of_next_action: nil, request_options: nil)
1300
612
  Async do
1301
- response = @request_client.conn.get do |req|
613
+ response = @request_client.conn.get("/api/encounters/v4") do |req|
1302
614
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1303
615
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1304
- req.headers = {
1305
- **(req.headers || {}),
1306
- **@request_client.get_headers,
1307
- **(request_options&.additional_headers || {})
1308
- }.compact
616
+ req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
1309
617
  req.params = {
1310
618
  **(request_options&.additional_query_parameters || {}),
1311
619
  "limit": limit,
@@ -1322,238 +630,161 @@ module CandidApiClient
1322
630
  "work_queue_id": work_queue_id,
1323
631
  "billable_status": billable_status,
1324
632
  "responsible_party": responsible_party,
1325
- "owner_of_next_action": owner_of_next_action,
1326
- "patient_external_id": patient_external_id
633
+ "owner_of_next_action": owner_of_next_action
1327
634
  }.compact
1328
- req.url "#{@request_client.get_url(environment: CandidApi,
1329
- request_options: request_options)}/api/encounters/v4"
1330
635
  end
1331
- CandidApiClient::Encounters::V4::Types::EncounterPage.from_json(json_object: response.body)
636
+ Encounters::V4::EncounterPage.from_json(json_object: response.body)
1332
637
  end
1333
638
  end
1334
639
 
1335
- # @param encounter_id [String]
1336
- # @param request_options [CandidApiClient::RequestOptions]
1337
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1338
- # @example
1339
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1340
- # api.encounters.v_4.get(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
640
+ # @param encounter_id [Commons::ENCOUNTER_ID]
641
+ # @param request_options [RequestOptions]
642
+ # @return [Encounters::V4::Encounter]
1341
643
  def get(encounter_id:, request_options: nil)
1342
644
  Async do
1343
- response = @request_client.conn.get do |req|
645
+ response = @request_client.conn.get("/api/encounters/v4/#{encounter_id}") do |req|
1344
646
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1345
647
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1346
- req.headers = {
1347
- **(req.headers || {}),
1348
- **@request_client.get_headers,
1349
- **(request_options&.additional_headers || {})
1350
- }.compact
1351
- req.url "#{@request_client.get_url(environment: CandidApi,
1352
- request_options: request_options)}/api/encounters/v4/#{encounter_id}"
648
+ req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
1353
649
  end
1354
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
650
+ Encounters::V4::Encounter.from_json(json_object: response.body)
1355
651
  end
1356
652
  end
1357
653
 
1358
- # @param external_id [String] A client-specified unique ID to associate with this encounter;
1359
- # for example, your internal encounter ID or a Dr. Chrono encounter ID.
1360
- # This field should not contain PHI.
1361
- # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
1362
- # This date must be the local date in the timezone where the service occurred.
1363
- # Box 24a on the CMS-1500 claim form.
1364
- # If service occurred over a range of dates, this should be the start date.
1365
- # date_of_service must be defined on either the encounter or the service lines but
1366
- # not both.
1367
- # If there are greater than zero service lines, it is recommended to specify
1368
- # date_of_service on the service_line instead of on the encounter to prepare for
1369
- # future API versions.
1370
- # @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
1371
- # This date must be the local date in the timezone where the service occurred.
1372
- # If omitted, the Encounter is assumed to be for a single day.
1373
- # Must not be temporally before the date_of_service field.
1374
- # If there are greater than zero service lines, it is recommended to specify
1375
- # end_date_of_service on the service_line instead of on the encounter to prepare
1376
- # for future API versions.
654
+ # @param external_id [Commons::ENCOUNTER_EXTERNAL_ID] A client-specified unique ID to associate with this encounter;
655
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
656
+ # This field should not contain PHI.
657
+ # @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
658
+ # This date must be the local date in the timezone where the service occurred.
659
+ # Box 24a on the CMS-1500 claim form.
660
+ # If service occurred over a range of dates, this should be the start date.
661
+ # @param end_date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
662
+ # This date must be the local date in the timezone where the service occurred.
663
+ # If omitted, the Encounter is assumed to be for a single day.
664
+ # Must not be temporally before the date_of_service field.
665
+ # @param prior_authorization_number [Encounters::V4::PRIOR_AUTHORIZATION_NUMBER] Box 23 on the CMS-1500 claim form.
1377
666
  # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
1378
- # for billing purpose.
1379
- # Box 12 on the CMS-1500 claim form.
667
+ # for billing purpose.
668
+ # Box 12 on the CMS-1500 claim form.
1380
669
  # @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you,
1381
- # not them. If false, patient may receive reimbursement.
1382
- # Box 13 on the CMS-1500 claim form.
670
+ # not them. If false, patient may receive reimbursement.
671
+ # Box 13 on the CMS-1500 claim form.
1383
672
  # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
1384
- # to be made to you, not them.
1385
- # Box 27 on the CMS-1500 claim form.
1386
- # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
1387
- # Headaches").
1388
- # @param existing_medications [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
673
+ # to be made to you, not them.
674
+ # Box 27 on the CMS-1500 claim form.
675
+ # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture - Headaches").
676
+ # @param existing_medications [Array<Hash>] Request of type Array<Encounters::V4::Medication>, as a Hash
1389
677
  # * :name (String)
1390
- # * :rx_cui (String)
678
+ # * :rx_cui (Encounters::V4::RX_CUI)
1391
679
  # * :dosage (String)
1392
680
  # * :dosage_form (String)
1393
681
  # * :frequency (String)
1394
682
  # * :as_needed (Boolean)
1395
- # @param vitals [Hash] Request of type CandidApiClient::Encounters::V4::Types::Vitals, as a Hash
683
+ # @param vitals [Hash] Request of type Encounters::V4::Vitals, as a Hash
1396
684
  # * :height_in (Integer)
1397
685
  # * :weight_lbs (Integer)
1398
686
  # * :blood_pressure_systolic_mmhg (Integer)
1399
687
  # * :blood_pressure_diastolic_mmhg (Integer)
1400
688
  # * :body_temperature_f (Float)
1401
- # * :hemoglobin_gdl (Float)
1402
- # * :hematocrit_pct (Float)
1403
- # @param interventions [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::Intervention>, as a Hash
689
+ # @param interventions [Array<Hash>] Request of type Array<Encounters::V4::Intervention>, as a Hash
1404
690
  # * :name (String)
1405
- # * :category (CandidApiClient::Encounters::V4::Types::InterventionCategory)
691
+ # * :category (Encounters::V4::InterventionCategory)
1406
692
  # * :description (String)
1407
693
  # * :medication (Hash)
1408
694
  # * :name (String)
1409
- # * :rx_cui (String)
695
+ # * :rx_cui (Encounters::V4::RX_CUI)
1410
696
  # * :dosage (String)
1411
697
  # * :dosage_form (String)
1412
698
  # * :frequency (String)
1413
699
  # * :as_needed (Boolean)
1414
- # * :labs (Array<CandidApiClient::Encounters::V4::Types::Lab>)
1415
- # @param pay_to_address [Hash] Specifies the address to which payments for the claim should be sent.Request of type CandidApiClient::Commons::Types::StreetAddressLongZip, as a Hash
700
+ # * :labs (Array<Encounters::V4::Lab>)
701
+ # @param pay_to_address [Hash] Specifies the address to which payments for the claim should be sent.Request of type Commons::StreetAddressLongZip, as a Hash
1416
702
  # * :zip_plus_four_code (String)
1417
703
  # * :address_1 (String)
1418
704
  # * :address_2 (String)
1419
705
  # * :city (String)
1420
- # * :state (CandidApiClient::Commons::Types::State)
706
+ # * :state (Commons::State)
1421
707
  # * :zip_code (String)
1422
- # @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
1423
- # Asynchronous encounters occur when providers and patients communicate online
1424
- # using
1425
- # forms, instant messaging, or other pre-recorded digital mediums.
1426
- # Synchronous encounters occur in live, real-time settings where the patient
1427
- # interacts
1428
- # directly with the provider, such as over video or a phone call.
1429
- # @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
1430
- # Examples for when this should be set to NOT_BILLABLE include
1431
- # if the Encounter has not occurred yet or if there is no intention of ever
1432
- # billing the responsible_party.
708
+ # @param synchronicity [Encounters::V4::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter.
709
+ # Asynchronous encounters occur when providers and patients communicate online using
710
+ # forms, instant messaging, or other pre-recorded digital mediums.
711
+ # Synchronous encounters occur in live, real-time settings where the patient interacts
712
+ # directly with the provider, such as over video or a phone call.
713
+ # @param billable_status [Encounters::V4::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
714
+ # Examples for when this should be set to NOT_BILLABLE include
715
+ # if the Encounter has not occurred yet or if there is no intention of ever billing the responsible_party.
716
+ # @param responsible_party [Encounters::V4::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
1433
717
  # @param additional_information [String] Defines additional information on the claim needed by the payer.
1434
- # Box 19 on the CMS-1500 claim form.
1435
- # @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
1436
- # Required when mandated by government law or regulation to obtain authorization
1437
- # for specific service(s) but, for the
1438
- # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
1439
- # the service was performed without
1440
- # obtaining the authorization.
1441
- # @param admission_date [Date] 837p Loop2300 DTP*435, CMS-1500 Box 18
1442
- # Required on all ambulance claims when the patient was known to be admitted to
1443
- # the hospital.
1444
- # OR
1445
- # Required on all claims involving inpatient medical visits.
1446
- # @param discharge_date [Date] 837p Loop2300 DTP*096, CMS-1500 Box 18
1447
- # Required for inpatient claims when the patient was discharged from the facility
1448
- # and the discharge date is known.
1449
- # @param onset_of_current_illness_or_symptom_date [Date] 837p Loop2300 DTP*431, CMS-1500 Box 14
1450
- # Required for the initial medical service or visit performed in response to a
1451
- # medical emergency when the date is available and is different than the date of
1452
- # service.
1453
- # OR
1454
- # This date is the onset of acute symptoms for the current illness or condition.
1455
- # @param last_menstrual_period_date [Date] 837p Loop2300 DTP*484, CMS-1500 Box 14
1456
- # Required when, in the judgment of the provider, the services on this claim are
1457
- # related to the patient's pregnancy.
1458
- # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
1459
- # Code indicating the reason why a request was delayed
718
+ # Box 19 on the CMS-1500 claim form.
719
+ # @param service_authorization_exception_code [Encounters::V4::ServiceAuthorizationExceptionCode] 837p Loop2300 REF\*4N
720
+ # Required when mandated by government law or regulation to obtain authorization for specific service(s) but, for the
721
+ # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode, the service was performed without
722
+ # obtaining the authorization.
723
+ # @param admission_date [Commons::DATE] 837p Loop2300 DTP\*435, CMS-1500 Box 18
724
+ # Required on all ambulance claims when the patient was known to be admitted to the hospital.
725
+ # OR
726
+ # Required on all claims involving inpatient medical visits.
727
+ # @param discharge_date [Commons::DATE] 837p Loop2300 DTP\*096, CMS-1500 Box 18
728
+ # Required for inpatient claims when the patient was discharged from the facility and the discharge date is known.
729
+ # @param onset_of_current_illness_or_symptom_date [Commons::DATE] 837p Loop2300 DTP\*431, CMS-1500 Box 14
730
+ # Required for the initial medical service or visit performed in response to a medical emergency when the date is available and is different than the date of service.
731
+ # OR
732
+ # This date is the onset of acute symptoms for the current illness or condition.
733
+ # @param last_menstrual_period_date [Commons::DATE] 837p Loop2300 DTP\*484, CMS-1500 Box 14
734
+ # Required when, in the judgment of the provider, the services on this claim are related to the patient's pregnancy.
735
+ # @param delay_reason_code [Commons::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
736
+ # Code indicating the reason why a request was delayed
1460
737
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
1461
- # @param _field_set [Object]
1462
- # @param patient [Hash] Contains the identification information of the individual receiving medical
1463
- # services.Request of type CandidApiClient::Individual::Types::PatientCreate, as a Hash
1464
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
738
+ # @param patient [Hash] Contains the identification information of the individual receiving medical services.Request of type Individual::PatientCreate, as a Hash
739
+ # * :phone_numbers (Array<Commons::PhoneNumber>)
1465
740
  # * :phone_consent (Boolean)
1466
- # * :email (String)
1467
- # * :non_insurance_payers (Array<String>)
1468
- # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
741
+ # * :email (Commons::EMAIL)
1469
742
  # * :email_consent (Boolean)
1470
743
  # * :external_id (String)
1471
- # * :date_of_birth (Date)
744
+ # * :date_of_birth (Commons::DATE)
1472
745
  # * :address (Hash)
1473
746
  # * :zip_plus_four_code (String)
1474
747
  # * :address_1 (String)
1475
748
  # * :address_2 (String)
1476
749
  # * :city (String)
1477
- # * :state (CandidApiClient::Commons::Types::State)
750
+ # * :state (Commons::State)
1478
751
  # * :zip_code (String)
1479
752
  # * :first_name (String)
1480
753
  # * :last_name (String)
1481
- # * :gender (CandidApiClient::Individual::Types::Gender)
1482
- # @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
1483
- # Billing provider may be, but is not necessarily, the same person/NPI as the
1484
- # rendering provider. From a payer's perspective, this represents the person or
1485
- # entity being reimbursed. When a contract exists with the target payer, the
1486
- # billing provider should be the entity contracted with the payer. In some
1487
- # circumstances, this will be an individual provider. In that case, submit that
1488
- # provider's NPI and the tax ID (TIN) that the provider gave to the payer during
1489
- # contracting. In other cases, the billing entity will be a medical group. If so,
1490
- # submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim form.Request of type CandidApiClient::EncounterProviders::V2::Types::BillingProvider, as a Hash
754
+ # * :gender (Individual::Gender)
755
+ # @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim. Billing provider may be, but is not necessarily, the same person/NPI as the rendering provider. From a payer's perspective, this represents the person or entity being reimbursed. When a contract exists with the target payer, the billing provider should be the entity contracted with the payer. In some circumstances, this will be an individual provider. In that case, submit that provider's NPI and the tax ID (TIN) that the provider gave to the payer during contracting. In other cases, the billing entity will be a medical group. If so, submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim form.Request of type EncounterProviders::V2::BillingProvider, as a Hash
1491
756
  # * :address (Hash)
1492
757
  # * :zip_plus_four_code (String)
1493
758
  # * :address_1 (String)
1494
759
  # * :address_2 (String)
1495
760
  # * :city (String)
1496
- # * :state (CandidApiClient::Commons::Types::State)
761
+ # * :state (Commons::State)
1497
762
  # * :zip_code (String)
1498
763
  # * :tax_id (String)
1499
764
  # * :npi (String)
1500
765
  # * :taxonomy_code (String)
1501
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
1502
- # * :first_name (String)
1503
- # * :last_name (String)
1504
- # * :organization_name (String)
1505
- # @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner,
1506
- # etc. -- performing the service.
1507
- # For telehealth services, the rendering provider performs the visit, asynchronous
1508
- # communication, or other service. The rendering provider address should generally
1509
- # be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProvider, as a Hash
1510
- # * :npi (String)
1511
- # * :taxonomy_code (String)
1512
- # * :address (Hash)
1513
- # * :zip_plus_four_code (String)
1514
- # * :address_1 (String)
1515
- # * :address_2 (String)
1516
- # * :city (String)
1517
- # * :state (CandidApiClient::Commons::Types::State)
1518
- # * :zip_code (String)
1519
766
  # * :first_name (String)
1520
767
  # * :last_name (String)
1521
768
  # * :organization_name (String)
1522
- # @param referring_provider [Hash] The final provider who referred the services that were rendered.
1523
- # All physicians who order services or refer Medicare beneficiaries must
1524
- # report this data.Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProvider, as a Hash
1525
- # * :npi (String)
1526
- # * :taxonomy_code (String)
769
+ # @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner, etc. -- performing the service.
770
+ # For telehealth services, the rendering provider performs the visit, asynchronous communication, or other service. The rendering provider address should generally be the same as the service facility address.Request of type EncounterProviders::V2::RenderingProvider, as a Hash
1527
771
  # * :address (Hash)
1528
772
  # * :zip_plus_four_code (String)
1529
773
  # * :address_1 (String)
1530
774
  # * :address_2 (String)
1531
775
  # * :city (String)
1532
- # * :state (CandidApiClient::Commons::Types::State)
776
+ # * :state (Commons::State)
1533
777
  # * :zip_code (String)
1534
- # * :first_name (String)
1535
- # * :last_name (String)
1536
- # * :organization_name (String)
1537
- # @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
1538
- # this loop to
1539
- # indicate the initial referral from the primary care provider or whatever
1540
- # provider wrote the initial referral for this patient's episode of care being
1541
- # billed/reported in this transaction.Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProvider, as a Hash
1542
778
  # * :npi (String)
1543
779
  # * :taxonomy_code (String)
1544
- # * :address (Hash)
1545
- # * :zip_plus_four_code (String)
1546
- # * :address_1 (String)
1547
- # * :address_2 (String)
1548
- # * :city (String)
1549
- # * :state (CandidApiClient::Commons::Types::State)
1550
- # * :zip_code (String)
1551
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
1552
780
  # * :first_name (String)
1553
781
  # * :last_name (String)
1554
782
  # * :organization_name (String)
1555
- # @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
1556
- # required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProvider, as a Hash
783
+ # @param referring_provider [Hash] The provider who referred the services that were rendered.
784
+ # All physicians who order services or refer Medicare beneficiaries must
785
+ # report this data.
786
+ # If a claim involves multiple referring physicians, create a separate
787
+ # encounter for each physician.Request of type EncounterProviders::V2::ReferringProvider, as a Hash
1557
788
  # * :npi (String)
1558
789
  # * :taxonomy_code (String)
1559
790
  # * :address (Hash)
@@ -1561,20 +792,12 @@ module CandidApiClient
1561
792
  # * :address_1 (String)
1562
793
  # * :address_2 (String)
1563
794
  # * :city (String)
1564
- # * :state (CandidApiClient::Commons::Types::State)
795
+ # * :state (Commons::State)
1565
796
  # * :zip_code (String)
1566
797
  # * :first_name (String)
1567
798
  # * :last_name (String)
1568
799
  # * :organization_name (String)
1569
- # @param service_facility [Hash] Encounter Service facility is typically the location a medical service was
1570
- # rendered, such as a provider office or hospital. For telehealth, service
1571
- # facility can represent the provider's location when the service was delivered
1572
- # (e.g., home), or the location where an in-person visit would have taken place,
1573
- # whichever is easier to identify. If the provider is in-network, service facility
1574
- # may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
1575
- # for an in-network claim to be successfully adjudicated, the service facility
1576
- # address listed on claims must match what was provided to the payer during the
1577
- # credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityBase, as a Hash
800
+ # @param service_facility [Hash] Encounter Service facility is typically the location a medical service was rendered, such as a provider office or hospital. For telehealth, service facility can represent the provider's location when the service was delivered (e.g., home), or the location where an in-person visit would have taken place, whichever is easier to identify. If the provider is in-network, service facility may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that for an in-network claim to be successfully adjudicated, the service facility address listed on claims must match what was provided to the payer during the credentialing process.Request of type ServiceFacility::EncounterServiceFacilityBase, as a Hash
1578
801
  # * :organization_name (String)
1579
802
  # * :npi (String)
1580
803
  # * :address (Hash)
@@ -1582,44 +805,12 @@ module CandidApiClient
1582
805
  # * :address_1 (String)
1583
806
  # * :address_2 (String)
1584
807
  # * :city (String)
1585
- # * :state (CandidApiClient::Commons::Types::State)
1586
- # * :zip_code (String)
1587
- # * :secondary_identification (String)
1588
- # @param subscriber_primary [Hash] Subscriber_primary is required when responsible_party is INSURANCE_PAY (i.e.
1589
- # when the claim should be billed to insurance).
1590
- # These are not required fields when responsible_party is SELF_PAY (i.e. when the
1591
- # claim should be billed to the patient).
1592
- # However, if you collect this for patients, even self-pay, we recommend including
1593
- # it when sending encounters to Candid.
1594
- # Note: Cash Pay is no longer a valid payer_id in v4, please use responsible party
1595
- # to define self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
1596
- # * :insurance_card (Hash)
1597
- # * :member_id (String)
1598
- # * :payer_name (String)
1599
- # * :payer_id (String)
1600
- # * :rx_bin (String)
1601
- # * :rx_pcn (String)
1602
- # * :image_url_front (String)
1603
- # * :image_url_back (String)
1604
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1605
- # * :group_number (String)
1606
- # * :plan_name (String)
1607
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1608
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1609
- # * :payer_plan_group_id (String)
1610
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1611
- # * :date_of_birth (Date)
1612
- # * :address (Hash)
1613
- # * :zip_plus_four_code (String)
1614
- # * :address_1 (String)
1615
- # * :address_2 (String)
1616
- # * :city (String)
1617
- # * :state (CandidApiClient::Commons::Types::State)
808
+ # * :state (Commons::State)
1618
809
  # * :zip_code (String)
1619
- # * :first_name (String)
1620
- # * :last_name (String)
1621
- # * :gender (CandidApiClient::Individual::Types::Gender)
1622
- # @param subscriber_secondary [Hash] Please always include this when you have it, even for self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
810
+ # @param subscriber_primary [Hash] Subscriber_primary is required when responsible_party is INSURANCE_PAY (i.e. when the claim should be billed to insurance).
811
+ # These are not required fields when responsible_party is SELF_PAY (i.e. when the claim should be billed to the patient).
812
+ # However, if you collect this for patients, even self-pay, we recommend including it when sending encounters to Candid.
813
+ # Note: Cash Pay is no longer a valid payer_id in v4, please use responsible party to define self-pay claims.Request of type Individual::SubscriberCreate, as a Hash
1623
814
  # * :insurance_card (Hash)
1624
815
  # * :member_id (String)
1625
816
  # * :payer_name (String)
@@ -1628,25 +819,24 @@ module CandidApiClient
1628
819
  # * :rx_pcn (String)
1629
820
  # * :image_url_front (String)
1630
821
  # * :image_url_back (String)
1631
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
822
+ # * :emr_payer_crosswalk (Commons::EmrPayerCrosswalk)
1632
823
  # * :group_number (String)
1633
824
  # * :plan_name (String)
1634
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1635
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1636
- # * :payer_plan_group_id (String)
1637
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1638
- # * :date_of_birth (Date)
825
+ # * :plan_type (Commons::SourceOfPaymentCode)
826
+ # * :insurance_type (Commons::InsuranceTypeCode)
827
+ # * :patient_relationship_to_subscriber_code (Commons::PatientRelationshipToInsuredCodeAll)
828
+ # * :date_of_birth (Commons::DATE)
1639
829
  # * :address (Hash)
1640
830
  # * :zip_plus_four_code (String)
1641
831
  # * :address_1 (String)
1642
832
  # * :address_2 (String)
1643
833
  # * :city (String)
1644
- # * :state (CandidApiClient::Commons::Types::State)
834
+ # * :state (Commons::State)
1645
835
  # * :zip_code (String)
1646
836
  # * :first_name (String)
1647
837
  # * :last_name (String)
1648
- # * :gender (CandidApiClient::Individual::Types::Gender)
1649
- # @param subscriber_tertiary [Hash] Please always include this when you have it, even for self-pay claims.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
838
+ # * :gender (Individual::Gender)
839
+ # @param subscriber_secondary [Hash] Please always include this when you have it, even for self-pay claims.Request of type Individual::SubscriberCreate, as a Hash
1650
840
  # * :insurance_card (Hash)
1651
841
  # * :member_id (String)
1652
842
  # * :payer_name (String)
@@ -1655,92 +845,61 @@ module CandidApiClient
1655
845
  # * :rx_pcn (String)
1656
846
  # * :image_url_front (String)
1657
847
  # * :image_url_back (String)
1658
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
848
+ # * :emr_payer_crosswalk (Commons::EmrPayerCrosswalk)
1659
849
  # * :group_number (String)
1660
850
  # * :plan_name (String)
1661
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
1662
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
1663
- # * :payer_plan_group_id (String)
1664
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
1665
- # * :date_of_birth (Date)
851
+ # * :plan_type (Commons::SourceOfPaymentCode)
852
+ # * :insurance_type (Commons::InsuranceTypeCode)
853
+ # * :patient_relationship_to_subscriber_code (Commons::PatientRelationshipToInsuredCodeAll)
854
+ # * :date_of_birth (Commons::DATE)
1666
855
  # * :address (Hash)
1667
856
  # * :zip_plus_four_code (String)
1668
857
  # * :address_1 (String)
1669
858
  # * :address_2 (String)
1670
859
  # * :city (String)
1671
- # * :state (CandidApiClient::Commons::Types::State)
860
+ # * :state (Commons::State)
1672
861
  # * :zip_code (String)
1673
862
  # * :first_name (String)
1674
863
  # * :last_name (String)
1675
- # * :gender (CandidApiClient::Individual::Types::Gender)
1676
- # @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
1677
- # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
1678
- # @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more
1679
- # diagnoses
1680
- # may be submitted at this time, and coders will later prioritize the 12 that will
1681
- # be
1682
- # submitted to the payor.Request of type Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>, as a Hash
864
+ # * :gender (Individual::Gender)
865
+ # @param diagnoses [Array<Hash>] Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses
866
+ # may be submitted at this time, and coders will later prioritize the 12 that will be
867
+ # submitted to the payor.Request of type Array<Diagnoses::DiagnosisCreate>, as a Hash
1683
868
  # * :name (String)
1684
- # * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
869
+ # * :code_type (Diagnoses::DiagnosisTypeCode)
1685
870
  # * :code (String)
1686
- # * :present_on_admission_indicator (CandidApiClient::YesNoIndicator::Types::YesNoIndicator)
1687
- # @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during
1688
- # patient encounters. Please note that medical records for appeals should be sent
1689
- # using the Encounter Attachments API.Request of type Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>, as a Hash
1690
- # * :category (CandidApiClient::Encounters::V4::Types::NoteCategory)
1691
- # * :notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNote>)
871
+ # @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during patient encounters.Request of type Array<Encounters::V4::ClinicalNoteCategoryCreate>, as a Hash
872
+ # * :category (Encounters::V4::NoteCategory)
873
+ # * :notes (Array<Encounters::V4::ClinicalNote>)
1692
874
  # @param billing_notes [Array<Hash>] Spot to store misc, human-readable, notes about this encounter to be used
1693
- # in the billing process.Request of type Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>, as a Hash
875
+ # in the billing process.Request of type Array<BillingNotes::V2::BillingNoteBase>, as a Hash
1694
876
  # * :text (String)
1695
- # @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
1696
- # telemedicine, 11 for in-person. Full list
1697
- # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
1698
- # @param patient_histories [Array<Hash>] Request of type Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>, as a Hash
1699
- # * :category (CandidApiClient::Encounters::V4::Types::PatientHistoryCategoryEnum)
1700
- # * :questions (Array<CandidApiClient::Encounters::V4::Types::IntakeQuestion>)
877
+ # @param place_of_service_code [Commons::FacilityTypeCode] Box 24B on the CMS-1500 claim form. Line-level place of service is not currently supported. 02 for telemedicine, 11 for in-person. Full list [here](https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
878
+ # @param patient_histories [Array<Hash>] Request of type Array<Encounters::V4::PatientHistoryCategory>, as a Hash
879
+ # * :category (Encounters::V4::PatientHistoryCategoryEnum)
880
+ # * :questions (Array<Encounters::V4::IntakeQuestion>)
1701
881
  # @param service_lines [Array<Hash>] Each service line must be linked to a diagnosis. Concretely,
1702
- # `service_line.diagnosis_pointers`must contain at least one entry which should be
1703
- # in bounds of the diagnoses list field.Request of type Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>, as a Hash
1704
- # * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
1705
- # * :has_epsdt_indicator (Boolean)
1706
- # * :has_family_planning_indicator (Boolean)
882
+ # `service_line.diagnosis_pointers`must contain at least one entry which should be
883
+ # in bounds of the diagnoses list field.Request of type Array<ServiceLines::V2::ServiceLineCreate>, as a Hash
884
+ # * :modifiers (Array<Commons::ProcedureModifier>)
1707
885
  # * :procedure_code (String)
1708
- # * :quantity (String)
1709
- # * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
886
+ # * :quantity (Commons::DECIMAL)
887
+ # * :units (Commons::ServiceLineUnits)
1710
888
  # * :charge_amount_cents (Integer)
1711
889
  # * :diagnosis_pointers (Array<Integer>)
1712
890
  # * :drug_identification (Hash)
1713
- # * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
891
+ # * :service_id_qualifier (ServiceLines::V2::ServiceIdQualifier)
1714
892
  # * :national_drug_code (String)
1715
893
  # * :national_drug_unit_count (String)
1716
- # * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
894
+ # * :measurement_unit_code (ServiceLines::V2::MeasurementUnitCode)
1717
895
  # * :link_sequence_number (String)
1718
896
  # * :pharmacy_prescription_number (String)
1719
- # * :conversion_formula (String)
1720
- # * :drug_description (String)
1721
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
897
+ # * :place_of_service_code (Commons::FacilityTypeCode)
1722
898
  # * :description (String)
1723
- # * :date_of_service (Date)
1724
- # * :end_date_of_service (Date)
1725
- # * :ordering_provider (Hash)
1726
- # * :npi (String)
1727
- # * :taxonomy_code (String)
1728
- # * :address (Hash)
1729
- # * :zip_plus_four_code (String)
1730
- # * :address_1 (String)
1731
- # * :address_2 (String)
1732
- # * :city (String)
1733
- # * :state (CandidApiClient::Commons::Types::State)
1734
- # * :zip_code (String)
1735
- # * :first_name (String)
1736
- # * :last_name (String)
1737
- # * :organization_name (String)
1738
- # * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
1739
- # * :note (String)
1740
- # @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorCreate, as a Hash
1741
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
899
+ # @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type Guarantor::V1::GuarantorCreate, as a Hash
900
+ # * :phone_numbers (Array<Commons::PhoneNumber>)
1742
901
  # * :phone_consent (Boolean)
1743
- # * :email (String)
902
+ # * :email (Commons::EMAIL)
1744
903
  # * :email_consent (Boolean)
1745
904
  # * :first_name (String)
1746
905
  # * :last_name (String)
@@ -1751,61 +910,29 @@ module CandidApiClient
1751
910
  # * :address_1 (String)
1752
911
  # * :address_2 (String)
1753
912
  # * :city (String)
1754
- # * :state (CandidApiClient::Commons::Types::State)
913
+ # * :state (Commons::State)
1755
914
  # * :zip_code (String)
1756
- # @param external_claim_submission [Hash] To be included for claims that have been submitted outside of Candid.
1757
- # Candid supports posting remits and payments to these claims and working them
1758
- # in-platform (e.g. editing, resubmitting).Request of type CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate, as a Hash
915
+ # @param external_claim_submission [Hash] ***This field is in beta.***
916
+ # To be included for claims that have been submitted outside of Candid.
917
+ # Candid supports posting remits and payments to these claims and working them in-platform (e.g. editing, resubmitting).Request of type ClaimSubmission::V1::ExternalClaimSubmissionCreate, as a Hash
1759
918
  # * :claim_created_at (DateTime)
1760
919
  # * :patient_control_number (String)
1761
- # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
1762
- # @param tag_ids [Array<String>] Names of tags that should be on the encounter.
1763
- # @param schema_instances [Array<Hash>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
1764
- # Multiple schema
1765
- # instances cannot be created for the same schema on an encounter.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
1766
- # * :schema_id (String)
1767
- # * :content (Hash{String => Object})
1768
- # @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
1769
- # @param epsdt_referral [Hash] Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
1770
- # 837P formRequest of type CandidApiClient::Encounters::V4::Types::EpsdtReferral, as a Hash
1771
- # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1772
- # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1773
- # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
1774
- # @param claim_supplemental_information [Array<Hash>] Refers to Loop 2300 - Segment PWK on the 837P form. No more than 10 entries are
1775
- # permitted.Request of type Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>, as a Hash
1776
- # * :attachment_report_type_code (CandidApiClient::Encounters::V4::Types::ReportTypeCode)
1777
- # * :attachment_transmission_code (CandidApiClient::Encounters::V4::Types::ReportTransmissionCode)
1778
- # * :attachment_control_number (String)
1779
- # @param secondary_payer_carrier_code [String] When Medicaid is billed as the secondary payer the Carrier Code is used to
1780
- # identify the primary payer. This is required for certain states.
1781
- # @param request_options [CandidApiClient::RequestOptions]
1782
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1783
- # @example
1784
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1785
- # api.encounters.v_4.create(
1786
- # patient: { first_name: "first_name", last_name: "last_name", gender: MALE, external_id: "external_id", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code" } },
1787
- # billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" },
1788
- # rendering_provider: { npi: "npi" },
1789
- # responsible_party: INSURANCE_PAY,
1790
- # diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }],
1791
- # place_of_service_code: PHARMACY
1792
- # )
1793
- def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
1794
- provider_accepts_assignment:, billable_status:, patient:, billing_provider:, rendering_provider:, responsible_party:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, referring_provider: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, subscriber_tertiary: nil, prior_authorization_number: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, referral_number: nil, epsdt_referral: nil, claim_supplemental_information: nil, secondary_payer_carrier_code: nil, request_options: nil)
920
+ # * :submission_records (Array<ClaimSubmission::V1::ClaimSubmissionRecordCreate>)
921
+ # @param request_options [RequestOptions]
922
+ # @return [Encounters::V4::Encounter]
923
+ def create(external_id:, date_of_service:, patient_authorized_release:, benefits_assigned_to_provider:,
924
+ provider_accepts_assignment:, billable_status:, responsible_party:, patient:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, end_date_of_service: nil, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, referring_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, request_options: nil)
1795
925
  Async do
1796
- response = @request_client.conn.post do |req|
926
+ response = @request_client.conn.post("/api/encounters/v4") do |req|
1797
927
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1798
928
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
1799
- req.headers = {
1800
- **(req.headers || {}),
1801
- **@request_client.get_headers,
1802
- **(request_options&.additional_headers || {})
1803
- }.compact
929
+ req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
1804
930
  req.body = {
1805
931
  **(request_options&.additional_body_parameters || {}),
1806
932
  external_id: external_id,
1807
933
  date_of_service: date_of_service,
1808
934
  end_date_of_service: end_date_of_service,
935
+ prior_authorization_number: prior_authorization_number,
1809
936
  patient_authorized_release: patient_authorized_release,
1810
937
  benefits_assigned_to_provider: benefits_assigned_to_provider,
1811
938
  provider_accepts_assignment: provider_accepts_assignment,
@@ -1816,6 +943,7 @@ module CandidApiClient
1816
943
  pay_to_address: pay_to_address,
1817
944
  synchronicity: synchronicity,
1818
945
  billable_status: billable_status,
946
+ responsible_party: responsible_party,
1819
947
  additional_information: additional_information,
1820
948
  service_authorization_exception_code: service_authorization_exception_code,
1821
949
  admission_date: admission_date,
@@ -1824,19 +952,13 @@ module CandidApiClient
1824
952
  last_menstrual_period_date: last_menstrual_period_date,
1825
953
  delay_reason_code: delay_reason_code,
1826
954
  additional_properties: additional_properties,
1827
- _field_set: _field_set,
1828
955
  patient: patient,
1829
956
  billing_provider: billing_provider,
1830
957
  rendering_provider: rendering_provider,
1831
958
  referring_provider: referring_provider,
1832
- initial_referring_provider: initial_referring_provider,
1833
- supervising_provider: supervising_provider,
1834
959
  service_facility: service_facility,
1835
960
  subscriber_primary: subscriber_primary,
1836
961
  subscriber_secondary: subscriber_secondary,
1837
- subscriber_tertiary: subscriber_tertiary,
1838
- prior_authorization_number: prior_authorization_number,
1839
- responsible_party: responsible_party,
1840
962
  diagnoses: diagnoses,
1841
963
  clinical_notes: clinical_notes,
1842
964
  billing_notes: billing_notes,
@@ -1844,344 +966,48 @@ module CandidApiClient
1844
966
  patient_histories: patient_histories,
1845
967
  service_lines: service_lines,
1846
968
  guarantor: guarantor,
1847
- external_claim_submission: external_claim_submission,
1848
- tag_ids: tag_ids,
1849
- schema_instances: schema_instances,
1850
- referral_number: referral_number,
1851
- epsdt_referral: epsdt_referral,
1852
- claim_supplemental_information: claim_supplemental_information,
1853
- secondary_payer_carrier_code: secondary_payer_carrier_code
969
+ external_claim_submission: external_claim_submission
1854
970
  }.compact
1855
- req.url "#{@request_client.get_url(environment: CandidApi,
1856
- request_options: request_options)}/api/encounters/v4"
1857
971
  end
1858
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
972
+ Encounters::V4::Encounter.from_json(json_object: response.body)
1859
973
  end
1860
974
  end
1861
975
 
1862
- # Create an encounter from a pre-encounter patient and appointment. This endpoint
1863
- # is intended to be used by consumers who are managing
1864
- # patients and appointments in the pre-encounter service and is currently under
1865
- # development. Consumers who are not taking advantage
1866
- # of the pre-encounter service should use the standard create endpoint.
1867
- # The endpoint will create an encounter from the provided fields, pulling
1868
- # information from the provided patient and appointment objects
1869
- # where applicable. In particular, the following fields are populated from the
1870
- # patient and appointment objects:
1871
- # - Patient
1872
- # - Referring Provider
1873
- # - Subscriber Primary
1874
- # - Subscriber Secondary
1875
- # - Referral Number
1876
- # - Responsible Party
1877
- # - Guarantor
1878
- # Utilizing this endpoint opts you into automatic updating of the encounter when
1879
- # the patient or appointment is updated, assuming the
1880
- # encounter has not already been submitted or adjudicated.
1881
- #
1882
- # @param request [Hash] Request of type CandidApiClient::Encounters::V4::Types::EncounterCreateFromPreEncounter, as a Hash
1883
- # * :pre_encounter_patient_id (String)
1884
- # * :pre_encounter_appointment_ids (Array<String>)
1885
- # * :billing_provider (Hash)
1886
- # * :address (Hash)
1887
- # * :zip_plus_four_code (String)
1888
- # * :address_1 (String)
1889
- # * :address_2 (String)
1890
- # * :city (String)
1891
- # * :state (CandidApiClient::Commons::Types::State)
1892
- # * :zip_code (String)
1893
- # * :tax_id (String)
1894
- # * :npi (String)
1895
- # * :taxonomy_code (String)
1896
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
1897
- # * :first_name (String)
1898
- # * :last_name (String)
1899
- # * :organization_name (String)
1900
- # * :rendering_provider (Hash)
1901
- # * :npi (String)
1902
- # * :taxonomy_code (String)
1903
- # * :address (Hash)
1904
- # * :zip_plus_four_code (String)
1905
- # * :address_1 (String)
1906
- # * :address_2 (String)
1907
- # * :city (String)
1908
- # * :state (CandidApiClient::Commons::Types::State)
1909
- # * :zip_code (String)
1910
- # * :first_name (String)
1911
- # * :last_name (String)
1912
- # * :organization_name (String)
1913
- # * :initial_referring_provider (Hash)
1914
- # * :npi (String)
1915
- # * :taxonomy_code (String)
1916
- # * :address (Hash)
1917
- # * :zip_plus_four_code (String)
1918
- # * :address_1 (String)
1919
- # * :address_2 (String)
1920
- # * :city (String)
1921
- # * :state (CandidApiClient::Commons::Types::State)
1922
- # * :zip_code (String)
1923
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
1924
- # * :first_name (String)
1925
- # * :last_name (String)
1926
- # * :organization_name (String)
1927
- # * :supervising_provider (Hash)
1928
- # * :npi (String)
1929
- # * :taxonomy_code (String)
1930
- # * :address (Hash)
1931
- # * :zip_plus_four_code (String)
1932
- # * :address_1 (String)
1933
- # * :address_2 (String)
1934
- # * :city (String)
1935
- # * :state (CandidApiClient::Commons::Types::State)
1936
- # * :zip_code (String)
1937
- # * :first_name (String)
1938
- # * :last_name (String)
1939
- # * :organization_name (String)
1940
- # * :service_facility (Hash)
1941
- # * :organization_name (String)
1942
- # * :npi (String)
1943
- # * :address (Hash)
1944
- # * :zip_plus_four_code (String)
1945
- # * :address_1 (String)
1946
- # * :address_2 (String)
1947
- # * :city (String)
1948
- # * :state (CandidApiClient::Commons::Types::State)
1949
- # * :zip_code (String)
1950
- # * :secondary_identification (String)
1951
- # * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
1952
- # * :clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>)
1953
- # * :billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>)
1954
- # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
1955
- # * :patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>)
1956
- # * :service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>)
1957
- # * :external_claim_submission (Hash)
1958
- # * :claim_created_at (DateTime)
1959
- # * :patient_control_number (String)
1960
- # * :submission_records (Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreate>)
1961
- # * :tag_ids (Array<String>)
1962
- # * :schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)
1963
- # * :external_id (String)
1964
- # * :date_of_service (Date)
1965
- # * :end_date_of_service (Date)
1966
- # * :patient_authorized_release (Boolean)
1967
- # * :benefits_assigned_to_provider (Boolean)
1968
- # * :provider_accepts_assignment (Boolean)
1969
- # * :appointment_type (String)
1970
- # * :existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>)
1971
- # * :vitals (Hash)
1972
- # * :height_in (Integer)
1973
- # * :weight_lbs (Integer)
1974
- # * :blood_pressure_systolic_mmhg (Integer)
1975
- # * :blood_pressure_diastolic_mmhg (Integer)
1976
- # * :body_temperature_f (Float)
1977
- # * :hemoglobin_gdl (Float)
1978
- # * :hematocrit_pct (Float)
1979
- # * :interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>)
1980
- # * :pay_to_address (Hash)
1981
- # * :zip_plus_four_code (String)
1982
- # * :address_1 (String)
1983
- # * :address_2 (String)
1984
- # * :city (String)
1985
- # * :state (CandidApiClient::Commons::Types::State)
1986
- # * :zip_code (String)
1987
- # * :synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType)
1988
- # * :billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType)
1989
- # * :additional_information (String)
1990
- # * :service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode)
1991
- # * :admission_date (Date)
1992
- # * :discharge_date (Date)
1993
- # * :onset_of_current_illness_or_symptom_date (Date)
1994
- # * :last_menstrual_period_date (Date)
1995
- # * :delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode)
1996
- # @param request_options [CandidApiClient::RequestOptions]
1997
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
1998
- # @example
1999
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
2000
- # api.encounters.v_4.create_from_pre_encounter_patient(request: { external_id: "external_id", patient_authorized_release: true, benefits_assigned_to_provider: true, provider_accepts_assignment: true, billable_status: BILLABLE, pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"], billing_provider: { address: { address_1: "address1", city: "city", state: AA, zip_code: "zip_code", zip_plus_four_code: "zip_plus_four_code" }, tax_id: "tax_id", npi: "npi" }, rendering_provider: { npi: "npi" }, diagnoses: [{ code_type: ABF, code: "code" }, { code_type: ABF, code: "code" }], place_of_service_code: PHARMACY })
2001
- def create_from_pre_encounter_patient(request:, request_options: nil)
2002
- Async do
2003
- response = @request_client.conn.post do |req|
2004
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
2005
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
2006
- req.headers = {
2007
- **(req.headers || {}),
2008
- **@request_client.get_headers,
2009
- **(request_options&.additional_headers || {})
2010
- }.compact
2011
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
2012
- req.url "#{@request_client.get_url(environment: CandidApi,
2013
- request_options: request_options)}/api/encounters/v4/create-from-pre-encounter"
2014
- end
2015
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
2016
- end
2017
- end
2018
-
2019
- # @param encounter_id [String]
2020
- # @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you, not
2021
- # them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim
2022
- # form.
2023
- # @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
2024
- # @param external_id [String] A client-specified unique ID to associate with this encounter;
2025
- # for example, your internal encounter ID or a Dr. Chrono encounter ID.
2026
- # This field should not contain PHI.
2027
- # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
2028
- # This date must be the local date in the timezone where the service occurred.
2029
- # Box 24a on the CMS-1500 claim form.
2030
- # If service occurred over a range of dates, this should be the start date.
2031
- # If service lines have distinct date_of_service values, updating the encounter's
2032
- # date_of_service will fail. If all service line date_of_service values are the
2033
- # same, updating the encounter's date_of_service will update all service line
2034
- # date_of_service values.
2035
- # @param tag_ids [Array<String>] Names of tags that should be on the encounter. Note all tags on encounter will
2036
- # be overridden with this list.
2037
- # @param billable_status [CandidApiClient::Encounters::V4::Types::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party.
2038
- # Examples for when this should be set to NOT_BILLABLE include if the Encounter
2039
- # has not occurred yet or if there is no intention of ever billing the
2040
- # responsible_party.
2041
- # @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use
2042
- # SELF_PAY if you intend to bill self pay/cash pay.
2043
- # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments to
2044
- # be made to you, not them. Box 27 on the CMS-1500 claim form.
2045
- # @param synchronicity [CandidApiClient::Encounters::V4::Types::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter. Asynchronous
2046
- # encounters occur when providers and patients communicate online using forms,
2047
- # instant messaging, or other pre-recorded digital mediums. Synchronous encounters
2048
- # occur in live, real-time settings where the patient interacts directly with the
2049
- # provider, such as over video or a phone call.
2050
- # @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
2051
- # telemedicine, 11 for in-person. Full list
2052
- # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
2053
- # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
2054
- # Headaches").
2055
- # @param end_date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
2056
- # This date must be the local date in the timezone where the service occurred.
2057
- # If omitted, the Encounter is assumed to be for a single day.
2058
- # Must not be temporally before the date_of_service field.
2059
- # If service lines have distinct end_date_of_service values, updating the
2060
- # encounter's end_date_of_service will fail. If all service line
2061
- # end_date_of_service values are the same, updating the encounter's
2062
- # end_date_of_service will update all service line date_of_service values.
2063
- # @param additional_information [String] Defines additional information on the claim needed by the payer.
2064
- # Box 19 on the CMS-1500 claim form.
2065
- # @param service_authorization_exception_code [CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
2066
- # Required when mandated by government law or regulation to obtain authorization
2067
- # for specific service(s) but, for the
2068
- # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode,
2069
- # the service was performed without
2070
- # obtaining the authorization.
2071
- # @param admission_date [Date] 837p Loop2300 DTP*435, CMS-1500 Box 18
2072
- # Required on all ambulance claims when the patient was known to be admitted to
2073
- # the hospital.
2074
- # OR
2075
- # Required on all claims involving inpatient medical visits.
2076
- # @param discharge_date [Date] 837p Loop2300 DTP*096, CMS-1500 Box 18
2077
- # Required for inpatient claims when the patient was discharged from the facility
2078
- # and the discharge date is known.
2079
- # @param onset_of_current_illness_or_symptom_date [Date] 837p Loop2300 DTP*431, CMS-1500 Box 14
2080
- # Required for the initial medical service or visit performed in response to a
2081
- # medical emergency when the date is available and is different than the date of
2082
- # service.
2083
- # OR
2084
- # This date is the onset of acute symptoms for the current illness or condition.
2085
- # @param last_menstrual_period_date [Date] 837p Loop2300 DTP*484, CMS-1500 Box 14
2086
- # Required when, in the judgment of the provider, the services on this claim are
2087
- # related to the patient's pregnancy.de
2088
- # @param delay_reason_code [CandidApiClient::Commons::Types::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
2089
- # Code indicating the reason why a request was delayed
2090
- # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
2091
- # for billing purpose.
2092
- # Box 12 on the CMS-1500 claim form.
2093
- # @param vitals [Hash] If a vitals entity already exists for the encounter, then all values will be
2094
- # updated to the provided values.
2095
- # Otherwise, a new vitals object will be created for the encounter.Request of type CandidApiClient::Encounters::V4::Types::VitalsUpdate, as a Hash
2096
- # * :height_in (Integer)
2097
- # * :weight_lbs (Integer)
2098
- # * :blood_pressure_systolic_mmhg (Integer)
2099
- # * :blood_pressure_diastolic_mmhg (Integer)
2100
- # * :body_temperature_f (Float)
2101
- # * :hemoglobin_gdl (Float)
2102
- # * :hematocrit_pct (Float)
2103
- # @param referral_number [String] Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
2104
- # @param secondary_payer_carrier_code [String] When Medicaid is billed as the secondary payer the Carrier Code is used to
2105
- # identify the primary payer. This is required for certain states.
2106
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
2107
- # @param _field_set [Object]
2108
- # @param epsdt_referral [Hash] Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the
2109
- # 837P formRequest of type CandidApiClient::Encounters::V4::Types::EpsdtReferral, as a Hash
2110
- # * :condition_indicator_1 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
2111
- # * :condition_indicator_2 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
2112
- # * :condition_indicator_3 (CandidApiClient::Commons::Types::EpsdtReferralConditionIndicatorCode)
2113
- # @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during
2114
- # patient encounters. Please note that medical records for appeals should be sent
2115
- # using the Encounter Attachments API.Request of type Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>, as a Hash
2116
- # * :category (CandidApiClient::Encounters::V4::Types::NoteCategory)
2117
- # * :notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNote>)
2118
- # @param claim_supplemental_information [Array<Hash>] Refers to Loop 2300 - Segment PWK on the 837P form. No more than 10 entries are
2119
- # permitted.Request of type Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>, as a Hash
2120
- # * :attachment_report_type_code (CandidApiClient::Encounters::V4::Types::ReportTypeCode)
2121
- # * :attachment_transmission_code (CandidApiClient::Encounters::V4::Types::ReportTransmissionCode)
2122
- # * :attachment_control_number (String)
2123
- # @param schema_instances [Array<Hash>] Key-value pairs that must adhere to a schema created via the Custom Schema API.
2124
- # Multiple schema
2125
- # instances cannot be created for the same schema on an encounter. Updating schema
2126
- # instances utilizes PUT
2127
- # semantics, so the schema instances on the encounter will be set to whatever
2128
- # inputs are provided. If null
2129
- # is provided as an input, then the encounter's schema instances will be cleared.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
2130
- # * :schema_id (String)
2131
- # * :content (Hash{String => Object})
2132
- # @param existing_medications [Array<Hash>] Existing medications that should be on the encounter.
2133
- # Note all current existing medications on encounter will be overridden with this
2134
- # list.Request of type Array<CandidApiClient::Encounters::V4::Types::Medication>, as a Hash
2135
- # * :name (String)
2136
- # * :rx_cui (String)
2137
- # * :dosage (String)
2138
- # * :dosage_form (String)
2139
- # * :frequency (String)
2140
- # * :as_needed (Boolean)
2141
- # @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorUpdate, as a Hash
2142
- # * :first_name (String)
2143
- # * :last_name (String)
2144
- # * :external_id (String)
2145
- # * :date_of_birth (Date)
2146
- # * :address (Hash)
2147
- # * :zip_plus_four_code (String)
2148
- # * :address_1 (String)
2149
- # * :address_2 (String)
2150
- # * :city (String)
2151
- # * :state (CandidApiClient::Commons::Types::State)
2152
- # * :zip_code (String)
2153
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
2154
- # * :phone_consent (Boolean)
2155
- # * :email (String)
2156
- # * :email_consent (Boolean)
2157
- # @param subscriber_primary [Hash] Contains details of the primary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
2158
- # * :insurance_card (Hash)
2159
- # * :member_id (String)
2160
- # * :payer_name (String)
2161
- # * :payer_id (String)
2162
- # * :rx_bin (String)
2163
- # * :rx_pcn (String)
2164
- # * :image_url_front (String)
2165
- # * :image_url_back (String)
2166
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
2167
- # * :group_number (String)
2168
- # * :plan_name (String)
2169
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
2170
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
2171
- # * :payer_plan_group_id (String)
2172
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
2173
- # * :date_of_birth (Date)
2174
- # * :address (Hash)
2175
- # * :zip_plus_four_code (String)
2176
- # * :address_1 (String)
2177
- # * :address_2 (String)
2178
- # * :city (String)
2179
- # * :state (CandidApiClient::Commons::Types::State)
2180
- # * :zip_code (String)
2181
- # * :first_name (String)
2182
- # * :last_name (String)
2183
- # * :gender (CandidApiClient::Individual::Types::Gender)
2184
- # @param subscriber_secondary [Hash] Contains details of the secondary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
976
+ # @param encounter_id [Commons::ENCOUNTER_ID]
977
+ # @param prior_authorization_number [Encounters::V4::PRIOR_AUTHORIZATION_NUMBER] Box 23 on the CMS-1500 claim form.
978
+ # @param external_id [Commons::ENCOUNTER_EXTERNAL_ID] A client-specified unique ID to associate with this encounter;
979
+ # for example, your internal encounter ID or a Dr. Chrono encounter ID.
980
+ # This field should not contain PHI.
981
+ # @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
982
+ # This date must be the local date in the timezone where the service occurred.
983
+ # Box 24a on the CMS-1500 claim form.
984
+ # If service occurred over a range of dates, this should be the start date.
985
+ # @param diagnosis_ids [Array<Diagnoses::DIAGNOSIS_ID>] Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses
986
+ # may be submitted at this time, and coders will later prioritize the 12 that will be
987
+ # submitted to the payor.
988
+ # @param tag_ids [Array<Tags::TAG_ID>] Names of tags that should be on the encounter.
989
+ # @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during patient encounters.Request of type Array<Encounters::V4::ClinicalNoteCategoryCreate>, as a Hash
990
+ # * :category (Encounters::V4::NoteCategory)
991
+ # * :notes (Array<Encounters::V4::ClinicalNote>)
992
+ # @param pay_to_address [Hash] Specifies the address to which payments for the claim should be sent.Request of type Commons::StreetAddressLongZip, as a Hash
993
+ # * :zip_plus_four_code (String)
994
+ # * :address_1 (String)
995
+ # * :address_2 (String)
996
+ # * :city (String)
997
+ # * :state (Commons::State)
998
+ # * :zip_code (String)
999
+ # @param billable_status [Encounters::V4::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party. Examples for when this should be set to NOT_BILLABLE include if the Encounter has not occurred yet or if there is no intention of ever billing the responsible_party.
1000
+ # @param responsible_party [Encounters::V4::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use SELF_PAY if you intend to bill self pay/cash pay.
1001
+ # @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments to be made to you, not them. Box 27 on the CMS-1500 claim form.
1002
+ # @param benefits_assigned_to_provider [Boolean] Whether this patient has authorized insurance payments to be made to you, not them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim form.
1003
+ # @param synchronicity [Encounters::V4::SynchronicityType] Whether or not this was a synchronous or asynchronous encounter. Asynchronous encounters occur when providers and patients communicate online using forms, instant messaging, or other pre-recorded digital mediums. Synchronous encounters occur in live, real-time settings where the patient interacts directly with the provider, such as over video or a phone call.
1004
+ # @param place_of_service_code [Commons::FacilityTypeCode] Box 24B on the CMS-1500 claim form. Line-level place of service is not currently supported. 02 for telemedicine, 11 for in-person. Full list [here](https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
1005
+ # @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture - Headaches").
1006
+ # @param end_date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
1007
+ # This date must be the local date in the timezone where the service occurred.
1008
+ # If omitted, the Encounter is assumed to be for a single day.
1009
+ # Must not be temporally before the date_of_service field.
1010
+ # @param subscriber_primary [Hash] Contains details of the primary insurance subscriber.Request of type Individual::SubscriberCreate, as a Hash
2185
1011
  # * :insurance_card (Hash)
2186
1012
  # * :member_id (String)
2187
1013
  # * :payer_name (String)
@@ -2190,25 +1016,24 @@ module CandidApiClient
2190
1016
  # * :rx_pcn (String)
2191
1017
  # * :image_url_front (String)
2192
1018
  # * :image_url_back (String)
2193
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1019
+ # * :emr_payer_crosswalk (Commons::EmrPayerCrosswalk)
2194
1020
  # * :group_number (String)
2195
1021
  # * :plan_name (String)
2196
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
2197
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
2198
- # * :payer_plan_group_id (String)
2199
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
2200
- # * :date_of_birth (Date)
1022
+ # * :plan_type (Commons::SourceOfPaymentCode)
1023
+ # * :insurance_type (Commons::InsuranceTypeCode)
1024
+ # * :patient_relationship_to_subscriber_code (Commons::PatientRelationshipToInsuredCodeAll)
1025
+ # * :date_of_birth (Commons::DATE)
2201
1026
  # * :address (Hash)
2202
1027
  # * :zip_plus_four_code (String)
2203
1028
  # * :address_1 (String)
2204
1029
  # * :address_2 (String)
2205
1030
  # * :city (String)
2206
- # * :state (CandidApiClient::Commons::Types::State)
1031
+ # * :state (Commons::State)
2207
1032
  # * :zip_code (String)
2208
1033
  # * :first_name (String)
2209
1034
  # * :last_name (String)
2210
- # * :gender (CandidApiClient::Individual::Types::Gender)
2211
- # @param subscriber_tertiary [Hash] Contains details of the tertiary insurance subscriber.Request of type CandidApiClient::Individual::Types::SubscriberCreate, as a Hash
1035
+ # * :gender (Individual::Gender)
1036
+ # @param subscriber_secondary [Hash] Contains details of the secondary insurance subscriber.Request of type Individual::SubscriberCreate, as a Hash
2212
1037
  # * :insurance_card (Hash)
2213
1038
  # * :member_id (String)
2214
1039
  # * :payer_name (String)
@@ -2217,232 +1042,81 @@ module CandidApiClient
2217
1042
  # * :rx_pcn (String)
2218
1043
  # * :image_url_front (String)
2219
1044
  # * :image_url_back (String)
2220
- # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1045
+ # * :emr_payer_crosswalk (Commons::EmrPayerCrosswalk)
2221
1046
  # * :group_number (String)
2222
1047
  # * :plan_name (String)
2223
- # * :plan_type (CandidApiClient::Commons::Types::SourceOfPaymentCode)
2224
- # * :insurance_type (CandidApiClient::Commons::Types::InsuranceTypeCode)
2225
- # * :payer_plan_group_id (String)
2226
- # * :patient_relationship_to_subscriber_code (CandidApiClient::Commons::Types::PatientRelationshipToInsuredCodeAll)
2227
- # * :date_of_birth (Date)
2228
- # * :address (Hash)
2229
- # * :zip_plus_four_code (String)
2230
- # * :address_1 (String)
2231
- # * :address_2 (String)
2232
- # * :city (String)
2233
- # * :state (CandidApiClient::Commons::Types::State)
2234
- # * :zip_code (String)
2235
- # * :first_name (String)
2236
- # * :last_name (String)
2237
- # * :gender (CandidApiClient::Individual::Types::Gender)
2238
- # @param pay_to_address [Hash] Specifies the address to which payments for the claim should be sent.Request of type CandidApiClient::Commons::Types::StreetAddressLongZip, as a Hash
2239
- # * :zip_plus_four_code (String)
2240
- # * :address_1 (String)
2241
- # * :address_2 (String)
2242
- # * :city (String)
2243
- # * :state (CandidApiClient::Commons::Types::State)
2244
- # * :zip_code (String)
2245
- # @param diagnosis_ids [Array<String>] Ideally, this field should contain no more than 12 diagnoses. However, more
2246
- # diagnoses
2247
- # may be submitted at this time, and coders will later prioritize the 12 that will
2248
- # be
2249
- # submitted to the payor.
2250
- # @param initial_referring_provider [Hash] The second iteration of Loop ID-2310. Use code "P3 - Primary Care Provider" in
2251
- # this loop to
2252
- # indicate the initial referral from the primary care provider or whatever
2253
- # provider wrote the initial referral for this patient's episode of care being
2254
- # billed/reported in this transaction.Request of type CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdate, as a Hash
2255
- # * :npi (String)
2256
- # * :taxonomy_code (String)
2257
- # * :address (Hash)
2258
- # * :zip_plus_four_code (String)
2259
- # * :address_1 (String)
2260
- # * :address_2 (String)
2261
- # * :city (String)
2262
- # * :state (CandidApiClient::Commons::Types::State)
2263
- # * :zip_code (String)
2264
- # * :qualifier (CandidApiClient::Commons::Types::QualifierCode)
2265
- # * :first_name (String)
2266
- # * :last_name (String)
2267
- # * :organization_name (String)
2268
- # @param referring_provider [Hash] The final provider who referred the services that were rendered.
2269
- # All physicians who order services or refer Medicare beneficiaries must
2270
- # report this data.Request of type CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdate, as a Hash
2271
- # * :npi (String)
2272
- # * :taxonomy_code (String)
2273
- # * :address (Hash)
2274
- # * :zip_plus_four_code (String)
2275
- # * :address_1 (String)
2276
- # * :address_2 (String)
2277
- # * :city (String)
2278
- # * :state (CandidApiClient::Commons::Types::State)
2279
- # * :zip_code (String)
2280
- # * :first_name (String)
2281
- # * :last_name (String)
2282
- # * :organization_name (String)
2283
- # @param patient [Hash] Contains the identification information of the individual receiving medical
2284
- # services.Request of type CandidApiClient::Individual::Types::PatientUpdate, as a Hash
2285
- # * :first_name (String)
2286
- # * :last_name (String)
2287
- # * :gender (CandidApiClient::Individual::Types::Gender)
2288
- # * :external_id (String)
2289
- # * :date_of_birth (Date)
2290
- # * :address (Hash)
2291
- # * :zip_plus_four_code (String)
2292
- # * :address_1 (String)
2293
- # * :address_2 (String)
2294
- # * :city (String)
2295
- # * :state (CandidApiClient::Commons::Types::State)
2296
- # * :zip_code (String)
2297
- # * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
2298
- # * :phone_consent (Boolean)
2299
- # * :email (String)
2300
- # * :email_consent (Boolean)
2301
- # * :non_insurance_payers (Array<String>)
2302
- # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
2303
- # @param rendering_provider [Hash] The rendering provider is the practitioner -- physician, nurse practitioner,
2304
- # etc. -- performing the service.
2305
- # For telehealth services, the rendering provider performs the visit, asynchronous
2306
- # communication, or other service. The rendering provider address should generally
2307
- # be the same as the service facility address.Request of type CandidApiClient::EncounterProviders::V2::Types::RenderingProviderUpdate, as a Hash
2308
- # * :npi (String)
2309
- # * :taxonomy_code (String)
1048
+ # * :plan_type (Commons::SourceOfPaymentCode)
1049
+ # * :insurance_type (Commons::InsuranceTypeCode)
1050
+ # * :patient_relationship_to_subscriber_code (Commons::PatientRelationshipToInsuredCodeAll)
1051
+ # * :date_of_birth (Commons::DATE)
2310
1052
  # * :address (Hash)
2311
1053
  # * :zip_plus_four_code (String)
2312
1054
  # * :address_1 (String)
2313
1055
  # * :address_2 (String)
2314
1056
  # * :city (String)
2315
- # * :state (CandidApiClient::Commons::Types::State)
1057
+ # * :state (Commons::State)
2316
1058
  # * :zip_code (String)
2317
1059
  # * :first_name (String)
2318
1060
  # * :last_name (String)
2319
- # * :organization_name (String)
2320
- # @param service_facility [Hash] Encounter Service facility is typically the location a medical service was
2321
- # rendered, such as a provider office or hospital. For telehealth, service
2322
- # facility can represent the provider's location when the service was delivered
2323
- # (e.g., home), or the location where an in-person visit would have taken place,
2324
- # whichever is easier to identify. If the provider is in-network, service facility
2325
- # may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that
2326
- # for an in-network claim to be successfully adjudicated, the service facility
2327
- # address listed on claims must match what was provided to the payer during the
2328
- # credentialing process.Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate, as a Hash
2329
- # * :organization_name (String)
2330
- # * :npi (String)
2331
- # * :address (Hash)
2332
- # * :zip_plus_four_code (String)
2333
- # * :address_1 (String)
2334
- # * :address_2 (String)
2335
- # * :city (String)
2336
- # * :state (CandidApiClient::Commons::Types::State)
2337
- # * :zip_code (String)
2338
- # * :secondary_identification (String)
2339
- # @param supervising_provider [Hash] Required when the rendering provider is supervised by a physician. If not
2340
- # required by this implementation guide, do not send.Request of type CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdate, as a Hash
2341
- # * :npi (String)
2342
- # * :taxonomy_code (String)
2343
- # * :address (Hash)
2344
- # * :zip_plus_four_code (String)
2345
- # * :address_1 (String)
2346
- # * :address_2 (String)
2347
- # * :city (String)
2348
- # * :state (CandidApiClient::Commons::Types::State)
2349
- # * :zip_code (String)
2350
- # * :first_name (String)
2351
- # * :last_name (String)
2352
- # * :organization_name (String)
2353
- # @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
2354
- # Billing provider may be, but is not necessarily, the same person/NPI as the
2355
- # rendering provider. From a payer's perspective, this represents the person or
2356
- # entity being reimbursed. When a contract exists with the target payer, the
2357
- # billing provider should be the entity contracted with the payer. In some
2358
- # circumstances, this will be an individual provider. In that case, submit that
2359
- # provider's NPI and the tax ID (TIN) that the provider gave to the payer during
2360
- # contracting. In other cases, the billing entity will be a medical group. If so,
2361
- # submit the group NPI and the group's tax ID. Box 33 on the CMS-1500 claim form.Request of type CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdate, as a Hash
2362
- # * :address (Hash)
2363
- # * :zip_plus_four_code (String)
2364
- # * :address_1 (String)
2365
- # * :address_2 (String)
2366
- # * :city (String)
2367
- # * :state (CandidApiClient::Commons::Types::State)
2368
- # * :zip_code (String)
2369
- # * :tax_id (String)
2370
- # * :npi (String)
2371
- # * :taxonomy_code (String)
2372
- # * :provider_commercial_license_type (CandidApiClient::Commons::Types::BillingProviderCommercialLicenseType)
2373
- # * :first_name (String)
2374
- # * :last_name (String)
2375
- # * :organization_name (String)
2376
- # @param place_of_service_code_as_submitted [CandidApiClient::Commons::Types::FacilityTypeCode] Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for
2377
- # telemedicine, 11 for in-person. Full list
2378
- # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
2379
- # @param request_options [CandidApiClient::RequestOptions]
2380
- # @return [CandidApiClient::Encounters::V4::Types::Encounter]
2381
- # @example
2382
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
2383
- # api.encounters.v_4.update(encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
2384
- def update(encounter_id:, benefits_assigned_to_provider: nil, prior_authorization_number: nil,
2385
- external_id: nil, date_of_service: nil, tag_ids: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient_authorized_release: nil, vitals: nil, referral_number: nil, secondary_payer_carrier_code: nil, additional_properties: nil, _field_set: nil, epsdt_referral: nil, clinical_notes: nil, claim_supplemental_information: nil, schema_instances: nil, existing_medications: nil, guarantor: nil, subscriber_primary: nil, subscriber_secondary: nil, subscriber_tertiary: nil, pay_to_address: nil, diagnosis_ids: nil, initial_referring_provider: nil, referring_provider: nil, patient: nil, rendering_provider: nil, service_facility: nil, supervising_provider: nil, billing_provider: nil, place_of_service_code_as_submitted: nil, request_options: nil)
1061
+ # * :gender (Individual::Gender)
1062
+ # @param additional_information [String] Defines additional information on the claim needed by the payer.
1063
+ # Box 19 on the CMS-1500 claim form.
1064
+ # @param service_authorization_exception_code [Encounters::V4::ServiceAuthorizationExceptionCode] 837p Loop2300 REF*4N
1065
+ # Required when mandated by government law or regulation to obtain authorization for specific service(s) but, for the
1066
+ # reasons listed in one of the enum values of ServiceAuthorizationExceptionCode, the service was performed without
1067
+ # obtaining the authorization.
1068
+ # @param admission_date [Commons::DATE] 837p Loop2300 DTP*435, CMS-1500 Box 18
1069
+ # Required on all ambulance claims when the patient was known to be admitted to the hospital.
1070
+ # OR
1071
+ # Required on all claims involving inpatient medical visits.
1072
+ # @param discharge_date [Commons::DATE] 837p Loop2300 DTP*096, CMS-1500 Box 18
1073
+ # Required for inpatient claims when the patient was discharged from the facility and the discharge date is known.
1074
+ # @param onset_of_current_illness_or_symptom_date [Commons::DATE] 837p Loop2300 DTP*431, CMS-1500 Box 14
1075
+ # Required for the initial medical service or visit performed in response to a medical emergency when the date is available and is different than the date of service.
1076
+ # OR
1077
+ # This date is the onset of acute symptoms for the current illness or condition.
1078
+ # @param last_menstrual_period_date [Commons::DATE] 837p Loop2300 DTP*484, CMS-1500 Box 14
1079
+ # Required when, in the judgment of the provider, the services on this claim are related to the patient's pregnancy.
1080
+ # @param delay_reason_code [Commons::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
1081
+ # Code indicating the reason why a request was delayed
1082
+ # @param request_options [RequestOptions]
1083
+ # @return [Encounters::V4::Encounter]
1084
+ def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
1085
+ diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, request_options: nil)
2386
1086
  Async do
2387
- response = @request_client.conn.patch do |req|
1087
+ response = @request_client.conn.patch("/api/encounters/v4/#{encounter_id}") do |req|
2388
1088
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
2389
1089
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
2390
- req.headers = {
2391
- **(req.headers || {}),
2392
- **@request_client.get_headers,
2393
- **(request_options&.additional_headers || {})
2394
- }.compact
1090
+ req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
2395
1091
  req.body = {
2396
1092
  **(request_options&.additional_body_parameters || {}),
2397
- benefits_assigned_to_provider: benefits_assigned_to_provider,
2398
1093
  prior_authorization_number: prior_authorization_number,
2399
1094
  external_id: external_id,
2400
1095
  date_of_service: date_of_service,
1096
+ diagnosis_ids: diagnosis_ids,
2401
1097
  tag_ids: tag_ids,
1098
+ clinical_notes: clinical_notes,
1099
+ pay_to_address: pay_to_address,
2402
1100
  billable_status: billable_status,
2403
1101
  responsible_party: responsible_party,
2404
1102
  provider_accepts_assignment: provider_accepts_assignment,
1103
+ benefits_assigned_to_provider: benefits_assigned_to_provider,
2405
1104
  synchronicity: synchronicity,
2406
1105
  place_of_service_code: place_of_service_code,
2407
1106
  appointment_type: appointment_type,
2408
1107
  end_date_of_service: end_date_of_service,
1108
+ subscriber_primary: subscriber_primary,
1109
+ subscriber_secondary: subscriber_secondary,
2409
1110
  additional_information: additional_information,
2410
1111
  service_authorization_exception_code: service_authorization_exception_code,
2411
1112
  admission_date: admission_date,
2412
1113
  discharge_date: discharge_date,
2413
1114
  onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
2414
1115
  last_menstrual_period_date: last_menstrual_period_date,
2415
- delay_reason_code: delay_reason_code,
2416
- patient_authorized_release: patient_authorized_release,
2417
- vitals: vitals,
2418
- referral_number: referral_number,
2419
- secondary_payer_carrier_code: secondary_payer_carrier_code,
2420
- additional_properties: additional_properties,
2421
- _field_set: _field_set,
2422
- epsdt_referral: epsdt_referral,
2423
- clinical_notes: clinical_notes,
2424
- claim_supplemental_information: claim_supplemental_information,
2425
- schema_instances: schema_instances,
2426
- existing_medications: existing_medications,
2427
- guarantor: guarantor,
2428
- subscriber_primary: subscriber_primary,
2429
- subscriber_secondary: subscriber_secondary,
2430
- subscriber_tertiary: subscriber_tertiary,
2431
- pay_to_address: pay_to_address,
2432
- diagnosis_ids: diagnosis_ids,
2433
- initial_referring_provider: initial_referring_provider,
2434
- referring_provider: referring_provider,
2435
- patient: patient,
2436
- rendering_provider: rendering_provider,
2437
- service_facility: service_facility,
2438
- supervising_provider: supervising_provider,
2439
- billing_provider: billing_provider,
2440
- place_of_service_code_as_submitted: place_of_service_code_as_submitted
1116
+ delay_reason_code: delay_reason_code
2441
1117
  }.compact
2442
- req.url "#{@request_client.get_url(environment: CandidApi,
2443
- request_options: request_options)}/api/encounters/v4/#{encounter_id}"
2444
1118
  end
2445
- CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
1119
+ Encounters::V4::Encounter.from_json(json_object: response.body)
2446
1120
  end
2447
1121
  end
2448
1122
  end