fhir-py icon indicating copy to clipboard operation
fhir-py copied to clipboard

Pass bundle class to fhirpy client

Open ruscoder opened this issue 1 year ago • 1 comments

Since fhir-py-types Bundle class parses included resources, it will be good to return parsed resources in fetch/fetch_all/fetch_raw. It won't infer types but the returned resources will be models instead of AsyncFHIRResource

It also solves issue mentioned in https://github.com/beda-software/fhir-py/issues/96#issuecomment-2265878507

ruscoder avatar Oct 01 '24 20:10 ruscoder

The issue is only with client method like get() that return either ResourceType or dict if no ResourceType specified. For uniformity all methods shall return valid typed model.

We can forbid using client.get and other methods without explicit resource type but these methods are used by SearchSet/Resource classes..

ruscoder avatar Oct 01 '24 20:10 ruscoder