tx_property_of {pathling}R Documentation

Get properties for codings

Description

Takes a Coding column as its input. Returns a Column that contains the values of properties for this coding with specified names and types. The type of the result column depends on the types of the properties. Primitive FHIR types are mapped to their corresponding SQL primitives. Complex types are mapped to their corresponding structs.

Usage

tx_property_of(
  coding,
  property_code,
  property_type = "string",
  accept_language = NULL
)

Arguments

coding

A Column containing a struct representation of a Coding.

property_code

The code of the property to retrieve.

property_type

The type of the property to retrieve.

accept_language

The optional language preferences for the returned property values. Overrides the parameter 'accept_language' in 'PathlingContext.create'.

Value

The Column containing the result of the operation (array of property values).

See Also

PropertyType

Pathling documentation - Retrieving properties

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

Examples


pc <- pathling_connect()

# Get the (first) value of the `inactive` property of the first coding of the Condition resource.
pc %>% pathling_example_resource('Condition') %>%
     sparklyr::mutate(id, 
         is_inavtive = (!!tx_property_of(code[['coding']][[0]], 
                                 "inactive",PropertyType$BOOLEAN))[[0]], 
         .keep='none'
     )

pathling_disconnect(pc)


[Package pathling version 7.0.0 Index]