Skip to main content

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

  1. Start the database
  2. Drop and re-create all collections based on the provided schema
docker-compose up -d
python main.py

Development setup

  1. Create a virtual environment and enter it
  2. Install python dependncies
virtualenv . 
. ./bin/activate
pip install -r requirements.txt

Project details


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.2.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

fhirstore-0.0.2-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page