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.106.0",
"cliVersion": "5.114.0",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "5.18.1",
"generatorConfig": {
Expand All @@ -8,10 +8,10 @@
"enabled": true
}
},
"originGitCommit": "4a08550f5db230949c7423d0ce5aa7055e8f0d65",
"originGitCommit": "e2cfa711e7e5ad04621efc35d12dcfd7d060040d",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "AUTO",
"ciProvider": "unknown",
"sdkVersion": "16.11.0"
"sdkVersion": "17.0.0"
}
18 changes: 12 additions & 6 deletions .fern/replay.lock

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

13 changes: 13 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## [17.0.0] - 2026-09-04
### Breaking Changes
- **`ProfileSummary`** — fields `id`, `source`, `resource_type`, `url`, `version`, `fhir_version`, `implementation_guide`, `created_at`, and `updated_at` are now required (non-`Optional`); update all construction sites to supply every field and remove any `None`-guard branches.
- **`ProfileGetResponse.structure_definition`** — promoted from `Optional[FhirResource]` to a required `FhirResource`; remove any `None` guard around this field.
- **`ProfileListResponse.profiles`** — promoted from `Optional[List[ProfileSummary]]` to a required `List[ProfileSummary]`; remove any `None` guard around this field.

### Added
- **`client.lang2fhir_batch`** — new sync and async sub-client (`Lang2FhirBatchClient` / `RawLang2FhirBatchClient`) for managing asynchronous bulk FHIR extraction jobs via `/lang2fhir/batch`; exposes `create`, `upload_item`, `finalize`, `list`, `get`, `get_results`, and `get_result` methods.
- **`phenoml.lang2fhir_batch` models and errors** — new Pydantic response models (`BatchJob`, `JobListResponse`, `JobDetailResponse`, `ResultsPageResponse`, `UploadItemResponse`, and related status types) and eight typed `ApiError` subclasses (e.g., `ConflictError`, `ContentTooLargeError`, `GatewayTimeoutError`) exported from `phenoml.lang2fhir_batch`.
- **`client.profiles.versions`** — new sync and async sub-client for managing immutable StructureDefinition versions on custom profiles; exposes `list`, `create`, `get`, and `delete` methods backed by `ProfileVersionListResponse` and `ProfileVersionCreateRequest`.
- **`ProfileSummary.status`, `.date`, and `.canonical`** — new optional fields surfacing StructureDefinition publication status, authored date, and canonical version-pinned reference.
- **`ConflictError` (profiles)** — new HTTP 409 `ApiError` subclass raised by `client.profiles.profiles.update()` and the profile versions endpoints on version conflicts; `lang2fhir_batch` module is now exported from the top-level `phenoml` package.

