View source: R/fhir_bundle_list.R
fhir_bundle_list | R Documentation |
A fhir_bundle_list is a list of fhir_bundle_xml or fhir_bundle_serialized objects. It is
usually returned by a call to fhir_search()
.
fhir_bundle_list(bundles)
bundles |
A list of xml_nodes/fhir_bundle_xml objects or of raw/fhir_bundle_serialized objects |
The only scenario where one would use this constructor function is when several fhir_bundle or fhir_bundle_list objects should be merged into one big fhir_bundle_list before cracking (see examples).
#unserialize example bundles bundles1 <- fhir_unserialize(example_bundles1) bundles2 <- fhir_unserialize(example_bundles2) #bind them together in one fhir_bundle_list bound_bundles <- fhir_bundle_list(c(bundles1, bundles2)) class(bound_bundles) #bound list contains bundles from both original lists length(bundles1) length(bundles2) length(bound_bundles) #Create fhir_bundle list from xml objects b1 <- xml2::read_xml("<Bundle><Resource><item value='1'/></Resource></Bundle>") b2 <- xml2::read_xml("<Bundle><Resource><item value='2'/></Resource></Bundle>") fhir_bundle_list(bundles = list(b1, b2)) fhir_bundle_list(bundles = list(fhir_bundle_xml(b1), fhir_bundle_xml(b2))) r1 <- xml2::xml_serialize(object = b1, connection= NULL) r2 <- xml2::xml_serialize(object = b2, connection= NULL) fhir_bundle_list(bundles = list(r1, r2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.