diff --git a/pyproject.toml b/pyproject.toml index be8ba3d..d14b221 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fern-metriport" -version = "0.1.7" +version = "0.1.8" description = "" readme = "README.md" authors = [] diff --git a/src/metriport/core/client_wrapper.py b/src/metriport/core/client_wrapper.py index a7c09d9..3b60763 100644 --- a/src/metriport/core/client_wrapper.py +++ b/src/metriport/core/client_wrapper.py @@ -14,7 +14,7 @@ def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { "X-Fern-Language": "Python", "X-Fern-SDK-Name": "fern-metriport", - "X-Fern-SDK-Version": "0.1.7", + "X-Fern-SDK-Version": "0.1.8", } headers["X-API-Key"] = self.api_key return headers diff --git a/src/metriport/resources/medical/__init__.py b/src/metriport/resources/medical/__init__.py index 1971135..061c8b8 100644 --- a/src/metriport/resources/medical/__init__.py +++ b/src/metriport/resources/medical/__init__.py @@ -21,8 +21,6 @@ Filter, GetConsolidatedQueryStatusResponse, ListDocumentsResponse, - ListFacilitiesResponse, - ListPatientsResponse, OrgType, Organization, Patient, @@ -63,8 +61,6 @@ "Filter", "GetConsolidatedQueryStatusResponse", "ListDocumentsResponse", - "ListFacilitiesResponse", - "ListPatientsResponse", "OrgType", "Organization", "Patient", diff --git a/src/metriport/resources/medical/resources/__init__.py b/src/metriport/resources/medical/resources/__init__.py index 4c9c457..000770b 100644 --- a/src/metriport/resources/medical/resources/__init__.py +++ b/src/metriport/resources/medical/resources/__init__.py @@ -12,7 +12,7 @@ ListDocumentsResponse, Progress, ) -from .facility import BaseFacility, Facility, ListFacilitiesResponse +from .facility import BaseFacility, Facility from .fhir import ( ConsolidatedCountResponse, Filter, @@ -31,7 +31,6 @@ Contacts, DriversLicense, FacilityId, - ListPatientsResponse, Patient, Period, PersonalIdentifier, @@ -59,8 +58,6 @@ "Filter", "GetConsolidatedQueryStatusResponse", "ListDocumentsResponse", - "ListFacilitiesResponse", - "ListPatientsResponse", "OrgType", "Organization", "Patient", diff --git a/src/metriport/resources/medical/resources/facility/__init__.py b/src/metriport/resources/medical/resources/facility/__init__.py index 47a3eae..8bde733 100644 --- a/src/metriport/resources/medical/resources/facility/__init__.py +++ b/src/metriport/resources/medical/resources/facility/__init__.py @@ -1,5 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -from .types import BaseFacility, Facility, ListFacilitiesResponse +from .types import BaseFacility, Facility -__all__ = ["BaseFacility", "Facility", "ListFacilitiesResponse"] +__all__ = ["BaseFacility", "Facility"] diff --git a/src/metriport/resources/medical/resources/facility/client.py b/src/metriport/resources/medical/resources/facility/client.py index 098448b..d20e381 100644 --- a/src/metriport/resources/medical/resources/facility/client.py +++ b/src/metriport/resources/medical/resources/facility/client.py @@ -11,7 +11,6 @@ from .....core.jsonable_encoder import jsonable_encoder from .types.base_facility import BaseFacility from .types.facility import Facility -from .types.list_facilities_response import ListFacilitiesResponse # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -88,7 +87,7 @@ def update(self, id: str, *, request: BaseFacility) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def list(self) -> ListFacilitiesResponse: + def list(self) -> typing.List[Facility]: """ Lists all of your Facilities. """ @@ -99,7 +98,7 @@ def list(self) -> ListFacilitiesResponse: timeout=60, ) if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(ListFacilitiesResponse, _response.json()) # type: ignore + return pydantic.parse_obj_as(typing.List[Facility], _response.json()) # type: ignore try: _response_json = _response.json() except JSONDecodeError: @@ -178,7 +177,7 @@ async def update(self, id: str, *, request: BaseFacility) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def list(self) -> ListFacilitiesResponse: + async def list(self) -> typing.List[Facility]: """ Lists all of your Facilities. """ @@ -189,7 +188,7 @@ async def list(self) -> ListFacilitiesResponse: timeout=60, ) if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(ListFacilitiesResponse, _response.json()) # type: ignore + return pydantic.parse_obj_as(typing.List[Facility], _response.json()) # type: ignore try: _response_json = _response.json() except JSONDecodeError: diff --git a/src/metriport/resources/medical/resources/facility/types/__init__.py b/src/metriport/resources/medical/resources/facility/types/__init__.py index 879fc73..1efc4d9 100644 --- a/src/metriport/resources/medical/resources/facility/types/__init__.py +++ b/src/metriport/resources/medical/resources/facility/types/__init__.py @@ -2,6 +2,5 @@ from .base_facility import BaseFacility from .facility import Facility -from .list_facilities_response import ListFacilitiesResponse -__all__ = ["BaseFacility", "Facility", "ListFacilitiesResponse"] +__all__ = ["BaseFacility", "Facility"] diff --git a/src/metriport/resources/medical/resources/facility/types/list_facilities_response.py b/src/metriport/resources/medical/resources/facility/types/list_facilities_response.py deleted file mode 100644 index c9731e9..0000000 --- a/src/metriport/resources/medical/resources/facility/types/list_facilities_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -import pydantic - -from ......core.datetime_utils import serialize_datetime -from .facility import Facility - - -class ListFacilitiesResponse(pydantic.BaseModel): - facilities: typing.List[Facility] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/metriport/resources/medical/resources/patient/__init__.py b/src/metriport/resources/medical/resources/patient/__init__.py index aa91c2e..2fbaa6b 100644 --- a/src/metriport/resources/medical/resources/patient/__init__.py +++ b/src/metriport/resources/medical/resources/patient/__init__.py @@ -7,7 +7,6 @@ Contacts, DriversLicense, FacilityId, - ListPatientsResponse, Patient, Period, PersonalIdentifier, @@ -21,7 +20,6 @@ "Contacts", "DriversLicense", "FacilityId", - "ListPatientsResponse", "Patient", "Period", "PersonalIdentifier", diff --git a/src/metriport/resources/medical/resources/patient/client.py b/src/metriport/resources/medical/resources/patient/client.py index 0022b92..2bb38a8 100644 --- a/src/metriport/resources/medical/resources/patient/client.py +++ b/src/metriport/resources/medical/resources/patient/client.py @@ -11,7 +11,6 @@ from .....core.jsonable_encoder import jsonable_encoder from .....core.remove_none_from_dict import remove_none_from_dict from .types.base_patient import BasePatient -from .types.list_patients_response import ListPatientsResponse from .types.patient import Patient # this is used as the default value for optional parameters @@ -100,12 +99,12 @@ def update(self, id: str, *, facility_id: str, request: BasePatient) -> Patient: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def list(self, *, facility_id: typing.Optional[str] = None) -> ListPatientsResponse: + def list(self, *, facility_id: str) -> typing.List[Patient]: """ Lists all Patients receiving care at the specified Facility. Parameters: - - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. + - facility_id: str. The ID of the Facility where the patient is receiving care. """ _response = self._client_wrapper.httpx_client.request( "GET", @@ -115,7 +114,7 @@ def list(self, *, facility_id: typing.Optional[str] = None) -> ListPatientsRespo timeout=60, ) if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(ListPatientsResponse, _response.json()) # type: ignore + return pydantic.parse_obj_as(typing.List[Patient], _response.json()) # type: ignore try: _response_json = _response.json() except JSONDecodeError: @@ -229,12 +228,12 @@ async def update(self, id: str, *, facility_id: str, request: BasePatient) -> Pa raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def list(self, *, facility_id: typing.Optional[str] = None) -> ListPatientsResponse: + async def list(self, *, facility_id: str) -> typing.List[Patient]: """ Lists all Patients receiving care at the specified Facility. Parameters: - - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. + - facility_id: str. The ID of the Facility where the patient is receiving care. """ _response = await self._client_wrapper.httpx_client.request( "GET", @@ -244,7 +243,7 @@ async def list(self, *, facility_id: typing.Optional[str] = None) -> ListPatient timeout=60, ) if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(ListPatientsResponse, _response.json()) # type: ignore + return pydantic.parse_obj_as(typing.List[Patient], _response.json()) # type: ignore try: _response_json = _response.json() except JSONDecodeError: diff --git a/src/metriport/resources/medical/resources/patient/types/__init__.py b/src/metriport/resources/medical/resources/patient/types/__init__.py index 3159dce..bd2c67a 100644 --- a/src/metriport/resources/medical/resources/patient/types/__init__.py +++ b/src/metriport/resources/medical/resources/patient/types/__init__.py @@ -6,7 +6,6 @@ from .contacts import Contacts from .drivers_license import DriversLicense from .facility_id import FacilityId -from .list_patients_response import ListPatientsResponse from .patient import Patient from .period import Period from .personal_identifier import PersonalIdentifier, PersonalIdentifier_DriversLicense @@ -18,7 +17,6 @@ "Contacts", "DriversLicense", "FacilityId", - "ListPatientsResponse", "Patient", "Period", "PersonalIdentifier", diff --git a/src/metriport/resources/medical/resources/patient/types/list_patients_response.py b/src/metriport/resources/medical/resources/patient/types/list_patients_response.py deleted file mode 100644 index eb6e656..0000000 --- a/src/metriport/resources/medical/resources/patient/types/list_patients_response.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt -import typing - -import pydantic - -from ......core.datetime_utils import serialize_datetime -from .patient import Patient - - -class ListPatientsResponse(pydantic.BaseModel): - patients: typing.List[Patient] - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} - return super().dict(**kwargs_with_defaults) - - class Config: - frozen = True - smart_union = True - json_encoders = {dt.datetime: serialize_datetime}