All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Removed pendulum dependency and replaced it with datetime. This should make the library more compatible with other libraries
Improve packaging with poetry to slim down library size with optional extras for datascience features. Record linkage for transfer functionality. Add support for Python 3.9+. Code base cleanup and refactoring. Big upgrades to the documentation 👀.
- Breaking: Renamed
FHIRQuery
classes toFhirQuerySync
andFhirQueryAsync
for naming consistency. - Breaking: Renamed
FHIRQueryParameters
class toFhirQueryParameters
for naming consistency. - Breaking: Query response
.save()
method now only supports saving as XML or JSON file. To serialize resources and bundles use theflatten
function from theserde
package. Requires installation of theds
extra. - Breaking: Moved
ServerSummary
and summary functionality into separate module. - Breaking: Unified
has()
andwhere()
parameter args into a single argument that accepts either a dict or a parameter object. Removed_dict
arguments. - Improve packaging with poetry and optional extras for datascience features and web app.
- Optional dependencies for [
ds
,app
] can be installed usingpip install fhir_kindling[{extra}]
. - Split batch transactions into separate module to slim down
FhirServer
class. - Split
transfer
functionality into separate module to slim downFhirServer
class.
- Optional progress bar for
summary
,get_many
,add_all
andtransfer
methods. - Additional property
resource_list
onFhirQueryResponse
to get a list of all resources (even included ones) from the response. summary_async()
method for asynchronous server summary.total
property onQueryResponse
to get the total number of resources returned by the query.record_linkage
functionality fortransfer()
method and split transfer functionality into separate module.- Retry functionality for the
FhirServer
class. Allowing for retrying failed requests based on the configured status codes and methods. Configurable with backoff and jitter. - Benchmark functionality for FhirServers that run a comprehensive set of tests against the server and measure the time it takes to complete them. Available only when the
ds
extra is installed.
- Removed
to_dfs()
method on query response object. Useflatten
function from theserde
package instead. Requires installation of theds
extra. - Removed
requests-oauthlib
in favor ofauthlib
.
Asynchronous API for CRUD operations against fhir servers.
- Switched http client library from requests httpx
- removed requests-oauthlib in favor of authlib for oauth2 authentication flow
FHIRQuery
class renamed toFhirQuerySync
to allow for sync and async version- moved resolving response pagination from
QueryReponse
to the sync and async query classes - getting multiple resources via
server.get_many()
now uses proper batch requests
FhirQueryAsync
class for async queries against a server- asynchronous counterparts for CRUD operations in the
FHIRServer
class using the same API:query_async()
raw_query_async()
get_async()
get_many_async()
add_async()
add_all_async()
add_bundle_async()
update_async()
delete_async()
Resource transfer between servers and querying resources by reference.
get
, get_many
for querying resource by reference
server.transfer(other_server, query_result)
for transferring resources
FhirServer
constructor now accepts two additional optional parameters,auth
andheaders
that will be used for the instance'srequests
session.
-
server.get(reference)
get a single resource from the server, based on relative path/reference. -
server.get_many(references)
get multiple resources from the server, based on relative path/reference. -
server.transfer(other_server, query)
transfer resources matching the query from one server to another. Also requests resources referenced by the resources matching to maintain referential integrity on the new server. -
query.all(page_callback=callback, count=50)
callback functions and count for pagination resolving in query responses.
Update a list of resources on the server. CSV/Pandas serialization of resources and query responses.
-
server.update(resources)
which updates a list of resources stored on the server - Recursive resource flattening for csv/tabular serialization
-
query_response.save(path, format="csv)
to save the results of a query to csv
server.query(params)
the query method now directly accepts query parameters
Query Response with included resources. Reworked Generators
- Query response now stores and parses included resources
- Generator parameters for Resources and Fields
- Field generators for generating resource fields based on probabilistic choices or a generator function
- Resource generator field values based on static value or list
- Patient based data set generator
- Query interface
where, include, has
now can add query parameters based on method arguments or parameter objects.
Query Parameters, include/revinclude, reverse chaining.
- Query Parameters classes, for regular queries, including resources and reverse chaining
- Support for
_include
and_revinclude
viaquery.include()
- Reverse chaining support via
query.has()
- Parsing parameters from given URL/ coverting parameters to query url
- Query interface
where, include, has
now can add query parameters based on method arguments or parameter objects.
Server summary, deleting resources, removed initial CLI.
- Getting a list of all resources on the server based on capabilities
- Plots for server and resource summary
-
server.delete()
method to delete resources based on ids
Response classes, reference parsing and basic xml support
XML output format and resolving xml pagination. Response objects containig resources and references
Outsourced resolving of response pagination into response classes
FHIR server and query API
Classes for fhir servers and queries. Oauth2/OIDC support.
Moved location of cli
Initial cli
Hashing order guarantees the right index of the query.json file in the hash