#unserialize example bundle
bundles <- fhir_unserialize(medication_bundles)
length(bundles)
#save to temporary directory
dir <- tempdir()
fhir_save(bundles, directory = dir)
#load from temporary directory
loaded_bundles <- fhir_load(dir)
length(loaded_bundles)
#load only two, the second and the third bundle
loaded_bundles <- fhir_load(dir, indices = c(2,3))
length(loaded_bundles)
Run the code above in your browser using DataLab