Takes a Coding column as input. Returns the Column which contains an array of Coding value with translation targets from the specified FHIR ConceptMap. There may be more than one target concept for each input concept. Only the translation with the specified equivalences are returned.
tx_translate(
codings,
concept_map_uri,
reverse = FALSE,
equivalences = NULL,
target = NULL
)
A Column containing a struct representation of a Coding.
An identifier for a FHIR ConceptMap.
The direction to traverse the map. FALSE results in "source to target" mappings, while TRUE results in "target to source".
A value of a collection of values from the ConceptMapEquivalence ValueSet.
Identifies the value set in which a translation is sought. If there's no target specified, the server should return all known translations.
A Column containing the result of the operation (an array of Coding structs).
Pathling documentation - Concept translation
Other terminology functions:
tx_display()
,
tx_member_of()
,
tx_property_of()
,
tx_subsumed_by()
,
tx_subsumes()
pc <- pathling_connect()
# Translates the codings of the Condition `code` using a SNOMED implicit concept map.
pc %>% pathling_example_resource('Condition') %>%
sparklyr::mutate(
id,
translation = !!tx_translate(code[['coding']],
'http://snomed.info/sct?fhir_cm=900000000000527005'),
.keep='none')
#> # Source: SQL [?? x 2]
#> # Database: spark_connection
#> id translation
#> <chr> <list>
#> 1 c879c300-7fdf-4b53-aa6a-a2b4a266b30c <list [0]>
#> 2 bb9c4fc1-795a-4492-b065-1f497fe18bb2 <list [0]>
#> 3 e620d7ee-6cfe-4f04-ba06-1d0b39f7624d <list [0]>
#> 4 0447de38-1f2a-411c-9fd2-a9c62ab1f221 <list [0]>
#> 5 4025ceb3-04a6-41fb-8569-16a8dcce7ccc <list [0]>
#> 6 7ed34fb1-0bbf-4c41-a101-1316ec483aa7 <list [0]>
#> 7 5ef84858-0480-4a34-8f43-fc962fe627b2 <list [0]>
#> 8 5378726d-7f2b-4c83-9762-eaf385915fa7 <list [0]>
#> 9 31393667-dd7f-4c94-90c3-6cde75c67d3e <list [0]>
#> 10 6464e20b-55ec-4685-be3e-55bc3b9602d4 <list [0]>
#> # ℹ more rows
pathling_disconnect(pc)