feat: add visit_occurrence_id and operator_concept_id to OMOP row types#169
Merged
Conversation
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
approved these changes
Jun 15, 2026
gavinsharp
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
17.3.0 → 17.4.0
Added
ConditionOccurrenceRow.getVisitOccurrenceId(),DrugExposureRow.getVisitOccurrenceId(),MeasurementRow.getVisitOccurrenceId(),ObservationRow.getVisitOccurrenceId(), andProcedureOccurrenceRow.getVisitOccurrenceId()— new optional accessor linking each clinical OMOP row back to itsvisit_occurrencerow.MeasurementRow.getOperatorConceptId()— new optional accessor carrying the OMOP "Meas Value Operator" standard concept (<,<=,>,>=) parsed from a FHIRvalueQuantity.comparatoror numeric-string value;0when no operator is present.Changed
MappingEntry.getTargetCode()— value semantics updated: now the standard concept's own code forALREADY_STANDARD,MAPPED, andUNCHECKEDrows; empty forUNMAPPEDrows.Summary— count-field docs clarify each total is counted once per resolved concept (not per coding), unlikemappings, which has one entry per coding.PhenomlClient.fhir2Omop().create(...)Javadoc — clarifies that a clinicalconcept_idof0covers bothUNMAPPEDandUNCHECKED, and thatoperator_concept_idis the one non-zero non-resolved concept on measurement rows.Note
Medium Risk
Additive JSON fields are backward compatible for deserialization, but changed
target_codepopulation 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_idon condition, drug, measurement, observation, and procedure rows so each event can reference itsvisit_occurrencerow.MeasurementRowalso addsoperator_concept_idfor 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 forALREADY_STANDARD,MAPPED, andUNCHECKEDmappings and omitted/empty forUNMAPPED.Summaryandfhir2Omop().create()Javadoc are updated to clarifyconcept_id0 (both unmapped and unchecked), summary counts per resolved concept vs one mapping per coding, andoperator_concept_idon measurements.Reviewed by Cursor Bugbot for commit 689cf3a. Bugbot is set up for automated code reviews on this repo. Configure here.