candidhealth 0.17.5 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create.rb +15 -4
  3. data/lib/candidhealth/commons/types/entity_conflict_error_message.rb +47 -0
  4. data/lib/candidhealth/commons/types/intended_submission_medium.rb +11 -0
  5. data/lib/candidhealth/commons/types/network_type.rb +27 -0
  6. data/lib/candidhealth/commons/types/rate_id.rb +7 -0
  7. data/lib/candidhealth/commons/types/source_of_payment_code.rb +1 -0
  8. data/lib/candidhealth/contracts/v_2/types/contract.rb +2 -2
  9. data/lib/candidhealth/contracts/v_2/types/contract_with_providers.rb +3 -3
  10. data/lib/candidhealth/eligibility/v_2/client.rb +10 -2
  11. data/lib/candidhealth/encounters/v_4/client.rb +22 -10
  12. data/lib/candidhealth/encounters/v_4/types/encounter.rb +13 -5
  13. data/lib/candidhealth/fee_schedules/client.rb +28 -0
  14. data/lib/candidhealth/fee_schedules/v_3/client.rb +499 -0
  15. data/lib/candidhealth/fee_schedules/v_3/types/dimension_match.rb +157 -0
  16. data/lib/candidhealth/fee_schedules/v_3/types/dimension_name.rb +14 -0
  17. data/lib/candidhealth/fee_schedules/v_3/types/dimensions.rb +136 -0
  18. data/lib/candidhealth/fee_schedules/v_3/types/dimensions_page.rb +69 -0
  19. data/lib/candidhealth/fee_schedules/v_3/types/match_cpt_code.rb +60 -0
  20. data/lib/candidhealth/fee_schedules/v_3/types/match_date.rb +61 -0
  21. data/lib/candidhealth/fee_schedules/v_3/types/match_facility_type_code.rb +61 -0
  22. data/lib/candidhealth/fee_schedules/v_3/types/match_geo.rb +66 -0
  23. data/lib/candidhealth/fee_schedules/v_3/types/match_license_type.rb +61 -0
  24. data/lib/candidhealth/fee_schedules/v_3/types/match_modifiers.rb +66 -0
  25. data/lib/candidhealth/fee_schedules/v_3/types/match_network_types.rb +66 -0
  26. data/lib/candidhealth/fee_schedules/v_3/types/match_payer.rb +61 -0
  27. data/lib/candidhealth/fee_schedules/v_3/types/match_provider.rb +61 -0
  28. data/lib/candidhealth/fee_schedules/v_3/types/match_result.rb +61 -0
  29. data/lib/candidhealth/fee_schedules/v_3/types/match_test_result.rb +66 -0
  30. data/lib/candidhealth/fee_schedules/v_3/types/new_rate.rb +64 -0
  31. data/lib/candidhealth/fee_schedules/v_3/types/new_rate_version.rb +64 -0
  32. data/lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb +136 -0
  33. data/lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb +71 -0
  34. data/lib/candidhealth/fee_schedules/v_3/types/payer_threshold.rb +66 -0
  35. data/lib/candidhealth/fee_schedules/v_3/types/payer_thresholds_page.rb +68 -0
  36. data/lib/candidhealth/fee_schedules/v_3/types/rate.rb +96 -0
  37. data/lib/candidhealth/fee_schedules/v_3/types/rate_entry.rb +72 -0
  38. data/lib/candidhealth/fee_schedules/v_3/types/rate_upload.rb +94 -0
  39. data/lib/candidhealth/fee_schedules/v_3/types/rate_upload_with_possible_errors.rb +76 -0
  40. data/lib/candidhealth/fee_schedules/v_3/types/rates_page.rb +65 -0
  41. data/lib/candidhealth/fee_schedules/v_3/types/threshold_match.rb +72 -0
  42. data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +129 -0
  43. data/lib/requests.rb +2 -2
  44. data/lib/types_export.rb +32 -0
  45. metadata +36 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5f3548c53a29fefa3d69a5df618b6d1a972ea705cbce1894f84c5d21fb59196
4
- data.tar.gz: 45da861a9a0587a1aec4bd50f2c3f86a74f7d0f79ce19d611c7112fbd815d2ae
3
+ metadata.gz: df25c870af6cb1d418bf6307d87cd5b2f1dc80efddca6f8dc0cbd0da6ec5a402
4
+ data.tar.gz: be621ae6d03ca2cf805b70f11d2661b71e9e0104176e2703c3e78078731e0de4
5
5
  SHA512:
