Skip to content
Open
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.58.0",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "5.14.13",
"generatorConfig": {
Expand All @@ -8,10 +8,10 @@
"enabled": true
}
},
"originGitCommit": "e2c477c4583f8f9e7d0d1a5b5591c1aa8cabef10",
"originGitCommit": "5275e24c43b267315ba69ed879018e66367384c7",
"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.

8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [16.5.0] - 2026-06-30
### Added
- **`CareSiteRow`, `DeathRow`, `LocationRow`, `ObservationPeriodRow`, `ProviderRow`** — five new OMOP CDM v5.4 row types exported from `phenoml.fhir2omop`, covering care sites, deaths, locations, observation periods, and providers.
- **`OmopTables.location`, `.care_site`, `.provider`, `.death`, `.observation_period`** — new optional list fields on `OmopTables` populated when the corresponding OMOP tables are produced by the FHIR-to-OMOP conversion.
- **`provider_id` field** — added as an optional field to `ConditionOccurrenceRow`, `DrugExposureRow`, `MeasurementRow`, `ObservationRow`, `ProcedureOccurrenceRow`, and `VisitOccurrenceRow` to link clinical events to their ordering provider.
- **`PersonRow.location_id` and `VisitOccurrenceRow.care_site_id`** — new optional linkage fields connecting persons to their location and visits to their care site.
- **`CreateMultiResponseResourcesItem.source_pages`** — new optional `List[int]` field containing 1-indexed page numbers indicating which source document pages a FHIR resource was extracted from (populated by `/lang2fhir/document/multi` only).

## [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
19 changes: 14 additions & 5 deletions code-examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"metadata": {
"language": "python",
"packageName": "phenoml",
"sdkVersion": "16.4.0",
"specCommit": "e2c477c4583f8f9e7d0d1a5b5591c1aa8cabef10",
"sdkVersion": "16.5.0",
"specCommit": "5275e24c43b267315ba69ed879018e66367384c7",
"generatorName": "fernapi/fern-python-sdk"
},
"renderRules": {
Expand Down Expand Up @@ -2999,19 +2999,28 @@
"tempId": "urn:uuid:patient-001",
"resourceType": "Patient",
"description": "John Doe, born 1979-03-15",
"originalText": "John Doe, DOB 1979-03-15"
"originalText": "John Doe, DOB 1979-03-15",
"sourcePages": [
1
]
},
{
"tempId": "urn:uuid:condition-001",
"resourceType": "Condition",
"description": "Type 2 Diabetes Mellitus diagnosis",
"originalText": "diagnosed with Type 2 Diabetes"
"originalText": "diagnosed with Type 2 Diabetes",
"sourcePages": [
1
]
},
{
"tempId": "urn:uuid:medication-001",
"resourceType": "MedicationRequest",
"description": "Metformin 500mg prescription",
"originalText": "Prescribed Metformin 500mg"
"originalText": "Prescribed Metformin 500mg",
"sourcePages": [
2
]
}
]
}
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

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

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
Loading