Skip to content

feat: add visit_occurrence_id and operator_concept_id to OMOP row types#169

Merged
gavinsharp merged 4 commits into
mainfrom
fern-bot/2026-06-15_16-39-25_896
Jun 15, 2026
Merged

feat: add visit_occurrence_id and operator_concept_id to OMOP row types#169
gavinsharp merged 4 commits into
mainfrom
fern-bot/2026-06-15_16-39-25_896

Conversation

@fern-api

@fern-api fern-api Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

17.3.0 → 17.4.0

Added

  • ConditionOccurrenceRow.getVisitOccurrenceId(), DrugExposureRow.getVisitOccurrenceId(), MeasurementRow.getVisitOccurrenceId(), ObservationRow.getVisitOccurrenceId(), and ProcedureOccurrenceRow.getVisitOccurrenceId() — new optional accessor linking each clinical OMOP row back to its visit_occurrence row.
  • MeasurementRow.getOperatorConceptId() — new optional accessor carrying the OMOP "Meas Value Operator" standard concept (<, <=, >, >=) parsed from a FHIR valueQuantity.comparator or numeric-string value; 0 when no operator is present.

Changed

  • MappingEntry.getTargetCode() — value semantics updated: now the standard concept's own code for ALREADY_STANDARD, MAPPED, and UNCHECKED rows; empty for UNMAPPED rows.
  • Summary — count-field docs clarify each total is counted once per resolved concept (not per coding), unlike mappings, which has one entry per coding.
  • PhenomlClient.fhir2Omop().create(...) Javadoc — clarifies that a clinical concept_id of 0 covers both UNMAPPED and UNCHECKED, and that operator_concept_id is the one non-zero non-resolved concept on measurement rows.

Note

Medium Risk
Additive JSON fields are backward compatible for deserialization, but changed target_code population and updated mapping semantics can break integrators that assumed the old UNCHECKED-only behavior.

Overview
17.4.0 regenerates the Java SDK from an updated FHIR→OMOP API spec (Fern), bumping the package to 17.4.0 and refreshing OpenAPI, examples, and wire tests.

Clinical OMOP row types gain optional visit_occurrence_id on condition, drug, measurement, observation, and procedure rows so each event can reference its visit_occurrence row. MeasurementRow also adds operator_concept_id for OMOP “Meas Value Operator” concepts from FHIR comparators or qualified numeric strings.

MappingEntry.getTargetCode() semantics change: the field is now the standard concept’s code for ALREADY_STANDARD, MAPPED, and UNCHECKED mappings and omitted/empty for UNMAPPED. Summary and fhir2Omop().create() Javadoc are updated to clarify concept_id 0 (both unmapped and unchecked), summary counts per resolved concept vs one mapping per coding, and operator_concept_id on measurements.

Reviewed by Cursor Bugbot for commit 689cf3a. Bugbot is set up for automated code reviews on this repo. Configure here.

fern-api Bot and others added 4 commits June 15, 2026 16:38
Generated by Fern
CLI Version: unknown
Generators:
  - fernapi/fern-java-sdk: 4.9.2
…v5.4 mapping

Expose a new `fhir2omop` sub-client on both `PhenomlClient` and
`AsyncPhenomlClient` that posts FHIR R4 resources or Bundles to
`POST /fhir2omop/create` and returns typed OMOP CDM v5.4 rows.

The response includes OMOP rows grouped by table (`tables`), per-coding
mapping entries (`mappings`), resources that could not be shaped into a
row (`dropped`), the OMOP vocabulary release used (`vocab_version`), and
aggregate resolution statistics (`summary`).

Key changes:
- Add `Fhir2OmopClient` / `AsyncFhir2OmopClient` and expose them via `PhenomlClient.fhir2Omop()` / `AsyncPhenomlClient.fhir2Omop()`
- Add `CreateOmopRequest` (requires `fhirResources`) and `CreateOmopResponse` (carries `tables`, `mappings`, `dropped`, `vocab_version`, `summary`)
- Add OMOP CDM v5.4 row types: `PersonRow`, `VisitOccurrenceRow`, `ConditionOccurrenceRow`, `DrugExposureRow`, `ProcedureOccurrenceRow`, `MeasurementRow`, `ObservationRow` under `OmopTables`
- Add `MappingEntry`, `Summary`, and `DroppedResource` supporting types
- Register `fhir2omop` service in OpenAPI spec and update code-examples metadata

🌿 Generated with Fern
The auto-generated 17.4.0 entry re-described the entire fhir2omop client/types/errors
as newly added (it shipped in 17.2.0). This release only adds getVisitOccurrenceId()
(5 row types) + MeasurementRow.getOperatorConceptId() and clarifies target_code /
Summary / create() docs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gavinsharp gavinsharp changed the title feat: add fhir2omop service with FHIR-to-OMOP CDM v5.4 mapping feat: add visit_occurrence_id and operator_concept_id to OMOP row types Jun 15, 2026
@gavinsharp gavinsharp merged commit b691c44 into main Jun 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant