R6 class providing access to the FHIR-to-OMOP Concept Resolver endpoints. Translates FHIR coded values (system URI + code) into OMOP standard concepts, CDM target tables, and optional Phoebe recommendations.
Value
A list with input and resolution containing source/standard
concepts, target CDM table, and optional enrichments.
When as_tibble = FALSE (default), a list with results
(per-item) and summary (total/resolved/failed). When
as_tibble = TRUE, a tibble::tibble suitable for
dplyr/tidyr pipelines.
A list with best_match, alternatives, and unresolved.
Details
Access via the fhir active binding on an OMOPHubClient:
client <- OMOPHubClient$new(api_key = "oh_xxx")
result <- client$fhir$resolve(
system = "http://snomed.info/sct",
code = "44054006",
resource_type = "Condition"
)
result$data$resolution$target_table
# "condition_occurrence"Methods
Method resolve()
Resolve a single FHIR Coding to an OMOP standard concept.
Provide at least one of (system + code), (vocabulary_id + code),
or display.
Usage
FhirResource$resolve(
system = NULL,
code = NULL,
display = NULL,
vocabulary_id = NULL,
resource_type = NULL,
include_recommendations = FALSE,
recommendations_limit = 5L,
include_quality = FALSE
)Arguments
systemFHIR code system URI (e.g.
"http://snomed.info/sct").codeCode value from the FHIR Coding.
displayHuman-readable text (semantic search fallback).
vocabulary_idDirect OMOP vocabulary_id, bypasses URI resolution.
resource_typeFHIR resource type (e.g.
"Condition","Observation").include_recommendationsLogical. Include Phoebe recommendations. Default
FALSE.recommendations_limitInteger. Max recommendations (1-20). Default
5L.include_qualityLogical. Include mapping quality signal. Default
FALSE.
Method resolve_batch()
Batch-resolve up to 100 FHIR Codings.
Failed items are reported inline without failing the batch.
Usage
FhirResource$resolve_batch(
codings,
resource_type = NULL,
include_recommendations = FALSE,
recommendations_limit = 5L,
include_quality = FALSE,
as_tibble = FALSE
)Arguments
codingsA list of coding lists, each with optional elements
system,code,display,vocabulary_id.resource_typeFHIR resource type applied to all codings.
include_recommendationsLogical. Default
FALSE.recommendations_limitInteger. Default
5L.include_qualityLogical. Default
FALSE.as_tibbleLogical. When
TRUE, returns a tibble::tibble with one row per input coding and flat columns for the source concept, standard concept, target CDM table, mapping type, and resolution status. The batchsummary(total/resolved/failed) is attached asattr(result, "summary"). DefaultFALSEkeeps the legacy list-shaped return.
Method resolve_codeable_concept()
Resolve a FHIR CodeableConcept with vocabulary preference.
Picks the best match per OHDSI preference order
(SNOMED > RxNorm > LOINC > CVX > ICD-10). Falls back to text
via semantic search if no coding resolves.
Usage
FhirResource$resolve_codeable_concept(
coding,
text = NULL,
resource_type = NULL,
include_recommendations = FALSE,
recommendations_limit = 5L,
include_quality = FALSE
)Arguments
codingA list of coding lists, each with
system,code, and optionaldisplay.textOptional CodeableConcept.text for semantic fallback.
resource_typeFHIR resource type.
include_recommendationsLogical. Default
FALSE.recommendations_limitInteger. Default
5L.include_qualityLogical. Default
FALSE.