fhir_style {fhircrackr} | R Documentation |
Create fhir_style object
Description
This function was used to create an object of class
fhir_style
in fhircrackr < 2.0.0.
It is now deprecated, the information that used to be coded in fhir_style
has been moved to the fhir_table_description.
Usage
fhir_style(sep = ":::", brackets = character(), rm_empty_cols = FALSE)
Arguments
sep |
A character vector of length one to separate pasted multiple entries. Defaults to |
brackets |
A character vector of length two defining the brackets surrounding indices for multiple entries, e.g. |
rm_empty_cols |
A logical vector of length one. Remove empty columns? Defaults to |
Details
A fhir_style
object is part of a fhir_table_description which in turn is part of a fhir_design and
ultimately used in fhir_crack()
. A fhir_style
object contains three elements:
-
sep
: A string defining the separator used to separate multiple entries for the same element in a FHIR resource, e.g. multipleaddress/city
elements in a Patient resource. -
brackets
: A character vector of length two defining the brackets surrounding indices for multiple entries, e.g.c("<|", "|>")
. If this is empty (i.e. character of length 0, the default), no indices will be added to multiple entries. Empty strings (""
) are not allowed. -
rm_empty_cols
: A logical scalar defining whether or not to remove empty columns after cracking. Empty columns arise when you try to extract an element that doesn't appear in any of the resources. Afhir_style
object looks for example like this:
sep: ':::' brackets: '<|' '|>' rm_empty_cols: FALSE
Value
A fhir_style object
Examples
#instead of this:
style <- fhir_style(sep = ":::",
brackets = c("<|", "|>"),
rm_empty_cols = TRUE)
table_description <- fhir_table_description(
resource = "Patient",
style = style)
#use this:
table_description <- fhir_table_description(
resource = "Patient",
sep = ":::",
brackets = c("<|", "|>"),
rm_empty_cols = TRUE)