6
- metadata.gz: ceadc55e333bff54c8c2558019afcc99cf3df442e81486cfc5c6936afacf7d579b65844ab66660ca481554feb73c657142bbb8f97d872fa03a888671c3ce0663
7
- data.tar.gz: 956d715ea2f5b2368d28801daf81094576f2775ef91c3b92736f5d818a60442bffb69b09ec5a3cd1f767f1f5f351820c6d8251cb02c29825905afe8abecd6822
6
+ metadata.gz: be96f46c2efeecc09f8ef186d9d6ce23acd2dd4303b973317deec12e5a79ffde9ba883ad3783c410e103262ab5115486894d580764042ab365dca93a896ec0a8
7
+ data.tar.gz: 30f528e60f40f52dc9e4001c9c013ef7576c1309163899d4ae4afd7aedf46365de7d266a897dfce478c9c90a206960c594de9eaa7349bdf44431ba1dd52ca5f5
@@ -3,6 +3,7 @@
3
3
  require "date"
4
4
  require_relative "claim_frequency_type_code"
5
5
  require_relative "../../../commons/types/claim_submission_payer_responsibility_type"
6
+ require_relative "../../../commons/types/intended_submission_medium"
6
7
  require "json"
7
8
 
8
9
  module CandidApiClient
@@ -10,20 +11,27 @@ module CandidApiClient
10
11
  module V1
11
12
  # Data about each external submission.
12
13
  class ClaimSubmissionRecordCreate
13
- attr_reader :submitted_at, :claim_frequency_code, :payer_responsibility, :additional_properties
14
+ attr_reader :submitted_at, :claim_frequency_code, :payer_responsibility, :intended_submission_medium,
15
+ :additional_properties
14
16
 
15
17
  # @param submitted_at [DateTime] When the claim was submitted to the payer.
16
18
  # @param claim_frequency_code [ClaimSubmission::V1::ClaimFrequencyTypeCode]
17
19
  # @param payer_responsibility [Commons::ClaimSubmissionPayerResponsibilityType]
20
+ # @param intended_submission_medium [Commons::IntendedSubmissionMedium] The medium by which the claim was submitted to the payer: paper or electronic.
21
+ # If omitted, defaults to electronic.
18
22
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
19
23
  # @return [ClaimSubmission::V1::ClaimSubmissionRecordCreate]
20
- def initialize(submitted_at:, claim_frequency_code: nil, payer_responsibility: nil, additional_properties: nil)
24
+ def initialize(submitted_at:, claim_frequency_code: nil, payer_responsibility: nil,
25
+ intended_submission_medium: nil, additional_properties: nil)
21
26
  # @type [DateTime] When the claim was submitted to the payer.
22
27
  @submitted_at = submitted_at
23
28
  # @type [ClaimSubmission::V1::ClaimFrequencyTypeCode]
24
29
  @claim_frequency_code = claim_frequency_code
25
30
  # @type [Commons::ClaimSubmissionPayerResponsibilityType]
26
31
  @payer_responsibility = payer_responsibility
32
+ # @type [Commons::IntendedSubmissionMedium] The medium by which the claim was submitted to the payer: paper or electronic.
33
+ # If omitted, defaults to electronic.
34
+ @intended_submission_medium = intended_submission_medium
27
35
  # @type [OpenStruct] Additional properties unmapped to the current class definition
28
36
  @additional_properties = additional_properties
29
37
  end
@@ -38,8 +46,9 @@ module CandidApiClient
38
46
  submitted_at = (DateTime.parse(parsed_json["submitted_at"]) unless parsed_json["submitted_at"].nil?)
39
47
  claim_frequency_code = struct.claim_frequency_code
40
48
  payer_responsibility = struct.payer_responsibility
49
+ intended_submission_medium = struct.intended_submission_medium
41
50
  new(submitted_at: submitted_at, claim_frequency_code: claim_frequency_code,
42
- payer_responsibility: payer_responsibility, additional_properties: struct)
51
+ payer_responsibility: payer_responsibility, intended_submission_medium: intended_submission_medium, additional_properties: struct)
43
52
  end
44
53
 
45
54
  # Serialize an instance of ClaimSubmissionRecordCreate to a JSON object
@@ -49,7 +58,8 @@ module CandidApiClient
49
58
  {
50
59
  "submitted_at": @submitted_at,
51
60
  "claim_frequency_code": @claim_frequency_code,
52
- "payer_responsibility": @payer_responsibility
61
+ "payer_responsibility": @payer_responsibility,
62
+ "intended_submission_medium": @intended_submission_medium
53
63
  }.to_json
54
64
  end
55
65
 
