candidhealth 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (647) hide show
  1. checksums.yaml +7 -0
  2. data/lib/candidhealth/auth/client.rb +30 -0
  3. data/lib/candidhealth/auth/default/client.rb +169 -0
  4. data/lib/candidhealth/auth/default/types/auth_get_token_response.rb +77 -0
  5. data/lib/candidhealth/auth/default/types/invalid_content_type_error_type.rb +60 -0
  6. data/lib/candidhealth/auth/default/types/too_many_requests_error_type.rb +60 -0
  7. data/lib/candidhealth/billing_notes/client.rb +30 -0
  8. data/lib/candidhealth/billing_notes/v_2/client.rb +188 -0
  9. data/lib/candidhealth/billing_notes/v_2/types/billing_note.rb +112 -0
  10. data/lib/candidhealth/billing_notes/v_2/types/billing_note_base.rb +60 -0
  11. data/lib/candidhealth/billing_notes/v_2/types/billing_note_base_optional.rb +62 -0
  12. data/lib/candidhealth/charge_capture/client.rb +30 -0
  13. data/lib/candidhealth/charge_capture/v_1/client.rb +1601 -0
  14. data/lib/candidhealth/charge_capture/v_1/types/charge_capture.rb +175 -0
  15. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +780 -0
  16. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb +138 -0
  17. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_page.rb +96 -0
  18. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb +80 -0
  19. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_sort_field.rb +14 -0
  20. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_status.rb +17 -0
  21. data/lib/candidhealth/charge_capture/v_1/types/charge_external_id_conflict_error_message.rb +62 -0
  22. data/lib/candidhealth/charge_capture_bundles/client.rb +30 -0
  23. data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +356 -0
  24. data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation.rb +132 -0
  25. data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_page.rb +88 -0
  26. data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_sort_field.rb +13 -0
  27. data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_status.rb +18 -0
  28. data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_summary.rb +100 -0
  29. data/lib/candidhealth/claim_submission/v_1/types/claim_frequency_type_code.rb +15 -0
  30. data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create.rb +100 -0
  31. data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional.rb +100 -0
  32. data/lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create.rb +97 -0
  33. data/lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create_optional.rb +101 -0
  34. data/lib/candidhealth/claims/types/claim.rb +132 -0
  35. data/lib/candidhealth/claims/types/claim_status.rb +25 -0
  36. data/lib/candidhealth/clinical_trials/v_1/types/clinical_trial.rb +109 -0
  37. data/lib/candidhealth/clinical_trials/v_1/types/clinical_trial_phase.rb +15 -0
  38. data/lib/candidhealth/clinical_trials/v_1/types/mutable_clinical_trial.rb +84 -0
  39. data/lib/candidhealth/commons/types/billing_provider_commercial_license_type.rb +20 -0
  40. data/lib/candidhealth/commons/types/claim_adjustment_group_codes.rb +20 -0
  41. data/lib/candidhealth/commons/types/claim_submission_payer_responsibility_type.rb +12 -0
  42. data/lib/candidhealth/commons/types/date_range_optional_end.rb +70 -0
  43. data/lib/candidhealth/commons/types/delay_reason_code.rb +25 -0
  44. data/lib/candidhealth/commons/types/emr_payer_crosswalk.rb +12 -0
  45. data/lib/candidhealth/commons/types/entity_conflict_error_message.rb +58 -0
  46. data/lib/candidhealth/commons/types/entity_not_found_error_message.rb +58 -0
  47. data/lib/candidhealth/commons/types/epsdt_referral_condition_indicator_code.rb +14 -0
  48. data/lib/candidhealth/commons/types/facility_type_code.rb +64 -0
  49. data/lib/candidhealth/commons/types/http_service_unavailable_error_message.rb +60 -0
  50. data/lib/candidhealth/commons/types/insurance_type_code.rb +82 -0
  51. data/lib/candidhealth/commons/types/intended_submission_medium.rb +15 -0
  52. data/lib/candidhealth/commons/types/network_type.rb +31 -0
  53. data/lib/candidhealth/commons/types/next_responsible_party.rb +16 -0
  54. data/lib/candidhealth/commons/types/organization_not_authorized_error_message.rb +59 -0
  55. data/lib/candidhealth/commons/types/patient_relationship_to_insured_code_all.rb +34 -0
  56. data/lib/candidhealth/commons/types/phone_number.rb +69 -0
  57. data/lib/candidhealth/commons/types/phone_number_optional.rb +71 -0
  58. data/lib/candidhealth/commons/types/phone_number_type.rb +13 -0
  59. data/lib/candidhealth/commons/types/primitive.rb +17 -0
  60. data/lib/candidhealth/commons/types/procedure_modifier.rb +409 -0
  61. data/lib/candidhealth/commons/types/qualifier_code.rb +14 -0
  62. data/lib/candidhealth/commons/types/region_national.rb +51 -0
  63. data/lib/candidhealth/commons/types/region_states.rb +59 -0
  64. data/lib/candidhealth/commons/types/regions.rb +98 -0
  65. data/lib/candidhealth/commons/types/removable_date_range_optional_end.rb +96 -0
  66. data/lib/candidhealth/commons/types/request_validation_error.rb +70 -0
  67. data/lib/candidhealth/commons/types/resource_page.rb +70 -0
  68. data/lib/candidhealth/commons/types/service_line_units.rb +12 -0
  69. data/lib/candidhealth/commons/types/sort_direction.rb +12 -0
  70. data/lib/candidhealth/commons/types/source_of_payment_code.rb +34 -0
  71. data/lib/candidhealth/commons/types/state.rb +72 -0
  72. data/lib/candidhealth/commons/types/street_address_base.rb +98 -0
  73. data/lib/candidhealth/commons/types/street_address_long_zip.rb +107 -0
  74. data/lib/candidhealth/commons/types/street_address_long_zip_optional.rb +107 -0
  75. data/lib/candidhealth/commons/types/street_address_optional_base.rb +99 -0
  76. data/lib/candidhealth/commons/types/street_address_short_zip.rb +107 -0
  77. data/lib/candidhealth/commons/types/street_address_short_zip_optional.rb +107 -0
  78. data/lib/candidhealth/commons/types/unauthorized_error_message.rb +60 -0
  79. data/lib/candidhealth/commons/types/unprocessable_entity_error_message.rb +60 -0
  80. data/lib/candidhealth/commons/types/updates_disabled_due_to_external_system_integration_error_message.rb +62 -0
  81. data/lib/candidhealth/contracts/client.rb +30 -0
  82. data/lib/candidhealth/contracts/v_2/client.rb +444 -0
  83. data/lib/candidhealth/contracts/v_2/types/authorized_signatory.rb +108 -0
  84. data/lib/candidhealth/contracts/v_2/types/authorized_signatory_update.rb +98 -0
  85. data/lib/candidhealth/contracts/v_2/types/contract.rb +202 -0
  86. data/lib/candidhealth/contracts/v_2/types/contract_base.rb +156 -0
  87. data/lib/candidhealth/contracts/v_2/types/contract_invalid_expiration_date_error.rb +60 -0
  88. data/lib/candidhealth/contracts/v_2/types/contract_is_linked_to_fee_schedule_error.rb +60 -0
  89. data/lib/candidhealth/contracts/v_2/types/contract_sort_field.rb +18 -0
  90. data/lib/candidhealth/contracts/v_2/types/contract_status.rb +15 -0
  91. data/lib/candidhealth/contracts/v_2/types/contract_with_providers.rb +216 -0
  92. data/lib/candidhealth/contracts/v_2/types/contracts_page.rb +88 -0
  93. data/lib/candidhealth/contracts/v_2/types/date_update.rb +97 -0
  94. data/lib/candidhealth/contracts/v_2/types/insurance_types.rb +109 -0
  95. data/lib/candidhealth/contracts/v_2/types/regions_update.rb +98 -0
  96. data/lib/candidhealth/credentialing/client.rb +30 -0
  97. data/lib/candidhealth/credentialing/v_2/client.rb +384 -0
  98. data/lib/candidhealth/credentialing/v_2/types/credentialing_span_status.rb +17 -0
  99. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +196 -0
  100. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span_page.rb +88 -0
  101. data/lib/candidhealth/custom_schemas/client.rb +30 -0
  102. data/lib/candidhealth/custom_schemas/v_1/client.rb +291 -0
  103. data/lib/candidhealth/custom_schemas/v_1/types/key_with_name_already_exists_error.rb +71 -0
  104. data/lib/candidhealth/custom_schemas/v_1/types/schema.rb +91 -0
  105. data/lib/candidhealth/custom_schemas/v_1/types/schema_field.rb +71 -0
  106. data/lib/candidhealth/custom_schemas/v_1/types/schema_get_multi_response.rb +65 -0
  107. data/lib/candidhealth/custom_schemas/v_1/types/schema_instance.rb +76 -0
  108. data/lib/candidhealth/custom_schemas/v_1/types/schema_instance_optional.rb +78 -0
  109. data/lib/candidhealth/custom_schemas/v_1/types/schema_validation_error.rb +100 -0
  110. data/lib/candidhealth/custom_schemas/v_1/types/schema_validation_failure.rb +65 -0
  111. data/lib/candidhealth/custom_schemas/v_1/types/schema_with_name_already_exists_error.rb +70 -0
  112. data/lib/candidhealth/diagnoses/client.rb +243 -0
  113. data/lib/candidhealth/diagnoses/types/diagnosis.rb +160 -0
  114. data/lib/candidhealth/diagnoses/types/diagnosis_create.rb +125 -0
  115. data/lib/candidhealth/diagnoses/types/diagnosis_create_optional.rb +126 -0
  116. data/lib/candidhealth/diagnoses/types/diagnosis_not_found_error.rb +70 -0
  117. data/lib/candidhealth/diagnoses/types/diagnosis_type_code.rb +20 -0
  118. data/lib/candidhealth/diagnoses/types/standalone_diagnosis_create.rb +134 -0
  119. data/lib/candidhealth/eligibility/client.rb +30 -0
  120. data/lib/candidhealth/eligibility/v_2/client.rb +338 -0
  121. data/lib/candidhealth/encounter_attachments/client.rb +30 -0
  122. data/lib/candidhealth/encounter_attachments/v_1/client.rb +193 -0
  123. data/lib/candidhealth/encounter_attachments/v_1/types/base_attachment.rb +98 -0
  124. data/lib/candidhealth/encounter_attachments/v_1/types/encounter_attachment.rb +115 -0
  125. data/lib/candidhealth/encounter_attachments/v_1/types/encounter_attachment_type.rb +15 -0
  126. data/lib/candidhealth/encounter_providers/client.rb +30 -0
  127. data/lib/candidhealth/encounter_providers/v_2/client.rb +789 -0
  128. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider.rb +157 -0
  129. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb +157 -0
  130. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +160 -0
  131. data/lib/candidhealth/encounter_providers/v_2/types/encounter_provider.rb +159 -0
  132. data/lib/candidhealth/encounter_providers/v_2/types/encounter_provider_base.rb +89 -0
  133. data/lib/candidhealth/encounter_providers/v_2/types/initial_referring_provider.rb +132 -0
  134. data/lib/candidhealth/encounter_providers/v_2/types/initial_referring_provider_update.rb +132 -0
  135. data/lib/candidhealth/encounter_providers/v_2/types/initial_referring_provider_update_with_optional_address.rb +134 -0
  136. data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider.rb +123 -0
  137. data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider_optional.rb +123 -0
  138. data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider_update.rb +123 -0
  139. data/lib/candidhealth/encounter_providers/v_2/types/referring_provider.rb +123 -0
  140. data/lib/candidhealth/encounter_providers/v_2/types/referring_provider_update.rb +123 -0
  141. data/lib/candidhealth/encounter_providers/v_2/types/referring_provider_update_with_optional_address.rb +125 -0
  142. data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider.rb +123 -0
  143. data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider_update.rb +123 -0
  144. data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider_update_with_optional_address.rb +125 -0
  145. data/lib/candidhealth/encounter_providers/v_2/types/supervising_provider.rb +123 -0
  146. data/lib/candidhealth/encounter_providers/v_2/types/supervising_provider_update.rb +123 -0
  147. data/lib/candidhealth/encounter_providers/v_2/types/supervising_provider_update_with_optional_address.rb +125 -0
  148. data/lib/candidhealth/encounters/client.rb +30 -0
  149. data/lib/candidhealth/encounters/v_4/client.rb +2451 -0
  150. data/lib/candidhealth/encounters/v_4/types/billable_status_type.rb +14 -0
  151. data/lib/candidhealth/encounters/v_4/types/cash_pay_payer_error_message.rb +60 -0
  152. data/lib/candidhealth/encounters/v_4/types/claim_supplemental_information.rb +86 -0
  153. data/lib/candidhealth/encounters/v_4/types/claim_supplemental_information_optional.rb +86 -0
  154. data/lib/candidhealth/encounters/v_4/types/clinical_note.rb +93 -0
  155. data/lib/candidhealth/encounters/v_4/types/clinical_note_category.rb +89 -0
  156. data/lib/candidhealth/encounters/v_4/types/clinical_note_category_create.rb +76 -0
  157. data/lib/candidhealth/encounters/v_4/types/clinical_note_category_create_optional.rb +78 -0
  158. data/lib/candidhealth/encounters/v_4/types/clinical_note_optional.rb +93 -0
  159. data/lib/candidhealth/encounters/v_4/types/coding_attribution_type.rb +16 -0
  160. data/lib/candidhealth/encounters/v_4/types/encounter.rb +892 -0
  161. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +360 -0
  162. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +629 -0
  163. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +780 -0
  164. data/lib/candidhealth/encounters/v_4/types/encounter_external_id_uniqueness_error_type.rb +63 -0
  165. data/lib/candidhealth/encounters/v_4/types/encounter_guarantor_missing_contact_info_error_type.rb +62 -0
  166. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +380 -0
  167. data/lib/candidhealth/encounters/v_4/types/encounter_owner_of_next_action_type.rb +16 -0
  168. data/lib/candidhealth/encounters/v_4/types/encounter_page.rb +88 -0
  169. data/lib/candidhealth/encounters/v_4/types/encounter_patient_control_number_uniqueness_error_type.rb +62 -0
  170. data/lib/candidhealth/encounters/v_4/types/encounter_sort_options.rb +16 -0
  171. data/lib/candidhealth/encounters/v_4/types/encounter_submission_origin_type.rb +14 -0
  172. data/lib/candidhealth/encounters/v_4/types/epsdt_referral.rb +85 -0
  173. data/lib/candidhealth/encounters/v_4/types/epsdt_referral_optional.rb +85 -0
  174. data/lib/candidhealth/encounters/v_4/types/intake_follow_up.rb +79 -0
  175. data/lib/candidhealth/encounters/v_4/types/intake_question.rb +84 -0
  176. data/lib/candidhealth/encounters/v_4/types/intake_question_optional.rb +84 -0
  177. data/lib/candidhealth/encounters/v_4/types/intake_response_and_follow_ups.rb +77 -0
  178. data/lib/candidhealth/encounters/v_4/types/intervention.rb +113 -0
  179. data/lib/candidhealth/encounters/v_4/types/intervention_category.rb +16 -0
  180. data/lib/candidhealth/encounters/v_4/types/intervention_optional.rb +114 -0
  181. data/lib/candidhealth/encounters/v_4/types/invalid_tag_names_error_type.rb +60 -0
  182. data/lib/candidhealth/encounters/v_4/types/key_does_not_exist_error.rb +70 -0
  183. data/lib/candidhealth/encounters/v_4/types/lab.rb +80 -0
  184. data/lib/candidhealth/encounters/v_4/types/lab_code_type.rb +14 -0
  185. data/lib/candidhealth/encounters/v_4/types/lab_optional.rb +80 -0
  186. data/lib/candidhealth/encounters/v_4/types/medication.rb +108 -0
  187. data/lib/candidhealth/encounters/v_4/types/medication_optional.rb +108 -0
  188. data/lib/candidhealth/encounters/v_4/types/multiple_instances_for_schema_error.rb +60 -0
  189. data/lib/candidhealth/encounters/v_4/types/note_category.rb +26 -0
  190. data/lib/candidhealth/encounters/v_4/types/patient_history_category.rb +76 -0
  191. data/lib/candidhealth/encounters/v_4/types/patient_history_category_enum.rb +16 -0
  192. data/lib/candidhealth/encounters/v_4/types/patient_history_category_optional.rb +78 -0
  193. data/lib/candidhealth/encounters/v_4/types/payer_plan_group_payer_does_not_match_insurance_card_error.rb +77 -0
  194. data/lib/candidhealth/encounters/v_4/types/report_transmission_code.rb +14 -0
  195. data/lib/candidhealth/encounters/v_4/types/report_type_code.rb +73 -0
  196. data/lib/candidhealth/encounters/v_4/types/responsible_party_type.rb +15 -0
  197. data/lib/candidhealth/encounters/v_4/types/schema_does_not_exist_error.rb +60 -0
  198. data/lib/candidhealth/encounters/v_4/types/schema_instance_validation_error.rb +139 -0
  199. data/lib/candidhealth/encounters/v_4/types/schema_instance_validation_failure.rb +65 -0
  200. data/lib/candidhealth/encounters/v_4/types/schema_unauthorized_access_error.rb +60 -0
  201. data/lib/candidhealth/encounters/v_4/types/service_authorization_exception_code.rb +23 -0
  202. data/lib/candidhealth/encounters/v_4/types/synchronicity_type.rb +14 -0
  203. data/lib/candidhealth/encounters/v_4/types/value_does_not_match_key_type_error.rb +90 -0
  204. data/lib/candidhealth/encounters/v_4/types/vitals.rb +116 -0
  205. data/lib/candidhealth/encounters/v_4/types/vitals_update.rb +116 -0
  206. data/lib/candidhealth/era/types/era.rb +75 -0
  207. data/lib/candidhealth/era/types/era_base.rb +68 -0
  208. data/lib/candidhealth/era/types/era_not_fully_processed_error_message.rb +68 -0
  209. data/lib/candidhealth/era_commons/types/claim_status_code_create.rb +20 -0
  210. data/lib/candidhealth/expected_network_status/client.rb +37 -0
  211. data/lib/candidhealth/expected_network_status/v_1/client.rb +153 -0
  212. data/lib/candidhealth/expected_network_status/v_1/types/expected_network_status.rb +15 -0
  213. data/lib/candidhealth/expected_network_status/v_1/types/expected_network_status_response.rb +86 -0
  214. data/lib/candidhealth/expected_network_status/v_2/client.rb +222 -0
  215. data/lib/candidhealth/expected_network_status/v_2/types/compute_all_in_network_providers_request.rb +152 -0
  216. data/lib/candidhealth/expected_network_status/v_2/types/compute_all_in_network_providers_response.rb +80 -0
  217. data/lib/candidhealth/expected_network_status/v_2/types/compute_all_in_network_rendering_providers_result.rb +114 -0
  218. data/lib/candidhealth/expected_network_status/v_2/types/empty_object.rb +53 -0
  219. data/lib/candidhealth/expected_network_status/v_2/types/expected_network_status_check_error_message.rb +61 -0
  220. data/lib/candidhealth/expected_network_status/v_2/types/expected_network_status_request_v_2.rb +152 -0
  221. data/lib/candidhealth/expected_network_status/v_2/types/expected_network_status_response_v_2.rb +77 -0
  222. data/lib/candidhealth/expected_network_status/v_2/types/expected_network_status_subscriber_information.rb +86 -0
  223. data/lib/candidhealth/expected_network_status/v_2/types/expected_network_status_v_2.rb +113 -0
  224. data/lib/candidhealth/expected_network_status/v_2/types/explanation.rb +20 -0
  225. data/lib/candidhealth/expected_network_status/v_2/types/in_network_rendering_providers_detail.rb +82 -0
  226. data/lib/candidhealth/expected_network_status/v_2/types/in_network_status.rb +73 -0
  227. data/lib/candidhealth/expected_network_status/v_2/types/indeterminate_network_status.rb +93 -0
  228. data/lib/candidhealth/expected_network_status/v_2/types/insurance_type.rb +78 -0
  229. data/lib/candidhealth/expected_network_status/v_2/types/insurance_type_codes.rb +112 -0
  230. data/lib/candidhealth/expected_network_status/v_2/types/line_of_business.rb +15 -0
  231. data/lib/candidhealth/expected_network_status/v_2/types/out_of_network_status.rb +82 -0
  232. data/lib/candidhealth/expected_network_status/v_2/types/service_type.rb +53 -0
  233. data/lib/candidhealth/exports/client.rb +30 -0
  234. data/lib/candidhealth/exports/v_3/client.rb +152 -0
  235. data/lib/candidhealth/exports/v_3/types/get_exports_response.rb +96 -0
  236. data/lib/candidhealth/external_payment_account_config/client.rb +30 -0
  237. data/lib/candidhealth/external_payment_account_config/v_1/client.rb +89 -0
  238. data/lib/candidhealth/external_payment_account_config/v_1/types/external_payment_account_config.rb +70 -0
  239. data/lib/candidhealth/external_payment_account_config/v_1/types/external_payment_account_config_page.rb +88 -0
  240. data/lib/candidhealth/fee_schedules/client.rb +30 -0
  241. data/lib/candidhealth/fee_schedules/v_3/client.rb +703 -0
  242. data/lib/candidhealth/fee_schedules/v_3/types/dimension_match.rb +200 -0
  243. data/lib/candidhealth/fee_schedules/v_3/types/dimension_name.rb +16 -0
  244. data/lib/candidhealth/fee_schedules/v_3/types/dimensions.rb +179 -0
  245. data/lib/candidhealth/fee_schedules/v_3/types/dimensions_page.rb +88 -0
  246. data/lib/candidhealth/fee_schedules/v_3/types/match_cpt_code.rb +78 -0
  247. data/lib/candidhealth/fee_schedules/v_3/types/match_date.rb +82 -0
  248. data/lib/candidhealth/fee_schedules/v_3/types/match_facility_type_code.rb +81 -0
  249. data/lib/candidhealth/fee_schedules/v_3/types/match_geo.rb +93 -0
  250. data/lib/candidhealth/fee_schedules/v_3/types/match_license_type.rb +81 -0
  251. data/lib/candidhealth/fee_schedules/v_3/types/match_modifiers.rb +85 -0
  252. data/lib/candidhealth/fee_schedules/v_3/types/match_network_types.rb +85 -0
  253. data/lib/candidhealth/fee_schedules/v_3/types/match_payer.rb +78 -0
  254. data/lib/candidhealth/fee_schedules/v_3/types/match_payer_plan_groups.rb +85 -0
  255. data/lib/candidhealth/fee_schedules/v_3/types/match_provider.rb +80 -0
  256. data/lib/candidhealth/fee_schedules/v_3/types/match_result.rb +77 -0
  257. data/lib/candidhealth/fee_schedules/v_3/types/match_test_result.rb +83 -0
  258. data/lib/candidhealth/fee_schedules/v_3/types/new_rate.rb +81 -0
  259. data/lib/candidhealth/fee_schedules/v_3/types/new_rate_version.rb +88 -0
  260. data/lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb +180 -0
  261. data/lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb +90 -0
  262. data/lib/candidhealth/fee_schedules/v_3/types/payer_plan_group_does_not_match_rate_payer_error.rb +75 -0
  263. data/lib/candidhealth/fee_schedules/v_3/types/payer_threshold.rb +93 -0
  264. data/lib/candidhealth/fee_schedules/v_3/types/payer_thresholds_page.rb +87 -0
  265. data/lib/candidhealth/fee_schedules/v_3/types/rate.rb +121 -0
  266. data/lib/candidhealth/fee_schedules/v_3/types/rate_entry.rb +96 -0
  267. data/lib/candidhealth/fee_schedules/v_3/types/rate_upload.rb +100 -0
  268. data/lib/candidhealth/fee_schedules/v_3/types/rate_upload_with_possible_errors.rb +100 -0
  269. data/lib/candidhealth/fee_schedules/v_3/types/rates_page.rb +88 -0
  270. data/lib/candidhealth/fee_schedules/v_3/types/threshold_match.rb +97 -0
  271. data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +160 -0
  272. data/lib/candidhealth/financials/types/account_type.rb +13 -0
  273. data/lib/candidhealth/financials/types/allocation.rb +75 -0
  274. data/lib/candidhealth/financials/types/allocation_create.rb +78 -0
  275. data/lib/candidhealth/financials/types/allocation_target.rb +138 -0
  276. data/lib/candidhealth/financials/types/allocation_target_create.rb +147 -0
  277. data/lib/candidhealth/financials/types/appointment_allocation_target.rb +68 -0
  278. data/lib/candidhealth/financials/types/appointment_by_id_and_patient_external_id.rb +68 -0
  279. data/lib/candidhealth/financials/types/billing_provider_allocation_target.rb +58 -0
  280. data/lib/candidhealth/financials/types/claim_allocation_target.rb +68 -0
  281. data/lib/candidhealth/financials/types/invoice_update.rb +95 -0
  282. data/lib/candidhealth/financials/types/note_update.rb +95 -0
  283. data/lib/candidhealth/financials/types/patient_transaction_source.rb +17 -0
  284. data/lib/candidhealth/financials/types/refund_reason.rb +11 -0
  285. data/lib/candidhealth/financials/types/refund_reason_update.rb +96 -0
  286. data/lib/candidhealth/financials/types/service_line_allocation_target.rb +75 -0
  287. data/lib/candidhealth/guarantor/client.rb +30 -0
  288. data/lib/candidhealth/guarantor/v_1/client.rb +247 -0
  289. data/lib/candidhealth/guarantor/v_1/types/encounter_has_existing_guarantor_error_type.rb +61 -0
  290. data/lib/candidhealth/guarantor/v_1/types/guarantor.rb +152 -0
  291. data/lib/candidhealth/guarantor/v_1/types/guarantor_base.rb +108 -0
  292. data/lib/candidhealth/guarantor/v_1/types/guarantor_create.rb +144 -0
  293. data/lib/candidhealth/guarantor/v_1/types/guarantor_optional.rb +144 -0
  294. data/lib/candidhealth/guarantor/v_1/types/guarantor_update.rb +144 -0
  295. data/lib/candidhealth/identifiers/types/identifier.rb +103 -0
  296. data/lib/candidhealth/identifiers/types/identifier_base.rb +95 -0
  297. data/lib/candidhealth/identifiers/types/identifier_code.rb +12 -0
  298. data/lib/candidhealth/identifiers/types/identifier_create.rb +95 -0
  299. data/lib/candidhealth/identifiers/types/identifier_update.rb +104 -0
  300. data/lib/candidhealth/identifiers/types/identifier_value.rb +98 -0
  301. data/lib/candidhealth/identifiers/types/medicaid_provider_identifier.rb +69 -0
  302. data/lib/candidhealth/identifiers/types/medicare_provider_identifier.rb +69 -0
  303. data/lib/candidhealth/identifiers/types/updatable_identifier.rb +110 -0
  304. data/lib/candidhealth/import_invoice/client.rb +30 -0
  305. data/lib/candidhealth/import_invoice/v_1/client.rb +320 -0
  306. data/lib/candidhealth/import_invoice/v_1/types/create_import_invoice_request.rb +143 -0
  307. data/lib/candidhealth/import_invoice/v_1/types/import_invoice.rb +165 -0
  308. data/lib/candidhealth/import_invoice/v_1/types/import_invoice_update_request.rb +109 -0
  309. data/lib/candidhealth/import_invoice/v_1/types/import_invoices_page.rb +88 -0
  310. data/lib/candidhealth/import_invoice/v_1/types/invoice_item_info_update.rb +80 -0
  311. data/lib/candidhealth/import_invoice/v_1/types/invoice_item_update_type.rb +14 -0
  312. data/lib/candidhealth/individual/types/gender.rb +15 -0
  313. data/lib/candidhealth/individual/types/individual_base.rb +76 -0
  314. data/lib/candidhealth/individual/types/individual_base_optional.rb +78 -0
  315. data/lib/candidhealth/individual/types/patient.rb +187 -0
  316. data/lib/candidhealth/individual/types/patient_base.rb +117 -0
  317. data/lib/candidhealth/individual/types/patient_clinical_trial_info.rb +80 -0
  318. data/lib/candidhealth/individual/types/patient_clinical_trial_info_create.rb +73 -0
  319. data/lib/candidhealth/individual/types/patient_create.rb +175 -0
  320. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info.rb +92 -0
  321. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create.rb +86 -0
  322. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create_optional.rb +89 -0
  323. data/lib/candidhealth/individual/types/patient_update.rb +179 -0
  324. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +179 -0
  325. data/lib/candidhealth/individual/types/subscriber.rb +138 -0
  326. data/lib/candidhealth/individual/types/subscriber_base.rb +116 -0
  327. data/lib/candidhealth/individual/types/subscriber_base_optional.rb +118 -0
  328. data/lib/candidhealth/individual/types/subscriber_create.rb +130 -0
  329. data/lib/candidhealth/individual/types/subscriber_create_optional.rb +132 -0
  330. data/lib/candidhealth/insurance_adjudications/client.rb +30 -0
  331. data/lib/candidhealth/insurance_adjudications/v_1/client.rb +206 -0
  332. data/lib/candidhealth/insurance_adjudications/v_1/types/claim_adjudication.rb +126 -0
  333. data/lib/candidhealth/insurance_adjudications/v_1/types/claim_adjudication_create.rb +119 -0
  334. data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication.rb +123 -0
  335. data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_create.rb +151 -0
  336. data/lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication.rb +142 -0
  337. data/lib/candidhealth/insurance_adjudications/v_1/types/service_line_adjudication_create.rb +134 -0
  338. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card.rb +166 -0
  339. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb +102 -0
  340. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb +167 -0
  341. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create_optional.rb +167 -0
  342. data/lib/candidhealth/insurance_payments/client.rb +30 -0
  343. data/lib/candidhealth/insurance_payments/v_1/client.rb +172 -0
  344. data/lib/candidhealth/insurance_payments/v_1/types/insurance_payment.rb +122 -0
  345. data/lib/candidhealth/insurance_payments/v_1/types/insurance_payment_sort_field.rb +15 -0
  346. data/lib/candidhealth/insurance_payments/v_1/types/insurance_payments_page.rb +88 -0
  347. data/lib/candidhealth/insurance_refunds/client.rb +30 -0
  348. data/lib/candidhealth/insurance_refunds/v_1/client.rb +372 -0
  349. data/lib/candidhealth/insurance_refunds/v_1/types/insurance_refund.rb +131 -0
  350. data/lib/candidhealth/insurance_refunds/v_1/types/insurance_refund_create.rb +123 -0
  351. data/lib/candidhealth/insurance_refunds/v_1/types/insurance_refund_sort_field.rb +16 -0
  352. data/lib/candidhealth/insurance_refunds/v_1/types/insurance_refunds_page.rb +88 -0
  353. data/lib/candidhealth/invoices/types/invoice.rb +169 -0
  354. data/lib/candidhealth/invoices/types/invoice_item.rb +68 -0
  355. data/lib/candidhealth/invoices/types/invoice_status.rb +16 -0
  356. data/lib/candidhealth/invoices/v_2/types/claim_invoice_item.rb +70 -0
  357. data/lib/candidhealth/invoices/v_2/types/claim_invoice_item_info.rb +85 -0
  358. data/lib/candidhealth/invoices/v_2/types/invoice.rb +173 -0
  359. data/lib/candidhealth/invoices/v_2/types/invoice_destination.rb +17 -0
  360. data/lib/candidhealth/invoices/v_2/types/invoice_destination_metadata.rb +95 -0
  361. data/lib/candidhealth/invoices/v_2/types/invoice_info.rb +85 -0
  362. data/lib/candidhealth/invoices/v_2/types/invoice_item_attribution_create.rb +110 -0
  363. data/lib/candidhealth/invoices/v_2/types/invoice_item_create.rb +77 -0
  364. data/lib/candidhealth/invoices/v_2/types/invoice_item_info.rb +78 -0
  365. data/lib/candidhealth/invoices/v_2/types/invoice_sort_field.rb +18 -0
  366. data/lib/candidhealth/invoices/v_2/types/invoice_status.rb +18 -0
  367. data/lib/candidhealth/invoices/v_2/types/service_line_invoice_item.rb +70 -0
  368. data/lib/candidhealth/invoices/v_2/types/unattributed_invoice_item.rb +60 -0
  369. data/lib/candidhealth/medication_dispense/client.rb +30 -0
  370. data/lib/candidhealth/medication_dispense/v_1/client.rb +114 -0
  371. data/lib/candidhealth/medication_dispense/v_1/types/medication_dispense_create.rb +142 -0
  372. data/lib/candidhealth/non_insurance_payer_payments/client.rb +30 -0
  373. data/lib/candidhealth/non_insurance_payer_payments/v_1/client.rb +344 -0
  374. data/lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payment.rb +138 -0
  375. data/lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payment_create.rb +124 -0
  376. data/lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payment_sort_field.rb +14 -0
  377. data/lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page.rb +88 -0
  378. data/lib/candidhealth/non_insurance_payer_refunds/client.rb +30 -0
  379. data/lib/candidhealth/non_insurance_payer_refunds/v_1/client.rb +371 -0
  380. data/lib/candidhealth/non_insurance_payer_refunds/v_1/types/non_insurance_payer_refund.rb +147 -0
  381. data/lib/candidhealth/non_insurance_payer_refunds/v_1/types/non_insurance_payer_refund_create.rb +133 -0
  382. data/lib/candidhealth/non_insurance_payer_refunds/v_1/types/non_insurance_payer_refund_sort_field.rb +14 -0
  383. data/lib/candidhealth/non_insurance_payer_refunds/v_1/types/non_insurance_payer_refunds_page.rb +88 -0
  384. data/lib/candidhealth/non_insurance_payers/client.rb +30 -0
  385. data/lib/candidhealth/non_insurance_payers/v_1/client.rb +377 -0
  386. data/lib/candidhealth/non_insurance_payers/v_1/types/create_non_insurance_payer_request.rb +111 -0
  387. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer.rb +127 -0
  388. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_address_update.rb +98 -0
  389. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_category_update.rb +97 -0
  390. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_description_update.rb +97 -0
  391. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_page.rb +88 -0
  392. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_sort_field.rb +16 -0
  393. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_update_request.rb +110 -0
  394. data/lib/candidhealth/non_insurance_payers/v_1/types/toggle_non_insurance_payer_enablement_request.rb +62 -0
  395. data/lib/candidhealth/organization_providers/client.rb +30 -0
  396. data/lib/candidhealth/organization_providers/v_2/types/address_type.rb +13 -0
  397. data/lib/candidhealth/organization_providers/v_2/types/employment_status.rb +14 -0
  398. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +111 -0
  399. data/lib/candidhealth/organization_providers/v_2/types/organization_provider.rb +210 -0
  400. data/lib/candidhealth/organization_providers/v_2/types/organization_provider_address.rb +78 -0
  401. data/lib/candidhealth/organization_providers/v_2/types/organization_provider_base.rb +177 -0
  402. data/lib/candidhealth/organization_providers/v_2/types/organization_provider_sort_options.rb +16 -0
  403. data/lib/candidhealth/organization_providers/v_2/types/provider_type.rb +14 -0
  404. data/lib/candidhealth/organization_providers/v_3/client.rb +325 -0
  405. data/lib/candidhealth/organization_providers/v_3/types/organization_provider_create_v_2.rb +194 -0
  406. data/lib/candidhealth/organization_providers/v_3/types/organization_provider_page_v_2.rb +88 -0
  407. data/lib/candidhealth/organization_providers/v_3/types/organization_provider_update_v_2.rb +191 -0
  408. data/lib/candidhealth/organization_providers/v_3/types/organization_provider_v_2.rb +202 -0
  409. data/lib/candidhealth/organization_service_facilities/client.rb +30 -0
  410. data/lib/candidhealth/organization_service_facilities/v_2/client.rb +352 -0
  411. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility.rb +172 -0
  412. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility_create.rb +164 -0
  413. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility_page.rb +88 -0
  414. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility_update.rb +164 -0
  415. data/lib/candidhealth/organization_service_facilities/v_2/types/service_facility_mode.rb +14 -0
  416. data/lib/candidhealth/organization_service_facilities/v_2/types/service_facility_operational_status.rb +18 -0
  417. data/lib/candidhealth/organization_service_facilities/v_2/types/service_facility_physical_type.rb +26 -0
  418. data/lib/candidhealth/organization_service_facilities/v_2/types/service_facility_status.rb +15 -0
  419. data/lib/candidhealth/organization_service_facilities/v_2/types/service_facility_type.rb +135 -0
  420. data/lib/candidhealth/patient_payments/client.rb +30 -0
  421. data/lib/candidhealth/patient_payments/v_3/types/patient_payment.rb +162 -0
  422. data/lib/candidhealth/patient_payments/v_3/types/patient_payment_source.rb +21 -0
  423. data/lib/candidhealth/patient_payments/v_3/types/patient_payment_status.rb +23 -0
  424. data/lib/candidhealth/patient_payments/v_4/client.rb +401 -0
  425. data/lib/candidhealth/patient_payments/v_4/types/patient_payment.rb +149 -0
  426. data/lib/candidhealth/patient_payments/v_4/types/patient_payment_sort_field.rb +16 -0
  427. data/lib/candidhealth/patient_payments/v_4/types/patient_payments_page.rb +88 -0
  428. data/lib/candidhealth/patient_refunds/client.rb +30 -0
  429. data/lib/candidhealth/patient_refunds/v_1/client.rb +413 -0
  430. data/lib/candidhealth/patient_refunds/v_1/types/patient_refund.rb +158 -0
  431. data/lib/candidhealth/patient_refunds/v_1/types/patient_refund_sort_field.rb +17 -0
  432. data/lib/candidhealth/patient_refunds/v_1/types/patient_refunds_page.rb +88 -0
  433. data/lib/candidhealth/payer_plan_groups/client.rb +30 -0
  434. data/lib/candidhealth/payer_plan_groups/v_1/client.rb +356 -0
  435. data/lib/candidhealth/payer_plan_groups/v_1/types/mutable_payer_plan_group.rb +78 -0
  436. data/lib/candidhealth/payer_plan_groups/v_1/types/payer_plan_group.rb +114 -0
  437. data/lib/candidhealth/payer_plan_groups/v_1/types/payer_plan_group_already_exists_error.rb +70 -0
  438. data/lib/candidhealth/payer_plan_groups/v_1/types/payer_plan_group_page.rb +88 -0
  439. data/lib/candidhealth/payer_plan_groups/v_1/types/payer_plan_group_sort_field.rb +15 -0
  440. data/lib/candidhealth/payers/client.rb +30 -0
  441. data/lib/candidhealth/payers/v_3/client.rb +145 -0
  442. data/lib/candidhealth/payers/v_3/types/payer.rb +131 -0
  443. data/lib/candidhealth/payers/v_3/types/payer_identifier.rb +99 -0
  444. data/lib/candidhealth/payers/v_3/types/payer_info.rb +70 -0
  445. data/lib/candidhealth/payers/v_3/types/payer_page.rb +88 -0
  446. data/lib/candidhealth/pre_encounter/appointments/client.rb +32 -0
  447. data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +580 -0
  448. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +283 -0
  449. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_status.rb +18 -0
  450. data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_work_queue.rb +18 -0
  451. data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +231 -0
  452. data/lib/candidhealth/pre_encounter/appointments/v_1/types/service.rb +82 -0
  453. data/lib/candidhealth/pre_encounter/appointments/v_1/types/universal_service_identifier.rb +18 -0
  454. data/lib/candidhealth/pre_encounter/appointments/v_1/types/visit.rb +96 -0
  455. data/lib/candidhealth/pre_encounter/appointments/v_1/types/visits_page.rb +98 -0
  456. data/lib/candidhealth/pre_encounter/client.rb +30 -0
  457. data/lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb +92 -0
  458. data/lib/candidhealth/pre_encounter/common/types/address.rb +123 -0
  459. data/lib/candidhealth/pre_encounter/common/types/address_use.rb +17 -0
  460. data/lib/candidhealth/pre_encounter/common/types/base_model.rb +104 -0
  461. data/lib/candidhealth/pre_encounter/common/types/canonical_clinical_trial_association.rb +86 -0
  462. data/lib/candidhealth/pre_encounter/common/types/canonical_non_insurance_payer_association.rb +103 -0
  463. data/lib/candidhealth/pre_encounter/common/types/contact_point.rb +87 -0
  464. data/lib/candidhealth/pre_encounter/common/types/contact_point_use.rb +17 -0
  465. data/lib/candidhealth/pre_encounter/common/types/disability_status.rb +14 -0
  466. data/lib/candidhealth/pre_encounter/common/types/error_base_4_xx.rb +72 -0
  467. data/lib/candidhealth/pre_encounter/common/types/ethnicity.rb +16 -0
  468. data/lib/candidhealth/pre_encounter/common/types/external_identifier.rb +87 -0
  469. data/lib/candidhealth/pre_encounter/common/types/external_provider.rb +146 -0
  470. data/lib/candidhealth/pre_encounter/common/types/external_provider_type.rb +15 -0
  471. data/lib/candidhealth/pre_encounter/common/types/gender.rb +21 -0
  472. data/lib/candidhealth/pre_encounter/common/types/human_name.rb +107 -0
  473. data/lib/candidhealth/pre_encounter/common/types/name_use.rb +19 -0
  474. data/lib/candidhealth/pre_encounter/common/types/period.rb +74 -0
  475. data/lib/candidhealth/pre_encounter/common/types/race.rb +21 -0
  476. data/lib/candidhealth/pre_encounter/common/types/relationship.rb +17 -0
  477. data/lib/candidhealth/pre_encounter/common/types/resource_page.rb +83 -0
  478. data/lib/candidhealth/pre_encounter/common/types/sex.rb +16 -0
  479. data/lib/candidhealth/pre_encounter/common/types/sexual_orientation.rb +19 -0
  480. data/lib/candidhealth/pre_encounter/common/types/sort_direction.rb +14 -0
  481. data/lib/candidhealth/pre_encounter/common/types/version_conflict_error_body.rb +79 -0
  482. data/lib/candidhealth/pre_encounter/coverages/client.rb +32 -0
  483. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +1206 -0
  484. data/lib/candidhealth/pre_encounter/coverages/v_1/types/address.rb +118 -0
  485. data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefit_type.rb +24 -0
  486. data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefits_related_entity.rb +108 -0
  487. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +225 -0
  488. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_benefits.rb +109 -0
  489. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_details.rb +104 -0
  490. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response.rb +87 -0
  491. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_level.rb +19 -0
  492. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_status.rb +20 -0
  493. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value.rb +94 -0
  494. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value_unit.rb +17 -0
  495. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverages_page.rb +98 -0
  496. data/lib/candidhealth/pre_encounter/coverages/v_1/types/expanded_member_info.rb +133 -0
  497. data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +165 -0
  498. data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code.rb +86 -0
  499. data/lib/candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check.rb +83 -0
  500. data/lib/candidhealth/pre_encounter/coverages/v_1/types/member_info.rb +111 -0
  501. data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +171 -0
  502. data/lib/candidhealth/pre_encounter/coverages/v_1/types/network_type.rb +38 -0
  503. data/lib/candidhealth/pre_encounter/coverages/v_1/types/payer_plan_group_fields.rb +92 -0
  504. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage.rb +113 -0
  505. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb +176 -0
  506. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_date.rb +87 -0
  507. data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_metadata.rb +167 -0
  508. data/lib/candidhealth/pre_encounter/coverages/v_1/types/related_entity_contact.rb +74 -0
  509. data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage.rb +122 -0
  510. data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage_details.rb +124 -0
  511. data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_type_code.rb +203 -0
  512. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +108 -0
  513. data/lib/candidhealth/pre_encounter/eligibility_checks/client.rb +32 -0
  514. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +264 -0
  515. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/batch_eligibility_response.rb +75 -0
  516. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check.rb +131 -0
  517. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error.rb +80 -0
  518. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_details.rb +112 -0
  519. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_source.rb +17 -0
  520. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_metadata.rb +103 -0
  521. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_page.rb +98 -0
  522. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_status.rb +18 -0
  523. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_request.rb +151 -0
  524. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_response.rb +15 -0
  525. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_status.rb +18 -0
  526. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/encounter.rb +83 -0
  527. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/individual_provider.rb +81 -0
  528. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/organization_provider.rb +74 -0
  529. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/parsed_response.rb +99 -0
  530. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/provider.rb +66 -0
  531. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/request_correction.rb +79 -0
  532. data/lib/candidhealth/pre_encounter/images/client.rb +32 -0
  533. data/lib/candidhealth/pre_encounter/images/v_1/client.rb +359 -0
  534. data/lib/candidhealth/pre_encounter/images/v_1/types/coverage_association.rb +74 -0
  535. data/lib/candidhealth/pre_encounter/images/v_1/types/coverage_image_side.rb +16 -0
  536. data/lib/candidhealth/pre_encounter/images/v_1/types/image.rb +188 -0
  537. data/lib/candidhealth/pre_encounter/images/v_1/types/image_status.rb +17 -0
  538. data/lib/candidhealth/pre_encounter/images/v_1/types/mutable_image.rb +125 -0
  539. data/lib/candidhealth/pre_encounter/images/v_1/types/patient_association.rb +75 -0
  540. data/lib/candidhealth/pre_encounter/lists/client.rb +32 -0
  541. data/lib/candidhealth/pre_encounter/lists/v_1/client.rb +187 -0
  542. data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_item.rb +114 -0
  543. data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_page.rb +98 -0
  544. data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_item.rb +104 -0
  545. data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_page.rb +98 -0
  546. data/lib/candidhealth/pre_encounter/notes/client.rb +32 -0
  547. data/lib/candidhealth/pre_encounter/notes/v_1/client.rb +257 -0
  548. data/lib/candidhealth/pre_encounter/notes/v_1/types/mutable_note.rb +86 -0
  549. data/lib/candidhealth/pre_encounter/notes/v_1/types/note.rb +149 -0
  550. data/lib/candidhealth/pre_encounter/patients/client.rb +32 -0
  551. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +1240 -0
  552. data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +170 -0
  553. data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization_unit.rb +16 -0
  554. data/lib/candidhealth/pre_encounter/patients/v_1/types/contact.rb +132 -0
  555. data/lib/candidhealth/pre_encounter/patients/v_1/types/do_not_invoice_reason.rb +18 -0
  556. data/lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb +73 -0
  557. data/lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb +63 -0
  558. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +121 -0
  559. data/lib/candidhealth/pre_encounter/patients/v_1/types/marital_status.rb +26 -0
  560. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +450 -0
  561. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +457 -0
  562. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +516 -0
  563. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient_page.rb +98 -0
  564. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral.rb +106 -0
  565. data/lib/candidhealth/pre_encounter/tags/client.rb +32 -0
  566. data/lib/candidhealth/pre_encounter/tags/v_1/client.rb +311 -0
  567. data/lib/candidhealth/pre_encounter/tags/v_1/types/mutable_tag.rb +63 -0
  568. data/lib/candidhealth/pre_encounter/tags/v_1/types/tag.rb +123 -0
  569. data/lib/candidhealth/pre_encounter/tags/v_1/types/tag_page.rb +98 -0
  570. data/lib/candidhealth/remits/v_1/types/payee.rb +77 -0
  571. data/lib/candidhealth/remits/v_1/types/payee_identifier.rb +106 -0
  572. data/lib/candidhealth/service_facility/client.rb +98 -0
  573. data/lib/candidhealth/service_facility/types/encounter_service_facility.rb +119 -0
  574. data/lib/candidhealth/service_facility/types/encounter_service_facility_base.rb +123 -0
  575. data/lib/candidhealth/service_facility/types/encounter_service_facility_update.rb +111 -0
  576. data/lib/candidhealth/service_facility/types/encounter_service_facility_update_with_optional_address.rb +113 -0
  577. data/lib/candidhealth/service_lines/client.rb +30 -0
  578. data/lib/candidhealth/service_lines/v_2/client.rb +313 -0
  579. data/lib/candidhealth/service_lines/v_2/types/denial_reason_content.rb +44 -0
  580. data/lib/candidhealth/service_lines/v_2/types/drug_identification.rb +126 -0
  581. data/lib/candidhealth/service_lines/v_2/types/drug_identification_optional.rb +126 -0
  582. data/lib/candidhealth/service_lines/v_2/types/measurement_unit_code.rb +17 -0
  583. data/lib/candidhealth/service_lines/v_2/types/service_id_qualifier.rb +19 -0
  584. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +463 -0
  585. data/lib/candidhealth/service_lines/v_2/types/service_line_adjustment.rb +102 -0
  586. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +247 -0
  587. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +247 -0
  588. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +293 -0
  589. data/lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb +66 -0
  590. data/lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb +78 -0
  591. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +285 -0
  592. data/lib/candidhealth/service_lines/v_2/types/test_result.rb +71 -0
  593. data/lib/candidhealth/service_lines/v_2/types/test_result_optional.rb +73 -0
  594. data/lib/candidhealth/service_lines/v_2/types/test_result_type.rb +15 -0
  595. data/lib/candidhealth/superbills/client.rb +30 -0
  596. data/lib/candidhealth/superbills/v_1/client.rb +123 -0
  597. data/lib/candidhealth/superbills/v_1/types/superbill.rb +108 -0
  598. data/lib/candidhealth/superbills/v_1/types/superbill_response.rb +65 -0
  599. data/lib/candidhealth/tags/types/tag.rb +83 -0
  600. data/lib/candidhealth/tags/types/tag_color_enum.rb +20 -0
  601. data/lib/candidhealth/tags/types/tag_create.rb +76 -0
  602. data/lib/candidhealth/tasks/client.rb +30 -0
  603. data/lib/candidhealth/tasks/commons/types/task_category.rb +54 -0
  604. data/lib/candidhealth/tasks/commons/types/task_status.rb +19 -0
  605. data/lib/candidhealth/tasks/commons/types/task_type.rb +24 -0
  606. data/lib/candidhealth/tasks/v_3/client.rb +343 -0
  607. data/lib/candidhealth/tasks/v_3/types/task.rb +225 -0
  608. data/lib/candidhealth/tasks/v_3/types/task_action.rb +85 -0
  609. data/lib/candidhealth/tasks/v_3/types/task_action_execution_method.rb +85 -0
  610. data/lib/candidhealth/tasks/v_3/types/task_action_type.rb +14 -0
  611. data/lib/candidhealth/tasks/v_3/types/task_actions.rb +65 -0
  612. data/lib/candidhealth/tasks/v_3/types/task_assignment.rb +75 -0
  613. data/lib/candidhealth/tasks/v_3/types/task_create_v_3.rb +118 -0
  614. data/lib/candidhealth/tasks/v_3/types/task_note.rb +100 -0
  615. data/lib/candidhealth/tasks/v_3/types/task_page.rb +88 -0
  616. data/lib/candidhealth/tasks/v_3/types/task_sort_options.rb +34 -0
  617. data/lib/candidhealth/tasks/v_3/types/task_update_v_3.rb +85 -0
  618. data/lib/candidhealth/tasks/v_3/types/task_updated_to_deprecated_status_error_type.rb +64 -0
  619. data/lib/candidhealth/write_offs/client.rb +30 -0
  620. data/lib/candidhealth/write_offs/v_1/client.rb +379 -0
  621. data/lib/candidhealth/write_offs/v_1/types/create_write_offs_response.rb +65 -0
  622. data/lib/candidhealth/write_offs/v_1/types/insurance_write_off.rb +149 -0
  623. data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_create.rb +125 -0
  624. data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_reason.rb +29 -0
  625. data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_target.rb +106 -0
  626. data/lib/candidhealth/write_offs/v_1/types/non_insurance_payer_write_off.rb +143 -0
  627. data/lib/candidhealth/write_offs/v_1/types/non_insurance_payer_write_off_create.rb +113 -0
  628. data/lib/candidhealth/write_offs/v_1/types/patient_write_off.rb +145 -0
  629. data/lib/candidhealth/write_offs/v_1/types/patient_write_off_create.rb +105 -0
  630. data/lib/candidhealth/write_offs/v_1/types/patient_write_off_reason.rb +24 -0
  631. data/lib/candidhealth/write_offs/v_1/types/write_off.rb +113 -0
  632. data/lib/candidhealth/write_offs/v_1/types/write_off_create.rb +113 -0
  633. data/lib/candidhealth/write_offs/v_1/types/write_off_sort_field.rb +15 -0
  634. data/lib/candidhealth/write_offs/v_1/types/write_offs_page.rb +88 -0
  635. data/lib/candidhealth/x_12/v_1/types/carc.rb +415 -0
  636. data/lib/candidhealth/x_12/v_1/types/claim_adjustment_reason_code.rb +79 -0
  637. data/lib/candidhealth/x_12/v_1/types/rarc.rb +1199 -0
  638. data/lib/candidhealth/x_12/v_1/types/remittance_advice_remark_code.rb +61 -0
  639. data/lib/candidhealth/yes_no_indicator/types/yes_no_indicator.rb +14 -0
  640. data/lib/candidhealth.rb +329 -0
  641. data/lib/core/file_utilities.rb +26 -0
  642. data/lib/core/oauth.rb +62 -0
  643. data/lib/environment.rb +18 -0
  644. data/lib/gemconfig.rb +14 -0
  645. data/lib/requests.rb +166 -0
  646. data/lib/types_export.rb +552 -0
  647. metadata +803 -0
