Skip to content

feat!: rename MappingReportEntry→MappingEntry, ScanSummary→Summary, and reshape CreateOmopResponse#181

Merged
gavinsharp merged 4 commits into
mainfrom
fern-bot/2026-06-15_14-25-00_023
Jun 15, 2026
Merged

feat!: rename MappingReportEntry→MappingEntry, ScanSummary→Summary, and reshape CreateOmopResponse#181
gavinsharp merged 4 commits into
mainfrom
fern-bot/2026-06-15_14-25-00_023

Conversation

@fern-api

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

Copy link
Copy Markdown
Contributor

⚠️ 15.2.0 → 16.0.0

Breaking: MAJOR because MappingReportEntry and ScanSummary were renamed to MappingEntry and Summary respectively, and CreateOmopResponse had three fields (report, scan_summary, mode) removed and replaced, all of which break existing callers at import time and at runtime.

Breaking Changes

  • phenoml.fhir2omop.MappingReportEntry — renamed to MappingEntry; update all imports and type annotations to use MappingEntry.
  • phenoml.fhir2omop.ScanSummary — renamed to Summary; update all imports and type annotations to use Summary.
  • phenoml.fhir2omop.CreateOmopResponse — fields report, scan_summary, and mode removed; replace report with mappings (List[MappingEntry]), scan_summary with summary (Summary), and remove any references to mode.

Added

  • phenoml.fhir2omop.MappingEntry — new Pydantic model describing how a single source coding resolved to an OMOP standard concept, exposing fields such as omop_id, source_code, target_vocabulary, mapping_status, and note.
  • phenoml.fhir2omop.Summary — new Pydantic model carrying data-quality headline metrics: codes_already_standard, codes_normalized, codes_unmapped, and off_vocab_rate.
  • phenoml.fhir2omop.CreateOmopResponse.dropped — new top-level field listing resources that could not be shaped into an OMOP row (previously nested under scan_summary.dropped_resources).
  • phenoml.fhir2omop.CreateOmopResponse.vocab_version — new top-level field reporting the OMOP vocabulary release codes were resolved against (e.g. "v20240229").
  • phenoml.fhir2omop.ServiceUnavailableError — new ApiError subclass raised when the API returns HTTP 503; callers may now catch this explicitly.

Changed

  • client.fhir2omop.create() OpenAPI spec — endpoint description updated to document both resolved and structural modes in detail, including a resolved_mapping response example.

See full changelog


✅ Customizations automatically preserved in this update.


Note

High Risk
Major semver bump with import-time and runtime breaks for any code using old fhir2omop response fields or types; integrators must migrate field names and dropped telemetry from ScanSummary.

Overview
Major release 16.0.0 (Fern regen: SDK 5.14.13, bundled OpenAPI/spec commit updated) with a breaking redesign of fhir2omop.create() response handling.

CreateOmopResponse drops mode, report, and scan_summary. Callers should use mappings (List[MappingEntry]), summary (Summary), top-level dropped (was scan_summary.dropped_resources), and vocab_version. Summary is a slim metrics object (resolution counts + off_vocab_rate); the old ScanSummary aggregate fields (resource counts, resolver telemetry, etc.) are gone from the model.

Renames: MappingReportEntryMappingEntry (adds omop_id); ScanSummarySummary. ServiceUnavailableError is raised on HTTP 503 from sync/async raw clients.

Docs, openapi.json, wire examples, and WireMock stubs align with the new JSON shape (single mapping example; structural/mode narrative removed from the spec text in this diff).

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

fern-api Bot and others added 4 commits June 15, 2026 14:24
Generated by Fern
CLI Version: unknown
Generators:
  - fernapi/fern-python-sdk: 5.14.13
…nSummary→Summary, and reshape CreateOmopResponse

The fhir2omop response surface has been significantly refactored to
reflect a cleaner, resolver-first API shape. Public types and response
fields have been renamed and restructured; callers referencing the old
symbols will get AttributeError / ImportError at runtime.

Key changes:
- `MappingReportEntry` renamed to `MappingEntry`; `ScanSummary` renamed to `Summary` — old names are no longer exported
- `CreateOmopResponse` fields reshaped: `report` → `mappings`, `scan_summary` → `summary`, `mode` removed, `dropped` and `vocab_version` added as top-level fields
- New `ServiceUnavailableError` (HTTP 503) added to `fhir2omop.errors` and raised by both sync and async clients

🌿 Generated with Fern
Patches applied (1):
  - patch-6516695e: Release 15.0.2: restore bundled openapi.json packaging (#169)
@gavinsharp gavinsharp merged commit 04f34cf into main Jun 15, 2026
2 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