fhir_save_design | R Documentation |
Writes a fhir_design for use with fhir_crack()
to an xml file.
fhir_save_design(design, file = "design.xml")
design |
A fhir_design object. See |
file |
A string specifying the file to write to, defaults to writing 'design.xml' into the current working directory. |
fhir_design()
, fhir_table_description()
, fhir_load_design()
#create and save design
table_desc1 <- fhir_table_description(
resource = 'Patient',
cols = c(
id = 'id', # column names with xpaths
name = 'name/family',
gender = 'gender'
),
sep = ':::',
brackets = c('[', ']'),
rm_empty_cols = FALSE,
format = 'compact',
keep_attr = FALSE
)
table_desc2 <- fhir_table_description(
resource = 'Observation',
cols = c(
'code/coding/system', # only xpaths
'code/coding/code'
)
)
design <- fhir_design(
Patients = table_desc1,
Observations = table_desc2
)
fhir_save_design(design = design, file = tempfile())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.