From 143bf93c8a6e2cf1c96b3174c42402096aa01fe7 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 18 Jun 2026 18:09:08 +0000 Subject: [PATCH 1/4] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-java-sdk: 4.9.2 --- .fern/metadata.json | 6 +-- build.gradle | 4 +- reference.md | 39 ++++++++++++-- .../com/phenoml/api/core/ClientOptions.java | 4 +- .../agent/chat/AsyncRawChatClient.java | 11 ++++ .../resources/agent/chat/RawChatClient.java | 7 +++ .../agent/chat/requests/AgentChatRequest.java | 8 +-- .../chat/requests/AgentStreamChatRequest.java | 8 +-- .../resources/agent/errors/ConflictError.java | 32 ++++++++++++ .../fhir2omop/AsyncFhir2OmopClient.java | 52 +++++++++++++++++++ .../fhir2omop/AsyncRawFhir2OmopClient.java | 52 +++++++++++++++++++ .../resources/fhir2omop/Fhir2OmopClient.java | 52 +++++++++++++++++++ .../fhir2omop/RawFhir2OmopClient.java | 52 +++++++++++++++++++ .../fhir2omop/requests/CreateOmopRequest.java | 18 ++++--- .../fhir2omop/types/CreateOmopResponse.java | 10 +++- 15 files changed, 327 insertions(+), 28 deletions(-) create mode 100644 src/main/java/com/phenoml/api/resources/agent/errors/ConflictError.java diff --git a/.fern/metadata.json b/.fern/metadata.json index fcc5c6d..1318ecc 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,5 +1,5 @@ { - "cliVersion": "5.49.1", + "cliVersion": "5.50.1", "generatorName": "fernapi/fern-java-sdk", "generatorVersion": "4.9.2", "generatorConfig": { @@ -10,10 +10,10 @@ "enable-wire-tests": true, "publish-to": "central" }, - "originGitCommit": "64f369254225bd6c2d4c58d87f59165d7e8e8dc9", + "originGitCommit": "fbaef4c66e97232edfaacb20d23d476aa286ecdd", "originGitCommitIsDirty": true, "invokedBy": "ci", "requestedVersion": "AUTO", "ciProvider": "unknown", - "sdkVersion": "17.5.0" + "sdkVersion": "0.0.0-fern-placeholder" } \ No newline at end of file diff --git a/build.gradle b/build.gradle index 2c5ccc2..e9f35ce 100644 --- a/build.gradle +++ b/build.gradle @@ -48,7 +48,7 @@ java { group = 'com.phenoml.maven' -version = '17.5.0' +version = '0.0.0-fern-placeholder' jar { dependsOn(":generatePomFileForMavenPublication") @@ -79,7 +79,7 @@ publishing { maven(MavenPublication) { groupId = 'com.phenoml.maven' artifactId = 'phenoml-java-sdk' - version = '17.5.0' + version = '0.0.0-fern-placeholder' from components.java pom { name = 'phenoml' diff --git a/reference.md b/reference.md index 4792978..6731113 100644 --- a/reference.md +++ b/reference.md @@ -486,7 +486,7 @@ Multiple FHIR provider integrations can be provided as comma-separated values.
-**sessionId:** `Optional` — Optional session ID for conversation continuity +**sessionId:** `Optional` — Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.
@@ -605,7 +605,7 @@ Multiple FHIR provider integrations can be provided as comma-separated values.
-**sessionId:** `Optional` — Optional session ID for conversation continuity +**sessionId:** `Optional` — Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.
@@ -3036,6 +3036,32 @@ Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows (person, visit_occurrence, condition_occurrence, drug_exposure, procedure_occurrence, measurement, observation). +Resource support is intentionally limited to the OMOP tables returned by +this endpoint: +- `Patient` -> `person` +- `Encounter` -> `visit_occurrence` +- `Condition` -> `condition_occurrence` +- `Procedure` -> `procedure_occurrence` +- `MedicationRequest`, `MedicationStatement`, and + `MedicationAdministration` -> `drug_exposure` +- `Immunization` -> `drug_exposure` +- `Observation` with a numeric `valueQuantity`, `valueInteger`, or + numeric-looking `valueString` (for example `"<2"`) -> `measurement` +- non-numeric `Observation` -> `observation` +- `AllergyIntolerance` -> `observation` + +`Medication` is supported only as reference data for medication +resources; it is not emitted as its own row because OMOP CDM has no +Medication table. Other reference/admin resources such as `Practitioner`, +`Organization`, `Location`, `Coverage`, and `Claim`, and clinical +workflow/document resources such as `DiagnosticReport`, `ServiceRequest`, +`CarePlan`, `DocumentReference`, `Composition`, `Specimen`, and +`DeviceUseStatement`, are currently accepted in a Bundle but are not +shaped into OMOP rows. Unsupported resource types are ignored rather than +listed under `dropped`; `dropped` is reserved for supported resource types +that were missing the subject/patient, code, or medication reference data +needed to produce a valid row. + Each resource's primary clinical coding is resolved to a standard OMOP `concept_id`. Alongside the OMOP rows grouped by table (`tables`), the response carries `mappings` (how each source coding resolved, linked back @@ -3151,9 +3177,12 @@ client.fhir2Omop().create( **fhirResources:** `Map` FHIR resources (single resource or Bundle). Must contain at least one -Patient resource. Resources are mapped to OMOP rows; standalone -Medication resources are consumed by medication references rather than -mapped to their own table. +Patient resource. Supported row-producing resources are Patient, +Encounter, Condition, Procedure, MedicationRequest, +MedicationStatement, MedicationAdministration, Immunization, +Observation, and AllergyIntolerance. Standalone Medication resources +are consumed by medication references rather than mapped to their own +table. Other resource types are accepted but ignored. diff --git a/src/main/java/com/phenoml/api/core/ClientOptions.java b/src/main/java/com/phenoml/api/core/ClientOptions.java index 24c1b6b..b1f15e2 100644 --- a/src/main/java/com/phenoml/api/core/ClientOptions.java +++ b/src/main/java/com/phenoml/api/core/ClientOptions.java @@ -38,10 +38,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/17.5.0"); + put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/0.0.0-fern-placeholder"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.phenoml.fern:api-sdk"); - put("X-Fern-SDK-Version", "17.5.0"); + put("X-Fern-SDK-Version", "0.0.0-fern-placeholder"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/phenoml/api/resources/agent/chat/AsyncRawChatClient.java b/src/main/java/com/phenoml/api/resources/agent/chat/AsyncRawChatClient.java index afa8b5b..dc88095 100644 --- a/src/main/java/com/phenoml/api/resources/agent/chat/AsyncRawChatClient.java +++ b/src/main/java/com/phenoml/api/resources/agent/chat/AsyncRawChatClient.java @@ -19,6 +19,7 @@ import com.phenoml.api.resources.agent.chat.requests.ListMessagesRequest; import com.phenoml.api.resources.agent.chat.types.ListMessagesResponse; import com.phenoml.api.resources.agent.errors.BadRequestError; +import com.phenoml.api.resources.agent.errors.ConflictError; import com.phenoml.api.resources.agent.errors.ForbiddenError; import com.phenoml.api.resources.agent.errors.GatewayTimeoutError; import com.phenoml.api.resources.agent.errors.InternalServerError; @@ -127,6 +128,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 500: future.completeExceptionally(new InternalServerError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), @@ -244,6 +250,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response)); return; + case 409: + future.completeExceptionally(new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; case 500: future.completeExceptionally(new InternalServerError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), diff --git a/src/main/java/com/phenoml/api/resources/agent/chat/RawChatClient.java b/src/main/java/com/phenoml/api/resources/agent/chat/RawChatClient.java index 786106e..461a481 100644 --- a/src/main/java/com/phenoml/api/resources/agent/chat/RawChatClient.java +++ b/src/main/java/com/phenoml/api/resources/agent/chat/RawChatClient.java @@ -19,6 +19,7 @@ import com.phenoml.api.resources.agent.chat.requests.ListMessagesRequest; import com.phenoml.api.resources.agent.chat.types.ListMessagesResponse; import com.phenoml.api.resources.agent.errors.BadRequestError; +import com.phenoml.api.resources.agent.errors.ConflictError; import com.phenoml.api.resources.agent.errors.ForbiddenError; import com.phenoml.api.resources.agent.errors.GatewayTimeoutError; import com.phenoml.api.resources.agent.errors.InternalServerError; @@ -109,6 +110,9 @@ public PhenomlClientHttpResponse send(AgentChatRequest reques case 404: throw new NotFoundError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 409: + throw new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 500: throw new InternalServerError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); @@ -199,6 +203,9 @@ public PhenomlClientHttpResponse> stream( case 404: throw new NotFoundError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); + case 409: + throw new ConflictError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); case 500: throw new InternalServerError( ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); diff --git a/src/main/java/com/phenoml/api/resources/agent/chat/requests/AgentChatRequest.java b/src/main/java/com/phenoml/api/resources/agent/chat/requests/AgentChatRequest.java index 3661d62..a2948c6 100644 --- a/src/main/java/com/phenoml/api/resources/agent/chat/requests/AgentChatRequest.java +++ b/src/main/java/com/phenoml/api/resources/agent/chat/requests/AgentChatRequest.java @@ -92,7 +92,7 @@ public Optional getContext() { } /** - * @return Optional session ID for conversation continuity + * @return Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict. */ @JsonProperty("session_id") public Optional getSessionId() { @@ -204,7 +204,7 @@ public interface _FinalStage { _FinalStage context(String context); /** - *

Optional session ID for conversation continuity

+ *

Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.

*/ _FinalStage sessionId(Optional sessionId); @@ -296,7 +296,7 @@ public _FinalStage enhancedReasoning(Optional enhancedReasoning) { } /** - *

Optional session ID for conversation continuity

+ *

Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -306,7 +306,7 @@ public _FinalStage sessionId(String sessionId) { } /** - *

Optional session ID for conversation continuity

+ *

Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.

*/ @java.lang.Override @JsonSetter(value = "session_id", nulls = Nulls.SKIP) diff --git a/src/main/java/com/phenoml/api/resources/agent/chat/requests/AgentStreamChatRequest.java b/src/main/java/com/phenoml/api/resources/agent/chat/requests/AgentStreamChatRequest.java index 30db732..b62762c 100644 --- a/src/main/java/com/phenoml/api/resources/agent/chat/requests/AgentStreamChatRequest.java +++ b/src/main/java/com/phenoml/api/resources/agent/chat/requests/AgentStreamChatRequest.java @@ -92,7 +92,7 @@ public Optional getContext() { } /** - * @return Optional session ID for conversation continuity + * @return Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict. */ @JsonProperty("session_id") public Optional getSessionId() { @@ -204,7 +204,7 @@ public interface _FinalStage { _FinalStage context(String context); /** - *

Optional session ID for conversation continuity

+ *

Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.

*/ _FinalStage sessionId(Optional sessionId); @@ -296,7 +296,7 @@ public _FinalStage enhancedReasoning(Optional enhancedReasoning) { } /** - *

Optional session ID for conversation continuity

+ *

Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -306,7 +306,7 @@ public _FinalStage sessionId(String sessionId) { } /** - *

Optional session ID for conversation continuity

+ *

Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.

*/ @java.lang.Override @JsonSetter(value = "session_id", nulls = Nulls.SKIP) diff --git a/src/main/java/com/phenoml/api/resources/agent/errors/ConflictError.java b/src/main/java/com/phenoml/api/resources/agent/errors/ConflictError.java new file mode 100644 index 0000000..31e9f23 --- /dev/null +++ b/src/main/java/com/phenoml/api/resources/agent/errors/ConflictError.java @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.phenoml.api.resources.agent.errors; + +import com.phenoml.api.core.PhenomlClientApiException; +import okhttp3.Response; + +public final class ConflictError extends PhenomlClientApiException { + /** + * The body of the response that triggered the exception. + */ + private final Object body; + + public ConflictError(Object body) { + super("ConflictError", 409, body); + this.body = body; + } + + public ConflictError(Object body, Response rawResponse) { + super("ConflictError", 409, body, rawResponse); + this.body = body; + } + + /** + * @return the body + */ + @java.lang.Override + public Object body() { + return this.body; + } +} diff --git a/src/main/java/com/phenoml/api/resources/fhir2omop/AsyncFhir2OmopClient.java b/src/main/java/com/phenoml/api/resources/fhir2omop/AsyncFhir2OmopClient.java index 907d42a..509fc77 100644 --- a/src/main/java/com/phenoml/api/resources/fhir2omop/AsyncFhir2OmopClient.java +++ b/src/main/java/com/phenoml/api/resources/fhir2omop/AsyncFhir2OmopClient.java @@ -30,6 +30,32 @@ public AsyncRawFhir2OmopClient withRawResponse() { * Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows * (person, visit_occurrence, condition_occurrence, drug_exposure, * procedure_occurrence, measurement, observation). + *

Resource support is intentionally limited to the OMOP tables returned by + * this endpoint:

+ *
    + *
  • Patient -> person
  • + *
  • Encounter -> visit_occurrence
  • + *
  • Condition -> condition_occurrence
  • + *
  • Procedure -> procedure_occurrence
  • + *
  • MedicationRequest, MedicationStatement, and + * MedicationAdministration -> drug_exposure
  • + *
  • Immunization -> drug_exposure
  • + *
  • Observation with a numeric valueQuantity, valueInteger, or + * numeric-looking valueString (for example "<2") -> measurement
  • + *
  • non-numeric Observation -> observation
  • + *
  • AllergyIntolerance -> observation
  • + *
+ *

Medication is supported only as reference data for medication + * resources; it is not emitted as its own row because OMOP CDM has no + * Medication table. Other reference/admin resources such as Practitioner, + * Organization, Location, Coverage, and Claim, and clinical + * workflow/document resources such as DiagnosticReport, ServiceRequest, + * CarePlan, DocumentReference, Composition, Specimen, and + * DeviceUseStatement, are currently accepted in a Bundle but are not + * shaped into OMOP rows. Unsupported resource types are ignored rather than + * listed under dropped; dropped is reserved for supported resource types + * that were missing the subject/patient, code, or medication reference data + * needed to produce a valid row.

*

Each resource's primary clinical coding is resolved to a standard OMOP * concept_id. Alongside the OMOP rows grouped by table (tables), the * response carries mappings (how each source coding resolved, linked back @@ -62,6 +88,32 @@ public CompletableFuture create(CreateOmopRequest request) { * Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows * (person, visit_occurrence, condition_occurrence, drug_exposure, * procedure_occurrence, measurement, observation). + *

Resource support is intentionally limited to the OMOP tables returned by + * this endpoint:

+ *
    + *
  • Patient -> person
  • + *
  • Encounter -> visit_occurrence
  • + *
  • Condition -> condition_occurrence
  • + *
  • Procedure -> procedure_occurrence
  • + *
  • MedicationRequest, MedicationStatement, and + * MedicationAdministration -> drug_exposure
  • + *
  • Immunization -> drug_exposure
  • + *
  • Observation with a numeric valueQuantity, valueInteger, or + * numeric-looking valueString (for example "<2") -> measurement
  • + *
  • non-numeric Observation -> observation
  • + *
  • AllergyIntolerance -> observation
  • + *
+ *

Medication is supported only as reference data for medication + * resources; it is not emitted as its own row because OMOP CDM has no + * Medication table. Other reference/admin resources such as Practitioner, + * Organization, Location, Coverage, and Claim, and clinical + * workflow/document resources such as DiagnosticReport, ServiceRequest, + * CarePlan, DocumentReference, Composition, Specimen, and + * DeviceUseStatement, are currently accepted in a Bundle but are not + * shaped into OMOP rows. Unsupported resource types are ignored rather than + * listed under dropped; dropped is reserved for supported resource types + * that were missing the subject/patient, code, or medication reference data + * needed to produce a valid row.

*

Each resource's primary clinical coding is resolved to a standard OMOP * concept_id. Alongside the OMOP rows grouped by table (tables), the * response carries mappings (how each source coding resolved, linked back diff --git a/src/main/java/com/phenoml/api/resources/fhir2omop/AsyncRawFhir2OmopClient.java b/src/main/java/com/phenoml/api/resources/fhir2omop/AsyncRawFhir2OmopClient.java index a6f3f84..4536efc 100644 --- a/src/main/java/com/phenoml/api/resources/fhir2omop/AsyncRawFhir2OmopClient.java +++ b/src/main/java/com/phenoml/api/resources/fhir2omop/AsyncRawFhir2OmopClient.java @@ -41,6 +41,32 @@ public AsyncRawFhir2OmopClient(ClientOptions clientOptions) { * Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows * (person, visit_occurrence, condition_occurrence, drug_exposure, * procedure_occurrence, measurement, observation). + *

Resource support is intentionally limited to the OMOP tables returned by + * this endpoint:

+ *
    + *
  • Patient -> person
  • + *
  • Encounter -> visit_occurrence
  • + *
  • Condition -> condition_occurrence
  • + *
  • Procedure -> procedure_occurrence
  • + *
  • MedicationRequest, MedicationStatement, and + * MedicationAdministration -> drug_exposure
  • + *
  • Immunization -> drug_exposure
  • + *
  • Observation with a numeric valueQuantity, valueInteger, or + * numeric-looking valueString (for example "<2") -> measurement
  • + *
  • non-numeric Observation -> observation
  • + *
  • AllergyIntolerance -> observation
  • + *
+ *

Medication is supported only as reference data for medication + * resources; it is not emitted as its own row because OMOP CDM has no + * Medication table. Other reference/admin resources such as Practitioner, + * Organization, Location, Coverage, and Claim, and clinical + * workflow/document resources such as DiagnosticReport, ServiceRequest, + * CarePlan, DocumentReference, Composition, Specimen, and + * DeviceUseStatement, are currently accepted in a Bundle but are not + * shaped into OMOP rows. Unsupported resource types are ignored rather than + * listed under dropped; dropped is reserved for supported resource types + * that were missing the subject/patient, code, or medication reference data + * needed to produce a valid row.

*

Each resource's primary clinical coding is resolved to a standard OMOP * concept_id. Alongside the OMOP rows grouped by table (tables), the * response carries mappings (how each source coding resolved, linked back @@ -73,6 +99,32 @@ public CompletableFuture> create(C * Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows * (person, visit_occurrence, condition_occurrence, drug_exposure, * procedure_occurrence, measurement, observation). + *

Resource support is intentionally limited to the OMOP tables returned by + * this endpoint:

+ *
    + *
  • Patient -> person
  • + *
  • Encounter -> visit_occurrence
  • + *
  • Condition -> condition_occurrence
  • + *
  • Procedure -> procedure_occurrence
  • + *
  • MedicationRequest, MedicationStatement, and + * MedicationAdministration -> drug_exposure
  • + *
  • Immunization -> drug_exposure
  • + *
  • Observation with a numeric valueQuantity, valueInteger, or + * numeric-looking valueString (for example "<2") -> measurement
  • + *
  • non-numeric Observation -> observation
  • + *
  • AllergyIntolerance -> observation
  • + *
+ *

Medication is supported only as reference data for medication + * resources; it is not emitted as its own row because OMOP CDM has no + * Medication table. Other reference/admin resources such as Practitioner, + * Organization, Location, Coverage, and Claim, and clinical + * workflow/document resources such as DiagnosticReport, ServiceRequest, + * CarePlan, DocumentReference, Composition, Specimen, and + * DeviceUseStatement, are currently accepted in a Bundle but are not + * shaped into OMOP rows. Unsupported resource types are ignored rather than + * listed under dropped; dropped is reserved for supported resource types + * that were missing the subject/patient, code, or medication reference data + * needed to produce a valid row.

*

Each resource's primary clinical coding is resolved to a standard OMOP * concept_id. Alongside the OMOP rows grouped by table (tables), the * response carries mappings (how each source coding resolved, linked back diff --git a/src/main/java/com/phenoml/api/resources/fhir2omop/Fhir2OmopClient.java b/src/main/java/com/phenoml/api/resources/fhir2omop/Fhir2OmopClient.java index 8f44914..5def4f5 100644 --- a/src/main/java/com/phenoml/api/resources/fhir2omop/Fhir2OmopClient.java +++ b/src/main/java/com/phenoml/api/resources/fhir2omop/Fhir2OmopClient.java @@ -29,6 +29,32 @@ public RawFhir2OmopClient withRawResponse() { * Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows * (person, visit_occurrence, condition_occurrence, drug_exposure, * procedure_occurrence, measurement, observation). + *

Resource support is intentionally limited to the OMOP tables returned by + * this endpoint:

+ *
    + *
  • Patient -> person
  • + *
  • Encounter -> visit_occurrence
  • + *
  • Condition -> condition_occurrence
  • + *
  • Procedure -> procedure_occurrence
  • + *
  • MedicationRequest, MedicationStatement, and + * MedicationAdministration -> drug_exposure
  • + *
  • Immunization -> drug_exposure
  • + *
  • Observation with a numeric valueQuantity, valueInteger, or + * numeric-looking valueString (for example "<2") -> measurement
  • + *
  • non-numeric Observation -> observation
  • + *
  • AllergyIntolerance -> observation
  • + *
+ *

Medication is supported only as reference data for medication + * resources; it is not emitted as its own row because OMOP CDM has no + * Medication table. Other reference/admin resources such as Practitioner, + * Organization, Location, Coverage, and Claim, and clinical + * workflow/document resources such as DiagnosticReport, ServiceRequest, + * CarePlan, DocumentReference, Composition, Specimen, and + * DeviceUseStatement, are currently accepted in a Bundle but are not + * shaped into OMOP rows. Unsupported resource types are ignored rather than + * listed under dropped; dropped is reserved for supported resource types + * that were missing the subject/patient, code, or medication reference data + * needed to produce a valid row.

*

Each resource's primary clinical coding is resolved to a standard OMOP * concept_id. Alongside the OMOP rows grouped by table (tables), the * response carries mappings (how each source coding resolved, linked back @@ -61,6 +87,32 @@ public CreateOmopResponse create(CreateOmopRequest request) { * Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows * (person, visit_occurrence, condition_occurrence, drug_exposure, * procedure_occurrence, measurement, observation). + *

Resource support is intentionally limited to the OMOP tables returned by + * this endpoint:

+ *
    + *
  • Patient -> person
  • + *
  • Encounter -> visit_occurrence
  • + *
  • Condition -> condition_occurrence
  • + *
  • Procedure -> procedure_occurrence
  • + *
  • MedicationRequest, MedicationStatement, and + * MedicationAdministration -> drug_exposure
  • + *
  • Immunization -> drug_exposure
  • + *
  • Observation with a numeric valueQuantity, valueInteger, or + * numeric-looking valueString (for example "<2") -> measurement
  • + *
  • non-numeric Observation -> observation
  • + *
  • AllergyIntolerance -> observation
  • + *
+ *

Medication is supported only as reference data for medication + * resources; it is not emitted as its own row because OMOP CDM has no + * Medication table. Other reference/admin resources such as Practitioner, + * Organization, Location, Coverage, and Claim, and clinical + * workflow/document resources such as DiagnosticReport, ServiceRequest, + * CarePlan, DocumentReference, Composition, Specimen, and + * DeviceUseStatement, are currently accepted in a Bundle but are not + * shaped into OMOP rows. Unsupported resource types are ignored rather than + * listed under dropped; dropped is reserved for supported resource types + * that were missing the subject/patient, code, or medication reference data + * needed to produce a valid row.

*

Each resource's primary clinical coding is resolved to a standard OMOP * concept_id. Alongside the OMOP rows grouped by table (tables), the * response carries mappings (how each source coding resolved, linked back diff --git a/src/main/java/com/phenoml/api/resources/fhir2omop/RawFhir2OmopClient.java b/src/main/java/com/phenoml/api/resources/fhir2omop/RawFhir2OmopClient.java index 5f16e04..fe8d28d 100644 --- a/src/main/java/com/phenoml/api/resources/fhir2omop/RawFhir2OmopClient.java +++ b/src/main/java/com/phenoml/api/resources/fhir2omop/RawFhir2OmopClient.java @@ -37,6 +37,32 @@ public RawFhir2OmopClient(ClientOptions clientOptions) { * Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows * (person, visit_occurrence, condition_occurrence, drug_exposure, * procedure_occurrence, measurement, observation). + *

Resource support is intentionally limited to the OMOP tables returned by + * this endpoint:

+ *
    + *
  • Patient -> person
  • + *
  • Encounter -> visit_occurrence
  • + *
  • Condition -> condition_occurrence
  • + *
  • Procedure -> procedure_occurrence
  • + *
  • MedicationRequest, MedicationStatement, and + * MedicationAdministration -> drug_exposure
  • + *
  • Immunization -> drug_exposure
  • + *
  • Observation with a numeric valueQuantity, valueInteger, or + * numeric-looking valueString (for example "<2") -> measurement
  • + *
  • non-numeric Observation -> observation
  • + *
  • AllergyIntolerance -> observation
  • + *
+ *

Medication is supported only as reference data for medication + * resources; it is not emitted as its own row because OMOP CDM has no + * Medication table. Other reference/admin resources such as Practitioner, + * Organization, Location, Coverage, and Claim, and clinical + * workflow/document resources such as DiagnosticReport, ServiceRequest, + * CarePlan, DocumentReference, Composition, Specimen, and + * DeviceUseStatement, are currently accepted in a Bundle but are not + * shaped into OMOP rows. Unsupported resource types are ignored rather than + * listed under dropped; dropped is reserved for supported resource types + * that were missing the subject/patient, code, or medication reference data + * needed to produce a valid row.

*

Each resource's primary clinical coding is resolved to a standard OMOP * concept_id. Alongside the OMOP rows grouped by table (tables), the * response carries mappings (how each source coding resolved, linked back @@ -69,6 +95,32 @@ public PhenomlClientHttpResponse create(CreateOmopRequest re * Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows * (person, visit_occurrence, condition_occurrence, drug_exposure, * procedure_occurrence, measurement, observation). + *

Resource support is intentionally limited to the OMOP tables returned by + * this endpoint:

+ *
    + *
  • Patient -> person
  • + *
  • Encounter -> visit_occurrence
  • + *
  • Condition -> condition_occurrence
  • + *
  • Procedure -> procedure_occurrence
  • + *
  • MedicationRequest, MedicationStatement, and + * MedicationAdministration -> drug_exposure
  • + *
  • Immunization -> drug_exposure
  • + *
  • Observation with a numeric valueQuantity, valueInteger, or + * numeric-looking valueString (for example "<2") -> measurement
  • + *
  • non-numeric Observation -> observation
  • + *
  • AllergyIntolerance -> observation
  • + *
+ *

Medication is supported only as reference data for medication + * resources; it is not emitted as its own row because OMOP CDM has no + * Medication table. Other reference/admin resources such as Practitioner, + * Organization, Location, Coverage, and Claim, and clinical + * workflow/document resources such as DiagnosticReport, ServiceRequest, + * CarePlan, DocumentReference, Composition, Specimen, and + * DeviceUseStatement, are currently accepted in a Bundle but are not + * shaped into OMOP rows. Unsupported resource types are ignored rather than + * listed under dropped; dropped is reserved for supported resource types + * that were missing the subject/patient, code, or medication reference data + * needed to produce a valid row.

*

Each resource's primary clinical coding is resolved to a standard OMOP * concept_id. Alongside the OMOP rows grouped by table (tables), the * response carries mappings (how each source coding resolved, linked back diff --git a/src/main/java/com/phenoml/api/resources/fhir2omop/requests/CreateOmopRequest.java b/src/main/java/com/phenoml/api/resources/fhir2omop/requests/CreateOmopRequest.java index 1ac4436..34b8f6d 100644 --- a/src/main/java/com/phenoml/api/resources/fhir2omop/requests/CreateOmopRequest.java +++ b/src/main/java/com/phenoml/api/resources/fhir2omop/requests/CreateOmopRequest.java @@ -31,9 +31,12 @@ private CreateOmopRequest(Map fhirResources, Map /** * @return FHIR resources (single resource or Bundle). Must contain at least one - * Patient resource. Resources are mapped to OMOP rows; standalone - * Medication resources are consumed by medication references rather than - * mapped to their own table. + * Patient resource. Supported row-producing resources are Patient, + * Encounter, Condition, Procedure, MedicationRequest, + * MedicationStatement, MedicationAdministration, Immunization, + * Observation, and AllergyIntolerance. Standalone Medication resources + * are consumed by medication references rather than mapped to their own + * table. Other resource types are accepted but ignored. */ @JsonProperty("fhir_resources") public Map getFhirResources() { @@ -85,9 +88,12 @@ public Builder from(CreateOmopRequest other) { /** *

FHIR resources (single resource or Bundle). Must contain at least one - * Patient resource. Resources are mapped to OMOP rows; standalone - * Medication resources are consumed by medication references rather than - * mapped to their own table.

+ * Patient resource. Supported row-producing resources are Patient, + * Encounter, Condition, Procedure, MedicationRequest, + * MedicationStatement, MedicationAdministration, Immunization, + * Observation, and AllergyIntolerance. Standalone Medication resources + * are consumed by medication references rather than mapped to their own + * table. Other resource types are accepted but ignored.

*/ @JsonSetter(value = "fhir_resources", nulls = Nulls.SKIP) public Builder fhirResources(Map fhirResources) { diff --git a/src/main/java/com/phenoml/api/resources/fhir2omop/types/CreateOmopResponse.java b/src/main/java/com/phenoml/api/resources/fhir2omop/types/CreateOmopResponse.java index 0160ece..e365995 100644 --- a/src/main/java/com/phenoml/api/resources/fhir2omop/types/CreateOmopResponse.java +++ b/src/main/java/com/phenoml/api/resources/fhir2omop/types/CreateOmopResponse.java @@ -80,7 +80,10 @@ public Optional> getMappings() { } /** - * @return Resources that could not be shaped into an OMOP row (rather than emitted as blank rows). + * @return Supported resource instances that could not be shaped into an OMOP + * row because required subject/patient, code, or medication reference + * data was missing. Unsupported resource types are ignored and do not + * appear here. */ @JsonProperty("dropped") public Optional> getDropped() { @@ -218,7 +221,10 @@ public Builder mappings(List mappings) { } /** - *

Resources that could not be shaped into an OMOP row (rather than emitted as blank rows).

+ *

Supported resource instances that could not be shaped into an OMOP + * row because required subject/patient, code, or medication reference + * data was missing. Unsupported resource types are ignored and do not + * appear here.

*/ @JsonSetter(value = "dropped", nulls = Nulls.SKIP) public Builder dropped(Optional> dropped) { From 55c4207055541c6ec18341e3a3e9e5f46f089c4f Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 18 Jun 2026 18:09:54 +0000 Subject: [PATCH 2/4] [fern-autoversion] feat: add Fhir2Omop client and ConflictError for agent chat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce the FHIR-to-OMOP mapping service as a first-class SDK client, and add HTTP 409 Conflict error handling to the agent chat endpoints. Key changes: - Add `Fhir2OmopClient` and `AsyncFhir2OmopClient` (plus raw variants) accessible via `PhenomlClient.fhir2Omop()` and `AsyncPhenomlClient.fhir2Omop()`, exposing `POST /fhir2omop/create` - Add new request/response types: `CreateOmopRequest`, `CreateOmopResponse`, `OmopTables`, `PersonRow`, `VisitOccurrenceRow`, `ConditionOccurrenceRow`, `DrugExposureRow`, `ProcedureOccurrenceRow`, `MeasurementRow`, `ObservationRow`, `MappingEntry`, `Summary`, and `DroppedResource` - Add `ConflictError` (HTTP 409) to agent chat sync and async clients (`RawChatClient`, `AsyncRawChatClient`) 🌿 Generated with Fern --- .fern/metadata.json | 2 +- build.gradle | 4 ++-- changelog.md | 8 ++++++++ src/main/java/com/phenoml/api/core/ClientOptions.java | 4 ++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.fern/metadata.json b/.fern/metadata.json index 1318ecc..0ebdc43 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -15,5 +15,5 @@ "invokedBy": "ci", "requestedVersion": "AUTO", "ciProvider": "unknown", - "sdkVersion": "0.0.0-fern-placeholder" + "sdkVersion": "17.6.0" } \ No newline at end of file diff --git a/build.gradle b/build.gradle index e9f35ce..842382d 100644 --- a/build.gradle +++ b/build.gradle @@ -48,7 +48,7 @@ java { group = 'com.phenoml.maven' -version = '0.0.0-fern-placeholder' +version = '17.6.0' jar { dependsOn(":generatePomFileForMavenPublication") @@ -79,7 +79,7 @@ publishing { maven(MavenPublication) { groupId = 'com.phenoml.maven' artifactId = 'phenoml-java-sdk' - version = '0.0.0-fern-placeholder' + version = '17.6.0' from components.java pom { name = 'phenoml' diff --git a/changelog.md b/changelog.md index 4afe10a..76bc78d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,11 @@ +## [17.6.0] - 2026-06-18 +### Added +- **`PhenomlClient.fhir2Omop()` / `AsyncPhenomlClient.fhir2Omop()`** — new client accessors exposing the `POST /fhir2omop/create` endpoint that maps a FHIR R4 resource or Bundle into OMOP CDM v5.4 rows. +- **`Fhir2OmopClient`**, **`AsyncFhir2OmopClient`**, **`RawFhir2OmopClient`**, and **`AsyncRawFhir2OmopClient`** — new synchronous, asynchronous, and raw-response client classes with a `create(CreateOmopRequest)` method returning a `CreateOmopResponse`. +- **OMOP CDM v5.4 row and supporting types** — new `PersonRow`, `VisitOccurrenceRow`, `ConditionOccurrenceRow`, `DrugExposureRow`, `ProcedureOccurrenceRow`, `MeasurementRow`, and `ObservationRow` classes aggregated under `OmopTables`, plus `MappingEntry`, `Summary`, `CreateOmopResponse`, and `DroppedResource` supporting types. +- **`ConflictError`** — new typed exception (HTTP 409) thrown by `RawChatClient` and `AsyncRawChatClient` when the agent chat endpoint returns a conflict response; `BadRequestError`, `UnauthorizedError`, `InternalServerError`, and `ServiceUnavailableError` are also thrown by `RawFhir2OmopClient`. +- **`Provider.AIDBOX`** — `"aidbox"` added as a supported value in the `Provider` enum, with a corresponding `Visitor.visitAidbox()` method. + ## [17.5.0] - 2026-06-15 ### Added - **`Provider.AIDBOX`** — `"aidbox"` is now a supported value in the `Provider` enum (with a corresponding `Visitor.visitAidbox()` method). diff --git a/src/main/java/com/phenoml/api/core/ClientOptions.java b/src/main/java/com/phenoml/api/core/ClientOptions.java index b1f15e2..af95a7f 100644 --- a/src/main/java/com/phenoml/api/core/ClientOptions.java +++ b/src/main/java/com/phenoml/api/core/ClientOptions.java @@ -38,10 +38,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/0.0.0-fern-placeholder"); + put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/17.6.0"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.phenoml.fern:api-sdk"); - put("X-Fern-SDK-Version", "0.0.0-fern-placeholder"); + put("X-Fern-SDK-Version", "17.6.0"); } }); this.headerSuppliers = headerSuppliers; From 3e4fa20241bb9b618b2de115cdd6012c3992fccd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Jun 2026 18:10:12 +0000 Subject: [PATCH 3/4] chore: sync OpenAPI spec + code-examples for fbaef4c66e97232edfaacb20d23d476aa286ecdd [skip ci] --- code-examples.json | 4 ++-- src/main/resources/openapi/openapi.json | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/code-examples.json b/code-examples.json index 2684d0c..00fb9e1 100644 --- a/code-examples.json +++ b/code-examples.json @@ -2,8 +2,8 @@ "metadata": { "language": "java", "packageName": "com.phenoml.maven:phenoml-java-sdk", - "sdkVersion": "17.5.0", - "specCommit": "64f369254225bd6c2d4c58d87f59165d7e8e8dc9", + "sdkVersion": "17.6.0", + "specCommit": "fbaef4c66e97232edfaacb20d23d476aa286ecdd", "generatorName": "fernapi/fern-java-sdk" }, "renderRules": { diff --git a/src/main/resources/openapi/openapi.json b/src/main/resources/openapi/openapi.json index 3882086..20e6e8a 100644 --- a/src/main/resources/openapi/openapi.json +++ b/src/main/resources/openapi/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.3", "info": { "title": "Phenoml API", - "version": "64f369254225bd6c2d4c58d87f59165d7e8e8dc9" + "version": "fbaef4c66e97232edfaacb20d23d476aa286ecdd" }, "x-services": [ { @@ -672,6 +672,9 @@ "404": { "description": "Agent or session not found" }, + "409": { + "description": "Chat session already has an active request. Retry after the in-flight turn completes." + }, "500": { "description": "Server error" }, @@ -746,6 +749,9 @@ "404": { "description": "Agent or session not found" }, + "409": { + "description": "Chat session already has an active request. Retry after the in-flight turn completes." + }, "500": { "description": "Server error" }, @@ -3021,7 +3027,7 @@ "post": { "operationId": "fhir2omop_create", "summary": "Map FHIR resources to OMOP CDM v5.4", - "description": "Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows\n(person, visit_occurrence, condition_occurrence, drug_exposure,\nprocedure_occurrence, measurement, observation).\n\nEach resource's primary clinical coding is resolved to a standard OMOP\n`concept_id`. Alongside the OMOP rows grouped by table (`tables`), the\nresponse carries `mappings` (how each source coding resolved, linked back\nto the row it produced), `dropped` (resources that could not be shaped\ninto a row), `vocab_version` (the OMOP vocabulary release codes were\nresolved against), and a small `summary` of the resolution outcomes.\n\nA `concept_id` of `0` is reported, not omitted (OMOP \"no matching\nconcept\" semantics): it covers both a coding with no standard match\n(`UNMAPPED`) and an unverified suggestion for a text-only resource\n(`UNCHECKED`). Only the primary clinical coding is resolved, so\n`gender`/`race`/`ethnicity`/`visit`/`value`/`unit` `concept_id`s are\nalways `0`; the one populated non-resolved concept is measurement\n`operator_concept_id`, set from a value comparator (`<`, `<=`, `>`, `>=`)\nrather than the resolver. Each `*_source_value` carries the verbatim FHIR\ncoding (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).\n\nMedication codes are resolved whether they appear inline\n(`medicationCodeableConcept`) or via a `medicationReference` to a contained,\nrelative (`Type/id`), or bundle-entry (`urn:uuid`) `Medication` resource.\nResources that cannot be shaped into a row \u2014 a medication with no usable\ncode, resolvable reference, or display, or any clinical resource whose\nsubject/patient reference cannot be tied to a person \u2014 are reported under\n`dropped` rather than emitted as blank rows. The\nbundle must contain at least one Patient resource.\n", + "description": "Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows\n(person, visit_occurrence, condition_occurrence, drug_exposure,\nprocedure_occurrence, measurement, observation).\n\nResource support is intentionally limited to the OMOP tables returned by\nthis endpoint:\n- `Patient` -> `person`\n- `Encounter` -> `visit_occurrence`\n- `Condition` -> `condition_occurrence`\n- `Procedure` -> `procedure_occurrence`\n- `MedicationRequest`, `MedicationStatement`, and\n `MedicationAdministration` -> `drug_exposure`\n- `Immunization` -> `drug_exposure`\n- `Observation` with a numeric `valueQuantity`, `valueInteger`, or\n numeric-looking `valueString` (for example `\"<2\"`) -> `measurement`\n- non-numeric `Observation` -> `observation`\n- `AllergyIntolerance` -> `observation`\n\n`Medication` is supported only as reference data for medication\nresources; it is not emitted as its own row because OMOP CDM has no\nMedication table. Other reference/admin resources such as `Practitioner`,\n`Organization`, `Location`, `Coverage`, and `Claim`, and clinical\nworkflow/document resources such as `DiagnosticReport`, `ServiceRequest`,\n`CarePlan`, `DocumentReference`, `Composition`, `Specimen`, and\n`DeviceUseStatement`, are currently accepted in a Bundle but are not\nshaped into OMOP rows. Unsupported resource types are ignored rather than\nlisted under `dropped`; `dropped` is reserved for supported resource types\nthat were missing the subject/patient, code, or medication reference data\nneeded to produce a valid row.\n\nEach resource's primary clinical coding is resolved to a standard OMOP\n`concept_id`. Alongside the OMOP rows grouped by table (`tables`), the\nresponse carries `mappings` (how each source coding resolved, linked back\nto the row it produced), `dropped` (resources that could not be shaped\ninto a row), `vocab_version` (the OMOP vocabulary release codes were\nresolved against), and a small `summary` of the resolution outcomes.\n\nA `concept_id` of `0` is reported, not omitted (OMOP \"no matching\nconcept\" semantics): it covers both a coding with no standard match\n(`UNMAPPED`) and an unverified suggestion for a text-only resource\n(`UNCHECKED`). Only the primary clinical coding is resolved, so\n`gender`/`race`/`ethnicity`/`visit`/`value`/`unit` `concept_id`s are\nalways `0`; the one populated non-resolved concept is measurement\n`operator_concept_id`, set from a value comparator (`<`, `<=`, `>`, `>=`)\nrather than the resolver. Each `*_source_value` carries the verbatim FHIR\ncoding (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).\n\nMedication codes are resolved whether they appear inline\n(`medicationCodeableConcept`) or via a `medicationReference` to a contained,\nrelative (`Type/id`), or bundle-entry (`urn:uuid`) `Medication` resource.\nResources that cannot be shaped into a row \u2014 a medication with no usable\ncode, resolvable reference, or display, or any clinical resource whose\nsubject/patient reference cannot be tied to a person \u2014 are reported under\n`dropped` rather than emitted as blank rows. The\nbundle must contain at least one Patient resource.\n", "requestBody": { "required": true, "content": { @@ -7345,7 +7351,7 @@ }, "session_id": { "type": "string", - "description": "Optional session ID for conversation continuity", + "description": "Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.", "example": "session-abc123" }, "agent_id": { @@ -7381,7 +7387,7 @@ }, "session_id": { "type": "string", - "description": "Optional session ID for conversation continuity", + "description": "Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.", "example": "session-abc123" }, "agent_id": { @@ -8544,7 +8550,7 @@ "fhir_resources": { "type": "object", "additionalProperties": true, - "description": "FHIR resources (single resource or Bundle). Must contain at least one\nPatient resource. Resources are mapped to OMOP rows; standalone\nMedication resources are consumed by medication references rather than\nmapped to their own table.\n" + "description": "FHIR resources (single resource or Bundle). Must contain at least one\nPatient resource. Supported row-producing resources are Patient,\nEncounter, Condition, Procedure, MedicationRequest,\nMedicationStatement, MedicationAdministration, Immunization,\nObservation, and AllergyIntolerance. Standalone Medication resources\nare consumed by medication references rather than mapped to their own\ntable. Other resource types are accepted but ignored.\n" } } }, @@ -8569,7 +8575,7 @@ }, "dropped": { "type": "array", - "description": "Resources that could not be shaped into an OMOP row (rather than emitted as blank rows).", + "description": "Supported resource instances that could not be shaped into an OMOP\nrow because required subject/patient, code, or medication reference\ndata was missing. Unsupported resource types are ignored and do not\nappear here.\n", "items": { "$ref": "#/components/schemas/fhir2omop_DroppedResource" } From 640eb502f78b0c0ecad2b4c08e3917a53661a76e Mon Sep 17 00:00:00 2001 From: Gavin Sharp Date: Thu, 18 Jun 2026 19:02:51 -0400 Subject: [PATCH 4/4] release: 17.6.0 - add agent conflict errors --- changelog.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index 76bc78d..18c89a5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,10 +1,11 @@ ## [17.6.0] - 2026-06-18 ### Added -- **`PhenomlClient.fhir2Omop()` / `AsyncPhenomlClient.fhir2Omop()`** — new client accessors exposing the `POST /fhir2omop/create` endpoint that maps a FHIR R4 resource or Bundle into OMOP CDM v5.4 rows. -- **`Fhir2OmopClient`**, **`AsyncFhir2OmopClient`**, **`RawFhir2OmopClient`**, and **`AsyncRawFhir2OmopClient`** — new synchronous, asynchronous, and raw-response client classes with a `create(CreateOmopRequest)` method returning a `CreateOmopResponse`. -- **OMOP CDM v5.4 row and supporting types** — new `PersonRow`, `VisitOccurrenceRow`, `ConditionOccurrenceRow`, `DrugExposureRow`, `ProcedureOccurrenceRow`, `MeasurementRow`, and `ObservationRow` classes aggregated under `OmopTables`, plus `MappingEntry`, `Summary`, `CreateOmopResponse`, and `DroppedResource` supporting types. -- **`ConflictError`** — new typed exception (HTTP 409) thrown by `RawChatClient` and `AsyncRawChatClient` when the agent chat endpoint returns a conflict response; `BadRequestError`, `UnauthorizedError`, `InternalServerError`, and `ServiceUnavailableError` are also thrown by `RawFhir2OmopClient`. -- **`Provider.AIDBOX`** — `"aidbox"` added as a supported value in the `Provider` enum, with a corresponding `Visitor.visitAidbox()` method. +- **`ConflictError`** — new typed exception thrown by `RawChatClient.send(...)`, `RawChatClient.stream(...)`, `AsyncRawChatClient.send(...)`, and `AsyncRawChatClient.stream(...)` for HTTP 409 responses when a session already has an active turn. + +### Changed +- **`AgentChatRequest.getSessionId()` and `AgentStreamChatRequest.getSessionId()`** — Javadoc now states that only one request may be active per session at a time and overlapping turns return `409 Conflict`. +- **`Fhir2OmopClient.create(...)` and `AsyncFhir2OmopClient.create(...)`** — Javadoc now lists the supported FHIR resource-to-OMOP table mappings and clarifies that unsupported resource types are accepted but ignored. +- **`CreateOmopResponse.getDropped()`** — Javadoc now clarifies that only supported resources missing required subject/patient, code, or medication reference data appear in `dropped`; unsupported resource types are ignored. ## [17.5.0] - 2026-06-15 ### Added @@ -586,4 +587,3 @@ import com.phenoml.api.PhenomlClient; * Update documentation to reflect removal of active status filtering * Simplify agent creation workflow by removing active status requirement * 🌿 Generated with Fern -