@@ -61,6 +71,7 @@ module CandidApiClient
61
71
  obj.submitted_at.is_a?(DateTime) != false || raise("Passed value for field obj.submitted_at is not the expected type, validation failed.")
62
72
  obj.claim_frequency_code&.is_a?(ClaimSubmission::V1::ClaimFrequencyTypeCode) != false || raise("Passed value for field obj.claim_frequency_code is not the expected type, validation failed.")
63
73
  obj.payer_responsibility&.is_a?(Commons::ClaimSubmissionPayerResponsibilityType) != false || raise("Passed value for field obj.payer_responsibility is not the expected type, validation failed.")
74
+ obj.intended_submission_medium&.is_a?(Commons::IntendedSubmissionMedium) != false || raise("Passed value for field obj.intended_submission_medium is not the expected type, validation failed.")
64
75
  end
65
76
  end
66
77
  end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+
5
+ module CandidApiClient
6
+ class Commons
7
+ class EntityConflictErrorMessage
8
+ attr_reader :entity_name, :additional_properties
9
+
10
+ # @param entity_name [String]
11
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
12
+ # @return [Commons::EntityConflictErrorMessage]
13
+ def initialize(entity_name:, additional_properties: nil)
14
+ # @type [String]
15
+ @entity_name = entity_name
16
+ # @type [OpenStruct] Additional properties unmapped to the current class definition
17
+ @additional_properties = additional_properties
18
+ end
19
+
20
+ # Deserialize a JSON object to an instance of EntityConflictErrorMessage
21
+ #
22
+ # @param json_object [JSON]
23
+ # @return [Commons::EntityConflictErrorMessage]
24
+ def self.from_json(json_object:)
25
+ struct = JSON.parse(json_object, object_class: OpenStruct)
26
+ JSON.parse(json_object)
27
+ entity_name = struct.entity_name
28
+ new(entity_name: entity_name, additional_properties: struct)
29
+ end
30
+
31
+ # Serialize an instance of EntityConflictErrorMessage to a JSON object
32
+ #
33
+ # @return [JSON]
34
+ def to_json(*_args)
35
+ { "entity_name": @entity_name }.to_json
36
+ end
37
+
38
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
39
+ #
40
+ # @param obj [Object]
41
+ # @return [Void]
42
+ def self.validate_raw(obj:)
43
+ obj.entity_name.is_a?(String) != false || raise("Passed value for field obj.entity_name is not the expected type, validation failed.")
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ class Commons
5
+ # The medium (paper or electronic) via which we intended to submit the claim. The clearinghouse to which we sent the claim may use a different medium in certain cases, e.g., if the payer does not support electronic claims.
6
+ class IntendedSubmissionMedium
7
+ PAPER = "paper"
8
+ ELECTRONIC = "electronic"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ class Commons
5
+ class NetworkType
6
+ PPO = "12"
7
+ POS = "13"
8
+ EPO = "14"
9
+ INDEMNITY_INSURANCE = "15"
10
+ HMO_MEDICARE_RISK = "16"
11
+ DMO = "17"
12
+ AUTO = "AM"
13
+ CHAMPUS = "CH"
14
+ DISABILITY = "DS"
15
+ HMO = "HM"
16
+ LIABILITY = "LM"
17
+ MEDICARE_PART_A = "MA"
18
+ MEDICARE_PART_B = "MB"
19
+ MEDICAID = "MC"
20
+ OTHER_FEDERAL_PROGRAM = "OF"
21
+ TITLE_V = "TV"
22
+ VETERANS_AFFAIRS_PLAN = "VA"
23
+ WORKERS_COMP_HEALTH_CLAIM = "WC"
24
+ MUTUALLY_DEFINED = "ZZ"
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ class Commons
5
+ RATE_ID = UUID
6
+ end
7
+ end
@@ -26,6 +26,7 @@ module CandidApiClient
26
26
  TITLE_V = "TV"
27
27
  VETERANS_AFFAIRS_PLAN = "VA"
28
28
  WORKERS_COMP_HEALTH_CLAIM = "WC"
29
+ MUTUALLY_DEFINED = "ZZ"
29
30
  end
30
31
  end
31
32
  end
@@ -32,7 +32,7 @@ module CandidApiClient
32
32
  # @param medicaid_insurance_types [Contracts::V2::InsuranceTypes] The Medicaid plan insurance types this contract applies.
33
33
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
34
34
  # @return [Contracts::V2::Contract]