## [16.11.0] - 2026-08-26
### Added
- **`PatientReference`** — new Pydantic model with `system` and `value` fields representing a business identifier for an existing patient; exported from `phenoml.lang2fhir`.
Expand Down
291 changes: 289 additions & 2 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.11.0",
"specCommit": "4a08550f5db230949c7423d0ce5aa7055e8f0d65",
"sdkVersion": "17.0.0",
"specCommit": "e2cfa711e7e5ad04621efc35d12dcfd7d060040d",
"generatorName": "fernapi/fern-python-sdk"
},
"renderRules": {
Expand Down Expand Up @@ -2685,6 +2685,197 @@
}
}
},
"POST /lang2fhir/batch": {
"httpMethod": "POST",
"httpPath": "/lang2fhir/batch",
"request": {
"body": {
"request_id": "submit-2025-09-02-batch-001"
}
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.lang2fhir_batch.create({{__body__}})",
"params": [],
"body": {
"fieldSeparator": ", ",
"fields": [
{
"jsonKey": "request_id",
"fieldTemplate": "request_id={{value}}",
"kind": "string",
"required": false
}
]
}
}
},
"GET /lang2fhir/batch": {
"httpMethod": "GET",
"httpPath": "/lang2fhir/batch",
"request": {
"body": null
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.lang2fhir_batch.list({{__body__}})",
"params": [],
"body": {
"fieldSeparator": ", ",
"fields": [
{
"jsonKey": "cursor",
"fieldTemplate": "cursor={{value}}",
"kind": "string",
"required": false
},
{
"jsonKey": "limit",
"fieldTemplate": "limit={{value}}",
"kind": "number",
"required": false
}
]
}
}
},
"POST /lang2fhir/batch/{job_id}/items": {
"httpMethod": "POST",
"httpPath": "/lang2fhir/batch/{job_id}/items",
"request": {
"body": null
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.lang2fhir_batch.upload_item(job_id={{job_id}})",
"params": [
{
"name": "job_id",
"kind": "string"
}
]
}
},
"POST /lang2fhir/batch/{job_id}/finalize": {
"httpMethod": "POST",
"httpPath": "/lang2fhir/batch/{job_id}/finalize",
"request": {
"body": null
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.lang2fhir_batch.finalize(job_id={{job_id}})",
"params": [
{
"name": "job_id",
"kind": "string"
}
]
}
},
"GET /lang2fhir/batch/{job_id}": {
"httpMethod": "GET",
"httpPath": "/lang2fhir/batch/{job_id}",
"request": {
"body": null
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.lang2fhir_batch.get(job_id={{job_id}}, {{__body__}})",
"params": [
{
"name": "job_id",
"kind": "string"
}
],
"body": {
"fieldSeparator": ", ",
"fields": [
{
"jsonKey": "cursor",
"fieldTemplate": "cursor={{value}}",
"kind": "string",
"required": false
},
{
"jsonKey": "limit",
"fieldTemplate": "limit={{value}}",
"kind": "number",
"required": false
}
]
}
}
},
"GET /lang2fhir/batch/{job_id}/results": {
"httpMethod": "GET",
"httpPath": "/lang2fhir/batch/{job_id}/results",
"request": {
"body": null
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.lang2fhir_batch.get_results(job_id={{job_id}}, {{__body__}})",
"params": [
{
"name": "job_id",
"kind": "string"
}
],
"body": {
"fieldSeparator": ", ",
"fields": [
{
"jsonKey": "cursor",
"fieldTemplate": "cursor={{value}}",
"kind": "string",
"required": false
},
{
"jsonKey": "limit",
"fieldTemplate": "limit={{value}}",
"kind": "number",
"required": false
}
]
}
}
},
"GET /lang2fhir/batch/{job_id}/results/{item_id}": {
"httpMethod": "GET",
"httpPath": "/lang2fhir/batch/{job_id}/results/{item_id}",
"request": {
"body": null
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.lang2fhir_batch.get_result(job_id={{job_id}}, item_id={{item_id}})",
"params": [
{
"name": "job_id",
"kind": "string"
},
{
"name": "item_id",
"kind": "string"
}
]
}
},
"POST /cohort": {
"httpMethod": "POST",
"httpPath": "/cohort",
Expand Down Expand Up @@ -3877,6 +4068,102 @@
]
}
},
"GET /fhir/profiles/{id}/versions": {
"httpMethod": "GET",
"httpPath": "/fhir/profiles/{id}/versions",
"request": {
"body": null
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.profiles.versions.list(id={{id}})",
"params": [
{
"name": "id",
"kind": "string"
}
]
}
},
"POST /fhir/profiles/{id}/versions": {
"httpMethod": "POST",
"httpPath": "/fhir/profiles/{id}/versions",
"request": {
"body": null
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.profiles.versions.create(id={{id}}, request={{__body__}})",
"params": [
{
"name": "id",
"kind": "string"
}
],
"body": {
"fieldSeparator": ", ",
"fields": [
{
"jsonKey": "",
"fieldTemplate": "{{value}}",
"kind": "object",
"required": true,
"passthroughBody": true
}
]
}
}
},
"GET /fhir/profiles/{id}/versions/{version}": {
"httpMethod": "GET",
"httpPath": "/fhir/profiles/{id}/versions/{version}",
"request": {
"body": null
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.profiles.versions.get(id={{id}}, version={{version}})",
"params": [
{
"name": "id",
"kind": "string"
},
{
"name": "version",
"kind": "string"
}
]
}
},
"DELETE /fhir/profiles/{id}/versions/{version}": {
"httpMethod": "DELETE",
"httpPath": "/fhir/profiles/{id}/versions/{version}",
"request": {
"body": null
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.profiles.versions.delete(id={{id}}, version={{version}})",
"params": [
{
"name": "id",
"kind": "string"
},
{
"name": "version",
"kind": "string"
}
]
}
},
"POST /tools/lang2fhir-and-create": {
"httpMethod": "POST",
"httpPath": "/tools/lang2fhir-and-create",
Expand Down
Loading