| pathling_filter | R Documentation |
Filters a tbl_spark using either a FHIRPath boolean expression or a FHIR search query
string, returning a tbl_spark containing only the matching rows. The DataFrame must be the
first argument to enable piping with %>%.
pathling_filter(df, pc, resource_type, expression, type = "fhirpath")
df |
A |
pc |
The PathlingContext object. |
resource_type |
A string containing the FHIR resource type code (e.g., "Patient", "Observation"). |
expression |
The filter expression. For |
type |
The type of expression: |
A tbl_spark containing only the rows matching the expression.
Other context functions:
pathling_evaluate_fhirpath(),
pathling_fhirpath_to_column(),
pathling_search_to_column(),
pathling_with_column()
## Not run:
pc <- pathling_connect()
data_source <- pc %>% pathling_read_ndjson(pathling_examples("ndjson"))
patients <- data_source %>% ds_read("Patient")
# Filter using a FHIRPath expression.
male_patients <- patients %>%
pathling_filter(pc, "Patient", "gender = 'male'")
# Filter using a FHIR search expression.
male_patients <- patients %>%
pathling_filter(pc, "Patient", "gender=male", type = "search")
pathling_disconnect(pc)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.