35
- def initialize(contract_id:, contracting_provider:, provider_count:, effective_date:, regions:, commercial_insurance_types:, medicare_insurance_types:, medicaid_insurance_types:, payer: nil,
35
+ def initialize(contract_id:, contracting_provider:, provider_count:, payer:, effective_date:, regions:, commercial_insurance_types:, medicare_insurance_types:, medicaid_insurance_types:,
36
36
  expiration_date: nil, contract_status: nil, authorized_signatory: nil, additional_properties: nil)
37
37
  # @type [Contracts::V2::CONTRACT_ID]
38
38
  @contract_id = contract_id
@@ -149,7 +149,7 @@ module CandidApiClient
149
149
  obj.contract_id.is_a?(UUID) != false || raise("Passed value for field obj.contract_id is not the expected type, validation failed.")
150
150
  OrganizationProviders::V2::OrganizationProvider.validate_raw(obj: obj.contracting_provider)
151
151
  obj.provider_count.is_a?(Integer) != false || raise("Passed value for field obj.provider_count is not the expected type, validation failed.")
152
- obj.payer.nil? || Payers::V3::Payer.validate_raw(obj: obj.payer)
152
+ Payers::V3::Payer.validate_raw(obj: obj.payer)
153
153
  obj.effective_date.is_a?(String) != false || raise("Passed value for field obj.effective_date is not the expected type, validation failed.")
154
154
  obj.expiration_date&.is_a?(String) != false || raise("Passed value for field obj.expiration_date is not the expected type, validation failed.")
155
155
  Commons::Regions.validate_raw(obj: obj.regions)
@@ -34,8 +34,8 @@ module CandidApiClient
34
34
  # @param medicaid_insurance_types [Contracts::V2::InsuranceTypes] The Medicaid plan insurance types this contract applies.
35
35
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
36
36
  # @return [Contracts::V2::ContractWithProviders]
37
- def initialize(rendering_provider_ids:, contract_id:, contracting_provider:, provider_count:, effective_date:,
38
- regions:, commercial_insurance_types:, medicare_insurance_types:, medicaid_insurance_types:, payer: nil, expiration_date: nil, contract_status: nil, authorized_signatory: nil, additional_properties: nil)
37
+ def initialize(rendering_provider_ids:, contract_id:, contracting_provider:, provider_count:, payer:,
38
+ effective_date:, regions:, commercial_insurance_types:, medicare_insurance_types:, medicaid_insurance_types:, expiration_date: nil, contract_status: nil, authorized_signatory: nil, additional_properties: nil)
39
39
  # @type [Set<UUID>] The providers who can render medical services under the contract
40
40
  @rendering_provider_ids = rendering_provider_ids
41
41
  # @type [Contracts::V2::CONTRACT_ID]
@@ -161,7 +161,7 @@ module CandidApiClient
161
161
  obj.contract_id.is_a?(UUID) != false || raise("Passed value for field obj.contract_id is not the expected type, validation failed.")
162
162
  OrganizationProviders::V2::OrganizationProvider.validate_raw(obj: obj.contracting_provider)
163
163
  obj.provider_count.is_a?(Integer) != false || raise("Passed value for field obj.provider_count is not the expected type, validation failed.")
164
- obj.payer.nil? || Payers::V3::Payer.validate_raw(obj: obj.payer)
164
+ Payers::V3::Payer.validate_raw(obj: obj.payer)
165
165
  obj.effective_date.is_a?(String) != false || raise("Passed value for field obj.effective_date is not the expected type, validation failed.")
166
166
  obj.expiration_date&.is_a?(String) != false || raise("Passed value for field obj.expiration_date is not the expected type, validation failed.")
167
167
  Commons::Regions.validate_raw(obj: obj.regions)
@@ -51,10 +51,14 @@ module CandidApiClient
51
51
  # - [Availity - Coverages 1.0.0 API](https://developer.availity.com/partner/documentation#c_coverages_references)
52
52
  # - [Candid Availity Eligibility Integration Guide](https://support.joincandidhealth.com/hc/en-us/articles/24218441631892--Availity-Eligibility-Integration-Guide)
53
53
  #
54
- # A schema of the response object can be found here: [Availity Docs](https://developer.availity.com/partner/product/191210/api/190898#/Coverages_100/operation/%2Fcoverages/get)
54
+ # A schema of the response object can be found here: [Availity Docs](https://developer.availity.com/partner/product/191210/api/190898#/Coverages_100/operation/%2Fcoverages%2F{id}/get)
55
55
  #
56
56
  # - Note Availity requires a free developer account to access this documentation.
57
57
  #
58
+ # Check connection status of Availity API and partners here:
59
+ #
60
+ # - [Availity Trading Partner Connection Status](https://www.availity.com/status/)
61
+ #
58
62
  # @param request_options [RequestOptions]
59
63
  # @return [Object]
60
64
  def submit_eligibility_check_availity(request_options: nil)
@@ -114,10 +118,14 @@ module CandidApiClient
114
118
  # - [Availity - Coverages 1.0.0 API](https://developer.availity.com/partner/documentation#c_coverages_references)
115
119
  # - [Candid Availity Eligibility Integration Guide](https://support.joincandidhealth.com/hc/en-us/articles/24218441631892--Availity-Eligibility-Integration-Guide)
116
120
  #
117
- # A schema of the response object can be found here: [Availity Docs](https://developer.availity.com/partner/product/191210/api/190898#/Coverages_100/operation/%2Fcoverages/get)
121
+ # A schema of the response object can be found here: [Availity Docs](https://developer.availity.com/partner/product/191210/api/190898#/Coverages_100/operation/%2Fcoverages%2F{id}/get)
118
122
  #
119
123
  # - Note Availity requires a free developer account to access this documentation.
120
124
  #
125
+ # Check connection status of Availity API and partners here:
126
+ #
127
+ # - [Availity Trading Partner Connection Status](https://www.availity.com/status/)
128
+ #
121
129
  # @param request_options [RequestOptions]
122
130
  # @return [Object]
123
131
  def submit_eligibility_check_availity(request_options: nil)
@@ -386,10 +386,11 @@ module CandidApiClient
386
386
  # * :claim_created_at (DateTime)
387
387
  # * :patient_control_number (String)
388
388
  # * :submission_records (Array<ClaimSubmission::V1::ClaimSubmissionRecordCreate>)
389
+ # @param tag_ids [Array<Tags::TAG_ID>] Names of tags that should be on the encounter.
389
390
  # @param request_options [RequestOptions]
390
391
  # @return [Encounters::V4::Encounter]
391
392
  def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
392
- provider_accepts_assignment:, billable_status:, responsible_party:, patient:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, date_of_service: nil, end_date_of_service: nil, referring_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, request_options: nil)
393
+ provider_accepts_assignment:, billable_status:, responsible_party:, patient:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, date_of_service: nil, end_date_of_service: nil, referring_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, request_options: nil)
393
394
  response = @request_client.conn.post("/api/encounters/v4") do |req|
