Takes a Coding column as its input. Returns a Column that contains the values of designations (strings) for this coding that match the specified use and language. If the language is not provided, then all designations with the specified type are returned regardless of their language.

tx_designation(coding, use = NULL, language = NULL)

Arguments

coding

A Column containing a struct representation of a Coding.

use

The code with the use of the designations.

language

The language of the designations.

Value

The Column containing the result of the operation (array of strings with designation values).

Examples

pc <- pathling_connect()

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