Reads a FHIR resource dataframe from the package example data.

pathling_example_resource(pc, resource_name)

Arguments

pc

The PathlingContext object.

resource_name

The name of the resource to read.

Value

A Spark DataFrame containing the resource data.

Details

The resources are read from the package example data in the extdata/parquet directory. Currently the following resources are available: 'Patient' and 'Condition'.

See also

Other example functions: pathling_examples()

Examples

pc <- pathling_connect()
pathling_example_resource(pc, 'Condition')
#> # Source:   table<`Condition_f6f07760_6502_4d6c_8d02_3e7a392f7a40`> [?? x 33]
#> # Database: spark_connection
#>    id              id_versioned meta         implicitRules language text        
#>    <chr>           <chr>        <list>       <chr>         <chr>    <list>      
#>  1 c879c300-7fdf-… Condition/c… <named list> NA            NA       <named list>
#>  2 bb9c4fc1-795a-… Condition/b… <named list> NA            NA       <named list>
#>  3 e620d7ee-6cfe-… Condition/e… <named list> NA            NA       <named list>
#>  4 0447de38-1f2a-… Condition/0… <named list> NA            NA       <named list>
#>  5 4025ceb3-04a6-… Condition/4… <named list> NA            NA       <named list>
#>  6 7ed34fb1-0bbf-… Condition/7… <named list> NA            NA       <named list>
#>  7 5ef84858-0480-… Condition/5… <named list> NA            NA       <named list>
#>  8 5378726d-7f2b-… Condition/5… <named list> NA            NA       <named list>
#>  9 31393667-dd7f-… Condition/3… <named list> NA            NA       <named list>
#> 10 6464e20b-55ec-… Condition/6… <named list> NA            NA       <named list>
#> # ℹ more rows
#> # ℹ 27 more variables: identifier <list>, clinicalStatus <list>,
#> #   verificationStatus <list>, category <list>, severity <list>, code <list>,
#> #   bodySite <list>, subject <list>, encounter <list>, onsetAge <list>,
#> #   onsetDateTime <chr>, onsetPeriod <list>, onsetRange <list>,
#> #   onsetString <chr>, abatementAge <list>, abatementDateTime <chr>,
#> #   abatementPeriod <list>, abatementRange <list>, abatementString <chr>, …
pathling_disconnect(pc)