Skip to content

Enhance FHIR resolution capabilities and response structure#20

Merged
alex-omophub merged 2 commits into
developfrom
feature/fhir-ig-gap-m2
May 25, 2026
Merged

Enhance FHIR resolution capabilities and response structure#20
alex-omophub merged 2 commits into
developfrom
feature/fhir-ig-gap-m2

Conversation

@alex-omophub
Copy link
Copy Markdown
Member

@alex-omophub alex-omophub commented May 25, 2026

Summary by cubic

Enhances FHIR resolution with typed value-as-concept fields, configurable unmapped-code handling, and support for user-selected codings. Improves CodeableConcept selection and keeps ETL writes stable when inputs don’t map.

  • New Features
    • FhirResolution now includes value_as_concept, value_target_field, concept_map_id, and mapping_note.
    • resolve(), resolve_batch(), and resolve_codeable_concept() (sync and async) accept and forward on_unmapped ("error" default; "sentinel" returns a concept_id 0 record).
    • Coding inputs accept user_selected; FHIR userSelected is mapped to it, and a user-selected coding takes precedence in CodeableConcept resolution.

Written for commit 4e020bb. Summary will update on new commits. Review in cubic

- Updated `FhirResolution` to include `value_as_concept`, `value_target_field`, `concept_map_id`, and `mapping_note` for improved handling of composite concepts and administrative code resolutions.
- Modified `resolve()`, `resolve_batch()`, and `resolve_codeable_concept()` methods to accept an `on_unmapped` argument, allowing for flexible handling of unmapped codes.
- Ensured `user_selected` is correctly passed through from FHIR inputs, enhancing the resolution process.
- Updated documentation and tests to reflect these changes and ensure compatibility.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 4 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/omophub/resources/fhir.py
Comment thread src/omophub/resources/fhir.py
- Enhanced `resolve_batch()` and `resolve_codeable_concept()` methods to include the `on_unmapped` parameter, allowing for better handling of unmapped codes.
- Added unit tests to verify that the `on_unmapped` parameter is correctly forwarded in the request body for both synchronous and asynchronous calls.
- Updated existing tests to ensure comprehensive coverage of the new functionality.
@alex-omophub alex-omophub merged commit a1996f1 into develop May 25, 2026
8 checks passed
@alex-omophub alex-omophub deleted the feature/fhir-ig-gap-m2 branch May 25, 2026 10:39
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