@@ -0,0 +1,2451 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../requests"
4
+ require_relative "../../claims/types/claim_status"
5
+ require_relative "types/encounter_sort_options"
6
+ require "date"
7
+ require_relative "types/billable_status_type"
8
+ require_relative "types/responsible_party_type"
9
+ require_relative "types/encounter_owner_of_next_action_type"
10
+ require_relative "types/encounter_page"
11
+ require_relative "types/encounter"
12
+ require_relative "types/medication"
13
+ require_relative "types/vitals"
14
+ require_relative "types/intervention"
15
+ require_relative "../../commons/types/street_address_long_zip"
16
+ require_relative "types/synchronicity_type"
17
+ require_relative "types/service_authorization_exception_code"
18
+ require_relative "../../commons/types/delay_reason_code"
19
+ require "ostruct"
20
+ require_relative "../../individual/types/patient_create"
21
+ require_relative "../../encounter_providers/v_2/types/billing_provider"
22
+ require_relative "../../encounter_providers/v_2/types/rendering_provider"
23
+ 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
+ require_relative "../../service_facility/types/encounter_service_facility_base"
27
+ require_relative "../../individual/types/subscriber_create"
28
+ require_relative "../../diagnoses/types/diagnosis_create"
29
+ require_relative "types/clinical_note_category_create"
30
+ require_relative "../../billing_notes/v_2/types/billing_note_base"
31
+ require_relative "../../commons/types/facility_type_code"
32
+ require_relative "types/patient_history_category"
33
+ require_relative "../../service_lines/v_2/types/service_line_create"
34
+ require_relative "../../guarantor/v_1/types/guarantor_create"
35
+ 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"
49
+ require "async"
50
+
51
+ module CandidApiClient
52
+ module Encounters
53
+ module V4
54
+ class V4Client
55
+ # @return [CandidApiClient::RequestClient]
56
+ attr_reader :request_client
57
+
58
+ # @param request_client [CandidApiClient::RequestClient]
59
+ # @return [CandidApiClient::Encounters::V4::V4Client]
60
+ def initialize(request_client:)
61
+ @request_client = request_client
62
+ end
63
+
64
+ # @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.
70
+ # @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
+ # )
105
+ 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|
108
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
109
+ 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
115
+ req.params = {
116
+ **(request_options&.additional_query_parameters || {}),
117
+ "limit": limit,
118
+ "claim_status": claim_status,
119
+ "sort": sort,
120
+ "page_token": page_token,
121
+ "date_of_service_min": date_of_service_min,
122
+ "date_of_service_max": date_of_service_max,
123
+ "primary_payer_names": primary_payer_names,
124
+ "search_term": search_term,
125
+ "external_id": external_id,
126
+ "diagnoses_updated_since": diagnoses_updated_since,
127
+ "tag_ids": tag_ids,
128
+ "work_queue_id": work_queue_id,
129
+ "billable_status": billable_status,
130
+ "responsible_party": responsible_party,
131
+ "owner_of_next_action": owner_of_next_action,
132
+ "patient_external_id": patient_external_id
133
+ }.compact
134
+ req.url "#{@request_client.get_url(environment: CandidApi,
135
+ request_options: request_options)}/api/encounters/v4"
136
+ end
137
+ CandidApiClient::Encounters::V4::Types::EncounterPage.from_json(json_object: response.body)
138
+ end
139
+
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")
146
+ def get(encounter_id:, request_options: nil)
147
+ response = @request_client.conn.get do |req|
148
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
149
+ 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}"
157
+ end
158
+ CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
159
+ end
160
+
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.
180
+ # @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.
183
+ # @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.
186
+ # @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
192
+ # * :name (String)
193
+ # * :rx_cui (String)
194
+ # * :dosage (String)
195
+ # * :dosage_form (String)
196
+ # * :frequency (String)
197
+ # * :as_needed (Boolean)
198
+ # @param vitals [Hash] Request of type CandidApiClient::Encounters::V4::Types::Vitals, as a Hash
199
+ # * :height_in (Integer)
200
+ # * :weight_lbs (Integer)
201
+ # * :blood_pressure_systolic_mmhg (Integer)
202
+ # * :blood_pressure_diastolic_mmhg (Integer)
203
+ # * :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
207
+ # * :name (String)
208
+ # * :category (CandidApiClient::Encounters::V4::Types::InterventionCategory)
209
+ # * :description (String)
210
+ # * :medication (Hash)
211
+ # * :name (String)
212
+ # * :rx_cui (String)
213
+ # * :dosage (String)
214
+ # * :dosage_form (String)
215
+ # * :frequency (String)
216
+ # * :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
219
+ # * :zip_plus_four_code (String)
220
+ # * :address_1 (String)
221
+ # * :address_2 (String)
222
+ # * :city (String)
223
+ # * :state (CandidApiClient::Commons::Types::State)
224
+ # * :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.
236
+ # @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
263
+ # @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>)
268
+ # * :phone_consent (Boolean)
269
+ # * :email (String)
270
+ # * :non_insurance_payers (Array<String>)
271
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
272
+ # * :email_consent (Boolean)
273
+ # * :external_id (String)
274
+ # * :date_of_birth (Date)
275
+ # * :address (Hash)
276
+ # * :zip_plus_four_code (String)
277
+ # * :address_1 (String)
278
+ # * :address_2 (String)
279
+ # * :city (String)
280
+ # * :state (CandidApiClient::Commons::Types::State)
281
+ # * :zip_code (String)
282
+ # * :first_name (String)
283
+ # * :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
294
+ # * :address (Hash)
295
+ # * :zip_plus_four_code (String)
296
+ # * :address_1 (String)
297
+ # * :address_2 (String)
298
+ # * :city (String)
299
+ # * :state (CandidApiClient::Commons::Types::State)
300
+ # * :zip_code (String)
301
+ # * :tax_id (String)
302
+ # * :npi (String)
303
+ # * :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
+ # * :first_name (String)
323
+ # * :last_name (String)
324
+ # * :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)
330
+ # * :address (Hash)
331
+ # * :zip_plus_four_code (String)
332
+ # * :address_1 (String)
333
+ # * :address_2 (String)
334
+ # * :city (String)
335
+ # * :state (CandidApiClient::Commons::Types::State)
336
+ # * :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
+ # * :npi (String)
346
+ # * :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
+ # * :first_name (String)
356
+ # * :last_name (String)
357
+ # * :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
360
+ # * :npi (String)
361
+ # * :taxonomy_code (String)
362
+ # * :address (Hash)
363
+ # * :zip_plus_four_code (String)
364
+ # * :address_1 (String)
365
+ # * :address_2 (String)
366
+ # * :city (String)
367
+ # * :state (CandidApiClient::Commons::Types::State)
368
+ # * :zip_code (String)
369
+ # * :first_name (String)
370
+ # * :last_name (String)
371
+ # * :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
381
+ # * :organization_name (String)
382
+ # * :npi (String)
383
+ # * :address (Hash)
384
+ # * :zip_plus_four_code (String)
385
+ # * :address_1 (String)
386
+ # * :address_2 (String)
387
+ # * :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)
421
+ # * :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
426
+ # * :insurance_card (Hash)
427
+ # * :member_id (String)
428
+ # * :payer_name (String)
429
+ # * :payer_id (String)
430
+ # * :rx_bin (String)
431
+ # * :rx_pcn (String)
432
+ # * :image_url_front (String)
433
+ # * :image_url_back (String)
434
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
435
+ # * :group_number (String)
436
+ # * :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)
442
+ # * :address (Hash)
443
+ # * :zip_plus_four_code (String)
444
+ # * :address_1 (String)
445
+ # * :address_2 (String)
446
+ # * :city (String)
447
+ # * :state (CandidApiClient::Commons::Types::State)
448
+ # * :zip_code (String)
449
+ # * :first_name (String)
450
+ # * :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
453
+ # * :insurance_card (Hash)
454
+ # * :member_id (String)
455
+ # * :payer_name (String)
456
+ # * :payer_id (String)
457
+ # * :rx_bin (String)
458
+ # * :rx_pcn (String)
459
+ # * :image_url_front (String)
460
+ # * :image_url_back (String)
461
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
462
+ # * :group_number (String)
463
+ # * :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)
469
+ # * :address (Hash)
470
+ # * :zip_plus_four_code (String)
471
+ # * :address_1 (String)
472
+ # * :address_2 (String)
473
+ # * :city (String)
474
+ # * :state (CandidApiClient::Commons::Types::State)
475
+ # * :zip_code (String)
476
+ # * :first_name (String)
477
+ # * :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
486
+ # * :name (String)
487
+ # * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
488
+ # * :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>)
495
+ # @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
497
+ # * :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>)
504
+ # @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)
510
+ # * :procedure_code (String)
511
+ # * :quantity (String)
512
+ # * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
513
+ # * :charge_amount_cents (Integer)
514
+ # * :diagnosis_pointers (Array<Integer>)
515
+ # * :drug_identification (Hash)
516
+ # * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
517
+ # * :national_drug_code (String)
518
+ # * :national_drug_unit_count (String)
519
+ # * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
520
+ # * :link_sequence_number (String)
521
+ # * :pharmacy_prescription_number (String)
522
+ # * :conversion_formula (String)
523
+ # * :drug_description (String)
524
+ # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
525
+ # * :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>)
545
+ # * :phone_consent (Boolean)
546
+ # * :email (String)
547
+ # * :email_consent (Boolean)
548
+ # * :first_name (String)
549
+ # * :last_name (String)
550
+ # * :external_id (String)
551
+ # * :date_of_birth (Date)
552
+ # * :address (Hash)
553
+ # * :zip_plus_four_code (String)
554
+ # * :address_1 (String)
555
+ # * :address_2 (String)
556
+ # * :city (String)
557
+ # * :state (CandidApiClient::Commons::Types::State)
558
+ # * :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
562
+ # * :claim_created_at (DateTime)
563
+ # * :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|
599
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
600
+ 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
606
+ req.body = {
607
+ **(request_options&.additional_body_parameters || {}),
608
+ external_id: external_id,
609
+ date_of_service: date_of_service,
610
+ end_date_of_service: end_date_of_service,
611
+ patient_authorized_release: patient_authorized_release,
612
+ benefits_assigned_to_provider: benefits_assigned_to_provider,
613
+ provider_accepts_assignment: provider_accepts_assignment,
614
+ appointment_type: appointment_type,
615
+ existing_medications: existing_medications,
616
+ vitals: vitals,
617
+ interventions: interventions,
618
+ pay_to_address: pay_to_address,
619
+ synchronicity: synchronicity,
620
+ billable_status: billable_status,
621
+ additional_information: additional_information,
622
+ service_authorization_exception_code: service_authorization_exception_code,
623
+ admission_date: admission_date,
624
+ discharge_date: discharge_date,
625
+ onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
626
+ last_menstrual_period_date: last_menstrual_period_date,
627
+ delay_reason_code: delay_reason_code,
628
+ additional_properties: additional_properties,
629
+ _field_set: _field_set,
630
+ patient: patient,
631
+ billing_provider: billing_provider,
632
+ rendering_provider: rendering_provider,
633
+ referring_provider: referring_provider,
634
+ initial_referring_provider: initial_referring_provider,
635
+ supervising_provider: supervising_provider,
636
+ service_facility: service_facility,
637
+ subscriber_primary: subscriber_primary,
638
+ subscriber_secondary: subscriber_secondary,
639
+ subscriber_tertiary: subscriber_tertiary,
640
+ prior_authorization_number: prior_authorization_number,
641
+ responsible_party: responsible_party,
642
+ diagnoses: diagnoses,
643
+ clinical_notes: clinical_notes,
644
+ billing_notes: billing_notes,
645
+ place_of_service_code: place_of_service_code,
646
+ patient_histories: patient_histories,
647
+ service_lines: service_lines,
648
+ 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
656
+ }.compact
657
+ req.url "#{@request_client.get_url(environment: CandidApi,
658
+ request_options: request_options)}/api/encounters/v4"
659
+ end
660
+ CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
661
+ end
662
+
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
984
+ # * :insurance_card (Hash)
985
+ # * :member_id (String)
986
+ # * :payer_name (String)
987
+ # * :payer_id (String)
988
+ # * :rx_bin (String)
989
+ # * :rx_pcn (String)
990
+ # * :image_url_front (String)
991
+ # * :image_url_back (String)
992
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
993
+ # * :group_number (String)
994
+ # * :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)
1000
+ # * :address (Hash)
1001
+ # * :zip_plus_four_code (String)
1002
+ # * :address_1 (String)
1003
+ # * :address_2 (String)
1004
+ # * :city (String)
1005
+ # * :state (CandidApiClient::Commons::Types::State)
1006
+ # * :zip_code (String)
1007
+ # * :first_name (String)
1008
+ # * :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
1011
+ # * :insurance_card (Hash)
1012
+ # * :member_id (String)
1013
+ # * :payer_name (String)
1014
+ # * :payer_id (String)
1015
+ # * :rx_bin (String)
1016
+ # * :rx_pcn (String)
1017
+ # * :image_url_front (String)
1018
+ # * :image_url_back (String)
1019
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1020
+ # * :group_number (String)
1021
+ # * :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)
1109
+ # * :address (Hash)
1110
+ # * :zip_plus_four_code (String)
1111
+ # * :address_1 (String)
1112
+ # * :address_2 (String)
1113
+ # * :city (String)
1114
+ # * :state (CandidApiClient::Commons::Types::State)
1115
+ # * :zip_code (String)
1116
+ # * :first_name (String)
1117
+ # * :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|
1186
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1187
+ 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
1193
+ req.body = {
1194
+ **(request_options&.additional_body_parameters || {}),
1195
+ benefits_assigned_to_provider: benefits_assigned_to_provider,
1196
+ prior_authorization_number: prior_authorization_number,
1197
+ external_id: external_id,
1198
+ date_of_service: date_of_service,
1199
+ tag_ids: tag_ids,
1200
+ billable_status: billable_status,
1201
+ responsible_party: responsible_party,
1202
+ provider_accepts_assignment: provider_accepts_assignment,
1203
+ synchronicity: synchronicity,
1204
+ place_of_service_code: place_of_service_code,
1205
+ appointment_type: appointment_type,
1206
+ end_date_of_service: end_date_of_service,
1207
+ additional_information: additional_information,
1208
+ service_authorization_exception_code: service_authorization_exception_code,
1209
+ admission_date: admission_date,
1210
+ discharge_date: discharge_date,
1211
+ onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
1212
+ 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
1239
+ }.compact
1240
+ req.url "#{@request_client.get_url(environment: CandidApi,
1241
+ request_options: request_options)}/api/encounters/v4/#{encounter_id}"
1242
+ end
1243
+ CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
1244
+ end
1245
+ end
1246
+
1247
+ class AsyncV4Client
1248
+ # @return [CandidApiClient::AsyncRequestClient]
1249
+ attr_reader :request_client
1250
+
1251
+ # @param request_client [CandidApiClient::AsyncRequestClient]
1252
+ # @return [CandidApiClient::Encounters::V4::AsyncV4Client]
1253
+ def initialize(request_client:)
1254
+ @request_client = request_client
1255
+ end
1256
+
1257
+ # @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.
1263
+ # @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
+ # )
1298
+ 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)
1300
+ Async do
1301
+ response = @request_client.conn.get do |req|
1302
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1303
+ 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
1309
+ req.params = {
1310
+ **(request_options&.additional_query_parameters || {}),
1311
+ "limit": limit,
1312
+ "claim_status": claim_status,
1313
+ "sort": sort,
1314
+ "page_token": page_token,
1315
+ "date_of_service_min": date_of_service_min,
1316
+ "date_of_service_max": date_of_service_max,
1317
+ "primary_payer_names": primary_payer_names,
1318
+ "search_term": search_term,
1319
+ "external_id": external_id,
1320
+ "diagnoses_updated_since": diagnoses_updated_since,
1321
+ "tag_ids": tag_ids,
1322
+ "work_queue_id": work_queue_id,
1323
+ "billable_status": billable_status,
1324
+ "responsible_party": responsible_party,
1325
+ "owner_of_next_action": owner_of_next_action,
1326
+ "patient_external_id": patient_external_id
1327
+ }.compact
1328
+ req.url "#{@request_client.get_url(environment: CandidApi,
1329
+ request_options: request_options)}/api/encounters/v4"
1330
+ end
1331
+ CandidApiClient::Encounters::V4::Types::EncounterPage.from_json(json_object: response.body)
1332
+ end
1333
+ end
1334
+
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")
1341
+ def get(encounter_id:, request_options: nil)
1342
+ Async do
1343
+ response = @request_client.conn.get do |req|
1344
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1345
+ 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}"
1353
+ end
1354
+ CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
1355
+ end
1356
+ end
1357
+
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.
1377
+ # @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.
1380
+ # @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.
1383
+ # @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
1389
+ # * :name (String)
1390
+ # * :rx_cui (String)
1391
+ # * :dosage (String)
1392
+ # * :dosage_form (String)
1393
+ # * :frequency (String)
1394
+ # * :as_needed (Boolean)
1395
+ # @param vitals [Hash] Request of type CandidApiClient::Encounters::V4::Types::Vitals, as a Hash
1396
+ # * :height_in (Integer)
1397
+ # * :weight_lbs (Integer)
1398
+ # * :blood_pressure_systolic_mmhg (Integer)
1399
+ # * :blood_pressure_diastolic_mmhg (Integer)
1400
+ # * :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
1404
+ # * :name (String)
1405
+ # * :category (CandidApiClient::Encounters::V4::Types::InterventionCategory)
1406
+ # * :description (String)
1407
+ # * :medication (Hash)
1408
+ # * :name (String)
1409
+ # * :rx_cui (String)
1410
+ # * :dosage (String)
1411
+ # * :dosage_form (String)
1412
+ # * :frequency (String)
1413
+ # * :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
1416
+ # * :zip_plus_four_code (String)
1417
+ # * :address_1 (String)
1418
+ # * :address_2 (String)
1419
+ # * :city (String)
1420
+ # * :state (CandidApiClient::Commons::Types::State)
1421
+ # * :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.
1433
+ # @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
1460
+ # @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>)
1465
+ # * :phone_consent (Boolean)
1466
+ # * :email (String)
1467
+ # * :non_insurance_payers (Array<String>)
1468
+ # * :non_insurance_payers_info (Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>)
1469
+ # * :email_consent (Boolean)
1470
+ # * :external_id (String)
1471
+ # * :date_of_birth (Date)
1472
+ # * :address (Hash)
1473
+ # * :zip_plus_four_code (String)
1474
+ # * :address_1 (String)
1475
+ # * :address_2 (String)
1476
+ # * :city (String)
1477
+ # * :state (CandidApiClient::Commons::Types::State)
1478
+ # * :zip_code (String)
1479
+ # * :first_name (String)
1480
+ # * :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
1491
+ # * :address (Hash)
1492
+ # * :zip_plus_four_code (String)
1493
+ # * :address_1 (String)
1494
+ # * :address_2 (String)
1495
+ # * :city (String)
1496
+ # * :state (CandidApiClient::Commons::Types::State)
1497
+ # * :zip_code (String)
1498
+ # * :tax_id (String)
1499
+ # * :npi (String)
1500
+ # * :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
+ # * :first_name (String)
1520
+ # * :last_name (String)
1521
+ # * :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)
1527
+ # * :address (Hash)
1528
+ # * :zip_plus_four_code (String)
1529
+ # * :address_1 (String)
1530
+ # * :address_2 (String)
1531
+ # * :city (String)
1532
+ # * :state (CandidApiClient::Commons::Types::State)
1533
+ # * :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
+ # * :npi (String)
1543
+ # * :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
+ # * :first_name (String)
1553
+ # * :last_name (String)
1554
+ # * :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
1557
+ # * :npi (String)
1558
+ # * :taxonomy_code (String)
1559
+ # * :address (Hash)
1560
+ # * :zip_plus_four_code (String)
1561
+ # * :address_1 (String)
1562
+ # * :address_2 (String)
1563
+ # * :city (String)
1564
+ # * :state (CandidApiClient::Commons::Types::State)
1565
+ # * :zip_code (String)
1566
+ # * :first_name (String)
1567
+ # * :last_name (String)
1568
+ # * :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
1578
+ # * :organization_name (String)
1579
+ # * :npi (String)
1580
+ # * :address (Hash)
1581
+ # * :zip_plus_four_code (String)
1582
+ # * :address_1 (String)
1583
+ # * :address_2 (String)
1584
+ # * :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)
1618
+ # * :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
1623
+ # * :insurance_card (Hash)
1624
+ # * :member_id (String)
1625
+ # * :payer_name (String)
1626
+ # * :payer_id (String)
1627
+ # * :rx_bin (String)
1628
+ # * :rx_pcn (String)
1629
+ # * :image_url_front (String)
1630
+ # * :image_url_back (String)
1631
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1632
+ # * :group_number (String)
1633
+ # * :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)
1639
+ # * :address (Hash)
1640
+ # * :zip_plus_four_code (String)
1641
+ # * :address_1 (String)
1642
+ # * :address_2 (String)
1643
+ # * :city (String)
1644
+ # * :state (CandidApiClient::Commons::Types::State)
1645
+ # * :zip_code (String)
1646
+ # * :first_name (String)
1647
+ # * :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
1650
+ # * :insurance_card (Hash)
1651
+ # * :member_id (String)
1652
+ # * :payer_name (String)
1653
+ # * :payer_id (String)
1654
+ # * :rx_bin (String)
1655
+ # * :rx_pcn (String)
1656
+ # * :image_url_front (String)
1657
+ # * :image_url_back (String)
1658
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
1659
+ # * :group_number (String)
1660
+ # * :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)
1666
+ # * :address (Hash)
1667
+ # * :zip_plus_four_code (String)
1668
+ # * :address_1 (String)
1669
+ # * :address_2 (String)
1670
+ # * :city (String)
1671
+ # * :state (CandidApiClient::Commons::Types::State)
1672
+ # * :zip_code (String)
1673
+ # * :first_name (String)
1674
+ # * :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
1683
+ # * :name (String)
1684
+ # * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
1685
+ # * :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>)
1692
+ # @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
1694
+ # * :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>)
1701
+ # @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)
1707
+ # * :procedure_code (String)
1708
+ # * :quantity (String)
1709
+ # * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
1710
+ # * :charge_amount_cents (Integer)
1711
+ # * :diagnosis_pointers (Array<Integer>)
1712
+ # * :drug_identification (Hash)
1713
+ # * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
1714
+ # * :national_drug_code (String)
1715
+ # * :national_drug_unit_count (String)
1716
+ # * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
1717
+ # * :link_sequence_number (String)
1718
+ # * :pharmacy_prescription_number (String)
1719
+ # * :conversion_formula (String)
1720
+ # * :drug_description (String)
1721
+ # * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
1722
+ # * :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>)
1742
+ # * :phone_consent (Boolean)
1743
+ # * :email (String)
1744
+ # * :email_consent (Boolean)
1745
+ # * :first_name (String)
1746
+ # * :last_name (String)
1747
+ # * :external_id (String)
1748
+ # * :date_of_birth (Date)
1749
+ # * :address (Hash)
1750
+ # * :zip_plus_four_code (String)
1751
+ # * :address_1 (String)
1752
+ # * :address_2 (String)
1753
+ # * :city (String)
1754
+ # * :state (CandidApiClient::Commons::Types::State)
1755
+ # * :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
1759
+ # * :claim_created_at (DateTime)
1760
+ # * :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)
1795
+ Async do
1796
+ response = @request_client.conn.post do |req|
1797
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
1798
+ 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
1804
+ req.body = {
1805
+ **(request_options&.additional_body_parameters || {}),
1806
+ external_id: external_id,
1807
+ date_of_service: date_of_service,
1808
+ end_date_of_service: end_date_of_service,
1809
+ patient_authorized_release: patient_authorized_release,
1810
+ benefits_assigned_to_provider: benefits_assigned_to_provider,
1811
+ provider_accepts_assignment: provider_accepts_assignment,
1812
+ appointment_type: appointment_type,
1813
+ existing_medications: existing_medications,
1814
+ vitals: vitals,
1815
+ interventions: interventions,
1816
+ pay_to_address: pay_to_address,
1817
+ synchronicity: synchronicity,
1818
+ billable_status: billable_status,
1819
+ additional_information: additional_information,
1820
+ service_authorization_exception_code: service_authorization_exception_code,
1821
+ admission_date: admission_date,
1822
+ discharge_date: discharge_date,
1823
+ onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
1824
+ last_menstrual_period_date: last_menstrual_period_date,
1825
+ delay_reason_code: delay_reason_code,
1826
+ additional_properties: additional_properties,
1827
+ _field_set: _field_set,
1828
+ patient: patient,
1829
+ billing_provider: billing_provider,
1830
+ rendering_provider: rendering_provider,
1831
+ referring_provider: referring_provider,
1832
+ initial_referring_provider: initial_referring_provider,
1833
+ supervising_provider: supervising_provider,
1834
+ service_facility: service_facility,
1835
+ subscriber_primary: subscriber_primary,
1836
+ subscriber_secondary: subscriber_secondary,
1837
+ subscriber_tertiary: subscriber_tertiary,
1838
+ prior_authorization_number: prior_authorization_number,
1839
+ responsible_party: responsible_party,
1840
+ diagnoses: diagnoses,
1841
+ clinical_notes: clinical_notes,
1842
+ billing_notes: billing_notes,
1843
+ place_of_service_code: place_of_service_code,
1844
+ patient_histories: patient_histories,
1845
+ service_lines: service_lines,
1846
+ 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
1854
+ }.compact
1855
+ req.url "#{@request_client.get_url(environment: CandidApi,
1856
+ request_options: request_options)}/api/encounters/v4"
1857
+ end
1858
+ CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
1859
+ end
1860
+ end
1861
+
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
2185
+ # * :insurance_card (Hash)
2186
+ # * :member_id (String)
2187
+ # * :payer_name (String)
2188
+ # * :payer_id (String)
2189
+ # * :rx_bin (String)
2190
+ # * :rx_pcn (String)
2191
+ # * :image_url_front (String)
2192
+ # * :image_url_back (String)
2193
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
2194
+ # * :group_number (String)
2195
+ # * :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)
2201
+ # * :address (Hash)
2202
+ # * :zip_plus_four_code (String)
2203
+ # * :address_1 (String)
2204
+ # * :address_2 (String)
2205
+ # * :city (String)
2206
+ # * :state (CandidApiClient::Commons::Types::State)
2207
+ # * :zip_code (String)
2208
+ # * :first_name (String)
2209
+ # * :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
2212
+ # * :insurance_card (Hash)
2213
+ # * :member_id (String)
2214
+ # * :payer_name (String)
2215
+ # * :payer_id (String)
2216
+ # * :rx_bin (String)
2217
+ # * :rx_pcn (String)
2218
+ # * :image_url_front (String)
2219
+ # * :image_url_back (String)
2220
+ # * :emr_payer_crosswalk (CandidApiClient::Commons::Types::EmrPayerCrosswalk)
2221
+ # * :group_number (String)
2222
+ # * :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)
2310
+ # * :address (Hash)
2311
+ # * :zip_plus_four_code (String)
2312
+ # * :address_1 (String)
2313
+ # * :address_2 (String)
2314
+ # * :city (String)
2315
+ # * :state (CandidApiClient::Commons::Types::State)
2316
+ # * :zip_code (String)
2317
+ # * :first_name (String)
2318
+ # * :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)
2386
+ Async do
2387
+ response = @request_client.conn.patch do |req|
2388
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
2389
+ 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
2395
+ req.body = {
2396
+ **(request_options&.additional_body_parameters || {}),
2397
+ benefits_assigned_to_provider: benefits_assigned_to_provider,
2398
+ prior_authorization_number: prior_authorization_number,
2399
+ external_id: external_id,
2400
+ date_of_service: date_of_service,
2401
+ tag_ids: tag_ids,
2402
+ billable_status: billable_status,
2403
+ responsible_party: responsible_party,
2404
+ provider_accepts_assignment: provider_accepts_assignment,
2405
+ synchronicity: synchronicity,
2406
+ place_of_service_code: place_of_service_code,
2407
+ appointment_type: appointment_type,
2408
+ end_date_of_service: end_date_of_service,
2409
+ additional_information: additional_information,
2410
+ service_authorization_exception_code: service_authorization_exception_code,
2411
+ admission_date: admission_date,
2412
+ discharge_date: discharge_date,
2413
+ onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
2414
+ 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
2441
+ }.compact
2442
+ req.url "#{@request_client.get_url(environment: CandidApi,
2443
+ request_options: request_options)}/api/encounters/v4/#{encounter_id}"
2444
+ end
2445
+ CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
2446
+ end
2447
+ end
2448
+ end
2449
+ end
2450
+ end
2451
+ end