fhir-py
fhir-py copied to clipboard
Pass bundle class to fhirpy client
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
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..