Manipulating FHIR data leveraging MongoDB as storage layer
Project description
fhirstore
Python library to manipulate fhir resources leveraging mongoDB as storage layer.
Installation
pip install fhirstore
Usage
from pymongo import MongoClient
from fhirstore import FHIRStore
client = MongoClient()
store = FHIRStore(client, "<my_database>")
# Dropping collections
store.reset()
# Parse json schema and create collections
store.bootstrap(depth=5)
# Insert resources
store.create({
"resourceType": "Patient",
"gender": "male",
})
Bootstrap the database
- Start the database
- Drop and re-create all collections based on the provided schema
docker-compose up -d
python main.py
Development setup
- Create a virtual environment and enter it
- Install python dependncies
virtualenv .
. ./bin/activate
pip install -r requirements.txt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fhirstore-0.0.3.tar.gz
(292.2 kB
view hashes)
Built Distribution
fhirstore-0.0.3-py3-none-any.whl
(302.6 kB
view hashes)
Close
Hashes for fhirstore-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 483af5f2c04c0b184c7fdba918e23eb6444fbd8e9678704ccb9d86b069c8039b |
|
MD5 | 352ff1def0fd13d4144cc1b329e04cb7 |
|
BLAKE2b-256 | fbfb17ced6543b1e18a6756ffa2a8556f160ff52724c2013da713c4d4c29a7c6 |