feat!: rename MappingReportEntry→MappingEntry, ScanSummary→Summary, and reshape CreateOmopResponse#181
Merged
Merged
Conversation
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
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.
Breaking: MAJOR because
MappingReportEntryandScanSummarywere renamed toMappingEntryandSummaryrespectively, andCreateOmopResponsehad 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 toMappingEntry; update all imports and type annotations to useMappingEntry.phenoml.fhir2omop.ScanSummary— renamed toSummary; update all imports and type annotations to useSummary.phenoml.fhir2omop.CreateOmopResponse— fieldsreport,scan_summary, andmoderemoved; replacereportwithmappings(List[MappingEntry]),scan_summarywithsummary(Summary), and remove any references tomode.Added
phenoml.fhir2omop.MappingEntry— new Pydantic model describing how a single source coding resolved to an OMOP standard concept, exposing fields such asomop_id,source_code,target_vocabulary,mapping_status, andnote.phenoml.fhir2omop.Summary— new Pydantic model carrying data-quality headline metrics:codes_already_standard,codes_normalized,codes_unmapped, andoff_vocab_rate.phenoml.fhir2omop.CreateOmopResponse.dropped— new top-level field listing resources that could not be shaped into an OMOP row (previously nested underscan_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— newApiErrorsubclass raised when the API returns HTTP 503; callers may now catch this explicitly.Changed
client.fhir2omop.create()OpenAPI spec — endpoint description updated to document bothresolvedandstructuralmodes in detail, including aresolved_mappingresponse 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.CreateOmopResponsedropsmode,report, andscan_summary. Callers should usemappings(List[MappingEntry]),summary(Summary), top-leveldropped(wasscan_summary.dropped_resources), andvocab_version.Summaryis a slim metrics object (resolution counts +off_vocab_rate); the oldScanSummaryaggregate fields (resource counts, resolver telemetry, etc.) are gone from the model.Renames:
MappingReportEntry→MappingEntry(addsomop_id);ScanSummary→Summary.ServiceUnavailableErroris 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/modenarrative 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.