Takes a Coding column as its input. Returns a Column that contains the canonical display name associated with the given code.

tx_display(coding, accept_language = NULL)

Arguments

coding

A Column containing a struct representation of a Coding.

accept_language

The optional language preferences for the returned display name. Overrides the parameter `accept_language` in pathling_connect.

Value

A Column containing the result of the operation (String).

Examples

pc <- pathling_connect()

# Get the display name of the first coding of the Condition resource, with the default language.
pc %>% pathling_example_resource('Condition') %>%
     sparklyr::mutate(
         id, 
         display = !!tx_display(code[['coding']][[0]]), 
         .keep='none')
#> # Source:   SQL [?? x 2]
#> # Database: spark_connection
#>    id                                   display                       
#>    <chr>                                <chr>                         
#>  1 c879c300-7fdf-4b53-aa6a-a2b4a266b30c Viral sinusitis               
#>  2 bb9c4fc1-795a-4492-b065-1f497fe18bb2 Type 2 diabetes mellitus      
#>  3 e620d7ee-6cfe-4f04-ba06-1d0b39f7624d Anaemia                       
#>  4 0447de38-1f2a-411c-9fd2-a9c62ab1f221 Viral sinusitis               
#>  5 4025ceb3-04a6-41fb-8569-16a8dcce7ccc Prediabetes                   
#>  6 7ed34fb1-0bbf-4c41-a101-1316ec483aa7 Viral sinusitis               
#>  7 5ef84858-0480-4a34-8f43-fc962fe627b2 Miscarriage in first trimester
#>  8 5378726d-7f2b-4c83-9762-eaf385915fa7 Anaemia                       
#>  9 31393667-dd7f-4c94-90c3-6cde75c67d3e Epidermal burn of skin        
#> 10 6464e20b-55ec-4685-be3e-55bc3b9602d4 Acute viral pharyngitis       
#> # ℹ more rows

pathling_disconnect(pc)