Creates a data source from a directory containing FHIR bundles.
pathling_read_bundles(pc, path, resource_types, mime_type = MimeType$FHIR_JSON)
The PathlingContext object.
The URI of the directory containing the bundles.
A sequence of resource type codes that should be extracted from the bundles.
The MIME type of the bundles. Defaults to "application/fhir+json".
A DataSource object that can be used to run queries against the data.
Pathling documentation - Reading Bundles
Other data source functions:
pathling_read_datasets()
,
pathling_read_delta()
,
pathling_read_ndjson()
,
pathling_read_parquet()
,
pathling_read_tables()
pc <- pathling_connect()
data_source <- pc %>% pathling_read_bundles(pathling_examples('bundle-xml'),
c("Patient", "Observation"), MimeType$FHIR_XML)
data_source %>% ds_read('Observation') %>% sparklyr::sdf_nrow()
#> [1] 61
pathling_disconnect(pc)