tx_to_snomed_coding {pathling}R Documentation

Convert SNOMED CT codes to Coding structures

Description

Converts a Column containing codes into a Column that contains a SNOMED Coding struct.

Usage

tx_to_snomed_coding(coding_column, version = NULL)

Arguments

coding_column

The Column containing the codes.

version

The version of the code system.

Details

The Coding struct Column can be used as an input to terminology functions such as tx_member_of and tx_translate. Please note that inside sparklyr verbs such as mutate the functions calls need to be preceded with !!, e.g: !!tx_to_coding(CODE, SNOMED_URI).

Value

A Column containing a Coding struct.

See Also

Other terminology helpers: tx_to_coding(), tx_to_ecl_value_set(), tx_to_loinc_coding()

Examples


pc <- pathling_connect()
condition_df <- pathling_spark(pc) %>% sparklyr::copy_to(conditions)

# Convert codes to SNOMED CT codings.
# Equivalent to: tx_to_coding(CODE, "http://snomed.info/sct")
condition_df %>% sparklyr::mutate(snomedCoding = !!tx_to_snomed_coding(CODE), .keep = 'none')

pathling_disconnect(pc)


[Package pathling version 6.4.2 Index]