Takes two Coding columns as input. Returns a Column that contains a Boolean value, indicating whether the left Coding subsumes the right Coding.

tx_subsumes(left_codings, right_codings)

Arguments

left_codings

A Column containing a struct representation of a Coding or an array of Codings.

right_codings

A Column containing a struct representation of a Coding or an array of Codings.

Value

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

Examples

pc <- pathling_connect()

# Test the codings of the Condition `code` for subsumption of a SNOMED CT code.
pc %>% pathling_example_resource('Condition') %>%
    sparklyr::mutate(
         id,
         subsumes = !!tx_subsumes(code[['coding']],
             !!tx_to_snomed_coding('444814009')),
         .keep='none')
#> # Source:   SQL [?? x 2]
#> # Database: spark_connection
#>    id                                   subsumes
#>    <chr>                                <lgl>   
#>  1 c879c300-7fdf-4b53-aa6a-a2b4a266b30c TRUE    
#>  2 bb9c4fc1-795a-4492-b065-1f497fe18bb2 FALSE   
#>  3 e620d7ee-6cfe-4f04-ba06-1d0b39f7624d FALSE   
#>  4 0447de38-1f2a-411c-9fd2-a9c62ab1f221 TRUE    
#>  5 4025ceb3-04a6-41fb-8569-16a8dcce7ccc FALSE   
#>  6 7ed34fb1-0bbf-4c41-a101-1316ec483aa7 TRUE    
#>  7 5ef84858-0480-4a34-8f43-fc962fe627b2 FALSE   
#>  8 5378726d-7f2b-4c83-9762-eaf385915fa7 FALSE   
#>  9 31393667-dd7f-4c94-90c3-6cde75c67d3e FALSE   
#> 10 6464e20b-55ec-4685-be3e-55bc3b9602d4 FALSE   
#> # ℹ more rows
 
pathling_disconnect(pc)