candidhealth 1.14.6 → 1.16.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/candid/client.rb +6 -1
- data/lib/candid/commons/types/bad_request_error_message.rb +11 -0
- data/lib/candid/commons/types/internal_error_message.rb +11 -0
- data/lib/candid/commons/types/procedure_modifier.rb +1 -0
- data/lib/candid/events/client.rb +17 -0
- data/lib/candid/events/v_1/client.rb +64 -0
- data/lib/candid/events/v_1/types/event.rb +18 -0
- data/lib/candid/events/v_1/types/event_scan_page.rb +16 -0
- data/lib/candid/events/v_1/types/get_event_scan_request.rb +17 -0
- data/lib/candid/patient_ar/v_1/client.rb +0 -4
- data/lib/candid/service_lines/v_2/types/service_line_create_optional.rb +1 -0
- data/lib/candid/version.rb +1 -1
- data/lib/candid.rb +7 -0
- data/reference.md +127 -4
- metadata +8 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6895f5f4be310fc99a79e4a950741d7a52ab05cc8e15a1d62d7a7fea6f63a344
|
|
4
|
+
data.tar.gz: 1ffc220cda0f77fa7f57e9d7e78748d1eb1384ef0d69522c533f51086b7d99f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee354cd3227e7868dbda9c9a4342dbafcd75ee316cde74ecb763f33c1f8819e3d8a149f847ee45da4aab45f323d952410df06c4d06395a840be8fafe209e79b1
|
|
7
|
+
data.tar.gz: 7dff42df91a60ee25188ef4832100e616b8713514465b74056fb238ff8145f3a9cd71f23b23c29da54d598c432498da9119eee3cd6fb39b31b62c56b503263ec
|
data/lib/candid/client.rb
CHANGED
|
@@ -7,7 +7,7 @@ module Candid
|
|
|
7
7
|
@raw_client = Candid::Internal::Http::RawClient.new(
|
|
8
8
|
base_url: base_url,
|
|
9
9
|
headers: {
|
|
10
|
-
"User-Agent": "candidhealth/1.
|
|
10
|
+
"User-Agent": "candidhealth/1.16.0",
|
|
11
11
|
"X-Fern-Language": "Ruby"
|
|
12
12
|
}
|
|
13
13
|
)
|
|
@@ -73,6 +73,11 @@ module Candid
|
|
|
73
73
|
@encounters ||= Candid::Encounters::Client.new(client: @raw_client)
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
+
# @return [Candid::Events::Client]
|
|
77
|
+
def events
|
|
78
|
+
@events ||= Candid::Events::Client.new(client: @raw_client)
|
|
79
|
+
end
|
|
80
|
+
|
|
76
81
|
# @return [Candid::ExpectedNetworkStatus::Client]
|
|
77
82
|
def expected_network_status
|
|
78
83
|
@expected_network_status ||= Candid::ExpectedNetworkStatus::Client.new(client: @raw_client)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Events
|
|
5
|
+
class Client
|
|
6
|
+
# @return [Candid::Events::Client]
|
|
7
|
+
def initialize(client:)
|
|
8
|
+
@client = client
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# @return [Candid::V1::Client]
|
|
12
|
+
def v_1
|
|
13
|
+
@v_1 ||= Candid::Events::V1::Client.new(client: @client)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Events
|
|
5
|
+
module V1
|
|
6
|
+
class Client
|
|
7
|
+
# @return [Candid::Events::V1::Client]
|
|
8
|
+
def initialize(client:)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Scans the last 30 days of events. All results are sorted by created date, descending.
|
|
13
|
+
#
|
|
14
|
+
# @return [Candid::Events::V1::Types::EventScanPage]
|
|
15
|
+
def scan(request_options: {}, **params)
|
|
16
|
+
params = Candid::Internal::Types::Utils.symbolize_keys(params)
|
|
17
|
+
_query_param_names = %i[page_token limit event_types created_before created_after]
|
|
18
|
+
_query = params.slice(*_query_param_names)
|
|
19
|
+
params.except(*_query_param_names)
|
|
20
|
+
|
|
21
|
+
_request = Candid::Internal::JSON::Request.new(
|
|
22
|
+
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
23
|
+
method: "GET",
|
|
24
|
+
path: "/api/events/v1/",
|
|
25
|
+
query: _query
|
|
26
|
+
)
|
|
27
|
+
begin
|
|
28
|
+
_response = @client.send(_request)
|
|
29
|
+
rescue Net::HTTPRequestTimeout
|
|
30
|
+
raise Candid::Errors::TimeoutError
|
|
31
|
+
end
|
|
32
|
+
code = _response.code.to_i
|
|
33
|
+
if code.between?(200, 299)
|
|
34
|
+
Candid::Events::V1::Types::EventScanPage.load(_response.body)
|
|
35
|
+
else
|
|
36
|
+
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
37
|
+
raise error_class.new(_response.body, code: code)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# @return [Candid::Events::V1::Types::Event]
|
|
42
|
+
def get(request_options: {}, **params)
|
|
43
|
+
_request = Candid::Internal::JSON::Request.new(
|
|
44
|
+
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
45
|
+
method: "GET",
|
|
46
|
+
path: "/api/events/v1/#{params[:event_id]}"
|
|
47
|
+
)
|
|
48
|
+
begin
|
|
49
|
+
_response = @client.send(_request)
|
|
50
|
+
rescue Net::HTTPRequestTimeout
|
|
51
|
+
raise Candid::Errors::TimeoutError
|
|
52
|
+
end
|
|
53
|
+
code = _response.code.to_i
|
|
54
|
+
if code.between?(200, 299)
|
|
55
|
+
Candid::Events::V1::Types::Event.load(_response.body)
|
|
56
|
+
else
|
|
57
|
+
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
58
|
+
raise error_class.new(_response.body, code: code)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Events
|
|
5
|
+
module V1
|
|
6
|
+
module Types
|
|
7
|
+
class Event < Internal::Types::Model
|
|
8
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :created_at, -> { String }, optional: false, nullable: false
|
|
10
|
+
field :timestamp, -> { String }, optional: false, nullable: false
|
|
11
|
+
field :event_type, -> { String }, optional: false, nullable: false
|
|
12
|
+
field :schema_version, -> { String }, optional: false, nullable: false
|
|
13
|
+
field :payload, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Events
|
|
5
|
+
module V1
|
|
6
|
+
module Types
|
|
7
|
+
class EventScanPage < Internal::Types::Model
|
|
8
|
+
field :next_page_token, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :items, lambda {
|
|
10
|
+
Internal::Types::Array[Candid::Events::V1::Types::Event]
|
|
11
|
+
}, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Events
|
|
5
|
+
module V1
|
|
6
|
+
module Types
|
|
7
|
+
class GetEventScanRequest < Internal::Types::Model
|
|
8
|
+
field :page_token, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
10
|
+
field :event_types, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :created_before, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :created_after, -> { String }, optional: true, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -9,8 +9,6 @@ module Candid
|
|
|
9
9
|
@client = client
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
# NOTE: This service is in-development and can only be used by select partners. Please contact Candid Health to request access.
|
|
13
|
-
#
|
|
14
12
|
# Retrieve a list of inventory records based on the provided filters. Each inventory record provides the latest invoiceable status of the associated claim.
|
|
15
13
|
# The response is paginated, and the `page_token` can be used to retrieve subsequent pages. Initial requests should not include `page_token`.
|
|
16
14
|
#
|
|
@@ -41,8 +39,6 @@ module Candid
|
|
|
41
39
|
end
|
|
42
40
|
end
|
|
43
41
|
|
|
44
|
-
# NOTE: This service is in-development and can only be used by select partners. Please contact Candid Health to request access.
|
|
45
|
-
#
|
|
46
42
|
# Provides detailed itemization of invoice data for a specific claim.
|
|
47
43
|
#
|
|
48
44
|
# @return [Candid::PatientAr::V1::Types::InvoiceItemizationResponse]
|
|
@@ -30,6 +30,7 @@ module Candid
|
|
|
30
30
|
}, optional: true, nullable: false
|
|
31
31
|
field :note, -> { String }, optional: true, nullable: false
|
|
32
32
|
field :revenue_code, -> { String }, optional: true, nullable: false
|
|
33
|
+
field :prior_authorization_number, -> { String }, optional: true, nullable: false
|
|
33
34
|
end
|
|
34
35
|
end
|
|
35
36
|
end
|
data/lib/candid/version.rb
CHANGED
data/lib/candid.rb
CHANGED
|
@@ -381,6 +381,8 @@ require_relative "candid/encounters/v_4/types/schema_instance_validation_error"
|
|
|
381
381
|
require_relative "candid/encounters/v_4/types/schema_instance_validation_failure"
|
|
382
382
|
require_relative "candid/encounters/v_4/types/payer_plan_group_payer_does_not_match_insurance_card_error"
|
|
383
383
|
require_relative "candid/encounters/v_4/types/encounter_rendering_or_attending_provider_required_error"
|
|
384
|
+
require_relative "candid/events/v_1/types/event"
|
|
385
|
+
require_relative "candid/events/v_1/types/event_scan_page"
|
|
384
386
|
require_relative "candid/expected_network_status/v_1/types/expected_network_status"
|
|
385
387
|
require_relative "candid/expected_network_status/v_1/types/expected_network_status_response"
|
|
386
388
|
require_relative "candid/expected_network_status/v_2/types/line_of_business"
|
|
@@ -706,6 +708,8 @@ require_relative "candid/commons/types/http_service_unavailable_error_message"
|
|
|
706
708
|
require_relative "candid/commons/types/request_validation_error"
|
|
707
709
|
require_relative "candid/commons/types/updates_disabled_due_to_external_system_integration_error_message"
|
|
708
710
|
require_relative "candid/commons/types/organization_not_authorized_error_message"
|
|
711
|
+
require_relative "candid/commons/types/bad_request_error_message"
|
|
712
|
+
require_relative "candid/commons/types/internal_error_message"
|
|
709
713
|
require_relative "candid/diagnoses/types/diagnosis_not_found_error"
|
|
710
714
|
require_relative "candid/diagnoses/types/service_lines_must_have_at_least_one_diagnosis_error"
|
|
711
715
|
require_relative "candid/diagnoses/types/disallow_multiple_primary_diagnosis_error"
|
|
@@ -766,6 +770,9 @@ require_relative "candid/encounter_supplemental_information/v_1/client"
|
|
|
766
770
|
require_relative "candid/encounters/client"
|
|
767
771
|
require_relative "candid/encounters/v_4/client"
|
|
768
772
|
require_relative "candid/encounters/v_4/types/get_all_encounters_request"
|
|
773
|
+
require_relative "candid/events/client"
|
|
774
|
+
require_relative "candid/events/v_1/client"
|
|
775
|
+
require_relative "candid/events/v_1/types/get_event_scan_request"
|
|
769
776
|
require_relative "candid/expected_network_status/client"
|
|
770
777
|
require_relative "candid/expected_network_status/v_1/client"
|
|
771
778
|
require_relative "candid/expected_network_status/v_1/types/expected_network_status_request"
|
data/reference.md
CHANGED
|
@@ -4477,6 +4477,133 @@ client.encounters.v_4.update({});
|
|
|
4477
4477
|
</dl>
|
|
4478
4478
|
|
|
4479
4479
|
|
|
4480
|
+
</dd>
|
|
4481
|
+
</dl>
|
|
4482
|
+
</details>
|
|
4483
|
+
|
|
4484
|
+
## Events V1
|
|
4485
|
+
<details><summary><code>client.events.v_1.scan() -> Candid::Events::V1::Types::EventScanPage</code></summary>
|
|
4486
|
+
<dl>
|
|
4487
|
+
<dd>
|
|
4488
|
+
|
|
4489
|
+
#### 📝 Description
|
|
4490
|
+
|
|
4491
|
+
<dl>
|
|
4492
|
+
<dd>
|
|
4493
|
+
|
|
4494
|
+
<dl>
|
|
4495
|
+
<dd>
|
|
4496
|
+
|
|
4497
|
+
Scans the last 30 days of events. All results are sorted by created date, descending.
|
|
4498
|
+
</dd>
|
|
4499
|
+
</dl>
|
|
4500
|
+
</dd>
|
|
4501
|
+
</dl>
|
|
4502
|
+
|
|
4503
|
+
#### 🔌 Usage
|
|
4504
|
+
|
|
4505
|
+
<dl>
|
|
4506
|
+
<dd>
|
|
4507
|
+
|
|
4508
|
+
<dl>
|
|
4509
|
+
<dd>
|
|
4510
|
+
|
|
4511
|
+
```ruby
|
|
4512
|
+
client.events.v_1.scan();
|
|
4513
|
+
```
|
|
4514
|
+
</dd>
|
|
4515
|
+
</dl>
|
|
4516
|
+
</dd>
|
|
4517
|
+
</dl>
|
|
4518
|
+
|
|
4519
|
+
#### ⚙️ Parameters
|
|
4520
|
+
|
|
4521
|
+
<dl>
|
|
4522
|
+
<dd>
|
|
4523
|
+
|
|
4524
|
+
<dl>
|
|
4525
|
+
<dd>
|
|
4526
|
+
|
|
4527
|
+
**page_token:** `String`
|
|
4528
|
+
|
|
4529
|
+
</dd>
|
|
4530
|
+
</dl>
|
|
4531
|
+
|
|
4532
|
+
<dl>
|
|
4533
|
+
<dd>
|
|
4534
|
+
|
|
4535
|
+
**limit:** `Integer` — Number of events to return. Minimum value is 1, maximum is 100. Defaults to 10.
|
|
4536
|
+
|
|
4537
|
+
</dd>
|
|
4538
|
+
</dl>
|
|
4539
|
+
|
|
4540
|
+
<dl>
|
|
4541
|
+
<dd>
|
|
4542
|
+
|
|
4543
|
+
**event_types:** `String` — Event types to filter on. Defaults to showing all event types.
|
|
4544
|
+
|
|
4545
|
+
</dd>
|
|
4546
|
+
</dl>
|
|
4547
|
+
|
|
4548
|
+
<dl>
|
|
4549
|
+
<dd>
|
|
4550
|
+
|
|
4551
|
+
**created_before:** `String` — Filters for only events created before this time (inclusive).
|
|
4552
|
+
|
|
4553
|
+
</dd>
|
|
4554
|
+
</dl>
|
|
4555
|
+
|
|
4556
|
+
<dl>
|
|
4557
|
+
<dd>
|
|
4558
|
+
|
|
4559
|
+
**created_after:** `String` — Filters for only events created after this time (inclusive).
|
|
4560
|
+
|
|
4561
|
+
</dd>
|
|
4562
|
+
</dl>
|
|
4563
|
+
</dd>
|
|
4564
|
+
</dl>
|
|
4565
|
+
|
|
4566
|
+
|
|
4567
|
+
</dd>
|
|
4568
|
+
</dl>
|
|
4569
|
+
</details>
|
|
4570
|
+
|
|
4571
|
+
<details><summary><code>client.events.v_1.get(event_id) -> Candid::Events::V1::Types::Event</code></summary>
|
|
4572
|
+
<dl>
|
|
4573
|
+
<dd>
|
|
4574
|
+
|
|
4575
|
+
#### 🔌 Usage
|
|
4576
|
+
|
|
4577
|
+
<dl>
|
|
4578
|
+
<dd>
|
|
4579
|
+
|
|
4580
|
+
<dl>
|
|
4581
|
+
<dd>
|
|
4582
|
+
|
|
4583
|
+
```ruby
|
|
4584
|
+
client.events.v_1.get();
|
|
4585
|
+
```
|
|
4586
|
+
</dd>
|
|
4587
|
+
</dl>
|
|
4588
|
+
</dd>
|
|
4589
|
+
</dl>
|
|
4590
|
+
|
|
4591
|
+
#### ⚙️ Parameters
|
|
4592
|
+
|
|
4593
|
+
<dl>
|
|
4594
|
+
<dd>
|
|
4595
|
+
|
|
4596
|
+
<dl>
|
|
4597
|
+
<dd>
|
|
4598
|
+
|
|
4599
|
+
**event_id:** `String`
|
|
4600
|
+
|
|
4601
|
+
</dd>
|
|
4602
|
+
</dl>
|
|
4603
|
+
</dd>
|
|
4604
|
+
</dl>
|
|
4605
|
+
|
|
4606
|
+
|
|
4480
4607
|
</dd>
|
|
4481
4608
|
</dl>
|
|
4482
4609
|
</details>
|
|
@@ -8668,8 +8795,6 @@ client.organization_service_facilities.v_2.delete();
|
|
|
8668
8795
|
<dl>
|
|
8669
8796
|
<dd>
|
|
8670
8797
|
|
|
8671
|
-
NOTE: This service is in-development and can only be used by select partners. Please contact Candid Health to request access.
|
|
8672
|
-
|
|
8673
8798
|
Retrieve a list of inventory records based on the provided filters. Each inventory record provides the latest invoiceable status of the associated claim.
|
|
8674
8799
|
The response is paginated, and the `page_token` can be used to retrieve subsequent pages. Initial requests should not include `page_token`.
|
|
8675
8800
|
</dd>
|
|
@@ -8741,8 +8866,6 @@ client.patient_ar.v_1.list_inventory();
|
|
|
8741
8866
|
<dl>
|
|
8742
8867
|
<dd>
|
|
8743
8868
|
|
|
8744
|
-
NOTE: This service is in-development and can only be used by select partners. Please contact Candid Health to request access.
|
|
8745
|
-
|
|
8746
8869
|
Provides detailed itemization of invoice data for a specific claim.
|
|
8747
8870
|
</dd>
|
|
8748
8871
|
</dl>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: candidhealth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.16.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Candid
|
|
@@ -68,6 +68,7 @@ files:
|
|
|
68
68
|
- lib/candid/clinical_trials/v_1/types/clinical_trial.rb
|
|
69
69
|
- lib/candid/clinical_trials/v_1/types/clinical_trial_phase.rb
|
|
70
70
|
- lib/candid/clinical_trials/v_1/types/mutable_clinical_trial.rb
|
|
71
|
+
- lib/candid/commons/types/bad_request_error_message.rb
|
|
71
72
|
- lib/candid/commons/types/billing_provider_commercial_license_type.rb
|
|
72
73
|
- lib/candid/commons/types/claim_adjustment_group_codes.rb
|
|
73
74
|
- lib/candid/commons/types/claim_submission_payer_responsibility_type.rb
|
|
@@ -82,6 +83,7 @@ files:
|
|
|
82
83
|
- lib/candid/commons/types/http_service_unavailable_error_message.rb
|
|
83
84
|
- lib/candid/commons/types/insurance_type_code.rb
|
|
84
85
|
- lib/candid/commons/types/intended_submission_medium.rb
|
|
86
|
+
- lib/candid/commons/types/internal_error_message.rb
|
|
85
87
|
- lib/candid/commons/types/network_type.rb
|
|
86
88
|
- lib/candid/commons/types/next_responsible_party.rb
|
|
87
89
|
- lib/candid/commons/types/organization_not_authorized_error_message.rb
|
|
@@ -281,6 +283,11 @@ files:
|
|
|
281
283
|
- lib/candid/errors/response_error.rb
|
|
282
284
|
- lib/candid/errors/server_error.rb
|
|
283
285
|
- lib/candid/errors/timeout_error.rb
|
|
286
|
+
- lib/candid/events/client.rb
|
|
287
|
+
- lib/candid/events/v_1/client.rb
|
|
288
|
+
- lib/candid/events/v_1/types/event.rb
|
|
289
|
+
- lib/candid/events/v_1/types/event_scan_page.rb
|
|
290
|
+
- lib/candid/events/v_1/types/get_event_scan_request.rb
|
|
284
291
|
- lib/candid/expected_network_status/client.rb
|
|
285
292
|
- lib/candid/expected_network_status/v_1/client.rb
|
|
286
293
|
- lib/candid/expected_network_status/v_1/types/expected_network_status.rb
|