Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

Unable to Read from Standalone Resources #73

Description

@hc1wwilger

Not sure if this is an issue or simply a misuse of the package, however, the FHIR JSON that I need to read from is not in bundles, but rather resource based.

I am unable to create a dataframe that is suitable for use with to_bundle using the R4 Python API. I assume the workflow would be something similar to, read files containing single resources in S3 > to_bundle > from_json > extract_entity. Some code I have attempted:

print('Starting text schema')
text_data_frame = spark.read.text("s3://<bucket_name>/WLW-test-1234/Patient")
text_data_frame.printSchema()
text_data_frame.show(100, False)

print("Starting to_bundle")
fhir_bundle = to_bundle(spark, text_data_frame)

Is there some specific format that the DataFrame needs to be in order to use the to_bundle function or is it truly that resources, unbundled, are not supported? From the documentation, "dataset – a DataFrame of encoded FHIR Resources"

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions