Creates a data source from a directory containing FHIR bundles.

pathling_read_bundles(pc, path, resource_types, mime_type = MimeType$FHIR_JSON)

Arguments

pc

The PathlingContext object.

path

The URI of the directory containing the bundles.

resource_types

A sequence of resource type codes that should be extracted from the bundles.

mime_type

The MIME type of the bundles. Defaults to "application/fhir+json".

Value

A DataSource object that can be used to run queries against the data.

Examples

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)