Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "5.50.4",
"cliVersion": "5.50.5",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "5.14.13",
"generatorConfig": {
Expand All @@ -8,10 +8,10 @@
"enabled": true
}
},
"originGitCommit": "e2c477c4583f8f9e7d0d1a5b5591c1aa8cabef10",
"originGitCommit": "7b0a1643f56f1ba4ead44e0a90a5547a31fa6831",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "AUTO",
"ciProvider": "unknown",
"sdkVersion": "16.4.0"
"sdkVersion": "16.5.0"
}
9 changes: 8 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [16.5.0] - 2026-06-23
### Added
- **`CareSiteRow`**, **`DeathRow`**, **`LocationRow`**, **`ObservationPeriodRow`**, and **`ProviderRow`** — new Pydantic models under `phenoml.fhir2omop` representing the corresponding OMOP CDM v5.4 destination tables.
- **`OmopTables.location`**, **`.care_site`**, **`.provider`**, **`.death`**, and **`.observation_period`** — new optional list fields on `OmopTables` that surface rows for the newly supported OMOP tables returned by the FHIR-to-OMOP conversion endpoint.
- **`provider_id`** optional field added to `ConditionOccurrenceRow`, `DrugExposureRow`, `MeasurementRow`, `ObservationRow`, `ProcedureOccurrenceRow`, and `VisitOccurrenceRow` to link clinical events to their performing provider.
- **`care_site_id`** optional field added to `VisitOccurrenceRow`; **`location_id`** optional field added to `PersonRow` to capture physical location linkage.

## [16.4.0] - 2026-06-23
### Added
- **`client.voice.voice.transcribe(...)`** — new sync and async method that accepts raw audio bytes (WAV, FLAC, MP3, OGG/WebM Opus) and returns a `TranscribeResponse` with the full transcript, supporting up to ~5 minutes of audio per request.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "phenoml"
version = "16.4.0"
version = "16.5.0"
description = ""
readme = "README.md"
authors = []
Expand Down
4 changes: 2 additions & 2 deletions src/phenoml/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "phenoml/16.4.0",
"User-Agent": "phenoml/16.5.0",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "phenoml",
"X-Fern-SDK-Version": "16.4.0",
"X-Fern-SDK-Version": "16.5.0",
**(self.get_custom_headers() or {}),
}
token = self._get_token()
Expand Down
15 changes: 15 additions & 0 deletions src/phenoml/fhir2omop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,43 @@

