From ddcb2b84f7a2757f06719cfae7301956cb00cb92 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Fri, 20 Dec 2024 11:36:10 +0000
Subject: [PATCH] Release 2.1.153
---
pyproject.toml | 2 +-
reference.md | 70 ++++++++
src/vital/__init__.py | 2 +
src/vital/core/client_wrapper.py | 2 +-
src/vital/insurance/client.py | 161 +++++++++++++++++-
src/vital/types/__init__.py | 2 +
.../client_facing_payor_search_response.py | 2 +-
...facing_payor_search_response_deprecated.py | 38 +++++
8 files changed, 268 insertions(+), 11 deletions(-)
create mode 100644 src/vital/types/client_facing_payor_search_response_deprecated.py
diff --git a/pyproject.toml b/pyproject.toml
index 7eed2a5..6b7c60b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "vital"
-version = "2.1.152"
+version = "2.1.153"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index efd4ca7..6a1b422 100644
--- a/reference.md
+++ b/reference.md
@@ -12872,6 +12872,76 @@ client.testkit.create_order(
## Insurance
+client.insurance.search_get_payor_info(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from vital import Vital
+
+client = Vital(
+ api_key="YOUR_API_KEY",
+)
+client.insurance.search_get_payor_info()
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**insurance_name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**provider:** `typing.Optional[PayorCodeExternalProvider]`
+
+
+
+
+
+-
+
+**provider_payor_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
client.insurance.search_payor_info(...)
-
diff --git a/src/vital/__init__.py b/src/vital/__init__.py
index 6afa0d6..a315d91 100644
--- a/src/vital/__init__.py
+++ b/src/vital/__init__.py
@@ -117,6 +117,7 @@
ClientFacingOrderEvent,
ClientFacingPatientDetailsCompatible,
ClientFacingPayorSearchResponse,
+ ClientFacingPayorSearchResponseDeprecated,
ClientFacingPhysician,
ClientFacingProfile,
ClientFacingProvider,
@@ -535,6 +536,7 @@
"ClientFacingOrderEvent",
"ClientFacingPatientDetailsCompatible",
"ClientFacingPayorSearchResponse",
+ "ClientFacingPayorSearchResponseDeprecated",
"ClientFacingPhysician",
"ClientFacingProfile",
"ClientFacingProvider",
diff --git a/src/vital/core/client_wrapper.py b/src/vital/core/client_wrapper.py
index b393d9f..fe21c76 100644
--- a/src/vital/core/client_wrapper.py
+++ b/src/vital/core/client_wrapper.py
@@ -16,7 +16,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "vital",
- "X-Fern-SDK-Version": "2.1.152",
+ "X-Fern-SDK-Version": "2.1.153",
}
headers["x-vital-api-key"] = self.api_key
return headers
diff --git a/src/vital/insurance/client.py b/src/vital/insurance/client.py
index 4d6a97e..ba70ef5 100644
--- a/src/vital/insurance/client.py
+++ b/src/vital/insurance/client.py
@@ -10,6 +10,7 @@
from ..types.http_validation_error import HttpValidationError
from json.decoder import JSONDecodeError
from ..core.api_error import ApiError
+from ..types.client_facing_payor_search_response_deprecated import ClientFacingPayorSearchResponseDeprecated
from ..types.client_facing_diagnosis_information import ClientFacingDiagnosisInformation
from ..core.client_wrapper import AsyncClientWrapper
@@ -21,6 +22,74 @@ class InsuranceClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper
+ def search_get_payor_info(
+ self,
+ *,
+ insurance_name: typing.Optional[str] = None,
+ provider: typing.Optional[PayorCodeExternalProvider] = None,
+ provider_payor_id: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> typing.List[ClientFacingPayorSearchResponse]:
+ """
+ Parameters
+ ----------
+ insurance_name : typing.Optional[str]
+
+ provider : typing.Optional[PayorCodeExternalProvider]
+
+ provider_payor_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ typing.List[ClientFacingPayorSearchResponse]
+ Successful Response
+
+ Examples
+ --------
+ from vital import Vital
+
+ client = Vital(
+ api_key="YOUR_API_KEY",
+ )
+ client.insurance.search_get_payor_info()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "v3/insurance/search/payor",
+ method="GET",
+ params={
+ "insurance_name": insurance_name,
+ "provider": provider,
+ "provider_payor_id": provider_payor_id,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[ClientFacingPayorSearchResponse],
+ parse_obj_as(
+ type_=typing.List[ClientFacingPayorSearchResponse], # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ typing.cast(
+ HttpValidationError,
+ parse_obj_as(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
def search_payor_info(
self,
*,
@@ -28,7 +97,7 @@ def search_payor_info(
provider: typing.Optional[PayorCodeExternalProvider] = OMIT,
provider_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> typing.List[ClientFacingPayorSearchResponse]:
+ ) -> typing.List[ClientFacingPayorSearchResponseDeprecated]:
"""
Parameters
----------
@@ -43,7 +112,7 @@ def search_payor_info(
Returns
-------
- typing.List[ClientFacingPayorSearchResponse]
+ typing.List[ClientFacingPayorSearchResponseDeprecated]
Successful Response
Examples
@@ -69,9 +138,9 @@ def search_payor_info(
try:
if 200 <= _response.status_code < 300:
return typing.cast(
- typing.List[ClientFacingPayorSearchResponse],
+ typing.List[ClientFacingPayorSearchResponseDeprecated],
parse_obj_as(
- type_=typing.List[ClientFacingPayorSearchResponse], # type: ignore
+ type_=typing.List[ClientFacingPayorSearchResponseDeprecated], # type: ignore
object_=_response.json(),
),
)
@@ -154,6 +223,82 @@ class AsyncInsuranceClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper
+ async def search_get_payor_info(
+ self,
+ *,
+ insurance_name: typing.Optional[str] = None,
+ provider: typing.Optional[PayorCodeExternalProvider] = None,
+ provider_payor_id: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> typing.List[ClientFacingPayorSearchResponse]:
+ """
+ Parameters
+ ----------
+ insurance_name : typing.Optional[str]
+
+ provider : typing.Optional[PayorCodeExternalProvider]
+
+ provider_payor_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ typing.List[ClientFacingPayorSearchResponse]
+ Successful Response
+
+ Examples
+ --------
+ import asyncio
+
+ from vital import AsyncVital
+
+ client = AsyncVital(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.insurance.search_get_payor_info()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "v3/insurance/search/payor",
+ method="GET",
+ params={
+ "insurance_name": insurance_name,
+ "provider": provider,
+ "provider_payor_id": provider_payor_id,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ typing.List[ClientFacingPayorSearchResponse],
+ parse_obj_as(
+ type_=typing.List[ClientFacingPayorSearchResponse], # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ typing.cast(
+ HttpValidationError,
+ parse_obj_as(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
async def search_payor_info(
self,
*,
@@ -161,7 +306,7 @@ async def search_payor_info(
provider: typing.Optional[PayorCodeExternalProvider] = OMIT,
provider_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> typing.List[ClientFacingPayorSearchResponse]:
+ ) -> typing.List[ClientFacingPayorSearchResponseDeprecated]:
"""
Parameters
----------
@@ -176,7 +321,7 @@ async def search_payor_info(
Returns
-------
- typing.List[ClientFacingPayorSearchResponse]
+ typing.List[ClientFacingPayorSearchResponseDeprecated]
Successful Response
Examples
@@ -210,9 +355,9 @@ async def main() -> None:
try:
if 200 <= _response.status_code < 300:
return typing.cast(
- typing.List[ClientFacingPayorSearchResponse],
+ typing.List[ClientFacingPayorSearchResponseDeprecated],
parse_obj_as(
- type_=typing.List[ClientFacingPayorSearchResponse], # type: ignore
+ type_=typing.List[ClientFacingPayorSearchResponseDeprecated], # type: ignore
object_=_response.json(),
),
)
diff --git a/src/vital/types/__init__.py b/src/vital/types/__init__.py
index baf5527..679a70a 100644
--- a/src/vital/types/__init__.py
+++ b/src/vital/types/__init__.py
@@ -136,6 +136,7 @@
from .client_facing_order_event import ClientFacingOrderEvent
from .client_facing_patient_details_compatible import ClientFacingPatientDetailsCompatible
from .client_facing_payor_search_response import ClientFacingPayorSearchResponse
+from .client_facing_payor_search_response_deprecated import ClientFacingPayorSearchResponseDeprecated
from .client_facing_physician import ClientFacingPhysician
from .client_facing_profile import ClientFacingProfile
from .client_facing_provider import ClientFacingProvider
@@ -541,6 +542,7 @@
"ClientFacingOrderEvent",
"ClientFacingPatientDetailsCompatible",
"ClientFacingPayorSearchResponse",
+ "ClientFacingPayorSearchResponseDeprecated",
"ClientFacingPhysician",
"ClientFacingProfile",
"ClientFacingProvider",
diff --git a/src/vital/types/client_facing_payor_search_response.py b/src/vital/types/client_facing_payor_search_response.py
index df30f82..542c4b4 100644
--- a/src/vital/types/client_facing_payor_search_response.py
+++ b/src/vital/types/client_facing_payor_search_response.py
@@ -8,7 +8,7 @@
class ClientFacingPayorSearchResponse(UniversalBaseModel):
- code: str = pydantic.Field()
+ payor_code: str = pydantic.Field()
"""
Payor code returned for the insurance information.
"""
diff --git a/src/vital/types/client_facing_payor_search_response_deprecated.py b/src/vital/types/client_facing_payor_search_response_deprecated.py
new file mode 100644
index 0000000..1116a32
--- /dev/null
+++ b/src/vital/types/client_facing_payor_search_response_deprecated.py
@@ -0,0 +1,38 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import pydantic
+import typing
+from .address import Address
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class ClientFacingPayorSearchResponseDeprecated(UniversalBaseModel):
+ code: str = pydantic.Field()
+ """
+ Payor code returned for the insurance information.
+ """
+
+ name: str = pydantic.Field()
+ """
+ Insurance name returned for the insurance information.
+ """
+
+ aliases: typing.List[str] = pydantic.Field()
+ """
+ Insurance name aliases returned for the insurance information.
+ """
+
+ org_address: Address = pydantic.Field()
+ """
+ Insurance business address returned for the insurance information.
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow