Skip to main content

Library containing classes for easier handling of data according to the MIABIS on FHIR profile, as well as client for communication with sample blaze server

Project description

Introduction

MIABIS is focused on standardizing the data elements used to describe biobanks, research on samples, and related data. The goal of MIABIS is to enhance interoperability among biobanks that share valuable data and samples. MIABIS Core 2.0, introduced in 2016, established general attributes at an aggregated/metadata level for describing biobanks, sample collections, and (research) studies. This version has already been implemented as a FHIR profile.

MIABIS on FHIR is designed to provide a FHIR implementation for MIABIS Core 3.0, its latest version, as well as MIABIS individual-level components, which describe information about samples and their donors.

The foundation for this FHIR profile (all the attributes defined by MIABIS) is available on MIABIS github.

The MIABIS on FHIR profile full specification along with the guide is available on the simplifier platform.

Modules

1. miabis_model

The miabis_model module includes a set of classes to help developers:

  • Create MIABIS on FHIR resources.
  • Read and validate these resources.
  • Convert resources to and from JSON format.

This module ensures compliance with the MIABIS on FHIR profile, allowing developers to handle MIABIS resources confidently and efficiently in Python.

2. blaze_client

The blaze_client module simplifies communication with the Samply.blaze FHIR storage server. Samply.blaze is a FHIR-compliant database designed for managing and storing FHIR resources. This module provides:

  • Streamlined communication with Samply.blaze, abstracting away the need for direct JSON response handling.
  • BlazeClient methods that simplify operations with the server, focusing on ease of use and minimizing boilerplate code.

Key Features

  • Compliance: Ensures MIABIS on FHIR resources meet the profile standards.
  • Ease of Use: Abstracts complex JSON interactions for a streamlined experience.
  • Blaze Integration: Seamless integration with Samply.blaze for FHIR resource management.

This package is ideal for developers looking to work with MIABIS on FHIR resources and interact with FHIR storage servers using Python.

Installation

pip install miabis_model

How to use

Here is how you can create a MIABIS on FHIR sample resource:

from miabis_model import Sample
from miabis_model import StorageTemperature

sample = Sample("sampleId", "donorId", "Urine", storage_temperature=StorageTemperature.TEMPERATURE_ROOM,
                use_restrictions="No restrictions")
# Convert the Sample object to a FHIR resource
sample_resource = sample.to_fhir("donorId")
# Convert the FHIR resource to a JSON string
sample_json = sample_resource.as_json()

Here is an example on how to communicate with blaze server via the BlazeClient:

import datetime
from miabis_model import Gender
from blaze_client import BlazeClient
from miabis_model import SampleDonor

client = BlazeClient("example_url", "username", "password")

donor = SampleDonor("donorId", Gender.MALE, birth_date=datetime.datetime(year=2000, month=12, day=12))
donor_fhir_id = client.upload_donor(donor)

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

miabis_on_fhir-1.1.1.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

MIABIS_on_FHIR-1.1.1-py3-none-any.whl (48.6 kB view details)

Uploaded Python 3

File details

Details for the file miabis_on_fhir-1.1.1.tar.gz.

File metadata

  • Download URL: miabis_on_fhir-1.1.1.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for miabis_on_fhir-1.1.1.tar.gz
Algorithm Hash digest
SHA256 49044da4d1e88ff315136d824e710a4d536877761d1891328bce4afe70fe1422
MD5 5c42ad00135649d633c56847dc1ed120
BLAKE2b-256 a629c520bbe4a2d1a67848b500c732510e8434ede07586777a15076e9a60449d

See more details on using hashes here.

File details

Details for the file MIABIS_on_FHIR-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: MIABIS_on_FHIR-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 48.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for MIABIS_on_FHIR-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7c34f35d49a82602869f9acf67861de0624897f252343ac8a12542942a2541b
MD5 5a59d6035802955108da9acde5ef8042
BLAKE2b-256 9da4bba58589c9ff0bb9c7b310fa93c8113b2f1a0543a5f18a44f483e2f0166d

See more details on using hashes here.

Supported by

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