if typing.TYPE_CHECKING:
from .types import (
CareSiteRow,
ConditionOccurrenceRow,
CreateOmopResponse,
DeathRow,
DroppedResource,
DrugExposureRow,
LocationRow,
MappingEntry,
MeasurementRow,
ObservationPeriodRow,
ObservationRow,
OmopTables,
PersonRow,
ProcedureOccurrenceRow,
ProviderRow,
Summary,
VisitOccurrenceRow,
)
from .errors import BadRequestError, InternalServerError, ServiceUnavailableError, UnauthorizedError
_dynamic_imports: typing.Dict[str, str] = {
"BadRequestError": ".errors",
"CareSiteRow": ".types",
"ConditionOccurrenceRow": ".types",
"CreateOmopResponse": ".types",
"DeathRow": ".types",
"DroppedResource": ".types",
"DrugExposureRow": ".types",
"InternalServerError": ".errors",
"LocationRow": ".types",
"MappingEntry": ".types",
"MeasurementRow": ".types",
"ObservationPeriodRow": ".types",
"ObservationRow": ".types",
"OmopTables": ".types",
"PersonRow": ".types",
"ProcedureOccurrenceRow": ".types",
"ProviderRow": ".types",
"ServiceUnavailableError": ".errors",
"Summary": ".types",
"UnauthorizedError": ".errors",
Expand Down Expand Up @@ -64,17 +74,22 @@ def __dir__():

__all__ = [
"BadRequestError",
"CareSiteRow",
"ConditionOccurrenceRow",
"CreateOmopResponse",
"DeathRow",
"DroppedResource",
"DrugExposureRow",
"InternalServerError",
"LocationRow",
"MappingEntry",
"MeasurementRow",
"ObservationPeriodRow",
"ObservationRow",
"OmopTables",
"PersonRow",
"ProcedureOccurrenceRow",
"ProviderRow",
"ServiceUnavailableError",
"Summary",
"UnauthorizedError",
Expand Down
15 changes: 15 additions & 0 deletions src/phenoml/fhir2omop/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,39 @@
from importlib import import_module

if typing.TYPE_CHECKING:
from .care_site_row import CareSiteRow
from .condition_occurrence_row import ConditionOccurrenceRow
from .create_omop_response import CreateOmopResponse
from .death_row import DeathRow
from .dropped_resource import DroppedResource
from .drug_exposure_row import DrugExposureRow
from .location_row import LocationRow
from .mapping_entry import MappingEntry
from .measurement_row import MeasurementRow
from .observation_period_row import ObservationPeriodRow
from .observation_row import ObservationRow
from .omop_tables import OmopTables
from .person_row import PersonRow
from .procedure_occurrence_row import ProcedureOccurrenceRow
from .provider_row import ProviderRow
from .summary import Summary
from .visit_occurrence_row import VisitOccurrenceRow
_dynamic_imports: typing.Dict[str, str] = {
"CareSiteRow": ".care_site_row",
"ConditionOccurrenceRow": ".condition_occurrence_row",
"CreateOmopResponse": ".create_omop_response",
"DeathRow": ".death_row",
"DroppedResource": ".dropped_resource",
"DrugExposureRow": ".drug_exposure_row",
"LocationRow": ".location_row",
"MappingEntry": ".mapping_entry",
"MeasurementRow": ".measurement_row",
"ObservationPeriodRow": ".observation_period_row",
"ObservationRow": ".observation_row",
"OmopTables": ".omop_tables",
"PersonRow": ".person_row",
"ProcedureOccurrenceRow": ".procedure_occurrence_row",
"ProviderRow": ".provider_row",
"Summary": ".summary",
"VisitOccurrenceRow": ".visit_occurrence_row",
}
Expand Down Expand Up @@ -56,16 +66,21 @@ def __dir__():


__all__ = [
"CareSiteRow",
"ConditionOccurrenceRow",
"CreateOmopResponse",
"DeathRow",
"DroppedResource",
"DrugExposureRow",
"LocationRow",
"MappingEntry",
"MeasurementRow",
"ObservationPeriodRow",
"ObservationRow",
"OmopTables",
"PersonRow",
"ProcedureOccurrenceRow",
"ProviderRow",
"Summary",
"VisitOccurrenceRow",
]
24 changes: 24 additions & 0 deletions src/phenoml/fhir2omop/types/care_site_row.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class CareSiteRow(UniversalBaseModel):
care_site_id: typing.Optional[int] = None
care_site_name: typing.Optional[str] = None
place_of_service_concept_id: typing.Optional[int] = None
location_id: typing.Optional[int] = None
care_site_source_value: typing.Optional[str] = None
place_of_service_source_value: typing.Optional[str] = None

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
1 change: 1 addition & 0 deletions src/phenoml/fhir2omop/types/condition_occurrence_row.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class ConditionOccurrenceRow(UniversalBaseModel):
condition_end_date: typing.Optional[str] = None
condition_type_concept_id: typing.Optional[int] = None
visit_occurrence_id: typing.Optional[int] = None
provider_id: typing.Optional[int] = None
condition_source_value: typing.Optional[str] = None
condition_source_concept_id: typing.Optional[int] = None
condition_status_source_value: typing.Optional[str] = None
Expand Down
25 changes: 25 additions & 0 deletions src/phenoml/fhir2omop/types/death_row.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class DeathRow(UniversalBaseModel):
person_id: typing.Optional[int] = None
death_date: typing.Optional[str] = None
death_datetime: typing.Optional[str] = None
death_type_concept_id: typing.Optional[int] = None
cause_concept_id: typing.Optional[int] = None
cause_source_value: typing.Optional[str] = None
cause_source_concept_id: typing.Optional[int] = None

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
1 change: 1 addition & 0 deletions src/phenoml/fhir2omop/types/drug_exposure_row.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class DrugExposureRow(UniversalBaseModel):
stop_reason: typing.Optional[str] = None
sig: typing.Optional[str] = None
visit_occurrence_id: typing.Optional[int] = None
provider_id: typing.Optional[int] = None
drug_source_value: typing.Optional[str] = None
drug_source_concept_id: typing.Optional[int] = None

Expand Down
36 changes: 36 additions & 0 deletions src/phenoml/fhir2omop/types/location_row.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
import typing_extensions
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...core.serialization import FieldMetadata


class LocationRow(UniversalBaseModel):
location_id: typing.Optional[int] = None
address1: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="address_1"), pydantic.Field(alias="address_1")
] = None
address2: typing_extensions.Annotated[
typing.Optional[str], FieldMetadata(alias="address_2"), pydantic.Field(alias="address_2")
] = None
city: typing.Optional[str] = None
state: typing.Optional[str] = None
zip: typing.Optional[str] = None
county: typing.Optional[str] = None
location_source_value: typing.Optional[str] = None
country_concept_id: typing.Optional[int] = None
country_source_value: typing.Optional[str] = None
latitude: typing.Optional[float] = None
longitude: typing.Optional[float] = None

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
1 change: 1 addition & 0 deletions src/phenoml/fhir2omop/types/measurement_row.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class MeasurementRow(UniversalBaseModel):
range_low: typing.Optional[float] = None
range_high: typing.Optional[float] = None
visit_occurrence_id: typing.Optional[int] = None
provider_id: typing.Optional[int] = None
measurement_source_value: typing.Optional[str] = None
measurement_source_concept_id: typing.Optional[int] = None
unit_source_value: typing.Optional[str] = None
Expand Down
23 changes: 23 additions & 0 deletions src/phenoml/fhir2omop/types/observation_period_row.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class ObservationPeriodRow(UniversalBaseModel):
observation_period_id: typing.Optional[int] = None
person_id: typing.Optional[int] = None
observation_period_start_date: typing.Optional[str] = None
observation_period_end_date: typing.Optional[str] = None
period_type_concept_id: typing.Optional[int] = None

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
1 change: 1 addition & 0 deletions src/phenoml/fhir2omop/types/observation_row.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class ObservationRow(UniversalBaseModel):
value_as_concept_id: typing.Optional[int] = None
unit_concept_id: typing.Optional[int] = None
visit_occurrence_id: typing.Optional[int] = None
provider_id: typing.Optional[int] = None
observation_source_value: typing.Optional[str] = None
observation_source_concept_id: typing.Optional[int] = None
unit_source_value: typing.Optional[str] = None
Expand Down
10 changes: 10 additions & 0 deletions src/phenoml/fhir2omop/types/omop_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .care_site_row import CareSiteRow
from .condition_occurrence_row import ConditionOccurrenceRow
from .death_row import DeathRow
from .drug_exposure_row import DrugExposureRow
from .location_row import LocationRow
from .measurement_row import MeasurementRow
from .observation_period_row import ObservationPeriodRow
from .observation_row import ObservationRow
from .person_row import PersonRow
from .procedure_occurrence_row import ProcedureOccurrenceRow
from .provider_row import ProviderRow
from .visit_occurrence_row import VisitOccurrenceRow


Expand All @@ -18,7 +23,12 @@ class OmopTables(UniversalBaseModel):
OMOP CDM v5.4 rows grouped by destination table.
"""

location: typing.Optional[typing.List[LocationRow]] = None
care_site: typing.Optional[typing.List[CareSiteRow]] = None
provider: typing.Optional[typing.List[ProviderRow]] = None
person: typing.Optional[typing.List[PersonRow]] = None
death: typing.Optional[typing.List[DeathRow]] = None
observation_period: typing.Optional[typing.List[ObservationPeriodRow]] = None
visit_occurrence: typing.Optional[typing.List[VisitOccurrenceRow]] = None
condition_occurrence: typing.Optional[typing.List[ConditionOccurrenceRow]] = None
drug_exposure: typing.Optional[typing.List[DrugExposureRow]] = None
Expand Down
1 change: 1 addition & 0 deletions src/phenoml/fhir2omop/types/person_row.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class PersonRow(UniversalBaseModel):
birth_datetime: typing.Optional[str] = None
race_concept_id: typing.Optional[int] = None
ethnicity_concept_id: typing.Optional[int] = None
location_id: typing.Optional[int] = None
person_source_value: typing.Optional[str] = None
gender_source_value: typing.Optional[str] = None
race_source_value: typing.Optional[str] = None
Expand Down
1 change: 1 addition & 0 deletions src/phenoml/fhir2omop/types/procedure_occurrence_row.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class ProcedureOccurrenceRow(UniversalBaseModel):
procedure_datetime: typing.Optional[str] = None
procedure_type_concept_id: typing.Optional[int] = None
visit_occurrence_id: typing.Optional[int] = None
provider_id: typing.Optional[int] = None
procedure_source_value: typing.Optional[str] = None
procedure_source_concept_id: typing.Optional[int] = None

Expand Down
Loading
Loading