diff --git a/.fern/metadata.json b/.fern/metadata.json index fcc5c6d..0ebdc43 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": "17.6.0" } \ No newline at end of file diff --git a/build.gradle b/build.gradle index 2c5ccc2..842382d 100644 --- a/build.gradle +++ b/build.gradle @@ -48,7 +48,7 @@ java { group = 'com.phenoml.maven' -version = '17.5.0' +version = '17.6.0' jar { dependsOn(":generatePomFileForMavenPublication") @@ -79,7 +79,7 @@ publishing { maven(MavenPublication) { groupId = 'com.phenoml.maven' artifactId = 'phenoml-java-sdk' - version = '17.5.0' + version = '17.6.0' from components.java pom { name = 'phenoml' diff --git a/changelog.md b/changelog.md index 4afe10a..18c89a5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,12 @@ +## [17.6.0] - 2026-06-18 +### Added +- **`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 - **`Provider.AIDBOX`** — `"aidbox"` is now a supported value in the `Provider` enum (with a corresponding `Visitor.visitAidbox()` method). @@ -578,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 - 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/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.
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(OptionalOptional 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 OptionalOptional 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(OptionalOptional 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 -> personEncounter -> visit_occurrenceCondition -> condition_occurrenceProcedure -> procedure_occurrenceMedicationRequest, MedicationStatement, and
+ * MedicationAdministration -> drug_exposureImmunization -> drug_exposureObservation with a numeric valueQuantity, valueInteger, or
+ * numeric-looking valueString (for example "<2") -> measurementObservation -> observationAllergyIntolerance -> observationMedication 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
* Resource support is intentionally limited to the OMOP tables returned by
+ * this endpoint: Each resource's primary clinical coding is resolved to a standard OMOP
* Resource support is intentionally limited to the OMOP tables returned by
+ * this endpoint: Each resource's primary clinical coding is resolved to a standard OMOP
* Resource support is intentionally limited to the OMOP tables returned by
+ * this endpoint: Each resource's primary clinical coding is resolved to a standard OMOP
* Resource support is intentionally limited to the OMOP tables returned by
+ * this endpoint: Each resource's primary clinical coding is resolved to a standard OMOP
* Resource support is intentionally limited to the OMOP tables returned by
+ * this endpoint: Each resource's primary clinical coding is resolved to a standard OMOP
* Resource support is intentionally limited to the OMOP tables returned by
+ * this endpoint: Each resource's primary clinical coding is resolved to a standard OMOP
* Resource support is intentionally limited to the OMOP tables returned by
+ * this endpoint: Each resource's primary clinical coding is resolved to a standard OMOP
* 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. 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.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
+ *
+ * Patient -> personEncounter -> visit_occurrenceCondition -> condition_occurrenceProcedure -> procedure_occurrenceMedicationRequest, MedicationStatement, and
+ * MedicationAdministration -> drug_exposureImmunization -> drug_exposureObservation with a numeric valueQuantity, valueInteger, or
+ * numeric-looking valueString (for example "<2") -> measurementObservation -> observationAllergyIntolerance -> observationMedication 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.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).
+ *
+ *
+ * Patient -> personEncounter -> visit_occurrenceCondition -> condition_occurrenceProcedure -> procedure_occurrenceMedicationRequest, MedicationStatement, and
+ * MedicationAdministration -> drug_exposureImmunization -> drug_exposureObservation with a numeric valueQuantity, valueInteger, or
+ * numeric-looking valueString (for example "<2") -> measurementObservation -> observationAllergyIntolerance -> observationMedication 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.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
+ *
+ * Patient -> personEncounter -> visit_occurrenceCondition -> condition_occurrenceProcedure -> procedure_occurrenceMedicationRequest, MedicationStatement, and
+ * MedicationAdministration -> drug_exposureImmunization -> drug_exposureObservation with a numeric valueQuantity, valueInteger, or
+ * numeric-looking valueString (for example "<2") -> measurementObservation -> observationAllergyIntolerance -> observationMedication 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.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).
+ *
+ *
+ * Patient -> personEncounter -> visit_occurrenceCondition -> condition_occurrenceProcedure -> procedure_occurrenceMedicationRequest, MedicationStatement, and
+ * MedicationAdministration -> drug_exposureImmunization -> drug_exposureObservation with a numeric valueQuantity, valueInteger, or
+ * numeric-looking valueString (for example "<2") -> measurementObservation -> observationAllergyIntolerance -> observationMedication 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.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).
+ *
+ *
+ * Patient -> personEncounter -> visit_occurrenceCondition -> condition_occurrenceProcedure -> procedure_occurrenceMedicationRequest, MedicationStatement, and
+ * MedicationAdministration -> drug_exposureImmunization -> drug_exposureObservation with a numeric valueQuantity, valueInteger, or
+ * numeric-looking valueString (for example "<2") -> measurementObservation -> observationAllergyIntolerance -> observationMedication 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.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).
+ *
+ *
+ * Patient -> personEncounter -> visit_occurrenceCondition -> condition_occurrenceProcedure -> procedure_occurrenceMedicationRequest, MedicationStatement, and
+ * MedicationAdministration -> drug_exposureImmunization -> drug_exposureObservation with a numeric valueQuantity, valueInteger, or
+ * numeric-looking valueString (for example "<2") -> measurementObservation -> observationAllergyIntolerance -> observationMedication 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.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
+ *
+ * Patient -> personEncounter -> visit_occurrenceCondition -> condition_occurrenceProcedure -> procedure_occurrenceMedicationRequest, MedicationStatement, and
+ * MedicationAdministration -> drug_exposureImmunization -> drug_exposureObservation with a numeric valueQuantity, valueInteger, or
+ * numeric-looking valueString (for example "<2") -> measurementObservation -> observationAllergyIntolerance -> observationMedication 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.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> 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
> dropped) {
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"
}