Skip to content

Release version 1.8.0 with new FHIR resolution features#7

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

Release version 1.8.0 with new FHIR resolution features#7
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

Release omophub 1.8.0 upgrades the FHIR resolver with Value-as-Concept in batch outputs and a new on_unmapped option, and refines unmapped labeling to only flag explicit concept_id 0. This reduces 404s in ETL and makes unmapped cases clear and consistent.

  • New Features

    • resolve(), resolve_batch(), and resolve_codeable_concept() accept on_unmapped ("error" default, or "sentinel" to return a concept_id 0 record instead of a 404).
    • Batch tibble adds value_as_concept_id and value_as_concept_name from “Maps to value” decomposition (FHIR-to-OMOP IG Value-as-Concept).
  • Behavior Changes

    • Batch tibble marks rows with no standard Maps to target as status = "unmapped" with standard_concept_id = 0 (previously "resolved").
    • Only an explicit concept_id 0 is labeled "unmapped"; missing/NA standard IDs remain "resolved" to avoid mislabeling.

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

- Updated the package version to 1.8.0.
- Introduced new features in FHIR resolution, including `value_as_concept_id` and `value_as_concept_name` columns in the `resolve_batch()` output for composite concepts.
- Added `on_unmapped` argument to `resolve()`, `resolve_batch()`, and `resolve_codeable_concept()` methods, allowing users to specify behavior for unmapped concepts.
- Updated documentation and examples to reflect these enhancements, ensuring clarity on new functionalities and usage patterns.
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 8 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="inst/examples/fhir_resolver.R">

<violation number="1" location="inst/examples/fhir_resolver.R:328">
P1: Use `userSelected` (FHIR camelCase) instead of `user_selected` in coding lists. The `resolve_codeable_concept` method serializes the coding list directly to JSON with no name conversion, so `user_selected` will produce the wrong JSON key and the precedence feature will be silently ignored.</violation>
</file>

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

Re-trigger cubic

list(
system = "http://hl7.org/fhir/sid/icd-10-cm",
code = "E11.9",
user_selected = TRUE
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: Use userSelected (FHIR camelCase) instead of user_selected in coding lists. The resolve_codeable_concept method serializes the coding list directly to JSON with no name conversion, so user_selected will produce the wrong JSON key and the precedence feature will be silently ignored.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At inst/examples/fhir_resolver.R, line 328:

<comment>Use `userSelected` (FHIR camelCase) instead of `user_selected` in coding lists. The `resolve_codeable_concept` method serializes the coding list directly to JSON with no name conversion, so `user_selected` will produce the wrong JSON key and the precedence feature will be silently ignored.</comment>

<file context>
@@ -284,10 +287,78 @@ if (!is.null(best)) {
+    list(
+      system = "http://hl7.org/fhir/sid/icd-10-cm",
+      code = "E11.9",
+      user_selected = TRUE
+    )
+  ),
</file context>
Suggested change
user_selected = TRUE
userSelected = TRUE

Comment thread R/fhir.R Outdated
…esponding tests

- Updated the logic in fhir_batch_to_tibble to correctly identify unmapped concepts, ensuring that only explicit concept_id 0 is labeled as "unmapped" while NA ids are treated as resolved.
- Added a new test case to verify that a missing standard id does not mislabel the response as "unmapped", maintaining clarity in the output status.
- Enhanced overall test coverage for the resolve_batch function to ensure accurate handling of malformed responses.
@alex-omophub alex-omophub merged commit 5c3337f into develop May 25, 2026
6 checks passed
@alex-omophub alex-omophub deleted the feature/fhir-ig-gap-m2 branch May 25, 2026 11:43
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