samplehc 0.10.0__py3-none-any.whl → 0.12.0__py3-none-any.whl
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.
- samplehc/__init__.py +3 -1
- samplehc/_base_client.py +12 -12
- samplehc/_client.py +8 -8
- samplehc/_compat.py +48 -48
- samplehc/_models.py +50 -44
- samplehc/_qs.py +7 -7
- samplehc/_types.py +53 -12
- samplehc/_utils/__init__.py +9 -2
- samplehc/_utils/_compat.py +45 -0
- samplehc/_utils/_datetime_parse.py +136 -0
- samplehc/_utils/_transform.py +13 -3
- samplehc/_utils/_typing.py +6 -1
- samplehc/_utils/_utils.py +4 -5
- samplehc/_version.py +1 -1
- samplehc/resources/v1/v1.py +9 -9
- samplehc/resources/v2/async_results.py +13 -13
- samplehc/resources/v2/browser_agents/__init__.py +33 -0
- samplehc/resources/v2/{browser_agents.py → browser_agents/browser_agents.py} +44 -12
- samplehc/resources/v2/browser_agents/runs/__init__.py +33 -0
- samplehc/resources/v2/browser_agents/runs/help_requests.py +191 -0
- samplehc/resources/v2/browser_agents/runs/runs.py +102 -0
- samplehc/resources/v2/browser_automation/availity.py +3 -3
- samplehc/resources/v2/clearinghouse/claim.py +29 -29
- samplehc/resources/v2/clearinghouse/clearinghouse.py +36 -36
- samplehc/resources/v2/clearinghouse/payers.py +5 -5
- samplehc/resources/v2/communication.py +29 -29
- samplehc/resources/v2/database.py +5 -5
- samplehc/resources/v2/documents/documents.py +152 -37
- samplehc/resources/v2/documents/formats.py +3 -3
- samplehc/resources/v2/documents/legacy.py +91 -6
- samplehc/resources/v2/documents/pdf_template.py +3 -3
- samplehc/resources/v2/documents/templates.py +27 -27
- samplehc/resources/v2/{events/events.py → events.py} +14 -46
- samplehc/resources/v2/hie/adt.py +7 -7
- samplehc/resources/v2/hie/documents.py +15 -15
- samplehc/resources/v2/integrations/__init__.py +28 -0
- samplehc/resources/v2/integrations/bank/transactions.py +5 -5
- samplehc/resources/v2/integrations/careviso.py +36 -36
- samplehc/resources/v2/integrations/glidian/glidian.py +13 -13
- samplehc/resources/v2/integrations/glidian/prior_authorizations/clinical_questions.py +5 -5
- samplehc/resources/v2/integrations/glidian/prior_authorizations/prior_authorizations.py +19 -19
- samplehc/resources/v2/integrations/integrations.py +64 -0
- samplehc/resources/v2/integrations/kno2/messages.py +5 -5
- samplehc/resources/v2/integrations/salesforce.py +193 -0
- samplehc/resources/v2/integrations/snowflake.py +3 -3
- samplehc/resources/v2/{events/integrations → integrations}/xcures.py +13 -13
- samplehc/resources/v2/ledger/__init__.py +27 -55
- samplehc/resources/v2/ledger/{orders.py → account.py} +123 -86
- samplehc/resources/v2/ledger/entry.py +381 -0
- samplehc/resources/v2/ledger/ledger.py +38 -1560
- samplehc/resources/v2/policies.py +47 -47
- samplehc/resources/v2/tasks/state.py +7 -7
- samplehc/resources/v2/tasks/tasks.py +15 -15
- samplehc/resources/v2/v2.py +16 -16
- samplehc/resources/v2/workflow_runs/step.py +3 -3
- samplehc/resources/v2/workflow_runs/workflow_runs.py +11 -11
- samplehc/resources/v2/workflows.py +13 -13
- samplehc/types/v2/__init__.py +1 -28
- samplehc/types/v2/browser_agents/runs/__init__.py +6 -0
- samplehc/types/v2/browser_agents/runs/help_request_resolve_params.py +18 -0
- samplehc/types/v2/browser_agents/runs/help_request_resolve_response.py +28 -0
- samplehc/types/v2/clearinghouse/claim_submit_params.py +10 -9
- samplehc/types/v2/clearinghouse_calculate_patient_cost_params.py +3 -2
- samplehc/types/v2/clearinghouse_check_eligibility_params.py +2 -2
- samplehc/types/v2/communication_send_letter_params.py +4 -3
- samplehc/types/v2/document_classify_params.py +3 -2
- samplehc/types/v2/document_extract_params.py +4 -1
- samplehc/types/v2/document_generate_csv_params.py +3 -2
- samplehc/types/v2/document_split_params.py +16 -1
- samplehc/types/v2/document_unzip_async_response.py +12 -0
- samplehc/types/v2/documents/__init__.py +2 -0
- samplehc/types/v2/documents/legacy_extract_params.py +8 -7
- samplehc/types/v2/documents/legacy_split_params.py +20 -0
- samplehc/types/v2/documents/legacy_split_response.py +12 -0
- samplehc/types/v2/documents/template_render_document_params.py +17 -5
- samplehc/types/v2/integrations/__init__.py +2 -0
- samplehc/types/v2/integrations/careviso_submit_prior_authorization_params.py +6 -5
- samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_params.py +3 -2
- samplehc/types/v2/integrations/salesforce_run_crud_action_params.py +22 -0
- samplehc/types/v2/ledger/__init__.py +6 -17
- samplehc/types/v2/ledger/account_writeoff_params.py +23 -0
- samplehc/types/v2/ledger/account_writeoff_response.py +12 -0
- samplehc/types/v2/ledger/entry_post_params.py +60 -0
- samplehc/types/v2/ledger/entry_post_response.py +10 -0
- samplehc/types/v2/ledger/entry_reverse_params.py +18 -0
- samplehc/types/v2/ledger/entry_reverse_response.py +10 -0
- {samplehc-0.10.0.dist-info → samplehc-0.12.0.dist-info}/METADATA +1 -1
- {samplehc-0.10.0.dist-info → samplehc-0.12.0.dist-info}/RECORD +92 -111
- samplehc/resources/v2/events/__init__.py +0 -33
- samplehc/resources/v2/events/integrations/__init__.py +0 -33
- samplehc/resources/v2/events/integrations/integrations.py +0 -102
- samplehc/resources/v2/ledger/institutions/__init__.py +0 -33
- samplehc/resources/v2/ledger/institutions/institutions.py +0 -258
- samplehc/resources/v2/ledger/institutions/orders.py +0 -169
- samplehc/resources/v2/ledger/insurance.py +0 -141
- samplehc/resources/v2/ledger/patients.py +0 -141
- samplehc/types/v2/events/integrations/__init__.py +0 -5
- samplehc/types/v2/ledger/institution_list_outstanding_accounts_response.py +0 -25
- samplehc/types/v2/ledger/institution_retrieve_outstanding_orders_response.py +0 -25
- samplehc/types/v2/ledger/institutions/__init__.py +0 -5
- samplehc/types/v2/ledger/institutions/order_retrieve_balance_response.py +0 -12
- samplehc/types/v2/ledger/insurance_list_outstanding_accounts_response.py +0 -25
- samplehc/types/v2/ledger/order_retrieve_balances_response.py +0 -31
- samplehc/types/v2/ledger/order_retrieve_batch_balances_params.py +0 -15
- samplehc/types/v2/ledger/order_retrieve_batch_balances_response.py +0 -38
- samplehc/types/v2/ledger/patient_list_outstanding_accounts_response.py +0 -22
- samplehc/types/v2/ledger_assign_invoice_params.py +0 -34
- samplehc/types/v2/ledger_assign_invoice_response.py +0 -12
- samplehc/types/v2/ledger_claim_adjustment_params.py +0 -34
- samplehc/types/v2/ledger_claim_adjustment_response.py +0 -12
- samplehc/types/v2/ledger_claim_payment_params.py +0 -34
- samplehc/types/v2/ledger_claim_payment_response.py +0 -12
- samplehc/types/v2/ledger_institution_adjustment_params.py +0 -31
- samplehc/types/v2/ledger_institution_adjustment_response.py +0 -12
- samplehc/types/v2/ledger_institution_payment_params.py +0 -31
- samplehc/types/v2/ledger_institution_payment_response.py +0 -12
- samplehc/types/v2/ledger_new_order_params.py +0 -22
- samplehc/types/v2/ledger_new_order_response.py +0 -12
- samplehc/types/v2/ledger_order_writeoff_params.py +0 -28
- samplehc/types/v2/ledger_order_writeoff_response.py +0 -12
- samplehc/types/v2/ledger_patient_adjustment_params.py +0 -31
- samplehc/types/v2/ledger_patient_adjustment_response.py +0 -12
- samplehc/types/v2/ledger_patient_payment_params.py +0 -28
- samplehc/types/v2/ledger_patient_payment_response.py +0 -12
- samplehc/types/v2/ledger_post_remittance_accepted_params.py +0 -37
- samplehc/types/v2/ledger_post_remittance_accepted_response.py +0 -12
- samplehc/types/v2/ledger_reverse_entry_params.py +0 -12
- samplehc/types/v2/ledger_reverse_entry_response.py +0 -12
- /samplehc/types/v2/{events → browser_agents}/__init__.py +0 -0
- /samplehc/types/v2/{events/integrations → integrations}/xcure_make_request_params.py +0 -0
- {samplehc-0.10.0.dist-info → samplehc-0.12.0.dist-info}/WHEEL +0 -0
- {samplehc-0.10.0.dist-info → samplehc-0.12.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,98 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
AsyncOrdersResource,
|
|
13
|
-
OrdersResourceWithRawResponse,
|
|
14
|
-
AsyncOrdersResourceWithRawResponse,
|
|
15
|
-
OrdersResourceWithStreamingResponse,
|
|
16
|
-
AsyncOrdersResourceWithStreamingResponse,
|
|
17
|
-
)
|
|
18
|
-
from .patients import (
|
|
19
|
-
PatientsResource,
|
|
20
|
-
AsyncPatientsResource,
|
|
21
|
-
PatientsResourceWithRawResponse,
|
|
22
|
-
AsyncPatientsResourceWithRawResponse,
|
|
23
|
-
PatientsResourceWithStreamingResponse,
|
|
24
|
-
AsyncPatientsResourceWithStreamingResponse,
|
|
5
|
+
from .entry import (
|
|
6
|
+
EntryResource,
|
|
7
|
+
AsyncEntryResource,
|
|
8
|
+
EntryResourceWithRawResponse,
|
|
9
|
+
AsyncEntryResourceWithRawResponse,
|
|
10
|
+
EntryResourceWithStreamingResponse,
|
|
11
|
+
AsyncEntryResourceWithStreamingResponse,
|
|
25
12
|
)
|
|
26
|
-
from
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
InsuranceResourceWithStreamingResponse,
|
|
34
|
-
AsyncInsuranceResourceWithStreamingResponse,
|
|
13
|
+
from .account import (
|
|
14
|
+
AccountResource,
|
|
15
|
+
AsyncAccountResource,
|
|
16
|
+
AccountResourceWithRawResponse,
|
|
17
|
+
AsyncAccountResourceWithRawResponse,
|
|
18
|
+
AccountResourceWithStreamingResponse,
|
|
19
|
+
AsyncAccountResourceWithStreamingResponse,
|
|
35
20
|
)
|
|
36
21
|
from ...._compat import cached_property
|
|
37
|
-
from ....types.v2 import (
|
|
38
|
-
ledger_new_order_params,
|
|
39
|
-
ledger_claim_payment_params,
|
|
40
|
-
ledger_reverse_entry_params,
|
|
41
|
-
ledger_assign_invoice_params,
|
|
42
|
-
ledger_order_writeoff_params,
|
|
43
|
-
ledger_patient_payment_params,
|
|
44
|
-
ledger_claim_adjustment_params,
|
|
45
|
-
ledger_patient_adjustment_params,
|
|
46
|
-
ledger_institution_payment_params,
|
|
47
|
-
ledger_institution_adjustment_params,
|
|
48
|
-
ledger_post_remittance_accepted_params,
|
|
49
|
-
)
|
|
50
22
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
51
|
-
from ...._response import (
|
|
52
|
-
to_raw_response_wrapper,
|
|
53
|
-
to_streamed_response_wrapper,
|
|
54
|
-
async_to_raw_response_wrapper,
|
|
55
|
-
async_to_streamed_response_wrapper,
|
|
56
|
-
)
|
|
57
|
-
from ...._base_client import make_request_options
|
|
58
|
-
from .institutions.institutions import (
|
|
59
|
-
InstitutionsResource,
|
|
60
|
-
AsyncInstitutionsResource,
|
|
61
|
-
InstitutionsResourceWithRawResponse,
|
|
62
|
-
AsyncInstitutionsResourceWithRawResponse,
|
|
63
|
-
InstitutionsResourceWithStreamingResponse,
|
|
64
|
-
AsyncInstitutionsResourceWithStreamingResponse,
|
|
65
|
-
)
|
|
66
|
-
from ....types.v2.ledger_new_order_response import LedgerNewOrderResponse
|
|
67
|
-
from ....types.v2.ledger_claim_payment_response import LedgerClaimPaymentResponse
|
|
68
|
-
from ....types.v2.ledger_reverse_entry_response import LedgerReverseEntryResponse
|
|
69
|
-
from ....types.v2.ledger_assign_invoice_response import LedgerAssignInvoiceResponse
|
|
70
|
-
from ....types.v2.ledger_order_writeoff_response import LedgerOrderWriteoffResponse
|
|
71
|
-
from ....types.v2.ledger_patient_payment_response import LedgerPatientPaymentResponse
|
|
72
|
-
from ....types.v2.ledger_claim_adjustment_response import LedgerClaimAdjustmentResponse
|
|
73
|
-
from ....types.v2.ledger_patient_adjustment_response import LedgerPatientAdjustmentResponse
|
|
74
|
-
from ....types.v2.ledger_institution_payment_response import LedgerInstitutionPaymentResponse
|
|
75
|
-
from ....types.v2.ledger_institution_adjustment_response import LedgerInstitutionAdjustmentResponse
|
|
76
|
-
from ....types.v2.ledger_post_remittance_accepted_response import LedgerPostRemittanceAcceptedResponse
|
|
77
23
|
|
|
78
24
|
__all__ = ["LedgerResource", "AsyncLedgerResource"]
|
|
79
25
|
|
|
80
26
|
|
|
81
27
|
class LedgerResource(SyncAPIResource):
|
|
82
28
|
@cached_property
|
|
83
|
-
def
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
@cached_property
|
|
87
|
-
def insurance(self) -> InsuranceResource:
|
|
88
|
-
return InsuranceResource(self._client)
|
|
89
|
-
|
|
90
|
-
@cached_property
|
|
91
|
-
def patients(self) -> PatientsResource:
|
|
92
|
-
return PatientsResource(self._client)
|
|
29
|
+
def entry(self) -> EntryResource:
|
|
30
|
+
return EntryResource(self._client)
|
|
93
31
|
|
|
94
32
|
@cached_property
|
|
95
|
-
def
|
|
96
|
-
return
|
|
33
|
+
def account(self) -> AccountResource:
|
|
34
|
+
return AccountResource(self._client)
|
|
97
35
|
|
|
98
36
|
@cached_property
|
|
99
37
|
def with_raw_response(self) -> LedgerResourceWithRawResponse:
|
|
@@ -114,665 +52,15 @@ class LedgerResource(SyncAPIResource):
|
|
|
114
52
|
"""
|
|
115
53
|
return LedgerResourceWithStreamingResponse(self)
|
|
116
54
|
|
|
117
|
-
def assign_invoice(
|
|
118
|
-
self,
|
|
119
|
-
*,
|
|
120
|
-
amount_usd_cents: float,
|
|
121
|
-
ik: str,
|
|
122
|
-
institution_id: str,
|
|
123
|
-
invoice_id: str,
|
|
124
|
-
order_id: str,
|
|
125
|
-
reason: str,
|
|
126
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
127
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
128
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
129
|
-
extra_headers: Headers | None = None,
|
|
130
|
-
extra_query: Query | None = None,
|
|
131
|
-
extra_body: Body | None = None,
|
|
132
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
133
|
-
) -> LedgerAssignInvoiceResponse:
|
|
134
|
-
"""
|
|
135
|
-
Assigns an invoice to an institution for a given order.
|
|
136
|
-
|
|
137
|
-
Args:
|
|
138
|
-
amount_usd_cents: Assignment amount in cents (positive or negative).
|
|
139
|
-
|
|
140
|
-
ik: Idempotency key for the assignment.
|
|
141
|
-
|
|
142
|
-
institution_id: Identifier of the institution for the assignment.
|
|
143
|
-
|
|
144
|
-
invoice_id: Invoice ID being assigned.
|
|
145
|
-
|
|
146
|
-
order_id: Order ID associated with the assignment.
|
|
147
|
-
|
|
148
|
-
reason: Reason for the assignment.
|
|
149
|
-
|
|
150
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
151
|
-
|
|
152
|
-
extra_headers: Send extra headers
|
|
153
|
-
|
|
154
|
-
extra_query: Add additional query parameters to the request
|
|
155
|
-
|
|
156
|
-
extra_body: Add additional JSON properties to the request
|
|
157
|
-
|
|
158
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
159
|
-
"""
|
|
160
|
-
return self._post(
|
|
161
|
-
"/api/v2/ledger/invoice-assignment",
|
|
162
|
-
body=maybe_transform(
|
|
163
|
-
{
|
|
164
|
-
"amount_usd_cents": amount_usd_cents,
|
|
165
|
-
"ik": ik,
|
|
166
|
-
"institution_id": institution_id,
|
|
167
|
-
"invoice_id": invoice_id,
|
|
168
|
-
"order_id": order_id,
|
|
169
|
-
"reason": reason,
|
|
170
|
-
"posted_at": posted_at,
|
|
171
|
-
},
|
|
172
|
-
ledger_assign_invoice_params.LedgerAssignInvoiceParams,
|
|
173
|
-
),
|
|
174
|
-
options=make_request_options(
|
|
175
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
176
|
-
),
|
|
177
|
-
cast_to=LedgerAssignInvoiceResponse,
|
|
178
|
-
)
|
|
179
|
-
|
|
180
|
-
def claim_adjustment(
|
|
181
|
-
self,
|
|
182
|
-
*,
|
|
183
|
-
amount_usd_cents: float,
|
|
184
|
-
claim_id: str,
|
|
185
|
-
ik: str,
|
|
186
|
-
insurance_id: str,
|
|
187
|
-
order_id: str,
|
|
188
|
-
reason: str,
|
|
189
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
190
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
191
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
192
|
-
extra_headers: Headers | None = None,
|
|
193
|
-
extra_query: Query | None = None,
|
|
194
|
-
extra_body: Body | None = None,
|
|
195
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
196
|
-
) -> LedgerClaimAdjustmentResponse:
|
|
197
|
-
"""Posts a claim adjustment to the ledger.
|
|
198
|
-
|
|
199
|
-
All monetary amounts should be provided
|
|
200
|
-
in cents.
|
|
201
|
-
|
|
202
|
-
Args:
|
|
203
|
-
amount_usd_cents: Adjustment amount in cents (positive or negative).
|
|
204
|
-
|
|
205
|
-
claim_id: Identifier of the claim associated with this adjustment.
|
|
206
|
-
|
|
207
|
-
ik: Idempotency key for the adjustment.
|
|
208
|
-
|
|
209
|
-
insurance_id: Identifier of the insurance for the adjustment.
|
|
210
|
-
|
|
211
|
-
order_id: Order ID associated with the adjustment.
|
|
212
|
-
|
|
213
|
-
reason: Reason for the adjustment.
|
|
214
|
-
|
|
215
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
216
|
-
|
|
217
|
-
extra_headers: Send extra headers
|
|
218
|
-
|
|
219
|
-
extra_query: Add additional query parameters to the request
|
|
220
|
-
|
|
221
|
-
extra_body: Add additional JSON properties to the request
|
|
222
|
-
|
|
223
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
224
|
-
"""
|
|
225
|
-
return self._post(
|
|
226
|
-
"/api/v2/ledger/claim-adjustment",
|
|
227
|
-
body=maybe_transform(
|
|
228
|
-
{
|
|
229
|
-
"amount_usd_cents": amount_usd_cents,
|
|
230
|
-
"claim_id": claim_id,
|
|
231
|
-
"ik": ik,
|
|
232
|
-
"insurance_id": insurance_id,
|
|
233
|
-
"order_id": order_id,
|
|
234
|
-
"reason": reason,
|
|
235
|
-
"posted_at": posted_at,
|
|
236
|
-
},
|
|
237
|
-
ledger_claim_adjustment_params.LedgerClaimAdjustmentParams,
|
|
238
|
-
),
|
|
239
|
-
options=make_request_options(
|
|
240
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
241
|
-
),
|
|
242
|
-
cast_to=LedgerClaimAdjustmentResponse,
|
|
243
|
-
)
|
|
244
|
-
|
|
245
|
-
def claim_payment(
|
|
246
|
-
self,
|
|
247
|
-
*,
|
|
248
|
-
amount_usd_cents: float,
|
|
249
|
-
claim_id: str,
|
|
250
|
-
ik: str,
|
|
251
|
-
insurance_id: str,
|
|
252
|
-
order_id: str,
|
|
253
|
-
reason: str,
|
|
254
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
255
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
256
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
257
|
-
extra_headers: Headers | None = None,
|
|
258
|
-
extra_query: Query | None = None,
|
|
259
|
-
extra_body: Body | None = None,
|
|
260
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
261
|
-
) -> LedgerClaimPaymentResponse:
|
|
262
|
-
"""Posts a claim payment to the ledger.
|
|
263
|
-
|
|
264
|
-
All monetary amounts should be provided in
|
|
265
|
-
cents.
|
|
266
|
-
|
|
267
|
-
Args:
|
|
268
|
-
amount_usd_cents: Payment amount in cents.
|
|
269
|
-
|
|
270
|
-
claim_id: Identifier of the claim associated with this payment.
|
|
271
|
-
|
|
272
|
-
ik: Idempotency key for the payment.
|
|
273
|
-
|
|
274
|
-
insurance_id: Identifier of the insurance for the payment.
|
|
275
|
-
|
|
276
|
-
order_id: Order ID associated with the payment.
|
|
277
|
-
|
|
278
|
-
reason: Reason for the payment.
|
|
279
|
-
|
|
280
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
281
|
-
|
|
282
|
-
extra_headers: Send extra headers
|
|
283
|
-
|
|
284
|
-
extra_query: Add additional query parameters to the request
|
|
285
|
-
|
|
286
|
-
extra_body: Add additional JSON properties to the request
|
|
287
|
-
|
|
288
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
289
|
-
"""
|
|
290
|
-
return self._post(
|
|
291
|
-
"/api/v2/ledger/claim-payment",
|
|
292
|
-
body=maybe_transform(
|
|
293
|
-
{
|
|
294
|
-
"amount_usd_cents": amount_usd_cents,
|
|
295
|
-
"claim_id": claim_id,
|
|
296
|
-
"ik": ik,
|
|
297
|
-
"insurance_id": insurance_id,
|
|
298
|
-
"order_id": order_id,
|
|
299
|
-
"reason": reason,
|
|
300
|
-
"posted_at": posted_at,
|
|
301
|
-
},
|
|
302
|
-
ledger_claim_payment_params.LedgerClaimPaymentParams,
|
|
303
|
-
),
|
|
304
|
-
options=make_request_options(
|
|
305
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
306
|
-
),
|
|
307
|
-
cast_to=LedgerClaimPaymentResponse,
|
|
308
|
-
)
|
|
309
|
-
|
|
310
|
-
def institution_adjustment(
|
|
311
|
-
self,
|
|
312
|
-
*,
|
|
313
|
-
amount_usd_cents: float,
|
|
314
|
-
ik: str,
|
|
315
|
-
institution_id: str,
|
|
316
|
-
order_id: str,
|
|
317
|
-
reason: str,
|
|
318
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
319
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
320
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
321
|
-
extra_headers: Headers | None = None,
|
|
322
|
-
extra_query: Query | None = None,
|
|
323
|
-
extra_body: Body | None = None,
|
|
324
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
325
|
-
) -> LedgerInstitutionAdjustmentResponse:
|
|
326
|
-
"""Posts an institution adjustment to the ledger.
|
|
327
|
-
|
|
328
|
-
All monetary amounts should be
|
|
329
|
-
provided in cents.
|
|
330
|
-
|
|
331
|
-
Args:
|
|
332
|
-
amount_usd_cents: Adjustment amount in cents (positive or negative).
|
|
333
|
-
|
|
334
|
-
ik: Idempotency key for the adjustment.
|
|
335
|
-
|
|
336
|
-
institution_id: Identifier of the institution for the adjustment.
|
|
337
|
-
|
|
338
|
-
order_id: Order ID associated with the adjustment.
|
|
339
|
-
|
|
340
|
-
reason: Reason for the adjustment.
|
|
341
|
-
|
|
342
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
343
|
-
|
|
344
|
-
extra_headers: Send extra headers
|
|
345
|
-
|
|
346
|
-
extra_query: Add additional query parameters to the request
|
|
347
|
-
|
|
348
|
-
extra_body: Add additional JSON properties to the request
|
|
349
|
-
|
|
350
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
351
|
-
"""
|
|
352
|
-
return self._post(
|
|
353
|
-
"/api/v2/ledger/institution-adjustment",
|
|
354
|
-
body=maybe_transform(
|
|
355
|
-
{
|
|
356
|
-
"amount_usd_cents": amount_usd_cents,
|
|
357
|
-
"ik": ik,
|
|
358
|
-
"institution_id": institution_id,
|
|
359
|
-
"order_id": order_id,
|
|
360
|
-
"reason": reason,
|
|
361
|
-
"posted_at": posted_at,
|
|
362
|
-
},
|
|
363
|
-
ledger_institution_adjustment_params.LedgerInstitutionAdjustmentParams,
|
|
364
|
-
),
|
|
365
|
-
options=make_request_options(
|
|
366
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
367
|
-
),
|
|
368
|
-
cast_to=LedgerInstitutionAdjustmentResponse,
|
|
369
|
-
)
|
|
370
|
-
|
|
371
|
-
def institution_payment(
|
|
372
|
-
self,
|
|
373
|
-
*,
|
|
374
|
-
amount_usd_cents: float,
|
|
375
|
-
ik: str,
|
|
376
|
-
institution_id: str,
|
|
377
|
-
invoice_id: str,
|
|
378
|
-
reason: str,
|
|
379
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
380
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
381
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
382
|
-
extra_headers: Headers | None = None,
|
|
383
|
-
extra_query: Query | None = None,
|
|
384
|
-
extra_body: Body | None = None,
|
|
385
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
386
|
-
) -> LedgerInstitutionPaymentResponse:
|
|
387
|
-
"""Posts an institution payment to the ledger.
|
|
388
|
-
|
|
389
|
-
All monetary amounts should be
|
|
390
|
-
provided in cents.
|
|
391
|
-
|
|
392
|
-
Args:
|
|
393
|
-
amount_usd_cents: Payment amount in cents.
|
|
394
|
-
|
|
395
|
-
ik: Idempotency key for the payment.
|
|
396
|
-
|
|
397
|
-
institution_id: Identifier of the institution for the payment.
|
|
398
|
-
|
|
399
|
-
invoice_id: Identifier of the invoice associated with this payment.
|
|
400
|
-
|
|
401
|
-
reason: Reason for the payment.
|
|
402
|
-
|
|
403
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
404
|
-
|
|
405
|
-
extra_headers: Send extra headers
|
|
406
|
-
|
|
407
|
-
extra_query: Add additional query parameters to the request
|
|
408
|
-
|
|
409
|
-
extra_body: Add additional JSON properties to the request
|
|
410
|
-
|
|
411
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
412
|
-
"""
|
|
413
|
-
return self._post(
|
|
414
|
-
"/api/v2/ledger/institution-payment",
|
|
415
|
-
body=maybe_transform(
|
|
416
|
-
{
|
|
417
|
-
"amount_usd_cents": amount_usd_cents,
|
|
418
|
-
"ik": ik,
|
|
419
|
-
"institution_id": institution_id,
|
|
420
|
-
"invoice_id": invoice_id,
|
|
421
|
-
"reason": reason,
|
|
422
|
-
"posted_at": posted_at,
|
|
423
|
-
},
|
|
424
|
-
ledger_institution_payment_params.LedgerInstitutionPaymentParams,
|
|
425
|
-
),
|
|
426
|
-
options=make_request_options(
|
|
427
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
428
|
-
),
|
|
429
|
-
cast_to=LedgerInstitutionPaymentResponse,
|
|
430
|
-
)
|
|
431
|
-
|
|
432
|
-
def new_order(
|
|
433
|
-
self,
|
|
434
|
-
*,
|
|
435
|
-
amount_usd_cents: float,
|
|
436
|
-
order_id: str,
|
|
437
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
438
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
439
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
440
|
-
extra_headers: Headers | None = None,
|
|
441
|
-
extra_query: Query | None = None,
|
|
442
|
-
extra_body: Body | None = None,
|
|
443
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
444
|
-
) -> LedgerNewOrderResponse:
|
|
445
|
-
"""
|
|
446
|
-
Creates a new ledger entry for an order, linking claim, institution, patient,
|
|
447
|
-
and insurance financial details. All monetary amounts should be provided in
|
|
448
|
-
cents.
|
|
449
|
-
|
|
450
|
-
Args:
|
|
451
|
-
amount_usd_cents: Total amount for the order, in cents.
|
|
452
|
-
|
|
453
|
-
order_id: Unique identifier for the order being processed.
|
|
454
|
-
|
|
455
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
456
|
-
|
|
457
|
-
extra_headers: Send extra headers
|
|
458
|
-
|
|
459
|
-
extra_query: Add additional query parameters to the request
|
|
460
|
-
|
|
461
|
-
extra_body: Add additional JSON properties to the request
|
|
462
|
-
|
|
463
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
464
|
-
"""
|
|
465
|
-
return self._post(
|
|
466
|
-
"/api/v2/ledger/new-order",
|
|
467
|
-
body=maybe_transform(
|
|
468
|
-
{
|
|
469
|
-
"amount_usd_cents": amount_usd_cents,
|
|
470
|
-
"order_id": order_id,
|
|
471
|
-
"posted_at": posted_at,
|
|
472
|
-
},
|
|
473
|
-
ledger_new_order_params.LedgerNewOrderParams,
|
|
474
|
-
),
|
|
475
|
-
options=make_request_options(
|
|
476
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
477
|
-
),
|
|
478
|
-
cast_to=LedgerNewOrderResponse,
|
|
479
|
-
)
|
|
480
|
-
|
|
481
|
-
def order_writeoff(
|
|
482
|
-
self,
|
|
483
|
-
*,
|
|
484
|
-
amount_usd_cents: float,
|
|
485
|
-
ik: str,
|
|
486
|
-
order_id: str,
|
|
487
|
-
reason: str,
|
|
488
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
489
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
490
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
491
|
-
extra_headers: Headers | None = None,
|
|
492
|
-
extra_query: Query | None = None,
|
|
493
|
-
extra_body: Body | None = None,
|
|
494
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
495
|
-
) -> LedgerOrderWriteoffResponse:
|
|
496
|
-
"""Posts an order write-off to the ledger.
|
|
497
|
-
|
|
498
|
-
All monetary amounts should be provided
|
|
499
|
-
in cents.
|
|
500
|
-
|
|
501
|
-
Args:
|
|
502
|
-
amount_usd_cents: Write-off amount in cents.
|
|
503
|
-
|
|
504
|
-
ik: Idempotency key for the write-off.
|
|
505
|
-
|
|
506
|
-
order_id: Order ID associated with the write-off.
|
|
507
|
-
|
|
508
|
-
reason: Reason for the write-off.
|
|
509
|
-
|
|
510
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
511
|
-
|
|
512
|
-
extra_headers: Send extra headers
|
|
513
|
-
|
|
514
|
-
extra_query: Add additional query parameters to the request
|
|
515
|
-
|
|
516
|
-
extra_body: Add additional JSON properties to the request
|
|
517
|
-
|
|
518
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
519
|
-
"""
|
|
520
|
-
return self._post(
|
|
521
|
-
"/api/v2/ledger/order-writeoff",
|
|
522
|
-
body=maybe_transform(
|
|
523
|
-
{
|
|
524
|
-
"amount_usd_cents": amount_usd_cents,
|
|
525
|
-
"ik": ik,
|
|
526
|
-
"order_id": order_id,
|
|
527
|
-
"reason": reason,
|
|
528
|
-
"posted_at": posted_at,
|
|
529
|
-
},
|
|
530
|
-
ledger_order_writeoff_params.LedgerOrderWriteoffParams,
|
|
531
|
-
),
|
|
532
|
-
options=make_request_options(
|
|
533
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
534
|
-
),
|
|
535
|
-
cast_to=LedgerOrderWriteoffResponse,
|
|
536
|
-
)
|
|
537
|
-
|
|
538
|
-
def patient_adjustment(
|
|
539
|
-
self,
|
|
540
|
-
*,
|
|
541
|
-
amount_usd_cents: float,
|
|
542
|
-
ik: str,
|
|
543
|
-
order_id: str,
|
|
544
|
-
patient_id: str,
|
|
545
|
-
reason: str,
|
|
546
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
547
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
548
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
549
|
-
extra_headers: Headers | None = None,
|
|
550
|
-
extra_query: Query | None = None,
|
|
551
|
-
extra_body: Body | None = None,
|
|
552
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
553
|
-
) -> LedgerPatientAdjustmentResponse:
|
|
554
|
-
"""Posts a patient adjustment to the ledger.
|
|
555
|
-
|
|
556
|
-
All monetary amounts should be
|
|
557
|
-
provided in cents.
|
|
558
|
-
|
|
559
|
-
Args:
|
|
560
|
-
amount_usd_cents: Adjustment amount in cents (positive or negative).
|
|
561
|
-
|
|
562
|
-
ik: Idempotency key for the adjustment.
|
|
563
|
-
|
|
564
|
-
order_id: Order ID associated with the adjustment.
|
|
565
|
-
|
|
566
|
-
patient_id: Identifier of the patient for the adjustment.
|
|
567
|
-
|
|
568
|
-
reason: Reason for the adjustment.
|
|
569
|
-
|
|
570
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
571
|
-
|
|
572
|
-
extra_headers: Send extra headers
|
|
573
|
-
|
|
574
|
-
extra_query: Add additional query parameters to the request
|
|
575
|
-
|
|
576
|
-
extra_body: Add additional JSON properties to the request
|
|
577
|
-
|
|
578
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
579
|
-
"""
|
|
580
|
-
return self._post(
|
|
581
|
-
"/api/v2/ledger/patient-adjustment",
|
|
582
|
-
body=maybe_transform(
|
|
583
|
-
{
|
|
584
|
-
"amount_usd_cents": amount_usd_cents,
|
|
585
|
-
"ik": ik,
|
|
586
|
-
"order_id": order_id,
|
|
587
|
-
"patient_id": patient_id,
|
|
588
|
-
"reason": reason,
|
|
589
|
-
"posted_at": posted_at,
|
|
590
|
-
},
|
|
591
|
-
ledger_patient_adjustment_params.LedgerPatientAdjustmentParams,
|
|
592
|
-
),
|
|
593
|
-
options=make_request_options(
|
|
594
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
595
|
-
),
|
|
596
|
-
cast_to=LedgerPatientAdjustmentResponse,
|
|
597
|
-
)
|
|
598
|
-
|
|
599
|
-
def patient_payment(
|
|
600
|
-
self,
|
|
601
|
-
*,
|
|
602
|
-
amount_usd_cents: float,
|
|
603
|
-
ik: str,
|
|
604
|
-
patient_id: str,
|
|
605
|
-
reason: str,
|
|
606
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
607
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
608
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
609
|
-
extra_headers: Headers | None = None,
|
|
610
|
-
extra_query: Query | None = None,
|
|
611
|
-
extra_body: Body | None = None,
|
|
612
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
613
|
-
) -> LedgerPatientPaymentResponse:
|
|
614
|
-
"""Posts a patient payment to the ledger.
|
|
615
|
-
|
|
616
|
-
All monetary amounts should be provided
|
|
617
|
-
in cents.
|
|
618
|
-
|
|
619
|
-
Args:
|
|
620
|
-
amount_usd_cents: Payment amount in cents.
|
|
621
|
-
|
|
622
|
-
ik: Idempotency key for the payment.
|
|
623
|
-
|
|
624
|
-
patient_id: Identifier of the patient for the payment.
|
|
625
|
-
|
|
626
|
-
reason: Reason for the payment.
|
|
627
|
-
|
|
628
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
629
|
-
|
|
630
|
-
extra_headers: Send extra headers
|
|
631
|
-
|
|
632
|
-
extra_query: Add additional query parameters to the request
|
|
633
|
-
|
|
634
|
-
extra_body: Add additional JSON properties to the request
|
|
635
|
-
|
|
636
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
637
|
-
"""
|
|
638
|
-
return self._post(
|
|
639
|
-
"/api/v2/ledger/patient-payment",
|
|
640
|
-
body=maybe_transform(
|
|
641
|
-
{
|
|
642
|
-
"amount_usd_cents": amount_usd_cents,
|
|
643
|
-
"ik": ik,
|
|
644
|
-
"patient_id": patient_id,
|
|
645
|
-
"reason": reason,
|
|
646
|
-
"posted_at": posted_at,
|
|
647
|
-
},
|
|
648
|
-
ledger_patient_payment_params.LedgerPatientPaymentParams,
|
|
649
|
-
),
|
|
650
|
-
options=make_request_options(
|
|
651
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
652
|
-
),
|
|
653
|
-
cast_to=LedgerPatientPaymentResponse,
|
|
654
|
-
)
|
|
655
|
-
|
|
656
|
-
def post_remittance_accepted(
|
|
657
|
-
self,
|
|
658
|
-
*,
|
|
659
|
-
adjustment_usd_cents: float,
|
|
660
|
-
claim_id: str,
|
|
661
|
-
ik: str,
|
|
662
|
-
insurance_id: str,
|
|
663
|
-
order_id: str,
|
|
664
|
-
patient_id: str,
|
|
665
|
-
patient_responsibility_usd_cents: float,
|
|
666
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
667
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
668
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
669
|
-
extra_headers: Headers | None = None,
|
|
670
|
-
extra_query: Query | None = None,
|
|
671
|
-
extra_body: Body | None = None,
|
|
672
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
673
|
-
) -> LedgerPostRemittanceAcceptedResponse:
|
|
674
|
-
"""Posts a remittance accepted entry to the ledger.
|
|
675
|
-
|
|
676
|
-
All monetary amounts should be
|
|
677
|
-
provided in cents.
|
|
678
|
-
|
|
679
|
-
Args:
|
|
680
|
-
adjustment_usd_cents: Adjustment amount in cents (positive or negative).
|
|
681
|
-
|
|
682
|
-
claim_id: Identifier of the claim associated with this remittance.
|
|
683
|
-
|
|
684
|
-
ik: Idempotency key for the remittance.
|
|
685
|
-
|
|
686
|
-
insurance_id: Identifier of the insurance for the remittance.
|
|
687
|
-
|
|
688
|
-
order_id: Order ID associated with the remittance.
|
|
689
|
-
|
|
690
|
-
patient_id: Identifier of the patient for the remittance.
|
|
691
|
-
|
|
692
|
-
patient_responsibility_usd_cents: Patient responsibility amount in cents.
|
|
693
|
-
|
|
694
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
695
|
-
|
|
696
|
-
extra_headers: Send extra headers
|
|
697
|
-
|
|
698
|
-
extra_query: Add additional query parameters to the request
|
|
699
|
-
|
|
700
|
-
extra_body: Add additional JSON properties to the request
|
|
701
|
-
|
|
702
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
703
|
-
"""
|
|
704
|
-
return self._post(
|
|
705
|
-
"/api/v2/ledger/remittance-accepted",
|
|
706
|
-
body=maybe_transform(
|
|
707
|
-
{
|
|
708
|
-
"adjustment_usd_cents": adjustment_usd_cents,
|
|
709
|
-
"claim_id": claim_id,
|
|
710
|
-
"ik": ik,
|
|
711
|
-
"insurance_id": insurance_id,
|
|
712
|
-
"order_id": order_id,
|
|
713
|
-
"patient_id": patient_id,
|
|
714
|
-
"patient_responsibility_usd_cents": patient_responsibility_usd_cents,
|
|
715
|
-
"posted_at": posted_at,
|
|
716
|
-
},
|
|
717
|
-
ledger_post_remittance_accepted_params.LedgerPostRemittanceAcceptedParams,
|
|
718
|
-
),
|
|
719
|
-
options=make_request_options(
|
|
720
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
721
|
-
),
|
|
722
|
-
cast_to=LedgerPostRemittanceAcceptedResponse,
|
|
723
|
-
)
|
|
724
|
-
|
|
725
|
-
def reverse_entry(
|
|
726
|
-
self,
|
|
727
|
-
*,
|
|
728
|
-
ik: str,
|
|
729
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
730
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
731
|
-
extra_headers: Headers | None = None,
|
|
732
|
-
extra_query: Query | None = None,
|
|
733
|
-
extra_body: Body | None = None,
|
|
734
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
735
|
-
) -> LedgerReverseEntryResponse:
|
|
736
|
-
"""
|
|
737
|
-
Given a ledger entry ID, posts its reversal entry.
|
|
738
|
-
|
|
739
|
-
Args:
|
|
740
|
-
ik: Idempotency key for the reversal.
|
|
741
|
-
|
|
742
|
-
extra_headers: Send extra headers
|
|
743
|
-
|
|
744
|
-
extra_query: Add additional query parameters to the request
|
|
745
|
-
|
|
746
|
-
extra_body: Add additional JSON properties to the request
|
|
747
|
-
|
|
748
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
749
|
-
"""
|
|
750
|
-
return self._post(
|
|
751
|
-
"/api/v2/ledger/reverse-entry",
|
|
752
|
-
body=maybe_transform({"ik": ik}, ledger_reverse_entry_params.LedgerReverseEntryParams),
|
|
753
|
-
options=make_request_options(
|
|
754
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
755
|
-
),
|
|
756
|
-
cast_to=LedgerReverseEntryResponse,
|
|
757
|
-
)
|
|
758
|
-
|
|
759
55
|
|
|
760
56
|
class AsyncLedgerResource(AsyncAPIResource):
|
|
761
57
|
@cached_property
|
|
762
|
-
def
|
|
763
|
-
return
|
|
58
|
+
def entry(self) -> AsyncEntryResource:
|
|
59
|
+
return AsyncEntryResource(self._client)
|
|
764
60
|
|
|
765
61
|
@cached_property
|
|
766
|
-
def
|
|
767
|
-
return
|
|
768
|
-
|
|
769
|
-
@cached_property
|
|
770
|
-
def patients(self) -> AsyncPatientsResource:
|
|
771
|
-
return AsyncPatientsResource(self._client)
|
|
772
|
-
|
|
773
|
-
@cached_property
|
|
774
|
-
def orders(self) -> AsyncOrdersResource:
|
|
775
|
-
return AsyncOrdersResource(self._client)
|
|
62
|
+
def account(self) -> AsyncAccountResource:
|
|
63
|
+
return AsyncAccountResource(self._client)
|
|
776
64
|
|
|
777
65
|
@cached_property
|
|
778
66
|
def with_raw_response(self) -> AsyncLedgerResourceWithRawResponse:
|
|
@@ -793,864 +81,54 @@ class AsyncLedgerResource(AsyncAPIResource):
|
|
|
793
81
|
"""
|
|
794
82
|
return AsyncLedgerResourceWithStreamingResponse(self)
|
|
795
83
|
|
|
796
|
-
async def assign_invoice(
|
|
797
|
-
self,
|
|
798
|
-
*,
|
|
799
|
-
amount_usd_cents: float,
|
|
800
|
-
ik: str,
|
|
801
|
-
institution_id: str,
|
|
802
|
-
invoice_id: str,
|
|
803
|
-
order_id: str,
|
|
804
|
-
reason: str,
|
|
805
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
806
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
807
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
808
|
-
extra_headers: Headers | None = None,
|
|
809
|
-
extra_query: Query | None = None,
|
|
810
|
-
extra_body: Body | None = None,
|
|
811
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
812
|
-
) -> LedgerAssignInvoiceResponse:
|
|
813
|
-
"""
|
|
814
|
-
Assigns an invoice to an institution for a given order.
|
|
815
|
-
|
|
816
|
-
Args:
|
|
817
|
-
amount_usd_cents: Assignment amount in cents (positive or negative).
|
|
818
|
-
|
|
819
|
-
ik: Idempotency key for the assignment.
|
|
820
|
-
|
|
821
|
-
institution_id: Identifier of the institution for the assignment.
|
|
822
|
-
|
|
823
|
-
invoice_id: Invoice ID being assigned.
|
|
824
|
-
|
|
825
|
-
order_id: Order ID associated with the assignment.
|
|
826
|
-
|
|
827
|
-
reason: Reason for the assignment.
|
|
828
|
-
|
|
829
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
830
|
-
|
|
831
|
-
extra_headers: Send extra headers
|
|
832
|
-
|
|
833
|
-
extra_query: Add additional query parameters to the request
|
|
834
|
-
|
|
835
|
-
extra_body: Add additional JSON properties to the request
|
|
836
|
-
|
|
837
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
838
|
-
"""
|
|
839
|
-
return await self._post(
|
|
840
|
-
"/api/v2/ledger/invoice-assignment",
|
|
841
|
-
body=await async_maybe_transform(
|
|
842
|
-
{
|
|
843
|
-
"amount_usd_cents": amount_usd_cents,
|
|
844
|
-
"ik": ik,
|
|
845
|
-
"institution_id": institution_id,
|
|
846
|
-
"invoice_id": invoice_id,
|
|
847
|
-
"order_id": order_id,
|
|
848
|
-
"reason": reason,
|
|
849
|
-
"posted_at": posted_at,
|
|
850
|
-
},
|
|
851
|
-
ledger_assign_invoice_params.LedgerAssignInvoiceParams,
|
|
852
|
-
),
|
|
853
|
-
options=make_request_options(
|
|
854
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
855
|
-
),
|
|
856
|
-
cast_to=LedgerAssignInvoiceResponse,
|
|
857
|
-
)
|
|
858
|
-
|
|
859
|
-
async def claim_adjustment(
|
|
860
|
-
self,
|
|
861
|
-
*,
|
|
862
|
-
amount_usd_cents: float,
|
|
863
|
-
claim_id: str,
|
|
864
|
-
ik: str,
|
|
865
|
-
insurance_id: str,
|
|
866
|
-
order_id: str,
|
|
867
|
-
reason: str,
|
|
868
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
869
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
870
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
871
|
-
extra_headers: Headers | None = None,
|
|
872
|
-
extra_query: Query | None = None,
|
|
873
|
-
extra_body: Body | None = None,
|
|
874
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
875
|
-
) -> LedgerClaimAdjustmentResponse:
|
|
876
|
-
"""Posts a claim adjustment to the ledger.
|
|
877
|
-
|
|
878
|
-
All monetary amounts should be provided
|
|
879
|
-
in cents.
|
|
880
|
-
|
|
881
|
-
Args:
|
|
882
|
-
amount_usd_cents: Adjustment amount in cents (positive or negative).
|
|
883
|
-
|
|
884
|
-
claim_id: Identifier of the claim associated with this adjustment.
|
|
885
|
-
|
|
886
|
-
ik: Idempotency key for the adjustment.
|
|
887
|
-
|
|
888
|
-
insurance_id: Identifier of the insurance for the adjustment.
|
|
889
|
-
|
|
890
|
-
order_id: Order ID associated with the adjustment.
|
|
891
|
-
|
|
892
|
-
reason: Reason for the adjustment.
|
|
893
|
-
|
|
894
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
895
|
-
|
|
896
|
-
extra_headers: Send extra headers
|
|
897
|
-
|
|
898
|
-
extra_query: Add additional query parameters to the request
|
|
899
|
-
|
|
900
|
-
extra_body: Add additional JSON properties to the request
|
|
901
|
-
|
|
902
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
903
|
-
"""
|
|
904
|
-
return await self._post(
|
|
905
|
-
"/api/v2/ledger/claim-adjustment",
|
|
906
|
-
body=await async_maybe_transform(
|
|
907
|
-
{
|
|
908
|
-
"amount_usd_cents": amount_usd_cents,
|
|
909
|
-
"claim_id": claim_id,
|
|
910
|
-
"ik": ik,
|
|
911
|
-
"insurance_id": insurance_id,
|
|
912
|
-
"order_id": order_id,
|
|
913
|
-
"reason": reason,
|
|
914
|
-
"posted_at": posted_at,
|
|
915
|
-
},
|
|
916
|
-
ledger_claim_adjustment_params.LedgerClaimAdjustmentParams,
|
|
917
|
-
),
|
|
918
|
-
options=make_request_options(
|
|
919
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
920
|
-
),
|
|
921
|
-
cast_to=LedgerClaimAdjustmentResponse,
|
|
922
|
-
)
|
|
923
|
-
|
|
924
|
-
async def claim_payment(
|
|
925
|
-
self,
|
|
926
|
-
*,
|
|
927
|
-
amount_usd_cents: float,
|
|
928
|
-
claim_id: str,
|
|
929
|
-
ik: str,
|
|
930
|
-
insurance_id: str,
|
|
931
|
-
order_id: str,
|
|
932
|
-
reason: str,
|
|
933
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
934
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
935
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
936
|
-
extra_headers: Headers | None = None,
|
|
937
|
-
extra_query: Query | None = None,
|
|
938
|
-
extra_body: Body | None = None,
|
|
939
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
940
|
-
) -> LedgerClaimPaymentResponse:
|
|
941
|
-
"""Posts a claim payment to the ledger.
|
|
942
|
-
|
|
943
|
-
All monetary amounts should be provided in
|
|
944
|
-
cents.
|
|
945
|
-
|
|
946
|
-
Args:
|
|
947
|
-
amount_usd_cents: Payment amount in cents.
|
|
948
|
-
|
|
949
|
-
claim_id: Identifier of the claim associated with this payment.
|
|
950
|
-
|
|
951
|
-
ik: Idempotency key for the payment.
|
|
952
|
-
|
|
953
|
-
insurance_id: Identifier of the insurance for the payment.
|
|
954
|
-
|
|
955
|
-
order_id: Order ID associated with the payment.
|
|
956
|
-
|
|
957
|
-
reason: Reason for the payment.
|
|
958
|
-
|
|
959
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
960
|
-
|
|
961
|
-
extra_headers: Send extra headers
|
|
962
|
-
|
|
963
|
-
extra_query: Add additional query parameters to the request
|
|
964
|
-
|
|
965
|
-
extra_body: Add additional JSON properties to the request
|
|
966
|
-
|
|
967
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
968
|
-
"""
|
|
969
|
-
return await self._post(
|
|
970
|
-
"/api/v2/ledger/claim-payment",
|
|
971
|
-
body=await async_maybe_transform(
|
|
972
|
-
{
|
|
973
|
-
"amount_usd_cents": amount_usd_cents,
|
|
974
|
-
"claim_id": claim_id,
|
|
975
|
-
"ik": ik,
|
|
976
|
-
"insurance_id": insurance_id,
|
|
977
|
-
"order_id": order_id,
|
|
978
|
-
"reason": reason,
|
|
979
|
-
"posted_at": posted_at,
|
|
980
|
-
},
|
|
981
|
-
ledger_claim_payment_params.LedgerClaimPaymentParams,
|
|
982
|
-
),
|
|
983
|
-
options=make_request_options(
|
|
984
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
985
|
-
),
|
|
986
|
-
cast_to=LedgerClaimPaymentResponse,
|
|
987
|
-
)
|
|
988
|
-
|
|
989
|
-
async def institution_adjustment(
|
|
990
|
-
self,
|
|
991
|
-
*,
|
|
992
|
-
amount_usd_cents: float,
|
|
993
|
-
ik: str,
|
|
994
|
-
institution_id: str,
|
|
995
|
-
order_id: str,
|
|
996
|
-
reason: str,
|
|
997
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
998
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
999
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1000
|
-
extra_headers: Headers | None = None,
|
|
1001
|
-
extra_query: Query | None = None,
|
|
1002
|
-
extra_body: Body | None = None,
|
|
1003
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1004
|
-
) -> LedgerInstitutionAdjustmentResponse:
|
|
1005
|
-
"""Posts an institution adjustment to the ledger.
|
|
1006
|
-
|
|
1007
|
-
All monetary amounts should be
|
|
1008
|
-
provided in cents.
|
|
1009
|
-
|
|
1010
|
-
Args:
|
|
1011
|
-
amount_usd_cents: Adjustment amount in cents (positive or negative).
|
|
1012
|
-
|
|
1013
|
-
ik: Idempotency key for the adjustment.
|
|
1014
|
-
|
|
1015
|
-
institution_id: Identifier of the institution for the adjustment.
|
|
1016
|
-
|
|
1017
|
-
order_id: Order ID associated with the adjustment.
|
|
1018
|
-
|
|
1019
|
-
reason: Reason for the adjustment.
|
|
1020
|
-
|
|
1021
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
1022
|
-
|
|
1023
|
-
extra_headers: Send extra headers
|
|
1024
|
-
|
|
1025
|
-
extra_query: Add additional query parameters to the request
|
|
1026
|
-
|
|
1027
|
-
extra_body: Add additional JSON properties to the request
|
|
1028
|
-
|
|
1029
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1030
|
-
"""
|
|
1031
|
-
return await self._post(
|
|
1032
|
-
"/api/v2/ledger/institution-adjustment",
|
|
1033
|
-
body=await async_maybe_transform(
|
|
1034
|
-
{
|
|
1035
|
-
"amount_usd_cents": amount_usd_cents,
|
|
1036
|
-
"ik": ik,
|
|
1037
|
-
"institution_id": institution_id,
|
|
1038
|
-
"order_id": order_id,
|
|
1039
|
-
"reason": reason,
|
|
1040
|
-
"posted_at": posted_at,
|
|
1041
|
-
},
|
|
1042
|
-
ledger_institution_adjustment_params.LedgerInstitutionAdjustmentParams,
|
|
1043
|
-
),
|
|
1044
|
-
options=make_request_options(
|
|
1045
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1046
|
-
),
|
|
1047
|
-
cast_to=LedgerInstitutionAdjustmentResponse,
|
|
1048
|
-
)
|
|
1049
|
-
|
|
1050
|
-
async def institution_payment(
|
|
1051
|
-
self,
|
|
1052
|
-
*,
|
|
1053
|
-
amount_usd_cents: float,
|
|
1054
|
-
ik: str,
|
|
1055
|
-
institution_id: str,
|
|
1056
|
-
invoice_id: str,
|
|
1057
|
-
reason: str,
|
|
1058
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
1059
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1060
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1061
|
-
extra_headers: Headers | None = None,
|
|
1062
|
-
extra_query: Query | None = None,
|
|
1063
|
-
extra_body: Body | None = None,
|
|
1064
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1065
|
-
) -> LedgerInstitutionPaymentResponse:
|
|
1066
|
-
"""Posts an institution payment to the ledger.
|
|
1067
|
-
|
|
1068
|
-
All monetary amounts should be
|
|
1069
|
-
provided in cents.
|
|
1070
|
-
|
|
1071
|
-
Args:
|
|
1072
|
-
amount_usd_cents: Payment amount in cents.
|
|
1073
|
-
|
|
1074
|
-
ik: Idempotency key for the payment.
|
|
1075
|
-
|
|
1076
|
-
institution_id: Identifier of the institution for the payment.
|
|
1077
|
-
|
|
1078
|
-
invoice_id: Identifier of the invoice associated with this payment.
|
|
1079
|
-
|
|
1080
|
-
reason: Reason for the payment.
|
|
1081
|
-
|
|
1082
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
1083
|
-
|
|
1084
|
-
extra_headers: Send extra headers
|
|
1085
|
-
|
|
1086
|
-
extra_query: Add additional query parameters to the request
|
|
1087
|
-
|
|
1088
|
-
extra_body: Add additional JSON properties to the request
|
|
1089
|
-
|
|
1090
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1091
|
-
"""
|
|
1092
|
-
return await self._post(
|
|
1093
|
-
"/api/v2/ledger/institution-payment",
|
|
1094
|
-
body=await async_maybe_transform(
|
|
1095
|
-
{
|
|
1096
|
-
"amount_usd_cents": amount_usd_cents,
|
|
1097
|
-
"ik": ik,
|
|
1098
|
-
"institution_id": institution_id,
|
|
1099
|
-
"invoice_id": invoice_id,
|
|
1100
|
-
"reason": reason,
|
|
1101
|
-
"posted_at": posted_at,
|
|
1102
|
-
},
|
|
1103
|
-
ledger_institution_payment_params.LedgerInstitutionPaymentParams,
|
|
1104
|
-
),
|
|
1105
|
-
options=make_request_options(
|
|
1106
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1107
|
-
),
|
|
1108
|
-
cast_to=LedgerInstitutionPaymentResponse,
|
|
1109
|
-
)
|
|
1110
|
-
|
|
1111
|
-
async def new_order(
|
|
1112
|
-
self,
|
|
1113
|
-
*,
|
|
1114
|
-
amount_usd_cents: float,
|
|
1115
|
-
order_id: str,
|
|
1116
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
1117
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1118
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1119
|
-
extra_headers: Headers | None = None,
|
|
1120
|
-
extra_query: Query | None = None,
|
|
1121
|
-
extra_body: Body | None = None,
|
|
1122
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1123
|
-
) -> LedgerNewOrderResponse:
|
|
1124
|
-
"""
|
|
1125
|
-
Creates a new ledger entry for an order, linking claim, institution, patient,
|
|
1126
|
-
and insurance financial details. All monetary amounts should be provided in
|
|
1127
|
-
cents.
|
|
1128
|
-
|
|
1129
|
-
Args:
|
|
1130
|
-
amount_usd_cents: Total amount for the order, in cents.
|
|
1131
|
-
|
|
1132
|
-
order_id: Unique identifier for the order being processed.
|
|
1133
|
-
|
|
1134
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
1135
|
-
|
|
1136
|
-
extra_headers: Send extra headers
|
|
1137
|
-
|
|
1138
|
-
extra_query: Add additional query parameters to the request
|
|
1139
|
-
|
|
1140
|
-
extra_body: Add additional JSON properties to the request
|
|
1141
|
-
|
|
1142
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1143
|
-
"""
|
|
1144
|
-
return await self._post(
|
|
1145
|
-
"/api/v2/ledger/new-order",
|
|
1146
|
-
body=await async_maybe_transform(
|
|
1147
|
-
{
|
|
1148
|
-
"amount_usd_cents": amount_usd_cents,
|
|
1149
|
-
"order_id": order_id,
|
|
1150
|
-
"posted_at": posted_at,
|
|
1151
|
-
},
|
|
1152
|
-
ledger_new_order_params.LedgerNewOrderParams,
|
|
1153
|
-
),
|
|
1154
|
-
options=make_request_options(
|
|
1155
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1156
|
-
),
|
|
1157
|
-
cast_to=LedgerNewOrderResponse,
|
|
1158
|
-
)
|
|
1159
|
-
|
|
1160
|
-
async def order_writeoff(
|
|
1161
|
-
self,
|
|
1162
|
-
*,
|
|
1163
|
-
amount_usd_cents: float,
|
|
1164
|
-
ik: str,
|
|
1165
|
-
order_id: str,
|
|
1166
|
-
reason: str,
|
|
1167
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
1168
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1169
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1170
|
-
extra_headers: Headers | None = None,
|
|
1171
|
-
extra_query: Query | None = None,
|
|
1172
|
-
extra_body: Body | None = None,
|
|
1173
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1174
|
-
) -> LedgerOrderWriteoffResponse:
|
|
1175
|
-
"""Posts an order write-off to the ledger.
|
|
1176
|
-
|
|
1177
|
-
All monetary amounts should be provided
|
|
1178
|
-
in cents.
|
|
1179
|
-
|
|
1180
|
-
Args:
|
|
1181
|
-
amount_usd_cents: Write-off amount in cents.
|
|
1182
|
-
|
|
1183
|
-
ik: Idempotency key for the write-off.
|
|
1184
|
-
|
|
1185
|
-
order_id: Order ID associated with the write-off.
|
|
1186
|
-
|
|
1187
|
-
reason: Reason for the write-off.
|
|
1188
|
-
|
|
1189
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
1190
|
-
|
|
1191
|
-
extra_headers: Send extra headers
|
|
1192
|
-
|
|
1193
|
-
extra_query: Add additional query parameters to the request
|
|
1194
|
-
|
|
1195
|
-
extra_body: Add additional JSON properties to the request
|
|
1196
|
-
|
|
1197
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1198
|
-
"""
|
|
1199
|
-
return await self._post(
|
|
1200
|
-
"/api/v2/ledger/order-writeoff",
|
|
1201
|
-
body=await async_maybe_transform(
|
|
1202
|
-
{
|
|
1203
|
-
"amount_usd_cents": amount_usd_cents,
|
|
1204
|
-
"ik": ik,
|
|
1205
|
-
"order_id": order_id,
|
|
1206
|
-
"reason": reason,
|
|
1207
|
-
"posted_at": posted_at,
|
|
1208
|
-
},
|
|
1209
|
-
ledger_order_writeoff_params.LedgerOrderWriteoffParams,
|
|
1210
|
-
),
|
|
1211
|
-
options=make_request_options(
|
|
1212
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1213
|
-
),
|
|
1214
|
-
cast_to=LedgerOrderWriteoffResponse,
|
|
1215
|
-
)
|
|
1216
|
-
|
|
1217
|
-
async def patient_adjustment(
|
|
1218
|
-
self,
|
|
1219
|
-
*,
|
|
1220
|
-
amount_usd_cents: float,
|
|
1221
|
-
ik: str,
|
|
1222
|
-
order_id: str,
|
|
1223
|
-
patient_id: str,
|
|
1224
|
-
reason: str,
|
|
1225
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
1226
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1227
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1228
|
-
extra_headers: Headers | None = None,
|
|
1229
|
-
extra_query: Query | None = None,
|
|
1230
|
-
extra_body: Body | None = None,
|
|
1231
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1232
|
-
) -> LedgerPatientAdjustmentResponse:
|
|
1233
|
-
"""Posts a patient adjustment to the ledger.
|
|
1234
|
-
|
|
1235
|
-
All monetary amounts should be
|
|
1236
|
-
provided in cents.
|
|
1237
|
-
|
|
1238
|
-
Args:
|
|
1239
|
-
amount_usd_cents: Adjustment amount in cents (positive or negative).
|
|
1240
|
-
|
|
1241
|
-
ik: Idempotency key for the adjustment.
|
|
1242
|
-
|
|
1243
|
-
order_id: Order ID associated with the adjustment.
|
|
1244
|
-
|
|
1245
|
-
patient_id: Identifier of the patient for the adjustment.
|
|
1246
|
-
|
|
1247
|
-
reason: Reason for the adjustment.
|
|
1248
|
-
|
|
1249
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
1250
|
-
|
|
1251
|
-
extra_headers: Send extra headers
|
|
1252
|
-
|
|
1253
|
-
extra_query: Add additional query parameters to the request
|
|
1254
|
-
|
|
1255
|
-
extra_body: Add additional JSON properties to the request
|
|
1256
|
-
|
|
1257
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1258
|
-
"""
|
|
1259
|
-
return await self._post(
|
|
1260
|
-
"/api/v2/ledger/patient-adjustment",
|
|
1261
|
-
body=await async_maybe_transform(
|
|
1262
|
-
{
|
|
1263
|
-
"amount_usd_cents": amount_usd_cents,
|
|
1264
|
-
"ik": ik,
|
|
1265
|
-
"order_id": order_id,
|
|
1266
|
-
"patient_id": patient_id,
|
|
1267
|
-
"reason": reason,
|
|
1268
|
-
"posted_at": posted_at,
|
|
1269
|
-
},
|
|
1270
|
-
ledger_patient_adjustment_params.LedgerPatientAdjustmentParams,
|
|
1271
|
-
),
|
|
1272
|
-
options=make_request_options(
|
|
1273
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1274
|
-
),
|
|
1275
|
-
cast_to=LedgerPatientAdjustmentResponse,
|
|
1276
|
-
)
|
|
1277
|
-
|
|
1278
|
-
async def patient_payment(
|
|
1279
|
-
self,
|
|
1280
|
-
*,
|
|
1281
|
-
amount_usd_cents: float,
|
|
1282
|
-
ik: str,
|
|
1283
|
-
patient_id: str,
|
|
1284
|
-
reason: str,
|
|
1285
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
1286
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1287
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1288
|
-
extra_headers: Headers | None = None,
|
|
1289
|
-
extra_query: Query | None = None,
|
|
1290
|
-
extra_body: Body | None = None,
|
|
1291
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1292
|
-
) -> LedgerPatientPaymentResponse:
|
|
1293
|
-
"""Posts a patient payment to the ledger.
|
|
1294
|
-
|
|
1295
|
-
All monetary amounts should be provided
|
|
1296
|
-
in cents.
|
|
1297
|
-
|
|
1298
|
-
Args:
|
|
1299
|
-
amount_usd_cents: Payment amount in cents.
|
|
1300
|
-
|
|
1301
|
-
ik: Idempotency key for the payment.
|
|
1302
|
-
|
|
1303
|
-
patient_id: Identifier of the patient for the payment.
|
|
1304
|
-
|
|
1305
|
-
reason: Reason for the payment.
|
|
1306
|
-
|
|
1307
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
1308
|
-
|
|
1309
|
-
extra_headers: Send extra headers
|
|
1310
|
-
|
|
1311
|
-
extra_query: Add additional query parameters to the request
|
|
1312
|
-
|
|
1313
|
-
extra_body: Add additional JSON properties to the request
|
|
1314
|
-
|
|
1315
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1316
|
-
"""
|
|
1317
|
-
return await self._post(
|
|
1318
|
-
"/api/v2/ledger/patient-payment",
|
|
1319
|
-
body=await async_maybe_transform(
|
|
1320
|
-
{
|
|
1321
|
-
"amount_usd_cents": amount_usd_cents,
|
|
1322
|
-
"ik": ik,
|
|
1323
|
-
"patient_id": patient_id,
|
|
1324
|
-
"reason": reason,
|
|
1325
|
-
"posted_at": posted_at,
|
|
1326
|
-
},
|
|
1327
|
-
ledger_patient_payment_params.LedgerPatientPaymentParams,
|
|
1328
|
-
),
|
|
1329
|
-
options=make_request_options(
|
|
1330
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1331
|
-
),
|
|
1332
|
-
cast_to=LedgerPatientPaymentResponse,
|
|
1333
|
-
)
|
|
1334
|
-
|
|
1335
|
-
async def post_remittance_accepted(
|
|
1336
|
-
self,
|
|
1337
|
-
*,
|
|
1338
|
-
adjustment_usd_cents: float,
|
|
1339
|
-
claim_id: str,
|
|
1340
|
-
ik: str,
|
|
1341
|
-
insurance_id: str,
|
|
1342
|
-
order_id: str,
|
|
1343
|
-
patient_id: str,
|
|
1344
|
-
patient_responsibility_usd_cents: float,
|
|
1345
|
-
posted_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
1346
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1347
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1348
|
-
extra_headers: Headers | None = None,
|
|
1349
|
-
extra_query: Query | None = None,
|
|
1350
|
-
extra_body: Body | None = None,
|
|
1351
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1352
|
-
) -> LedgerPostRemittanceAcceptedResponse:
|
|
1353
|
-
"""Posts a remittance accepted entry to the ledger.
|
|
1354
|
-
|
|
1355
|
-
All monetary amounts should be
|
|
1356
|
-
provided in cents.
|
|
1357
|
-
|
|
1358
|
-
Args:
|
|
1359
|
-
adjustment_usd_cents: Adjustment amount in cents (positive or negative).
|
|
1360
|
-
|
|
1361
|
-
claim_id: Identifier of the claim associated with this remittance.
|
|
1362
|
-
|
|
1363
|
-
ik: Idempotency key for the remittance.
|
|
1364
|
-
|
|
1365
|
-
insurance_id: Identifier of the insurance for the remittance.
|
|
1366
|
-
|
|
1367
|
-
order_id: Order ID associated with the remittance.
|
|
1368
|
-
|
|
1369
|
-
patient_id: Identifier of the patient for the remittance.
|
|
1370
|
-
|
|
1371
|
-
patient_responsibility_usd_cents: Patient responsibility amount in cents.
|
|
1372
|
-
|
|
1373
|
-
posted_at: Optional ISO 8601 date-time to post the entry.
|
|
1374
|
-
|
|
1375
|
-
extra_headers: Send extra headers
|
|
1376
|
-
|
|
1377
|
-
extra_query: Add additional query parameters to the request
|
|
1378
|
-
|
|
1379
|
-
extra_body: Add additional JSON properties to the request
|
|
1380
|
-
|
|
1381
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1382
|
-
"""
|
|
1383
|
-
return await self._post(
|
|
1384
|
-
"/api/v2/ledger/remittance-accepted",
|
|
1385
|
-
body=await async_maybe_transform(
|
|
1386
|
-
{
|
|
1387
|
-
"adjustment_usd_cents": adjustment_usd_cents,
|
|
1388
|
-
"claim_id": claim_id,
|
|
1389
|
-
"ik": ik,
|
|
1390
|
-
"insurance_id": insurance_id,
|
|
1391
|
-
"order_id": order_id,
|
|
1392
|
-
"patient_id": patient_id,
|
|
1393
|
-
"patient_responsibility_usd_cents": patient_responsibility_usd_cents,
|
|
1394
|
-
"posted_at": posted_at,
|
|
1395
|
-
},
|
|
1396
|
-
ledger_post_remittance_accepted_params.LedgerPostRemittanceAcceptedParams,
|
|
1397
|
-
),
|
|
1398
|
-
options=make_request_options(
|
|
1399
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1400
|
-
),
|
|
1401
|
-
cast_to=LedgerPostRemittanceAcceptedResponse,
|
|
1402
|
-
)
|
|
1403
|
-
|
|
1404
|
-
async def reverse_entry(
|
|
1405
|
-
self,
|
|
1406
|
-
*,
|
|
1407
|
-
ik: str,
|
|
1408
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1409
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1410
|
-
extra_headers: Headers | None = None,
|
|
1411
|
-
extra_query: Query | None = None,
|
|
1412
|
-
extra_body: Body | None = None,
|
|
1413
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1414
|
-
) -> LedgerReverseEntryResponse:
|
|
1415
|
-
"""
|
|
1416
|
-
Given a ledger entry ID, posts its reversal entry.
|
|
1417
|
-
|
|
1418
|
-
Args:
|
|
1419
|
-
ik: Idempotency key for the reversal.
|
|
1420
|
-
|
|
1421
|
-
extra_headers: Send extra headers
|
|
1422
|
-
|
|
1423
|
-
extra_query: Add additional query parameters to the request
|
|
1424
|
-
|
|
1425
|
-
extra_body: Add additional JSON properties to the request
|
|
1426
|
-
|
|
1427
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1428
|
-
"""
|
|
1429
|
-
return await self._post(
|
|
1430
|
-
"/api/v2/ledger/reverse-entry",
|
|
1431
|
-
body=await async_maybe_transform({"ik": ik}, ledger_reverse_entry_params.LedgerReverseEntryParams),
|
|
1432
|
-
options=make_request_options(
|
|
1433
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1434
|
-
),
|
|
1435
|
-
cast_to=LedgerReverseEntryResponse,
|
|
1436
|
-
)
|
|
1437
|
-
|
|
1438
84
|
|
|
1439
85
|
class LedgerResourceWithRawResponse:
|
|
1440
86
|
def __init__(self, ledger: LedgerResource) -> None:
|
|
1441
87
|
self._ledger = ledger
|
|
1442
88
|
|
|
1443
|
-
self.assign_invoice = to_raw_response_wrapper(
|
|
1444
|
-
ledger.assign_invoice,
|
|
1445
|
-
)
|
|
1446
|
-
self.claim_adjustment = to_raw_response_wrapper(
|
|
1447
|
-
ledger.claim_adjustment,
|
|
1448
|
-
)
|
|
1449
|
-
self.claim_payment = to_raw_response_wrapper(
|
|
1450
|
-
ledger.claim_payment,
|
|
1451
|
-
)
|
|
1452
|
-
self.institution_adjustment = to_raw_response_wrapper(
|
|
1453
|
-
ledger.institution_adjustment,
|
|
1454
|
-
)
|
|
1455
|
-
self.institution_payment = to_raw_response_wrapper(
|
|
1456
|
-
ledger.institution_payment,
|
|
1457
|
-
)
|
|
1458
|
-
self.new_order = to_raw_response_wrapper(
|
|
1459
|
-
ledger.new_order,
|
|
1460
|
-
)
|
|
1461
|
-
self.order_writeoff = to_raw_response_wrapper(
|
|
1462
|
-
ledger.order_writeoff,
|
|
1463
|
-
)
|
|
1464
|
-
self.patient_adjustment = to_raw_response_wrapper(
|
|
1465
|
-
ledger.patient_adjustment,
|
|
1466
|
-
)
|
|
1467
|
-
self.patient_payment = to_raw_response_wrapper(
|
|
1468
|
-
ledger.patient_payment,
|
|
1469
|
-
)
|
|
1470
|
-
self.post_remittance_accepted = to_raw_response_wrapper(
|
|
1471
|
-
ledger.post_remittance_accepted,
|
|
1472
|
-
)
|
|
1473
|
-
self.reverse_entry = to_raw_response_wrapper(
|
|
1474
|
-
ledger.reverse_entry,
|
|
1475
|
-
)
|
|
1476
|
-
|
|
1477
89
|
@cached_property
|
|
1478
|
-
def
|
|
1479
|
-
return
|
|
90
|
+
def entry(self) -> EntryResourceWithRawResponse:
|
|
91
|
+
return EntryResourceWithRawResponse(self._ledger.entry)
|
|
1480
92
|
|
|
1481
93
|
@cached_property
|
|
1482
|
-
def
|
|
1483
|
-
return
|
|
1484
|
-
|
|
1485
|
-
@cached_property
|
|
1486
|
-
def patients(self) -> PatientsResourceWithRawResponse:
|
|
1487
|
-
return PatientsResourceWithRawResponse(self._ledger.patients)
|
|
1488
|
-
|
|
1489
|
-
@cached_property
|
|
1490
|
-
def orders(self) -> OrdersResourceWithRawResponse:
|
|
1491
|
-
return OrdersResourceWithRawResponse(self._ledger.orders)
|
|
94
|
+
def account(self) -> AccountResourceWithRawResponse:
|
|
95
|
+
return AccountResourceWithRawResponse(self._ledger.account)
|
|
1492
96
|
|
|
1493
97
|
|
|
1494
98
|
class AsyncLedgerResourceWithRawResponse:
|
|
1495
99
|
def __init__(self, ledger: AsyncLedgerResource) -> None:
|
|
1496
100
|
self._ledger = ledger
|
|
1497
101
|
|
|
1498
|
-
self.assign_invoice = async_to_raw_response_wrapper(
|
|
1499
|
-
ledger.assign_invoice,
|
|
1500
|
-
)
|
|
1501
|
-
self.claim_adjustment = async_to_raw_response_wrapper(
|
|
1502
|
-
ledger.claim_adjustment,
|
|
1503
|
-
)
|
|
1504
|
-
self.claim_payment = async_to_raw_response_wrapper(
|
|
1505
|
-
ledger.claim_payment,
|
|
1506
|
-
)
|
|
1507
|
-
self.institution_adjustment = async_to_raw_response_wrapper(
|
|
1508
|
-
ledger.institution_adjustment,
|
|
1509
|
-
)
|
|
1510
|
-
self.institution_payment = async_to_raw_response_wrapper(
|
|
1511
|
-
ledger.institution_payment,
|
|
1512
|
-
)
|
|
1513
|
-
self.new_order = async_to_raw_response_wrapper(
|
|
1514
|
-
ledger.new_order,
|
|
1515
|
-
)
|
|
1516
|
-
self.order_writeoff = async_to_raw_response_wrapper(
|
|
1517
|
-
ledger.order_writeoff,
|
|
1518
|
-
)
|
|
1519
|
-
self.patient_adjustment = async_to_raw_response_wrapper(
|
|
1520
|
-
ledger.patient_adjustment,
|
|
1521
|
-
)
|
|
1522
|
-
self.patient_payment = async_to_raw_response_wrapper(
|
|
1523
|
-
ledger.patient_payment,
|
|
1524
|
-
)
|
|
1525
|
-
self.post_remittance_accepted = async_to_raw_response_wrapper(
|
|
1526
|
-
ledger.post_remittance_accepted,
|
|
1527
|
-
)
|
|
1528
|
-
self.reverse_entry = async_to_raw_response_wrapper(
|
|
1529
|
-
ledger.reverse_entry,
|
|
1530
|
-
)
|
|
1531
|
-
|
|
1532
102
|
@cached_property
|
|
1533
|
-
def
|
|
1534
|
-
return
|
|
103
|
+
def entry(self) -> AsyncEntryResourceWithRawResponse:
|
|
104
|
+
return AsyncEntryResourceWithRawResponse(self._ledger.entry)
|
|
1535
105
|
|
|
1536
106
|
@cached_property
|
|
1537
|
-
def
|
|
1538
|
-
return
|
|
1539
|
-
|
|
1540
|
-
@cached_property
|
|
1541
|
-
def patients(self) -> AsyncPatientsResourceWithRawResponse:
|
|
1542
|
-
return AsyncPatientsResourceWithRawResponse(self._ledger.patients)
|
|
1543
|
-
|
|
1544
|
-
@cached_property
|
|
1545
|
-
def orders(self) -> AsyncOrdersResourceWithRawResponse:
|
|
1546
|
-
return AsyncOrdersResourceWithRawResponse(self._ledger.orders)
|
|
107
|
+
def account(self) -> AsyncAccountResourceWithRawResponse:
|
|
108
|
+
return AsyncAccountResourceWithRawResponse(self._ledger.account)
|
|
1547
109
|
|
|
1548
110
|
|
|
1549
111
|
class LedgerResourceWithStreamingResponse:
|
|
1550
112
|
def __init__(self, ledger: LedgerResource) -> None:
|
|
1551
113
|
self._ledger = ledger
|
|
1552
114
|
|
|
1553
|
-
self.assign_invoice = to_streamed_response_wrapper(
|
|
1554
|
-
ledger.assign_invoice,
|
|
1555
|
-
)
|
|
1556
|
-
self.claim_adjustment = to_streamed_response_wrapper(
|
|
1557
|
-
ledger.claim_adjustment,
|
|
1558
|
-
)
|
|
1559
|
-
self.claim_payment = to_streamed_response_wrapper(
|
|
1560
|
-
ledger.claim_payment,
|
|
1561
|
-
)
|
|
1562
|
-
self.institution_adjustment = to_streamed_response_wrapper(
|
|
1563
|
-
ledger.institution_adjustment,
|
|
1564
|
-
)
|
|
1565
|
-
self.institution_payment = to_streamed_response_wrapper(
|
|
1566
|
-
ledger.institution_payment,
|
|
1567
|
-
)
|
|
1568
|
-
self.new_order = to_streamed_response_wrapper(
|
|
1569
|
-
ledger.new_order,
|
|
1570
|
-
)
|
|
1571
|
-
self.order_writeoff = to_streamed_response_wrapper(
|
|
1572
|
-
ledger.order_writeoff,
|
|
1573
|
-
)
|
|
1574
|
-
self.patient_adjustment = to_streamed_response_wrapper(
|
|
1575
|
-
ledger.patient_adjustment,
|
|
1576
|
-
)
|
|
1577
|
-
self.patient_payment = to_streamed_response_wrapper(
|
|
1578
|
-
ledger.patient_payment,
|
|
1579
|
-
)
|
|
1580
|
-
self.post_remittance_accepted = to_streamed_response_wrapper(
|
|
1581
|
-
ledger.post_remittance_accepted,
|
|
1582
|
-
)
|
|
1583
|
-
self.reverse_entry = to_streamed_response_wrapper(
|
|
1584
|
-
ledger.reverse_entry,
|
|
1585
|
-
)
|
|
1586
|
-
|
|
1587
115
|
@cached_property
|
|
1588
|
-
def
|
|
1589
|
-
return
|
|
116
|
+
def entry(self) -> EntryResourceWithStreamingResponse:
|
|
117
|
+
return EntryResourceWithStreamingResponse(self._ledger.entry)
|
|
1590
118
|
|
|
1591
119
|
@cached_property
|
|
1592
|
-
def
|
|
1593
|
-
return
|
|
1594
|
-
|
|
1595
|
-
@cached_property
|
|
1596
|
-
def patients(self) -> PatientsResourceWithStreamingResponse:
|
|
1597
|
-
return PatientsResourceWithStreamingResponse(self._ledger.patients)
|
|
1598
|
-
|
|
1599
|
-
@cached_property
|
|
1600
|
-
def orders(self) -> OrdersResourceWithStreamingResponse:
|
|
1601
|
-
return OrdersResourceWithStreamingResponse(self._ledger.orders)
|
|
120
|
+
def account(self) -> AccountResourceWithStreamingResponse:
|
|
121
|
+
return AccountResourceWithStreamingResponse(self._ledger.account)
|
|
1602
122
|
|
|
1603
123
|
|
|
1604
124
|
class AsyncLedgerResourceWithStreamingResponse:
|
|
1605
125
|
def __init__(self, ledger: AsyncLedgerResource) -> None:
|
|
1606
126
|
self._ledger = ledger
|
|
1607
127
|
|
|
1608
|
-
self.assign_invoice = async_to_streamed_response_wrapper(
|
|
1609
|
-
ledger.assign_invoice,
|
|
1610
|
-
)
|
|
1611
|
-
self.claim_adjustment = async_to_streamed_response_wrapper(
|
|
1612
|
-
ledger.claim_adjustment,
|
|
1613
|
-
)
|
|
1614
|
-
self.claim_payment = async_to_streamed_response_wrapper(
|
|
1615
|
-
ledger.claim_payment,
|
|
1616
|
-
)
|
|
1617
|
-
self.institution_adjustment = async_to_streamed_response_wrapper(
|
|
1618
|
-
ledger.institution_adjustment,
|
|
1619
|
-
)
|
|
1620
|
-
self.institution_payment = async_to_streamed_response_wrapper(
|
|
1621
|
-
ledger.institution_payment,
|
|
1622
|
-
)
|
|
1623
|
-
self.new_order = async_to_streamed_response_wrapper(
|
|
1624
|
-
ledger.new_order,
|
|
1625
|
-
)
|
|
1626
|
-
self.order_writeoff = async_to_streamed_response_wrapper(
|
|
1627
|
-
ledger.order_writeoff,
|
|
1628
|
-
)
|
|
1629
|
-
self.patient_adjustment = async_to_streamed_response_wrapper(
|
|
1630
|
-
ledger.patient_adjustment,
|
|
1631
|
-
)
|
|
1632
|
-
self.patient_payment = async_to_streamed_response_wrapper(
|
|
1633
|
-
ledger.patient_payment,
|
|
1634
|
-
)
|
|
1635
|
-
self.post_remittance_accepted = async_to_streamed_response_wrapper(
|
|
1636
|
-
ledger.post_remittance_accepted,
|
|
1637
|
-
)
|
|
1638
|
-
self.reverse_entry = async_to_streamed_response_wrapper(
|
|
1639
|
-
ledger.reverse_entry,
|
|
1640
|
-
)
|
|
1641
|
-
|
|
1642
|
-
@cached_property
|
|
1643
|
-
def institutions(self) -> AsyncInstitutionsResourceWithStreamingResponse:
|
|
1644
|
-
return AsyncInstitutionsResourceWithStreamingResponse(self._ledger.institutions)
|
|
1645
|
-
|
|
1646
|
-
@cached_property
|
|
1647
|
-
def insurance(self) -> AsyncInsuranceResourceWithStreamingResponse:
|
|
1648
|
-
return AsyncInsuranceResourceWithStreamingResponse(self._ledger.insurance)
|
|
1649
|
-
|
|
1650
128
|
@cached_property
|
|
1651
|
-
def
|
|
1652
|
-
return
|
|
129
|
+
def entry(self) -> AsyncEntryResourceWithStreamingResponse:
|
|
130
|
+
return AsyncEntryResourceWithStreamingResponse(self._ledger.entry)
|
|
1653
131
|
|
|
1654
132
|
@cached_property
|
|
1655
|
-
def
|
|
1656
|
-
return
|
|
133
|
+
def account(self) -> AsyncAccountResourceWithStreamingResponse:
|
|
134
|
+
return AsyncAccountResourceWithStreamingResponse(self._ledger.account)
|