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

Unable to Read from Standalone Resources #73

Open
hc1wwilger opened this issue Feb 4, 2020 · 0 comments
Open

Unable to Read from Standalone Resources #73

hc1wwilger opened this issue Feb 4, 2020 · 0 comments

Comments

@hc1wwilger
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant