ds_extract {pathling} | R Documentation |
Execute an extract query
Description
Executes an extract query over FHIR data. This type of query extracts specified columns from FHIR resources in a tabular format.
Usage
ds_extract(ds, subject_resource, columns, filters = NULL)
Arguments
ds |
The DataSource object containing the data to be queried. |
subject_resource |
A string representing the type of FHIR resource to extract data from. |
columns |
A named list of FHIRPath expressions that define the columns to include in the extract. |
filters |
An optional sequence of FHIRPath expressions that can be evaluated against each resource in the data set to determine whether it is included within the result. The expression must evaluate to a Boolean value. Multiple filters are combined using AND logic. |
Value
A Spark DataFrame containing the extracted data.
See Also
Pathling documentation - Extract
Other FHIRPath queries:
ds_aggregate()
Examples
pc <- pathling_connect()
data_source <- pc %>% pathling_read_ndjson(pathling_examples('ndjson'))
data_source %>% ds_extract('Patient',
columns = c('gender', givenName='name.given'),
filters = c('birthDate > @1950-01-01')
)
pathling_disconnect(pc)
[Package pathling version 7.0.0 Index]