394
395
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
395
396
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -433,7 +434,8 @@ module CandidApiClient
433
434
  patient_histories: patient_histories,
434
435
  service_lines: service_lines,
435
436
  guarantor: guarantor,
436
- external_claim_submission: external_claim_submission
437
+ external_claim_submission: external_claim_submission,
438
+ tag_ids: tag_ids
437
439
  }.compact
438
440
  end
439
441
  Encounters::V4::Encounter.from_json(json_object: response.body)
@@ -452,7 +454,7 @@ module CandidApiClient
452
454
  # @param diagnosis_ids [Array<Diagnoses::DIAGNOSIS_ID>] Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses
453
455
  # may be submitted at this time, and coders will later prioritize the 12 that will be
454
456
  # submitted to the payor.
455
- # @param tag_ids [Array<Tags::TAG_ID>] Names of tags that should be on the encounter.
457
+ # @param tag_ids [Array<Tags::TAG_ID>] Names of tags that should be on the encounter. Note all tags on encounter will be overriden with this list.
456
458
  # @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during patient encounters.Request of type Array<Encounters::V4::ClinicalNoteCategoryCreate>, as a Hash
457
459
  # * :category (Encounters::V4::NoteCategory)
458
460
  # * :notes (Array<Encounters::V4::ClinicalNote>)
@@ -547,10 +549,13 @@ module CandidApiClient
547
549
  # Required when, in the judgment of the provider, the services on this claim are related to the patient's pregnancy.
548
550
  # @param delay_reason_code [Commons::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
549
551
  # Code indicating the reason why a request was delayed
552
+ # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
553
+ # for billing purpose.
554
+ # Box 12 on the CMS-1500 claim form.
550
555
  # @param request_options [RequestOptions]
551
556
  # @return [Encounters::V4::Encounter]
552
557
  def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
553
- diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, request_options: nil)
558
+ diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient_authorized_release: nil, request_options: nil)
554
559
  response = @request_client.conn.patch("/api/encounters/v4/#{encounter_id}") do |req|
555
560
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
556
561
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -580,7 +585,8 @@ module CandidApiClient
580
585
  discharge_date: discharge_date,
581
586
  onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
582
587
  last_menstrual_period_date: last_menstrual_period_date,
