pathling_read_bundles: Create a data source from FHIR bundles

View source: R/datasource.R

pathling_read_bundlesR Documentation

Create a data source from FHIR bundles

Description

Creates a data source from a directory containing FHIR bundles.

Usage

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.

See Also

Pathling documentation - Reading Bundles

Other data source functions: pathling_read_bulk(), pathling_read_datasets(), pathling_read_delta(), pathling_read_ndjson(), pathling_read_parquet(), pathling_read_tables()

Examples

## Not run: 
data_source <- pc %>% pathling_read_bundles(
  pathling_examples("bundle-xml"),
  c("Patient", "Observation"), MimeType$FHIR_XML
)
data_source %>%
  ds_read("Observation") %>%
  sparklyr::sdf_nrow()

## End(Not run)

pathling documentation built on June 3, 2026, 9:08 a.m.