Comments (2)
Some thoughts.
Operation on particular resource/reference
sdk.client.resource('Questionnaire', id=123).execute('$populate')
sdk.client.reference('Patient', 1).execute( ... )
async def execute(self, operation):
pass
Operation on any path. In FHIR we can also use GET requests for operations (and there are some DELETE and PUT operations in Aidbox), but I think we should implement sdk.client.execute
to work only with POST operations (because it's most common)
sdk.client.execute('/ValueSet/$expand', {'url': 'http://abc', 'filter': 'value'})
async def execute(path, payload, method?='post'):
pass
# or using kwargs:
sdk.client.execute('/ValueSet/$expand', url='http://abc', filter='value')
async def execute(path, method?='post', **payload):
pass
Also we can add public method for doing any requests with fhir-py aiohttp client. Something like:
sdk.client.request('post', '/Valuest/$expand', ...)
async def request(method, path, params=None, payload=None)
pass
from fhir-py.
We decided that all methods should have similar set of params.
Execute on resources affects only request url.
sdk.client.resource('Questionnaire', id=123).execute('$populate', **kwargs)
sdk.client.execute('/ValueSet/$expand', **kwargs)
# kwargs: method, params, payload, etc..
# Probably they should be the same as in aiohttp request
# and should be passed to aiohttp request without any changes
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 2
- delete resource doesn't work HOT 3
- Fix build (tests) in CI HOT 1
- Add .execute for search set
- _build_request_url does not accept port HOT 4
- Pickling not supported
- Fix resource fetching for /fhir base urls
- 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 1
- 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.