tx_translate {pathling}R Documentation

Translate between value sets

Description

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.

Usage

tx_translate(
  codings,
  concept_map_uri,
  reverse = FALSE,
  equivalences = NULL,
  target = NULL
)

Arguments

codings

A Column containing a struct representation of a Coding.

concept_map_uri

An identifier for a FHIR ConceptMap.

reverse

The direction to traverse the map. FALSE results in "source to target" mappings, while TRUE results in "target to source".

equivalences

A value of a collection of values from the ConceptMapEquivalence ValueSet.

target

Identifies the value set in which a translation is sought. If there's no target specified, the server should return all known translations.

Value

A Column containing the result of the operation (an array of Coding structs).

See Also

Equivalence

Pathling documentation - Concept translation

Other terminology functions: tx_display(), tx_member_of(), tx_property_of(), tx_subsumed_by(), tx_subsumes()

Examples


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')
 
pathling_disconnect(pc)


[Package pathling version 6.4.2 Index]