samplehc 0.5.0__py3-none-any.whl → 0.7.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.
Files changed (55) hide show
  1. samplehc/_version.py +1 -1
  2. samplehc/resources/v2/__init__.py +14 -0
  3. samplehc/resources/v2/browser_agents.py +177 -0
  4. samplehc/resources/v2/clearinghouse/claim.py +20 -36
  5. samplehc/resources/v2/communication.py +8 -0
  6. samplehc/resources/v2/database.py +19 -9
  7. samplehc/resources/v2/events/__init__.py +33 -0
  8. samplehc/resources/v2/{events.py → events/events.py} +42 -10
  9. samplehc/resources/v2/events/hie/__init__.py +33 -0
  10. samplehc/resources/v2/events/hie/adt.py +249 -0
  11. samplehc/resources/v2/events/hie/hie.py +102 -0
  12. samplehc/resources/v2/integrations/__init__.py +14 -0
  13. samplehc/resources/v2/integrations/glidian/__init__.py +33 -0
  14. samplehc/resources/v2/integrations/glidian/glidian.py +425 -0
  15. samplehc/resources/v2/integrations/glidian/prior_authorizations/__init__.py +33 -0
  16. samplehc/resources/v2/integrations/glidian/prior_authorizations/clinical_questions.py +276 -0
  17. samplehc/resources/v2/integrations/glidian/prior_authorizations/prior_authorizations.py +527 -0
  18. samplehc/resources/v2/integrations/integrations.py +32 -0
  19. samplehc/resources/v2/ledger/ledger.py +152 -0
  20. samplehc/resources/v2/v2.py +40 -8
  21. samplehc/types/v2/__init__.py +8 -0
  22. samplehc/types/v2/browser_agent_invoke_params.py +13 -0
  23. samplehc/types/v2/browser_agent_invoke_response.py +12 -0
  24. samplehc/types/v2/clearinghouse/claim_submit_params.py +1214 -884
  25. samplehc/types/v2/clearinghouse/claim_submit_response.py +10 -1
  26. samplehc/types/v2/communication_send_email_params.py +3 -0
  27. samplehc/types/v2/database_execute_sql_params.py +5 -3
  28. samplehc/types/v2/event_emit_params.py +1 -1
  29. samplehc/types/v2/events/__init__.py +3 -0
  30. samplehc/types/v2/events/hie/__init__.py +5 -0
  31. samplehc/types/v2/events/hie/adt_subscribe_params.py +92 -0
  32. samplehc/types/v2/integrations/__init__.py +10 -0
  33. samplehc/types/v2/integrations/glidian/__init__.py +20 -0
  34. samplehc/types/v2/integrations/glidian/prior_authorization_create_draft_params.py +32 -0
  35. samplehc/types/v2/integrations/glidian/prior_authorization_create_draft_response.py +22 -0
  36. samplehc/types/v2/integrations/glidian/prior_authorization_retrieve_record_response.py +11 -0
  37. samplehc/types/v2/integrations/glidian/prior_authorization_submit_response.py +14 -0
  38. samplehc/types/v2/integrations/glidian/prior_authorization_update_record_params.py +20 -0
  39. samplehc/types/v2/integrations/glidian/prior_authorization_update_record_response.py +14 -0
  40. samplehc/types/v2/integrations/glidian/prior_authorizations/__init__.py +7 -0
  41. samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_list_response.py +40 -0
  42. samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_params.py +22 -0
  43. samplehc/types/v2/integrations/glidian/prior_authorizations/clinical_question_update_response.py +17 -0
  44. samplehc/types/v2/integrations/glidian_get_submission_requirements_params.py +17 -0
  45. samplehc/types/v2/integrations/glidian_get_submission_requirements_response.py +31 -0
  46. samplehc/types/v2/integrations/glidian_list_payers_params.py +11 -0
  47. samplehc/types/v2/integrations/glidian_list_payers_response.py +17 -0
  48. samplehc/types/v2/integrations/glidian_list_services_params.py +13 -0
  49. samplehc/types/v2/integrations/glidian_list_services_response.py +19 -0
  50. samplehc/types/v2/ledger_post_remittance_accepted_params.py +37 -0
  51. samplehc/types/v2/ledger_post_remittance_accepted_response.py +12 -0
  52. {samplehc-0.5.0.dist-info → samplehc-0.7.0.dist-info}/METADATA +1 -1
  53. {samplehc-0.5.0.dist-info → samplehc-0.7.0.dist-info}/RECORD +55 -21
  54. {samplehc-0.5.0.dist-info → samplehc-0.7.0.dist-info}/WHEEL +0 -0
  55. {samplehc-0.5.0.dist-info → samplehc-0.7.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,249 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable
6
+ from typing_extensions import Literal
7
+
8
+ import httpx
9
+
10
+ from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
+ from ....._utils import maybe_transform, async_maybe_transform
12
+ from ....._compat import cached_property
13
+ from ....._resource import SyncAPIResource, AsyncAPIResource
14
+ from ....._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from ....._base_client import make_request_options
21
+ from .....types.v2.events.hie import adt_subscribe_params
22
+
23
+ __all__ = ["AdtResource", "AsyncAdtResource"]
24
+
25
+
26
+ class AdtResource(SyncAPIResource):
27
+ @cached_property
28
+ def with_raw_response(self) -> AdtResourceWithRawResponse:
29
+ """
30
+ This property can be used as a prefix for any HTTP method call to return
31
+ the raw response object instead of the parsed content.
32
+
33
+ For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
34
+ """
35
+ return AdtResourceWithRawResponse(self)
36
+
37
+ @cached_property
38
+ def with_streaming_response(self) -> AdtResourceWithStreamingResponse:
39
+ """
40
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
41
+
42
+ For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
43
+ """
44
+ return AdtResourceWithStreamingResponse(self)
45
+
46
+ def subscribe(
47
+ self,
48
+ *,
49
+ address: Iterable[adt_subscribe_params.Address],
50
+ dob: str,
51
+ external_id: str,
52
+ first_name: str,
53
+ gender_at_birth: Literal["M", "F", "O", "U"],
54
+ last_name: str,
55
+ contact: Iterable[adt_subscribe_params.Contact] | NotGiven = NOT_GIVEN,
56
+ personal_identifiers: Iterable[adt_subscribe_params.PersonalIdentifier] | NotGiven = NOT_GIVEN,
57
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
58
+ # The extra values given here take precedence over values defined on the client or passed to this method.
59
+ extra_headers: Headers | None = None,
60
+ extra_query: Query | None = None,
61
+ extra_body: Body | None = None,
62
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
63
+ ) -> object:
64
+ """
65
+ Creates or updates a patient and subscribes to their ADT (Admission, Discharge,
66
+ Transfer) feed.
67
+
68
+ Args:
69
+ address: An array of Address objects, representing the Patient's current and/or previous
70
+ addresses. May be empty.
71
+
72
+ dob: The Patient's date of birth (DOB), formatted `YYYY-MM-DD` as per ISO 8601.
73
+
74
+ external_id: An external Patient ID that you store and can use to reference this Patient.
75
+
76
+ first_name: The Patient's first name(s).
77
+
78
+ gender_at_birth: The Patient's gender at birth, can be one of `M` or `F` or `O` or `U`. Use `O`
79
+ (other) when the patient's gender is known but it is not `M` or `F`, i.e
80
+ intersex or hermaphroditic. Use `U` (unknown) when the patient's gender is not
81
+ known.
82
+
83
+ last_name: The Patient's last name(s).
84
+
85
+ contact: An array of Contact objects, representing the Patient's current and/or previous
86
+ contact information. May be empty.
87
+
88
+ personal_identifiers: An array of the Patient's personal IDs, such as a driver's license or SSN. May
89
+ be empty.
90
+
91
+ extra_headers: Send extra headers
92
+
93
+ extra_query: Add additional query parameters to the request
94
+
95
+ extra_body: Add additional JSON properties to the request
96
+
97
+ timeout: Override the client-level default timeout for this request, in seconds
98
+ """
99
+ return self._post(
100
+ "/api/v2/hie/adt/subscribe",
101
+ body=maybe_transform(
102
+ {
103
+ "address": address,
104
+ "dob": dob,
105
+ "external_id": external_id,
106
+ "first_name": first_name,
107
+ "gender_at_birth": gender_at_birth,
108
+ "last_name": last_name,
109
+ "contact": contact,
110
+ "personal_identifiers": personal_identifiers,
111
+ },
112
+ adt_subscribe_params.AdtSubscribeParams,
113
+ ),
114
+ options=make_request_options(
115
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
116
+ ),
117
+ cast_to=object,
118
+ )
119
+
120
+
121
+ class AsyncAdtResource(AsyncAPIResource):
122
+ @cached_property
123
+ def with_raw_response(self) -> AsyncAdtResourceWithRawResponse:
124
+ """
125
+ This property can be used as a prefix for any HTTP method call to return
126
+ the raw response object instead of the parsed content.
127
+
128
+ For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
129
+ """
130
+ return AsyncAdtResourceWithRawResponse(self)
131
+
132
+ @cached_property
133
+ def with_streaming_response(self) -> AsyncAdtResourceWithStreamingResponse:
134
+ """
135
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
136
+
137
+ For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
138
+ """
139
+ return AsyncAdtResourceWithStreamingResponse(self)
140
+
141
+ async def subscribe(
142
+ self,
143
+ *,
144
+ address: Iterable[adt_subscribe_params.Address],
145
+ dob: str,
146
+ external_id: str,
147
+ first_name: str,
148
+ gender_at_birth: Literal["M", "F", "O", "U"],
149
+ last_name: str,
150
+ contact: Iterable[adt_subscribe_params.Contact] | NotGiven = NOT_GIVEN,
151
+ personal_identifiers: Iterable[adt_subscribe_params.PersonalIdentifier] | NotGiven = NOT_GIVEN,
152
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
153
+ # The extra values given here take precedence over values defined on the client or passed to this method.
154
+ extra_headers: Headers | None = None,
155
+ extra_query: Query | None = None,
156
+ extra_body: Body | None = None,
157
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
158
+ ) -> object:
159
+ """
160
+ Creates or updates a patient and subscribes to their ADT (Admission, Discharge,
161
+ Transfer) feed.
162
+
163
+ Args:
164
+ address: An array of Address objects, representing the Patient's current and/or previous
165
+ addresses. May be empty.
166
+
167
+ dob: The Patient's date of birth (DOB), formatted `YYYY-MM-DD` as per ISO 8601.
168
+
169
+ external_id: An external Patient ID that you store and can use to reference this Patient.
170
+
171
+ first_name: The Patient's first name(s).
172
+
173
+ gender_at_birth: The Patient's gender at birth, can be one of `M` or `F` or `O` or `U`. Use `O`
174
+ (other) when the patient's gender is known but it is not `M` or `F`, i.e
175
+ intersex or hermaphroditic. Use `U` (unknown) when the patient's gender is not
176
+ known.
177
+
178
+ last_name: The Patient's last name(s).
179
+
180
+ contact: An array of Contact objects, representing the Patient's current and/or previous
181
+ contact information. May be empty.
182
+
183
+ personal_identifiers: An array of the Patient's personal IDs, such as a driver's license or SSN. May
184
+ be empty.
185
+
186
+ extra_headers: Send extra headers
187
+
188
+ extra_query: Add additional query parameters to the request
189
+
190
+ extra_body: Add additional JSON properties to the request
191
+
192
+ timeout: Override the client-level default timeout for this request, in seconds
193
+ """
194
+ return await self._post(
195
+ "/api/v2/hie/adt/subscribe",
196
+ body=await async_maybe_transform(
197
+ {
198
+ "address": address,
199
+ "dob": dob,
200
+ "external_id": external_id,
201
+ "first_name": first_name,
202
+ "gender_at_birth": gender_at_birth,
203
+ "last_name": last_name,
204
+ "contact": contact,
205
+ "personal_identifiers": personal_identifiers,
206
+ },
207
+ adt_subscribe_params.AdtSubscribeParams,
208
+ ),
209
+ options=make_request_options(
210
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
211
+ ),
212
+ cast_to=object,
213
+ )
214
+
215
+
216
+ class AdtResourceWithRawResponse:
217
+ def __init__(self, adt: AdtResource) -> None:
218
+ self._adt = adt
219
+
220
+ self.subscribe = to_raw_response_wrapper(
221
+ adt.subscribe,
222
+ )
223
+
224
+
225
+ class AsyncAdtResourceWithRawResponse:
226
+ def __init__(self, adt: AsyncAdtResource) -> None:
227
+ self._adt = adt
228
+
229
+ self.subscribe = async_to_raw_response_wrapper(
230
+ adt.subscribe,
231
+ )
232
+
233
+
234
+ class AdtResourceWithStreamingResponse:
235
+ def __init__(self, adt: AdtResource) -> None:
236
+ self._adt = adt
237
+
238
+ self.subscribe = to_streamed_response_wrapper(
239
+ adt.subscribe,
240
+ )
241
+
242
+
243
+ class AsyncAdtResourceWithStreamingResponse:
244
+ def __init__(self, adt: AsyncAdtResource) -> None:
245
+ self._adt = adt
246
+
247
+ self.subscribe = async_to_streamed_response_wrapper(
248
+ adt.subscribe,
249
+ )
@@ -0,0 +1,102 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .adt import (
6
+ AdtResource,
7
+ AsyncAdtResource,
8
+ AdtResourceWithRawResponse,
9
+ AsyncAdtResourceWithRawResponse,
10
+ AdtResourceWithStreamingResponse,
11
+ AsyncAdtResourceWithStreamingResponse,
12
+ )
13
+ from ....._compat import cached_property
14
+ from ....._resource import SyncAPIResource, AsyncAPIResource
15
+
16
+ __all__ = ["HieResource", "AsyncHieResource"]
17
+
18
+
19
+ class HieResource(SyncAPIResource):
20
+ @cached_property
21
+ def adt(self) -> AdtResource:
22
+ return AdtResource(self._client)
23
+
24
+ @cached_property
25
+ def with_raw_response(self) -> HieResourceWithRawResponse:
26
+ """
27
+ This property can be used as a prefix for any HTTP method call to return
28
+ the raw response object instead of the parsed content.
29
+
30
+ For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
31
+ """
32
+ return HieResourceWithRawResponse(self)
33
+
34
+ @cached_property
35
+ def with_streaming_response(self) -> HieResourceWithStreamingResponse:
36
+ """
37
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38
+
39
+ For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
40
+ """
41
+ return HieResourceWithStreamingResponse(self)
42
+
43
+
44
+ class AsyncHieResource(AsyncAPIResource):
45
+ @cached_property
46
+ def adt(self) -> AsyncAdtResource:
47
+ return AsyncAdtResource(self._client)
48
+
49
+ @cached_property
50
+ def with_raw_response(self) -> AsyncHieResourceWithRawResponse:
51
+ """
52
+ This property can be used as a prefix for any HTTP method call to return
53
+ the raw response object instead of the parsed content.
54
+
55
+ For more information, see https://www.github.com/samplehc/samplehc-python#accessing-raw-response-data-eg-headers
56
+ """
57
+ return AsyncHieResourceWithRawResponse(self)
58
+
59
+ @cached_property
60
+ def with_streaming_response(self) -> AsyncHieResourceWithStreamingResponse:
61
+ """
62
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
63
+
64
+ For more information, see https://www.github.com/samplehc/samplehc-python#with_streaming_response
65
+ """
66
+ return AsyncHieResourceWithStreamingResponse(self)
67
+
68
+
69
+ class HieResourceWithRawResponse:
70
+ def __init__(self, hie: HieResource) -> None:
71
+ self._hie = hie
72
+
73
+ @cached_property
74
+ def adt(self) -> AdtResourceWithRawResponse:
75
+ return AdtResourceWithRawResponse(self._hie.adt)
76
+
77
+
78
+ class AsyncHieResourceWithRawResponse:
79
+ def __init__(self, hie: AsyncHieResource) -> None:
80
+ self._hie = hie
81
+
82
+ @cached_property
83
+ def adt(self) -> AsyncAdtResourceWithRawResponse:
84
+ return AsyncAdtResourceWithRawResponse(self._hie.adt)
85
+
86
+
87
+ class HieResourceWithStreamingResponse:
88
+ def __init__(self, hie: HieResource) -> None:
89
+ self._hie = hie
90
+
91
+ @cached_property
92
+ def adt(self) -> AdtResourceWithStreamingResponse:
93
+ return AdtResourceWithStreamingResponse(self._hie.adt)
94
+
95
+
96
+ class AsyncHieResourceWithStreamingResponse:
97
+ def __init__(self, hie: AsyncHieResource) -> None:
98
+ self._hie = hie
99
+
100
+ @cached_property
101
+ def adt(self) -> AsyncAdtResourceWithStreamingResponse:
102
+ return AsyncAdtResourceWithStreamingResponse(self._hie.adt)
@@ -16,6 +16,14 @@ from .kno2 import (
16
16
  Kno2ResourceWithStreamingResponse,
17
17
  AsyncKno2ResourceWithStreamingResponse,
18
18
  )
19
+ from .glidian import (
20
+ GlidianResource,
21
+ AsyncGlidianResource,
22
+ GlidianResourceWithRawResponse,
23
+ AsyncGlidianResourceWithRawResponse,
24
+ GlidianResourceWithStreamingResponse,
25
+ AsyncGlidianResourceWithStreamingResponse,
26
+ )
19
27
  from .careviso import (
20
28
  CarevisoResource,
21
29
  AsyncCarevisoResource,
@@ -66,6 +74,12 @@ __all__ = [
66
74
  "AsyncKno2ResourceWithRawResponse",
67
75
  "Kno2ResourceWithStreamingResponse",
68
76
  "AsyncKno2ResourceWithStreamingResponse",
77
+ "GlidianResource",
78
+ "AsyncGlidianResource",
79
+ "GlidianResourceWithRawResponse",
80
+ "AsyncGlidianResourceWithRawResponse",
81
+ "GlidianResourceWithStreamingResponse",
82
+ "AsyncGlidianResourceWithStreamingResponse",
69
83
  "IntegrationsResource",
70
84
  "AsyncIntegrationsResource",
71
85
  "IntegrationsResourceWithRawResponse",
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .glidian import (
4
+ GlidianResource,
5
+ AsyncGlidianResource,
6
+ GlidianResourceWithRawResponse,
7
+ AsyncGlidianResourceWithRawResponse,
8
+ GlidianResourceWithStreamingResponse,
9
+ AsyncGlidianResourceWithStreamingResponse,
10
+ )
11
+ from .prior_authorizations import (
12
+ PriorAuthorizationsResource,
13
+ AsyncPriorAuthorizationsResource,
14
+ PriorAuthorizationsResourceWithRawResponse,
15
+ AsyncPriorAuthorizationsResourceWithRawResponse,
16
+ PriorAuthorizationsResourceWithStreamingResponse,
17
+ AsyncPriorAuthorizationsResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "PriorAuthorizationsResource",
22
+ "AsyncPriorAuthorizationsResource",
23
+ "PriorAuthorizationsResourceWithRawResponse",
24
+ "AsyncPriorAuthorizationsResourceWithRawResponse",
25
+ "PriorAuthorizationsResourceWithStreamingResponse",
26
+ "AsyncPriorAuthorizationsResourceWithStreamingResponse",
27
+ "GlidianResource",
28
+ "AsyncGlidianResource",
29
+ "GlidianResourceWithRawResponse",
30
+ "AsyncGlidianResourceWithRawResponse",
31
+ "GlidianResourceWithStreamingResponse",
32
+ "AsyncGlidianResourceWithStreamingResponse",
33
+ ]