583
- delay_reason_code: delay_reason_code
588
+ delay_reason_code: delay_reason_code,
589
+ patient_authorized_release: patient_authorized_release
584
590
  }.compact
585
591
  end
586
592
  Encounters::V4::Encounter.from_json(json_object: response.body)
@@ -934,10 +940,11 @@ module CandidApiClient
934
940
  # * :claim_created_at (DateTime)
935
941
  # * :patient_control_number (String)
936
942
  # * :submission_records (Array<ClaimSubmission::V1::ClaimSubmissionRecordCreate>)
943
+ # @param tag_ids [Array<Tags::TAG_ID>] Names of tags that should be on the encounter.
937
944
  # @param request_options [RequestOptions]
938
945
  # @return [Encounters::V4::Encounter]
939
946
  def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
940
- provider_accepts_assignment:, billable_status:, responsible_party:, patient:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, date_of_service: nil, end_date_of_service: nil, referring_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, request_options: nil)
947
+ provider_accepts_assignment:, billable_status:, responsible_party:, patient:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, date_of_service: nil, end_date_of_service: nil, referring_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, tag_ids: nil, request_options: nil)
941
948
  Async do
942
949
  response = @request_client.conn.post("/api/encounters/v4") do |req|
943
950
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -982,7 +989,8 @@ module CandidApiClient
982
989
  patient_histories: patient_histories,
983
990
  service_lines: service_lines,
984
991
  guarantor: guarantor,
985
- external_claim_submission: external_claim_submission
992
+ external_claim_submission: external_claim_submission,
993
+ tag_ids: tag_ids
986
994
  }.compact
987
995
  end
988
996
  Encounters::V4::Encounter.from_json(json_object: response.body)
@@ -1002,7 +1010,7 @@ module CandidApiClient
1002
1010
  # @param diagnosis_ids [Array<Diagnoses::DIAGNOSIS_ID>] Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses
1003
1011
  # may be submitted at this time, and coders will later prioritize the 12 that will be
1004
1012
  # submitted to the payor.
1005
- # @param tag_ids [Array<Tags::TAG_ID>] Names of tags that should be on the encounter.
1013
+ # @param tag_ids [Array<Tags::TAG_ID>] Names of tags that should be on the encounter. Note all tags on encounter will be overriden with this list.
1006
1014
  # @param clinical_notes [Array<Hash>] Holds a collection of clinical observations made by healthcare providers during patient encounters.Request of type Array<Encounters::V4::ClinicalNoteCategoryCreate>, as a Hash
1007
1015
  # * :category (Encounters::V4::NoteCategory)
1008
1016
  # * :notes (Array<Encounters::V4::ClinicalNote>)
@@ -1097,10 +1105,13 @@ module CandidApiClient
1097
1105
  # Required when, in the judgment of the provider, the services on this claim are related to the patient's pregnancy.
1098
1106
  # @param delay_reason_code [Commons::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
1099
1107
  # Code indicating the reason why a request was delayed
1108
+ # @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
1109
+ # for billing purpose.
1110
+ # Box 12 on the CMS-1500 claim form.
1100
1111
  # @param request_options [RequestOptions]
1101
1112
  # @return [Encounters::V4::Encounter]
1102
1113
  def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
1103
- diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, request_options: nil)
1114
+ diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient_authorized_release: nil, request_options: nil)
1104
1115
  Async do
1105
1116
  response = @request_client.conn.patch("/api/encounters/v4/#{encounter_id}") do |req|
1106
1117
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -1131,7 +1142,8 @@ module CandidApiClient
1131
1142
  discharge_date: discharge_date,
1132
1143
  onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date,
1133
1144
  last_menstrual_period_date: last_menstrual_period_date,
1134
- delay_reason_code: delay_reason_code
1145
+ delay_reason_code: delay_reason_code,
1146
+ patient_authorized_release: patient_authorized_release
1135
1147
  }.compact
1136
1148
  end
1137
1149
  Encounters::V4::Encounter.from_json(json_object: response.body)
@@ -38,9 +38,11 @@ module CandidApiClient
38
38
  module Encounters
39
39
  module V4
40
40
  class Encounter
