candidhealth 1.3.1 → 1.4.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.
- checksums.yaml +4 -4
- data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create.rb +4 -4
- data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional.rb +4 -4
- data/lib/candidhealth/diagnoses/types/service_lines_must_have_at_least_one_diagnosis_error.rb +77 -0
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +151 -2
- data/lib/candidhealth/encounters/v_4/types/encounter_submission_expectation.rb +23 -0
- data/lib/candidhealth/exports/v_3/client.rb +16 -10
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +205 -2
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/coordination_of_benefits_recommendation.rb +63 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_recommendation.rb +144 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_recommendation_patient_info.rb +124 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_recommendation_payload.rb +102 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/medicare_advantage_recommendation.rb +70 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/medicare_advantage_recommendation_payload.rb +87 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/payer_search_response.rb +107 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/post_eligibility_recommendation_request.rb +96 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/stedi_payer.rb +144 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/stedi_payer_item.rb +79 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_item.rb +28 -1
- data/lib/candidhealth/pre_encounter/tags/v_1/client.rb +8 -0
- data/lib/candidhealth/pre_encounter/tags/v_1/types/mutable_tag.rb +22 -3
- data/lib/candidhealth/pre_encounter/tags/v_1/types/tag.rb +21 -3
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +9 -1
- data/lib/candidhealth/x_12/v_1/types/patient_discharge_status_code.rb +52 -0
- data/lib/candidhealth/x_12/v_1/types/point_of_origin_for_admission_or_visit_code.rb +23 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_admission_or_visit_code.rb +18 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +98 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_bill_frequency_code.rb +39 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_care_code.rb +21 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_facility_code.rb +19 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +19 -1
- metadata +21 -3
- data/lib/candidhealth/claim_submission/v_1/types/claim_frequency_type_code.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9141225cef78a8c36e171f743919b15182424e3068cf0fd7f399d8196642725a
|
4
|
+
data.tar.gz: 4ab389fa9065b982c3a5ba6cd8658bbe700373fc1cc55fb4627e85bcfbc650f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09fcbd3990b2f80d298e0625286dd6cf31c1ed580ae9b8cfca884322447eef072e99cd42cc41d857ec9207212b3d22a35b128e252522ee2b9cedbc69c75b44b4'
|
7
|
+
data.tar.gz: 719e69c29be38c3f2b45ac0dba4e1a8e2c179b84a3ad8963c2c18234a2cbf31a7180cb0299579be899dec4f96ddb77262b6008688dda364815f3b894838863d9
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "date"
|
4
|
-
require_relative "
|
4
|
+
require_relative "../../../x_12/v_1/types/type_of_bill_frequency_code"
|
5
5
|
require_relative "../../../commons/types/claim_submission_payer_responsibility_type"
|
6
6
|
require_relative "../../../commons/types/intended_submission_medium"
|
7
7
|
require "ostruct"
|
@@ -15,7 +15,7 @@ module CandidApiClient
|
|
15
15
|
class ClaimSubmissionRecordCreate
|
16
16
|
# @return [DateTime] When the claim was submitted to the payer.
|
17
17
|
attr_reader :submitted_at
|
18
|
-
# @return [CandidApiClient::
|
18
|
+
# @return [CandidApiClient::X12::V1::Types::TypeOfBillFrequencyCode]
|
19
19
|
attr_reader :claim_frequency_code
|
20
20
|
# @return [CandidApiClient::Commons::Types::ClaimSubmissionPayerResponsibilityType]
|
21
21
|
attr_reader :payer_responsibility
|
@@ -31,7 +31,7 @@ module CandidApiClient
|
|
31
31
|
OMIT = Object.new
|
32
32
|
|
33
33
|
# @param submitted_at [DateTime] When the claim was submitted to the payer.
|
34
|
-
# @param claim_frequency_code [CandidApiClient::
|
34
|
+
# @param claim_frequency_code [CandidApiClient::X12::V1::Types::TypeOfBillFrequencyCode]
|
35
35
|
# @param payer_responsibility [CandidApiClient::Commons::Types::ClaimSubmissionPayerResponsibilityType]
|
36
36
|
# @param intended_submission_medium [CandidApiClient::Commons::Types::IntendedSubmissionMedium] The medium by which the claim was submitted to the payer: paper or electronic.
|
37
37
|
# If omitted, defaults to electronic.
|
@@ -89,7 +89,7 @@ module CandidApiClient
|
|
89
89
|
# @return [Void]
|
90
90
|
def self.validate_raw(obj:)
|
91
91
|
obj.submitted_at.is_a?(DateTime) != false || raise("Passed value for field obj.submitted_at is not the expected type, validation failed.")
|
92
|
-
obj.claim_frequency_code&.is_a?(CandidApiClient::
|
92
|
+
obj.claim_frequency_code&.is_a?(CandidApiClient::X12::V1::Types::TypeOfBillFrequencyCode) != false || raise("Passed value for field obj.claim_frequency_code is not the expected type, validation failed.")
|
93
93
|
obj.payer_responsibility&.is_a?(CandidApiClient::Commons::Types::ClaimSubmissionPayerResponsibilityType) != false || raise("Passed value for field obj.payer_responsibility is not the expected type, validation failed.")
|
94
94
|
obj.intended_submission_medium&.is_a?(CandidApiClient::Commons::Types::IntendedSubmissionMedium) != false || raise("Passed value for field obj.intended_submission_medium is not the expected type, validation failed.")
|
95
95
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "date"
|
4
|
-
require_relative "
|
4
|
+
require_relative "../../../x_12/v_1/types/type_of_bill_frequency_code"
|
5
5
|
require_relative "../../../commons/types/claim_submission_payer_responsibility_type"
|
6
6
|
require_relative "../../../commons/types/intended_submission_medium"
|
7
7
|
require "ostruct"
|
@@ -15,7 +15,7 @@ module CandidApiClient
|
|
15
15
|
class ClaimSubmissionRecordCreateOptional
|
16
16
|
# @return [DateTime] When the claim was submitted to the payer.
|
17
17
|
attr_reader :submitted_at
|
18
|
-
# @return [CandidApiClient::
|
18
|
+
# @return [CandidApiClient::X12::V1::Types::TypeOfBillFrequencyCode]
|
19
19
|
attr_reader :claim_frequency_code
|
20
20
|
# @return [CandidApiClient::Commons::Types::ClaimSubmissionPayerResponsibilityType]
|
21
21
|
attr_reader :payer_responsibility
|
@@ -31,7 +31,7 @@ module CandidApiClient
|
|
31
31
|
OMIT = Object.new
|
32
32
|
|
33
33
|
# @param submitted_at [DateTime] When the claim was submitted to the payer.
|
34
|
-
# @param claim_frequency_code [CandidApiClient::
|
34
|
+
# @param claim_frequency_code [CandidApiClient::X12::V1::Types::TypeOfBillFrequencyCode]
|
35
35
|
# @param payer_responsibility [CandidApiClient::Commons::Types::ClaimSubmissionPayerResponsibilityType]
|
36
36
|
# @param intended_submission_medium [CandidApiClient::Commons::Types::IntendedSubmissionMedium] The medium by which the claim was submitted to the payer: paper or electronic.
|
37
37
|
# If omitted, defaults to electronic.
|
@@ -89,7 +89,7 @@ module CandidApiClient
|
|
89
89
|
# @return [Void]
|
90
90
|
def self.validate_raw(obj:)
|
91
91
|
obj.submitted_at&.is_a?(DateTime) != false || raise("Passed value for field obj.submitted_at is not the expected type, validation failed.")
|
92
|
-
obj.claim_frequency_code&.is_a?(CandidApiClient::
|
92
|
+
obj.claim_frequency_code&.is_a?(CandidApiClient::X12::V1::Types::TypeOfBillFrequencyCode) != false || raise("Passed value for field obj.claim_frequency_code is not the expected type, validation failed.")
|
93
93
|
obj.payer_responsibility&.is_a?(CandidApiClient::Commons::Types::ClaimSubmissionPayerResponsibilityType) != false || raise("Passed value for field obj.payer_responsibility is not the expected type, validation failed.")
|
94
94
|
obj.intended_submission_medium&.is_a?(CandidApiClient::Commons::Types::IntendedSubmissionMedium) != false || raise("Passed value for field obj.intended_submission_medium is not the expected type, validation failed.")
|
95
95
|
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module Diagnoses
|
8
|
+
module Types
|
9
|
+
class ServiceLinesMustHaveAtLeastOneDiagnosisError
|
10
|
+
# @return [String]
|
11
|
+
attr_reader :diagnosis_id
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :service_line_id
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :message
|
16
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
attr_reader :additional_properties
|
18
|
+
# @return [Object]
|
19
|
+
attr_reader :_field_set
|
20
|
+
protected :_field_set
|
21
|
+
|
22
|
+
OMIT = Object.new
|
23
|
+
|
24
|
+
# @param diagnosis_id [String]
|
25
|
+
# @param service_line_id [String]
|
26
|
+
# @param message [String]
|
27
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
+
# @return [CandidApiClient::Diagnoses::Types::ServiceLinesMustHaveAtLeastOneDiagnosisError]
|
29
|
+
def initialize(diagnosis_id:, service_line_id:, message:, additional_properties: nil)
|
30
|
+
@diagnosis_id = diagnosis_id
|
31
|
+
@service_line_id = service_line_id
|
32
|
+
@message = message
|
33
|
+
@additional_properties = additional_properties
|
34
|
+
@_field_set = { "diagnosis_id": diagnosis_id, "service_line_id": service_line_id, "message": message }
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deserialize a JSON object to an instance of
|
38
|
+
# ServiceLinesMustHaveAtLeastOneDiagnosisError
|
39
|
+
#
|
40
|
+
# @param json_object [String]
|
41
|
+
# @return [CandidApiClient::Diagnoses::Types::ServiceLinesMustHaveAtLeastOneDiagnosisError]
|
42
|
+
def self.from_json(json_object:)
|
43
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
44
|
+
diagnosis_id = struct["diagnosis_id"]
|
45
|
+
service_line_id = struct["service_line_id"]
|
46
|
+
message = struct["message"]
|
47
|
+
new(
|
48
|
+
diagnosis_id: diagnosis_id,
|
49
|
+
service_line_id: service_line_id,
|
50
|
+
message: message,
|
51
|
+
additional_properties: struct
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Serialize an instance of ServiceLinesMustHaveAtLeastOneDiagnosisError to a JSON
|
56
|
+
# object
|
57
|
+
#
|
58
|
+
# @return [String]
|
59
|
+
def to_json(*_args)
|
60
|
+
@_field_set&.to_json
|
61
|
+
end
|
62
|
+
|
63
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
64
|
+
# hash and check each fields type against the current object's property
|
65
|
+
# definitions.
|
66
|
+
#
|
67
|
+
# @param obj [Object]
|
68
|
+
# @return [Void]
|
69
|
+
def self.validate_raw(obj:)
|
70
|
+
obj.diagnosis_id.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id is not the expected type, validation failed.")
|
71
|
+
obj.service_line_id.is_a?(String) != false || raise("Passed value for field obj.service_line_id is not the expected type, validation failed.")
|
72
|
+
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -1,9 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "../../../commons/types/state"
|
3
4
|
require_relative "../../../claims/types/claim"
|
4
5
|
require_relative "../../../individual/types/patient"
|
5
6
|
require_relative "../../../guarantor/v_1/types/guarantor"
|
6
7
|
require_relative "../../../encounter_providers/v_2/types/encounter_provider"
|
8
|
+
require_relative "../../../encounter_providers/v_2/types/rendering_provider"
|
9
|
+
require_relative "../../../x_12/v_1/types/type_of_admission_or_visit_code"
|
10
|
+
require_relative "../../../x_12/v_1/types/point_of_origin_for_admission_or_visit_code"
|
11
|
+
require_relative "../../../x_12/v_1/types/patient_discharge_status_code"
|
12
|
+
require_relative "encounter_submission_expectation"
|
13
|
+
require_relative "../../../x_12/v_1/types/type_of_bill_composite"
|
7
14
|
require_relative "../../../service_facility/types/encounter_service_facility"
|
8
15
|
require_relative "../../../individual/types/subscriber"
|
9
16
|
require_relative "responsible_party_type"
|
@@ -38,6 +45,9 @@ module CandidApiClient
|
|
38
45
|
module V4
|
39
46
|
module Types
|
40
47
|
class Encounter
|
48
|
+
# @return [CandidApiClient::Commons::Types::State] 837i-REF1000 -- an optional state indicating where an accident related to the
|
49
|
+
# encounter occurred.
|
50
|
+
attr_reader :accident_state_or_province_code
|
41
51
|
# @return [String] If the encounter was created from ingested charge captures, this is the
|
42
52
|
# associated Charge Capture Claim Creation Id.
|
43
53
|
attr_reader :claim_creation_id
|
@@ -71,6 +81,41 @@ module CandidApiClient
|
|
71
81
|
# communication, or other service. The rendering provider address should generally
|
72
82
|
# be the same as the service facility address.
|
73
83
|
attr_reader :rendering_provider
|
84
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
|
85
|
+
# has overall responsibility for the patient in institutional claims processing.
|
86
|
+
attr_reader :attending_provider
|
87
|
+
# @return [Integer] 837i Loop 2300 DTP-03
|
88
|
+
# Extension of the admission date with hour (0-23) details.
|
89
|
+
# Required for institutional submission.
|
90
|
+
attr_reader :admission_hour
|
91
|
+
# @return [CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode] 837i Loop 2300 CL1-01
|
92
|
+
# Code used to indicate the priority of an admission or visit.
|
93
|
+
attr_reader :admission_type_code
|
94
|
+
# @return [CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode] 837i Loop 2300 CLI1-02
|
95
|
+
# Code used to indicate the conditions under which an admission occurs.
|
96
|
+
attr_reader :admission_source_code
|
97
|
+
# @return [Integer] 837i Loop 2300 DTP-03
|
98
|
+
# Extension of the discharge date with hour (0-23) details.
|
99
|
+
# Required for institutional submission.
|
100
|
+
attr_reader :discharge_hour
|
101
|
+
# @return [CandidApiClient::X12::V1::Types::PatientDischargeStatusCode] 837i CL1-03
|
102
|
+
# Code indicating patient status as of the "statement covers through date".
|
103
|
+
attr_reader :discharge_status
|
104
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
|
105
|
+
# has primary responsibility for surgical procedures in institutional claims
|
106
|
+
# processing.
|
107
|
+
attr_reader :operating_provider
|
108
|
+
# @return [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
|
109
|
+
# has secondary responsibility for surgical procedures in institutional claims
|
110
|
+
# processing. Only used when operating_provider is also set.
|
111
|
+
attr_reader :other_operating_provider
|
112
|
+
# @return [CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation] Describes the currently expected target form for this encounter. This effects
|
113
|
+
# what validations and queues the form is processed under. When this value is not
|
114
|
+
# set, it should be assumed to be TARGET_PROFESSIONAL.
|
115
|
+
attr_reader :submission_expectation
|
116
|
+
# @return [CandidApiClient::X12::V1::Types::TypeOfBillComposite] Used by institutional forms to indicate how the bill is to be interpreted.
|
117
|
+
# Professional forms are not required to submit this attribute.
|
118
|
+
attr_reader :type_of_bill
|
74
119
|
# @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
|
75
120
|
attr_reader :referring_provider
|
76
121
|
# @return [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
|
@@ -268,6 +313,8 @@ module CandidApiClient
|
|
268
313
|
|
269
314
|
OMIT = Object.new
|
270
315
|
|
316
|
+
# @param accident_state_or_province_code [CandidApiClient::Commons::Types::State] 837i-REF1000 -- an optional state indicating where an accident related to the
|
317
|
+
# encounter occurred.
|
271
318
|
# @param claim_creation_id [String] If the encounter was created from ingested charge captures, this is the
|
272
319
|
# associated Charge Capture Claim Creation Id.
|
273
320
|
# @param patient_control_number [String] A patient control number (PCN) is a unique identifier assigned to a patient
|
@@ -293,6 +340,31 @@ module CandidApiClient
|
|
293
340
|
# For telehealth services, the rendering provider performs the visit, asynchronous
|
294
341
|
# communication, or other service. The rendering provider address should generally
|
295
342
|
# be the same as the service facility address.
|
343
|
+
# @param attending_provider [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
|
344
|
+
# has overall responsibility for the patient in institutional claims processing.
|
345
|
+
# @param admission_hour [Integer] 837i Loop 2300 DTP-03
|
346
|
+
# Extension of the admission date with hour (0-23) details.
|
347
|
+
# Required for institutional submission.
|
348
|
+
# @param admission_type_code [CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode] 837i Loop 2300 CL1-01
|
349
|
+
# Code used to indicate the priority of an admission or visit.
|
350
|
+
# @param admission_source_code [CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode] 837i Loop 2300 CLI1-02
|
351
|
+
# Code used to indicate the conditions under which an admission occurs.
|
352
|
+
# @param discharge_hour [Integer] 837i Loop 2300 DTP-03
|
353
|
+
# Extension of the discharge date with hour (0-23) details.
|
354
|
+
# Required for institutional submission.
|
355
|
+
# @param discharge_status [CandidApiClient::X12::V1::Types::PatientDischargeStatusCode] 837i CL1-03
|
356
|
+
# Code indicating patient status as of the "statement covers through date".
|
357
|
+
# @param operating_provider [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
|
358
|
+
# has primary responsibility for surgical procedures in institutional claims
|
359
|
+
# processing.
|
360
|
+
# @param other_operating_provider [CandidApiClient::EncounterProviders::V2::Types::RenderingProvider] 837i NM1 2500 variant for Loop ID-2310. Used to indicate the individual whom
|
361
|
+
# has secondary responsibility for surgical procedures in institutional claims
|
362
|
+
# processing. Only used when operating_provider is also set.
|
363
|
+
# @param submission_expectation [CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation] Describes the currently expected target form for this encounter. This effects
|
364
|
+
# what validations and queues the form is processed under. When this value is not
|
365
|
+
# set, it should be assumed to be TARGET_PROFESSIONAL.
|
366
|
+
# @param type_of_bill [CandidApiClient::X12::V1::Types::TypeOfBillComposite] Used by institutional forms to indicate how the bill is to be interpreted.
|
367
|
+
# Professional forms are not required to submit this attribute.
|
296
368
|
# @param referring_provider [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
|
297
369
|
# @param initial_referring_provider [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
|
298
370
|
# @param supervising_provider [CandidApiClient::EncounterProviders::V2::Types::EncounterProvider]
|
@@ -433,8 +505,11 @@ module CandidApiClient
|
|
433
505
|
# Code indicating the reason why a request was delayed
|
434
506
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
435
507
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
436
|
-
def initialize(encounter_id:, claims:, patient:, billing_provider:, rendering_provider:, service_facility:,
|
437
|
-
guarantor: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, subscriber_tertiary: OMIT, prior_authorization_number: OMIT, billing_notes: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, coding_attribution: OMIT, work_queue_id: OMIT, work_queue_membership_activated_at: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, secondary_payer_carrier_code: OMIT, last_submitted_at: OMIT, next_responsible_party: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, appointment_type: OMIT, existing_medications: OMIT, vitals: OMIT, interventions: OMIT, pay_to_address: OMIT, synchronicity: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, additional_properties: nil)
|
508
|
+
def initialize(encounter_id:, claims:, patient:, billing_provider:, rendering_provider:, service_facility:,
|
509
|
+
responsible_party:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, schema_instances:, created_at:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, accident_state_or_province_code: OMIT, claim_creation_id: OMIT, patient_control_number: OMIT, guarantor: OMIT, attending_provider: OMIT, admission_hour: OMIT, admission_type_code: OMIT, admission_source_code: OMIT, discharge_hour: OMIT, discharge_status: OMIT, operating_provider: OMIT, other_operating_provider: OMIT, submission_expectation: OMIT, type_of_bill: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, subscriber_tertiary: OMIT, prior_authorization_number: OMIT, billing_notes: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, coding_attribution: OMIT, work_queue_id: OMIT, work_queue_membership_activated_at: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, secondary_payer_carrier_code: OMIT, last_submitted_at: OMIT, next_responsible_party: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, appointment_type: OMIT, existing_medications: OMIT, vitals: OMIT, interventions: OMIT, pay_to_address: OMIT, synchronicity: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, additional_properties: nil)
|
510
|
+
if accident_state_or_province_code != OMIT
|
511
|
+
@accident_state_or_province_code = accident_state_or_province_code
|
512
|
+
end
|
438
513
|
@claim_creation_id = claim_creation_id if claim_creation_id != OMIT
|
439
514
|
@patient_control_number = patient_control_number if patient_control_number != OMIT
|
440
515
|
@encounter_id = encounter_id
|
@@ -443,6 +518,16 @@ module CandidApiClient
|
|
443
518
|
@guarantor = guarantor if guarantor != OMIT
|
444
519
|
@billing_provider = billing_provider
|
445
520
|
@rendering_provider = rendering_provider
|
521
|
+
@attending_provider = attending_provider if attending_provider != OMIT
|
522
|
+
@admission_hour = admission_hour if admission_hour != OMIT
|
523
|
+
@admission_type_code = admission_type_code if admission_type_code != OMIT
|
524
|
+
@admission_source_code = admission_source_code if admission_source_code != OMIT
|
525
|
+
@discharge_hour = discharge_hour if discharge_hour != OMIT
|
526
|
+
@discharge_status = discharge_status if discharge_status != OMIT
|
527
|
+
@operating_provider = operating_provider if operating_provider != OMIT
|
528
|
+
@other_operating_provider = other_operating_provider if other_operating_provider != OMIT
|
529
|
+
@submission_expectation = submission_expectation if submission_expectation != OMIT
|
530
|
+
@type_of_bill = type_of_bill if type_of_bill != OMIT
|
446
531
|
@referring_provider = referring_provider if referring_provider != OMIT
|
447
532
|
@initial_referring_provider = initial_referring_provider if initial_referring_provider != OMIT
|
448
533
|
@supervising_provider = supervising_provider if supervising_provider != OMIT
|
@@ -504,6 +589,7 @@ module CandidApiClient
|
|
504
589
|
@delay_reason_code = delay_reason_code if delay_reason_code != OMIT
|
505
590
|
@additional_properties = additional_properties
|
506
591
|
@_field_set = {
|
592
|
+
"accident_state_or_province_code": accident_state_or_province_code,
|
507
593
|
"claim_creation_id": claim_creation_id,
|
508
594
|
"patient_control_number": patient_control_number,
|
509
595
|
"encounter_id": encounter_id,
|
@@ -512,6 +598,16 @@ module CandidApiClient
|
|
512
598
|
"guarantor": guarantor,
|
513
599
|
"billing_provider": billing_provider,
|
514
600
|
"rendering_provider": rendering_provider,
|
601
|
+
"attending_provider": attending_provider,
|
602
|
+
"admission_hour": admission_hour,
|
603
|
+
"admission_type_code": admission_type_code,
|
604
|
+
"admission_source_code": admission_source_code,
|
605
|
+
"discharge_hour": discharge_hour,
|
606
|
+
"discharge_status": discharge_status,
|
607
|
+
"operating_provider": operating_provider,
|
608
|
+
"other_operating_provider": other_operating_provider,
|
609
|
+
"submission_expectation": submission_expectation,
|
610
|
+
"type_of_bill": type_of_bill,
|
515
611
|
"referring_provider": referring_provider,
|
516
612
|
"initial_referring_provider": initial_referring_provider,
|
517
613
|
"supervising_provider": supervising_provider,
|
@@ -575,6 +671,7 @@ module CandidApiClient
|
|
575
671
|
def self.from_json(json_object:)
|
576
672
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
577
673
|
parsed_json = JSON.parse(json_object)
|
674
|
+
accident_state_or_province_code = struct["accident_state_or_province_code"]
|
578
675
|
claim_creation_id = struct["claim_creation_id"]
|
579
676
|
patient_control_number = struct["patient_control_number"]
|
580
677
|
encounter_id = struct["encounter_id"]
|
@@ -606,6 +703,36 @@ module CandidApiClient
|
|
606
703
|
rendering_provider = parsed_json["rendering_provider"].to_json
|
607
704
|
rendering_provider = CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.from_json(json_object: rendering_provider)
|
608
705
|
end
|
706
|
+
if parsed_json["attending_provider"].nil?
|
707
|
+
attending_provider = nil
|
708
|
+
else
|
709
|
+
attending_provider = parsed_json["attending_provider"].to_json
|
710
|
+
attending_provider = CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.from_json(json_object: attending_provider)
|
711
|
+
end
|
712
|
+
admission_hour = struct["admission_hour"]
|
713
|
+
admission_type_code = struct["admission_type_code"]
|
714
|
+
admission_source_code = struct["admission_source_code"]
|
715
|
+
discharge_hour = struct["discharge_hour"]
|
716
|
+
discharge_status = struct["discharge_status"]
|
717
|
+
if parsed_json["operating_provider"].nil?
|
718
|
+
operating_provider = nil
|
719
|
+
else
|
720
|
+
operating_provider = parsed_json["operating_provider"].to_json
|
721
|
+
operating_provider = CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.from_json(json_object: operating_provider)
|
722
|
+
end
|
723
|
+
if parsed_json["other_operating_provider"].nil?
|
724
|
+
other_operating_provider = nil
|
725
|
+
else
|
726
|
+
other_operating_provider = parsed_json["other_operating_provider"].to_json
|
727
|
+
other_operating_provider = CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.from_json(json_object: other_operating_provider)
|
728
|
+
end
|
729
|
+
submission_expectation = struct["submission_expectation"]
|
730
|
+
if parsed_json["type_of_bill"].nil?
|
731
|
+
type_of_bill = nil
|
732
|
+
else
|
733
|
+
type_of_bill = parsed_json["type_of_bill"].to_json
|
734
|
+
type_of_bill = CandidApiClient::X12::V1::Types::TypeOfBillComposite.from_json(json_object: type_of_bill)
|
735
|
+
end
|
609
736
|
if parsed_json["referring_provider"].nil?
|
610
737
|
referring_provider = nil
|
611
738
|
else
|
@@ -748,6 +875,7 @@ module CandidApiClient
|
|
748
875
|
end
|
749
876
|
delay_reason_code = struct["delay_reason_code"]
|
750
877
|
new(
|
878
|
+
accident_state_or_province_code: accident_state_or_province_code,
|
751
879
|
claim_creation_id: claim_creation_id,
|
752
880
|
patient_control_number: patient_control_number,
|
753
881
|
encounter_id: encounter_id,
|
@@ -756,6 +884,16 @@ module CandidApiClient
|
|
756
884
|
guarantor: guarantor,
|
757
885
|
billing_provider: billing_provider,
|
758
886
|
rendering_provider: rendering_provider,
|
887
|
+
attending_provider: attending_provider,
|
888
|
+
admission_hour: admission_hour,
|
889
|
+
admission_type_code: admission_type_code,
|
890
|
+
admission_source_code: admission_source_code,
|
891
|
+
discharge_hour: discharge_hour,
|
892
|
+
discharge_status: discharge_status,
|
893
|
+
operating_provider: operating_provider,
|
894
|
+
other_operating_provider: other_operating_provider,
|
895
|
+
submission_expectation: submission_expectation,
|
896
|
+
type_of_bill: type_of_bill,
|
759
897
|
referring_provider: referring_provider,
|
760
898
|
initial_referring_provider: initial_referring_provider,
|
761
899
|
supervising_provider: supervising_provider,
|
@@ -825,6 +963,7 @@ module CandidApiClient
|
|
825
963
|
# @param obj [Object]
|
826
964
|
# @return [Void]
|
827
965
|
def self.validate_raw(obj:)
|
966
|
+
obj.accident_state_or_province_code&.is_a?(CandidApiClient::Commons::Types::State) != false || raise("Passed value for field obj.accident_state_or_province_code is not the expected type, validation failed.")
|
828
967
|
obj.claim_creation_id&.is_a?(String) != false || raise("Passed value for field obj.claim_creation_id is not the expected type, validation failed.")
|
829
968
|
obj.patient_control_number&.is_a?(String) != false || raise("Passed value for field obj.patient_control_number is not the expected type, validation failed.")
|
830
969
|
obj.encounter_id.is_a?(String) != false || raise("Passed value for field obj.encounter_id is not the expected type, validation failed.")
|
@@ -833,6 +972,16 @@ module CandidApiClient
|
|
833
972
|
obj.guarantor.nil? || CandidApiClient::Guarantor::V1::Types::Guarantor.validate_raw(obj: obj.guarantor)
|
834
973
|
CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.validate_raw(obj: obj.billing_provider)
|
835
974
|
CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.validate_raw(obj: obj.rendering_provider)
|
975
|
+
obj.attending_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.validate_raw(obj: obj.attending_provider)
|
976
|
+
obj.admission_hour&.is_a?(Integer) != false || raise("Passed value for field obj.admission_hour is not the expected type, validation failed.")
|
977
|
+
obj.admission_type_code&.is_a?(CandidApiClient::X12::V1::Types::TypeOfAdmissionOrVisitCode) != false || raise("Passed value for field obj.admission_type_code is not the expected type, validation failed.")
|
978
|
+
obj.admission_source_code&.is_a?(CandidApiClient::X12::V1::Types::PointOfOriginForAdmissionOrVisitCode) != false || raise("Passed value for field obj.admission_source_code is not the expected type, validation failed.")
|
979
|
+
obj.discharge_hour&.is_a?(Integer) != false || raise("Passed value for field obj.discharge_hour is not the expected type, validation failed.")
|
980
|
+
obj.discharge_status&.is_a?(CandidApiClient::X12::V1::Types::PatientDischargeStatusCode) != false || raise("Passed value for field obj.discharge_status is not the expected type, validation failed.")
|
981
|
+
obj.operating_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.validate_raw(obj: obj.operating_provider)
|
982
|
+
obj.other_operating_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::RenderingProvider.validate_raw(obj: obj.other_operating_provider)
|
983
|
+
obj.submission_expectation&.is_a?(CandidApiClient::Encounters::V4::Types::EncounterSubmissionExpectation) != false || raise("Passed value for field obj.submission_expectation is not the expected type, validation failed.")
|
984
|
+
obj.type_of_bill.nil? || CandidApiClient::X12::V1::Types::TypeOfBillComposite.validate_raw(obj: obj.type_of_bill)
|
836
985
|
obj.referring_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.validate_raw(obj: obj.referring_provider)
|
837
986
|
obj.initial_referring_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.validate_raw(obj: obj.initial_referring_provider)
|
838
987
|
obj.supervising_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::EncounterProvider.validate_raw(obj: obj.supervising_provider)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module Encounters
|
5
|
+
module V4
|
6
|
+
module Types
|
7
|
+
# Used to describe the currently expected target form for this encounter. This
|
8
|
+
# effects what
|
9
|
+
# validations and queues the form is processed under. If you're not sure, you can
|
10
|
+
# set this value
|
11
|
+
# to UNEXPECTED, in which case the form will be treated loosely during processing.
|
12
|
+
# Before
|
13
|
+
# submission, this value will be required by some rules or user intervention. It
|
14
|
+
# can be changed
|
15
|
+
# at any time, although doing so may incur other rules.
|
16
|
+
class EncounterSubmissionExpectation
|
17
|
+
TARGET_PROFESSIONAL = "TARGET_PROFESSIONAL"
|
18
|
+
TARGET_INSTITUTIONAL = "TARGET_INSTITUTIONAL"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -18,7 +18,14 @@ module CandidApiClient
|
|
18
18
|
@request_client = request_client
|
19
19
|
end
|
20
20
|
|
21
|
-
#
|
21
|
+
# <Warning>
|
22
|
+
# API-based exports are in the process of being deprecated in favor of Candid Data
|
23
|
+
# Share and are not being offered to new customers.
|
24
|
+
# Please see the [Candid Data Share
|
25
|
+
# docs](https://docs.joincandidhealth.com/introduction/candid-data-share) for more
|
26
|
+
# information.
|
27
|
+
# </Warning>
|
28
|
+
# Retrieve CSV-formatted reports on claim submissions and outcomes. This endpoint
|
22
29
|
# returns Export objects that contain an
|
23
30
|
# authenticated URL to a customer's reports with a 2min TTL. The schema for the
|
24
31
|
# CSV export can be found
|
@@ -40,10 +47,6 @@ module CandidApiClient
|
|
40
47
|
# up to 90 days in the past by default. Please email our [Support
|
41
48
|
# team](mailto:support@joincandidhealth.com) with any data requests
|
42
49
|
# outside of these stated guarantees.
|
43
|
-
# **New Customers:** This endpoint is not enabled by default for new Candid
|
44
|
-
# customers. To have this endpoint enabled for your organization,
|
45
|
-
# please email our [Support team](mailto:support@joincandidhealth.com) with the
|
46
|
-
# request.
|
47
50
|
#
|
48
51
|
# @param start_date [Date] Beginning date of claim versions returned in the export, ISO 8601 date e.g.
|
49
52
|
# 2019-08-24.
|
@@ -87,7 +90,14 @@ module CandidApiClient
|
|
87
90
|
@request_client = request_client
|
88
91
|
end
|
89
92
|
|
90
|
-
#
|
93
|
+
# <Warning>
|
94
|
+
# API-based exports are in the process of being deprecated in favor of Candid Data
|
95
|
+
# Share and are not being offered to new customers.
|
96
|
+
# Please see the [Candid Data Share
|
97
|
+
# docs](https://docs.joincandidhealth.com/introduction/candid-data-share) for more
|
98
|
+
# information.
|
99
|
+
# </Warning>
|
100
|
+
# Retrieve CSV-formatted reports on claim submissions and outcomes. This endpoint
|
91
101
|
# returns Export objects that contain an
|
92
102
|
# authenticated URL to a customer's reports with a 2min TTL. The schema for the
|
93
103
|
# CSV export can be found
|
@@ -109,10 +119,6 @@ module CandidApiClient
|
|
109
119
|
# up to 90 days in the past by default. Please email our [Support
|
110
120
|
# team](mailto:support@joincandidhealth.com) with any data requests
|
111
121
|
# outside of these stated guarantees.
|
112
|
-
# **New Customers:** This endpoint is not enabled by default for new Candid
|
113
|
-
# customers. To have this endpoint enabled for your organization,
|
114
|
-
# please email our [Support team](mailto:support@joincandidhealth.com) with the
|
115
|
-
# request.
|
116
122
|
#
|
117
123
|
# @param start_date [Date] Beginning date of claim versions returned in the export, ISO 8601 date e.g.
|
118
124
|
# 2019-08-24.
|