MIABIS-on-FHIR


NameMIABIS-on-FHIR JSON
Version 1.1.4 PyPI version JSON
download
home_pageNone
SummaryLibrary containing classes for easier handling of data according to the MIABIS on FHIR profile, as well as client for communication with sample blaze server
upload_time2024-11-10 09:10:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT License Copyright (c) 2024 BBMRI.cz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords miabis fhir model profile data handling
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## 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](https://simplifier.net/miabis). 

## 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](https://github.com/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
```bash 
pip install miabis_model
```
## How to use
Here is how you can create a MIABIS on FHIR sample resource:

```python
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:

```python
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)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "MIABIS-on-FHIR",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "MIABIS, FHIR, model, profile, data, handling",
    "author": null,
    "author_email": "Simon Konar <simon.konar@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e3/9d/8704e77bdc46289c3fc5a2dfa0558952ce269e3080c7bebbca994916f502/miabis_on_fhir-1.1.4.tar.gz",
    "platform": null,
    "description": "## Introduction\n\nMIABIS is focused on standardizing the data elements used to describe biobanks, research on samples, and related data.\nThe goal of MIABIS is to enhance interoperability among biobanks that share valuable data and samples. MIABIS Core 2.0,\nintroduced in 2016, established general attributes at an aggregated/metadata level for describing biobanks, sample\ncollections, and (research) studies. This version has already been implemented as a FHIR profile.\n\nMIABIS on FHIR is designed to provide a FHIR implementation for MIABIS Core 3.0, its latest version, as well as MIABIS\nindividual-level components, which describe information about samples and their donors.\n\nThe foundation for this FHIR profile (all the attributes defined by MIABIS) is available on MIABIS github.\n\nThe MIABIS on FHIR profile full specification along with the guide is available on the [simplifier platform](https://simplifier.net/miabis). \n\n## Modules\n\n### 1. `miabis_model`\nThe `miabis_model` module includes a set of classes to help developers:\n- **Create** MIABIS on FHIR resources.\n- **Read** and **validate** these resources.\n- **Convert** resources to and from JSON format.\n\nThis module ensures compliance with the MIABIS on FHIR profile, allowing developers to handle MIABIS resources confidently and efficiently in Python.\n\n### 2. `blaze_client`\nThe `blaze_client` module simplifies communication with the [Samply.blaze](https://github.com/samply/blaze) FHIR storage server. Samply.blaze is a FHIR-compliant database designed for managing and storing FHIR resources. This module provides:\n- **Streamlined communication** with Samply.blaze, abstracting away the need for direct JSON response handling.\n- **BlazeClient** methods that simplify operations with the server, focusing on ease of use and minimizing boilerplate code.\n\n## Key Features\n- **Compliance**: Ensures MIABIS on FHIR resources meet the profile standards.\n- **Ease of Use**: Abstracts complex JSON interactions for a streamlined experience.\n- **Blaze Integration**: Seamless integration with Samply.blaze for FHIR resource management.\n\nThis package is ideal for developers looking to work with MIABIS on FHIR resources and interact with FHIR storage servers using Python.\n\n\n## Installation\n```bash \npip install miabis_model\n```\n## How to use\nHere is how you can create a MIABIS on FHIR sample resource:\n\n```python\nfrom miabis_model import Sample\nfrom miabis_model import StorageTemperature\n\nsample = Sample(\"sampleId\", \"donorId\", \"Urine\", storage_temperature=StorageTemperature.TEMPERATURE_ROOM,\n                use_restrictions=\"No restrictions\")\n# Convert the Sample object to a FHIR resource\nsample_resource = sample.to_fhir(\"donorId\")\n# Convert the FHIR resource to a JSON string\nsample_json = sample_resource.as_json()\n```\n\nHere is an example on how to communicate with blaze server via the BlazeClient:\n\n```python\nimport datetime\nfrom miabis_model import Gender\nfrom blaze_client import BlazeClient\nfrom miabis_model import SampleDonor\n\nclient = BlazeClient(\"example_url\", \"username\", \"password\")\n\ndonor = SampleDonor(\"donorId\", Gender.MALE, birth_date=datetime.datetime(year=2000, month=12, day=12))\ndonor_fhir_id = client.upload_donor(donor)\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 BBMRI.cz  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "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",
    "version": "1.1.4",
    "project_urls": null,
    "split_keywords": [
        "miabis",
        " fhir",
        " model",
        " profile",
        " data",
        " handling"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9fda02673e3409e4e829a0fe891f67c6f0562a225463fb55d0f175894b05d12d",
                "md5": "006c65db885456ad70c78ae46877eb00",
                "sha256": "3284dcd99f97659dcac13382ee37b5401c3400122fdec2a27e72d9d744ac6a21"
            },
            "downloads": -1,
            "filename": "MIABIS_on_FHIR-1.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "006c65db885456ad70c78ae46877eb00",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 51692,
            "upload_time": "2024-11-10T09:10:45",
            "upload_time_iso_8601": "2024-11-10T09:10:45.394897Z",
            "url": "https://files.pythonhosted.org/packages/9f/da/02673e3409e4e829a0fe891f67c6f0562a225463fb55d0f175894b05d12d/MIABIS_on_FHIR-1.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e39d8704e77bdc46289c3fc5a2dfa0558952ce269e3080c7bebbca994916f502",
                "md5": "bc458f4c71b0c63b6f6474758b168068",
                "sha256": "5164d99e1a6937dde89f8eb6086bbb50d1de0482120b2606c6ffa8640eb60e46"
            },
            "downloads": -1,
            "filename": "miabis_on_fhir-1.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "bc458f4c71b0c63b6f6474758b168068",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 39351,
            "upload_time": "2024-11-10T09:10:47",
            "upload_time_iso_8601": "2024-11-10T09:10:47.473894Z",
            "url": "https://files.pythonhosted.org/packages/e3/9d/8704e77bdc46289c3fc5a2dfa0558952ce269e3080c7bebbca994916f502/miabis_on_fhir-1.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-10 09:10:47",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "miabis-on-fhir"
}
        
Elapsed time: 0.33862s