41
- attr_reader :date_of_service, :end_date_of_service, :encounter_id, :claims, :patient, :guarantor,
42
- :billing_provider, :rendering_provider, :referring_provider, :service_facility, :subscriber_primary, :subscriber_secondary, :url, :diagnoses, :clinical_notes, :billing_notes, :place_of_service_code, :place_of_service_code_as_submitted, :patient_histories, :patient_payments, :tags, :coding_attribution, :work_queue_id, :work_queue_membership_activated_at, :owner_of_next_action, :submission_origin, :external_id, :prior_authorization_number, :patient_authorized_release, :benefits_assigned_to_provider, :provider_accepts_assignment, :appointment_type, :existing_medications, :vitals, :interventions, :pay_to_address, :synchronicity, :billable_status, :responsible_party, :additional_information, :service_authorization_exception_code, :admission_date, :discharge_date, :onset_of_current_illness_or_symptom_date, :last_menstrual_period_date, :delay_reason_code, :additional_properties
41
+ attr_reader :patient_control_number, :date_of_service, :end_date_of_service, :encounter_id, :claims, :patient,
42
+ :guarantor, :billing_provider, :rendering_provider, :referring_provider, :service_facility, :subscriber_primary, :subscriber_secondary, :url, :diagnoses, :clinical_notes, :billing_notes, :place_of_service_code, :place_of_service_code_as_submitted, :patient_histories, :patient_payments, :tags, :coding_attribution, :work_queue_id, :work_queue_membership_activated_at, :owner_of_next_action, :submission_origin, :external_id, :prior_authorization_number, :patient_authorized_release, :benefits_assigned_to_provider, :provider_accepts_assignment, :appointment_type, :existing_medications, :vitals, :interventions, :pay_to_address, :synchronicity, :billable_status, :responsible_party, :additional_information, :service_authorization_exception_code, :admission_date, :discharge_date, :onset_of_current_illness_or_symptom_date, :last_menstrual_period_date, :delay_reason_code, :additional_properties
43
43
 
44
+ # @param patient_control_number [String] A patient control number (PCN) is a unique identifier assigned to a patient within a healthcare system or facility.
45
+ # It's used to track and manage a patient's medical records, treatments, and other healthcare-related information.
44
46
  # @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
45
47
  # This date must be the local date in the timezone where the service occurred.
46
48
  # Box 24a on the CMS-1500 claim form.
@@ -131,7 +133,10 @@ module CandidApiClient
131
133
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
132
134
  # @return [Encounters::V4::Encounter]
133
135
  def initialize(date_of_service:, encounter_id:, claims:, patient:, billing_provider:, rendering_provider:,
134
- service_facility:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, responsible_party:, end_date_of_service: nil, guarantor: nil, referring_provider: nil, subscriber_primary: nil, subscriber_secondary: nil, billing_notes: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, coding_attribution: nil, work_queue_id: nil, work_queue_membership_activated_at: nil, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil)
136
+ service_facility:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, responsible_party:, patient_control_number: nil, end_date_of_service: nil, guarantor: nil, referring_provider: nil, subscriber_primary: nil, subscriber_secondary: nil, billing_notes: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, coding_attribution: nil, work_queue_id: nil, work_queue_membership_activated_at: nil, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil)
137
+ # @type [String] A patient control number (PCN) is a unique identifier assigned to a patient within a healthcare system or facility.
138
+ # It's used to track and manage a patient's medical records, treatments, and other healthcare-related information.
139
+ @patient_control_number = patient_control_number
135
140
  # @type [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
136
141
  # This date must be the local date in the timezone where the service occurred.
137
142
  # Box 24a on the CMS-1500 claim form.
@@ -276,6 +281,7 @@ module CandidApiClient
276
281
  def self.from_json(json_object:)
277
282
  struct = JSON.parse(json_object, object_class: OpenStruct)
278
283
  parsed_json = JSON.parse(json_object)
284
+ patient_control_number = struct.patient_control_number
279
285
  date_of_service = struct.date_of_service
280
286
  end_date_of_service = struct.end_date_of_service
281
287
  encounter_id = struct.encounter_id
@@ -401,8 +407,8 @@ module CandidApiClient
401
407
  onset_of_current_illness_or_symptom_date = struct.onset_of_current_illness_or_symptom_date
402
408
  last_menstrual_period_date = struct.last_menstrual_period_date
403
409
  delay_reason_code = struct.delay_reason_code
