Comments (2)
I think it would be good when the bundle would behave identically to the client so that the code like this would work
bundle = client.resources('Bundle')
for patient in patientlist:
bundle.resources("Patient").reference('Patient', user)
bundle.fetch_all()
as this is a special behavior it might also be good to have a special constructor like bundle = client.bundle()
instead
from fhir-py.
We discussed in the team this issue and decided that Bundle isn't an ordinary resource as a Patient and etc. It is an abstract resource that can't be instantiated. So, it means we can use .delete(), is_valid() and the resource can't have an id.
Let's add a new class BundleResource (and appropriate AsyncBundleResource/SyncBundleResource and aidbox versions) and return it in client.resources('Bundle')
.
This class should provide an interface:
- .save() - only if type = transaction/batch - should update the inner resource without changing bundle.type
- .get_resources()/resources TBD
- .set_resources()/resources TBD
- .add_resources() TBD
- get_resources_by_resource_type(resource_type)
- get_resource_by_reference(reference)
Also, let's return the instance of this class in fetch_raw - it'll solve #17 partially
from fhir-py.
Related Issues (20)
- Don't pass _count if _id is specified HOT 1
- Getting _elements when using reference not supported HOT 2
- Is there an API to handle the ValueSet resource? HOT 2
- Delete via reference currently requires download first HOT 4
- Persistent session support HOT 1
- Issue with client.execute() Method Removing Parameters from Path HOT 1
- Unable to use items() on AttrDict HOT 2
- Add support for `_cascade=delete` param to `delete` method HOT 1
- Why the save() function will cost a lot of time for saving one Resource?
- Use semantic-release for release cycle
- TypeError: Cannot serialize non-str key None HOT 1
- Next URL - relative to hostname HOT 3
- Example re: paging through a FHIR bundle? HOT 1
- AsyncFHIRClient's aiohttp throwing SSLCertVerificationError HOT 4
- Saving Device with reference to Patient not successful HOT 5
- Hashable resources HOT 10
- Add support for chained search params without specifying resource type
- Create aiohttp.ClientSession once per application rather than per request HOT 2
- Add fetch_raw_all support HOT 3
- Handle references HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fhir-py.