404
- new(date_of_service: date_of_service, end_date_of_service: end_date_of_service, encounter_id: encounter_id,
405
- claims: claims, patient: patient, guarantor: guarantor, billing_provider: billing_provider, rendering_provider: rendering_provider, referring_provider: referring_provider, service_facility: service_facility, subscriber_primary: subscriber_primary, subscriber_secondary: subscriber_secondary, url: url, diagnoses: diagnoses, clinical_notes: clinical_notes, billing_notes: billing_notes, place_of_service_code: place_of_service_code, place_of_service_code_as_submitted: place_of_service_code_as_submitted, patient_histories: patient_histories, patient_payments: patient_payments, tags: tags, coding_attribution: coding_attribution, work_queue_id: work_queue_id, work_queue_membership_activated_at: work_queue_membership_activated_at, owner_of_next_action: owner_of_next_action, submission_origin: submission_origin, external_id: external_id, prior_authorization_number: prior_authorization_number, patient_authorized_release: patient_authorized_release, benefits_assigned_to_provider: benefits_assigned_to_provider, provider_accepts_assignment: provider_accepts_assignment, appointment_type: appointment_type, existing_medications: existing_medications, vitals: vitals, interventions: interventions, pay_to_address: pay_to_address, synchronicity: synchronicity, billable_status: billable_status, responsible_party: responsible_party, additional_information: additional_information, service_authorization_exception_code: service_authorization_exception_code, admission_date: admission_date, discharge_date: discharge_date, onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date, last_menstrual_period_date: last_menstrual_period_date, delay_reason_code: delay_reason_code, additional_properties: struct)
410
+ new(patient_control_number: patient_control_number, date_of_service: date_of_service,
411
+ end_date_of_service: end_date_of_service, encounter_id: encounter_id, claims: claims, patient: patient, guarantor: guarantor, billing_provider: billing_provider, rendering_provider: rendering_provider, referring_provider: referring_provider, service_facility: service_facility, subscriber_primary: subscriber_primary, subscriber_secondary: subscriber_secondary, url: url, diagnoses: diagnoses, clinical_notes: clinical_notes, billing_notes: billing_notes, place_of_service_code: place_of_service_code, place_of_service_code_as_submitted: place_of_service_code_as_submitted, patient_histories: patient_histories, patient_payments: patient_payments, tags: tags, coding_attribution: coding_attribution, work_queue_id: work_queue_id, work_queue_membership_activated_at: work_queue_membership_activated_at, owner_of_next_action: owner_of_next_action, submission_origin: submission_origin, external_id: external_id, prior_authorization_number: prior_authorization_number, patient_authorized_release: patient_authorized_release, benefits_assigned_to_provider: benefits_assigned_to_provider, provider_accepts_assignment: provider_accepts_assignment, appointment_type: appointment_type, existing_medications: existing_medications, vitals: vitals, interventions: interventions, pay_to_address: pay_to_address, synchronicity: synchronicity, billable_status: billable_status, responsible_party: responsible_party, additional_information: additional_information, service_authorization_exception_code: service_authorization_exception_code, admission_date: admission_date, discharge_date: discharge_date, onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date, last_menstrual_period_date: last_menstrual_period_date, delay_reason_code: delay_reason_code, additional_properties: struct)
406
412
  end
407
413
 
408
414
  # Serialize an instance of Encounter to a JSON object
@@ -410,6 +416,7 @@ module CandidApiClient
410
416
  # @return [JSON]
411
417
  def to_json(*_args)
412
418
  {
419
+ "patient_control_number": @patient_control_number,
413
420
  "date_of_service": @date_of_service,
414
421
  "end_date_of_service": @end_date_of_service,
415
422
  "encounter_id": @encounter_id,
@@ -464,6 +471,7 @@ module CandidApiClient
464
471
  # @param obj [Object]
465
472
  # @return [Void]
466
473
  def self.validate_raw(obj:)
474
+ obj.patient_control_number&.is_a?(String) != false || raise("Passed value for field obj.patient_control_number is not the expected type, validation failed.")
467
475
  obj.date_of_service.is_a?(String) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
468
476
  obj.end_date_of_service&.is_a?(String) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
469
477
  obj.encounter_id.is_a?(UUID) != false || raise("Passed value for field obj.encounter_id is not the expected type, validation failed.")
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../requests"
4
+ require_relative "v_3/client"
5
+
6
+ module CandidApiClient
7
+ module FeeSchedules
8
+ class Client
9
+ attr_reader :v_3
10
+
11
+ # @param request_client [RequestClient]
12
+ # @return [FeeSchedules::Client]
13
+ def initialize(request_client:)
14
+ @v_3 = FeeSchedules::V3::V3Client.new(request_client: request_client)
15
+ end
16
+ end
17
+
18
+ class AsyncClient
19
+ attr_reader :v_3
20
+
21
+ # @param request_client [RequestClient]
22
+ # @return [FeeSchedules::AsyncClient]
23
+ def initialize(request_client:)
24
+ @v_3 = FeeSchedules::V3::AsyncV3Client.new(request_client: request_client)
25
+ end
26
+ end
27
+ end
28
+ end