{ "info": { "author": "Gijs Kant", "author_email": "gijs@thehyve.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: Bio-Informatics" ], "description": "################################################################################\nExample FHIR to TranSMART loader\n################################################################################\n\n|Build status| |codecov| |pypi| |downloads|\n\n.. |Build status| image:: https://travis-ci.org/thehyve/python_fhir2transmart.svg?branch=master\n :alt: Build status\n :target: https://travis-ci.org/thehyve/python_fhir2transmart/branches\n.. |codecov| image:: https://codecov.io/gh/thehyve/python_fhir2transmart/branch/master/graph/badge.svg\n :alt: codecov\n :target: https://codecov.io/gh/thehyve/python_fhir2transmart\n.. |pypi| image:: https://img.shields.io/pypi/v/fhir2transmart.svg\n :alt: PyPI\n :target: https://pypi.org/project/fhir2transmart/\n.. |downloads| image:: https://img.shields.io/pypi/dm/fhir2transmart.svg\n :alt: PyPI - Downloads\n :target: https://pypi.org/project/fhir2transmart/\n\nThis package contains a mapper that reads data from `HL7 FHIR`_ (STU 3 or R4) resources\nand translates them to the data model of the TranSMART_ platform,\nan open source data sharing and analytics platform for translational biomedical research.\n\nIt also provides a utility that applies the mapper and writes the translated data to tab-separated files\nthat can be loaded into a TranSMART database using the transmart-copy_ tool.\n\nThe FHIR reader is based on the fhirclient_ package, writing to TranSMART is based on transmart-loader_.\n\n\u26a0\ufe0f Note: this is a very preliminary version, still under development.\nIssues can be reported at https://github.com/thehyve/python_fhir2transmart/issues.\n\n.. _`HL7 FHIR`: https://hl7.org/fhir\n.. _TranSMART: https://github.com/thehyve/transmart-core\n.. _transmart-copy: https://github.com/thehyve/transmart-core/tree/dev/transmart-copy\n.. _fhirclient: https://pypi.org/project/fhirclient\n.. _transmart-loader: https://pypi.org/project/transmart-loader\n\n\nInstallation\n------------\n\nThe package requires Python 3.6.\n\nTo install ``fhir2transmart``, do:\n\n.. code-block:: bash\n\n pip install fhir2transmart\n\nOr from source:\n\n.. code-block:: bash\n\n git clone https://github.com/thehyve/python_fhir2transmart.git\n cd python_fhir2transmart\n pip install .\n\n\nRun tests (including coverage) with:\n\n.. code-block:: console\n\n python setup.py test\n\n\nUsage\n-----\n\nRead input from a JSON file ``input.json`` and write the output in transmart-copy\nformat to ``/path/to/output``. The output directory should be\nempty of not existing (then it will be created).\n\n.. code-block:: bash\n\n # Translate one json file\n fhir2transmart [--with-ontology] input.json /path/to/output\n # Translate all json files in a directory\n fhir2transmart [--with-ontology] input_dir /path/to/output\n\nWith the ``--with-ontology`` option, concepts and ontology nodes\nare created based on the input data. Do not use this option when ontologies\nhave already been loaded separately.\n\nExample data is available at `MITRE SyntheticMass`_. Instructions:\n\n.. _`MITRE SyntheticMass`: https://syntheticmass.mitre.org/download.html\n\n.. code-block:: bash\n\n # Download 1K Sample Synthetic Patient Records, FHIR STU3 : 20MB\n wget https://syntheticmass.mitre.org/downloads/2017_11_06/synthea_sample_data_fhir_stu3_nov2017.zip\n # unzip creates a directory 'fhir' containing 282MB of json files\n unzip synthea_sample_data_fhir_stu3_nov2017.zip\n # create an output directory\n mkdir output\n # apply the mapping\n fhir2transmart fhir output\n\nThis generates the directories ``i2b2metadata`` and ``i2b2demodata`` in the ``output`` directory.\nThe generated data can be loaded using transmart-copy_:\n\n.. code-block:: console\n\n # Download transmart-copy:\n curl -f -L https://repo.thehyve.nl/service/local/repositories/releases/content/org/transmartproject/transmart-copy/17.1-HYVE-5.9-RC3/transmart-copy-17.1-HYVE-5.9-RC3.jar -o transmart-copy.jar\n # Load data\n PGUSER=tm_cz PGPASSWORD=tm_cz java -jar transmart-copy.jar -d output\n\n\nMapping\n-------\n\nThe following mapping table shows how FHIR resources are mapped to the\nTranSMART data model.\n\n============= ================= ============== ============== ============ =========\nFIHR TranSMART\n------------------------------- ----------------------------------------------------\nResource type attribute Class attribute concept modifier\n============= ================= ============== ============== ============ =========\nPatient_ identifier PatientMapping identifier\nPatient_ gender Patient sex\nPatient_ gender Observation value Gender\nPatient_ birthDate Observation value BirthDate\nPatient_ deceased Observation value Deceased\nPatient_ deceasedDate Observation value DeceasedDate\n------------- ----------------- -------------- -------------- ------------ ---------\nCondition_ subject Observation patient\nCondition_ code Observation conceptCode\nCondition_ onsetDateTime Observation startDate\nCondition_ abatementDateTime Observation endDate\nCondition_ recordedDate Observation\nCondition_ category\n------------- ----------------- -------------- -------------- ------------ ---------\nEncounter_ identifier Visit\nEncounter_ period.start Visit startDate\nEncounter_ period.end Visit endDate\nEncounter_ status Visit activeStatusCd\nEncounter_ class Visit inoutCd\nEncounter_ hospitalization Visit locationCd\n============= ================= ============== ============== ============ =========\n\n.. _Patient: https://www.hl7.org/fhir/patient.html\n.. _Condition: https://www.hl7.org/fhir/condition.html\n.. _Encounter: https://www.hl7.org/fhir/encounter.html\n\n\nLicense\n-------\n\nCopyright (c) 2019 The Hyve B.V.\n\nThe FHIR to TranSMART loader is licensed under the MIT License. See the file ``_.\n\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thehyve/python_fhir2transmart", "keywords": "fhir2transmart", "license": "GNU General Public License v3 or later", "maintainer": "", "maintainer_email": "", "name": "fhir2transmart", "package_url": "https://pypi.org/project/fhir2transmart/", "platform": "", "project_url": "https://pypi.org/project/fhir2transmart/", "project_urls": { "Homepage": "https://github.com/thehyve/python_fhir2transmart" }, "release_url": "https://pypi.org/project/fhir2transmart/0.2.0/", "requires_dist": [ "click (==7.0)", "python-dateutil (==2.8.0)", "fhirclient (==3.2.0)", "transmart-loader (==1.1.0)", "prospector[with_pyroma] ; extra == 'dev'", "yapf ; extra == 'dev'", "isort ; extra == 'dev'" ], "requires_python": ">=3.6.0", "summary": "Example FHIR to TranSMART loader", "version": "0.2.0" }, "last_serial": 5516450, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "84b94583830e119b1835f5e3ffa83a1c", "sha256": "c00846ed4872eb6bae01169c08f82d421224f2e50075f7b5e734c33e72529dab" }, "downloads": -1, "filename": "fhir2transmart-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "84b94583830e119b1835f5e3ffa83a1c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 7628, "upload_time": "2019-05-10T07:48:54", "url": "https://files.pythonhosted.org/packages/a1/bc/505184a2b5a0f6a1524b5fc1f0b7ef3d5a23edf786840269d1e2b19f28e1/fhir2transmart-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "13052127439bc39ed311abe5b5498729", "sha256": "12fe61de6ae66332a69b404908eee59174686c9db95f6f2c7a537fcef25ecbf0" }, "downloads": -1, "filename": "fhir2transmart-0.1.0.tar.gz", "has_sig": false, "md5_digest": "13052127439bc39ed311abe5b5498729", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 6567, "upload_time": "2019-05-10T07:48:56", "url": "https://files.pythonhosted.org/packages/a2/06/c6fc7a7ac4b3b50f95a8c94ee6d11480e951a04ac0a5f1119a888f41b104/fhir2transmart-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3637921a399b1ae41bffd5e0ab9b7f62", "sha256": "6e7e483a8feb45c56eceb83e8380a79f9a412fe00ff676dade4c257fff3ade1b" }, "downloads": -1, "filename": "fhir2transmart-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3637921a399b1ae41bffd5e0ab9b7f62", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 9124, "upload_time": "2019-05-10T10:40:31", "url": "https://files.pythonhosted.org/packages/89/6c/97d7092663a2240f6d673673f813107deaece3862a586863640fa9c314bc/fhir2transmart-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3a38a3961d024d423ec01a58bbbc665", "sha256": "690a2a28014fe9b59aa853bdbc61dd7ec364c7fc155d4d1b95b69c99f25920b1" }, "downloads": -1, "filename": "fhir2transmart-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e3a38a3961d024d423ec01a58bbbc665", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8863, "upload_time": "2019-05-10T10:40:32", "url": "https://files.pythonhosted.org/packages/7a/95/d1efade148d612090493432c8b3321788dd66b69238470125c0f3e41f223/fhir2transmart-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "ad2c834ea1ba30f815d99008c8a035f0", "sha256": "8504fe661c22937bbd8b0d9471a40bbc03fb4ac1224d830b18ad0f5fde168297" }, "downloads": -1, "filename": "fhir2transmart-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ad2c834ea1ba30f815d99008c8a035f0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 9157, "upload_time": "2019-05-10T11:56:19", "url": "https://files.pythonhosted.org/packages/9d/4e/a03bec16d249bc35f0b8db860a8d061f1b21058c77b674e1315c2fcc8bf4/fhir2transmart-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ada143e918d72f59c1fabbcd24f04ba5", "sha256": "60fe607bec17a538c788b10313f602f31369093507d86efc7450deb57797964a" }, "downloads": -1, "filename": "fhir2transmart-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ada143e918d72f59c1fabbcd24f04ba5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8935, "upload_time": "2019-05-10T11:56:20", "url": "https://files.pythonhosted.org/packages/8e/cd/d677a16cb606094d56eac7a6f9a93527461aa927c1a5eca312937a6ed523/fhir2transmart-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "e79dc551ceee09edee920975591582d7", "sha256": "d08a8a1efdb0d86d8896e2b98ac5ba0c900606550355c251da75e9cf9583a500" }, "downloads": -1, "filename": "fhir2transmart-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e79dc551ceee09edee920975591582d7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 9510, "upload_time": "2019-05-14T08:36:31", "url": "https://files.pythonhosted.org/packages/4a/b3/fb35f97ab255d06cbcc3b9806aa5b57697fd36ff43feb3fbe438c56b81a7/fhir2transmart-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2f578722e0ed9d730b3a69ed69480e3b", "sha256": "e392970bba75e1e3922d9190c287f5e26a596211a2ef1498862bc001c5380537" }, "downloads": -1, "filename": "fhir2transmart-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2f578722e0ed9d730b3a69ed69480e3b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8008, "upload_time": "2019-05-14T08:36:32", "url": "https://files.pythonhosted.org/packages/91/fc/570a17fc99d0e882e06da6842ec87745bd1260e6108a8bfe679042080961/fhir2transmart-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "a3c81197a6e7ea3ab631ee46104ebf2d", "sha256": "f8767c1ed3f1a530a5dedc58e2cd83b30c4ffcc78236f90331ba422924425db1" }, "downloads": -1, "filename": "fhir2transmart-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "a3c81197a6e7ea3ab631ee46104ebf2d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 9714, "upload_time": "2019-05-20T07:28:13", "url": "https://files.pythonhosted.org/packages/b9/88/a3f3e279a20a6b3500c86dcdf1fe47f505001c4397e86128045e03b14783/fhir2transmart-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e7a76e39f003cfbb090fac5f7b67653", "sha256": "080b4ccb57331b89c43e61a0d268dcc4eff0950a267a88f381cf6bf069353d2e" }, "downloads": -1, "filename": "fhir2transmart-0.1.4.tar.gz", "has_sig": false, "md5_digest": "3e7a76e39f003cfbb090fac5f7b67653", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8861, "upload_time": "2019-05-20T07:28:14", "url": "https://files.pythonhosted.org/packages/f5/d9/bf8024799b5bbeffb23ec0bf780351b680d5ea3347014c6336605bff1f66/fhir2transmart-0.1.4.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "30dced9fd14be378cb3302b1e7392759", "sha256": "acc40c98b5a2235b7dd34c21ae1bd89d00762725977e03003b646457a8efdee7" }, "downloads": -1, "filename": "fhir2transmart-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "30dced9fd14be378cb3302b1e7392759", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 9786, "upload_time": "2019-07-11T09:15:58", "url": "https://files.pythonhosted.org/packages/45/d7/226b015677d0b49aa6e468f86811f80fa3fe45fe18f1b300b06548116943/fhir2transmart-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4460bc898e63076c0b552399058945a2", "sha256": "80207ca78d613d228c0bc465ce3740b1b26236629432cd1141e6f43af9378017" }, "downloads": -1, "filename": "fhir2transmart-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4460bc898e63076c0b552399058945a2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8892, "upload_time": "2019-07-11T09:16:00", "url": "https://files.pythonhosted.org/packages/77/cf/98c6ea7969b13f43c114371f874eb2ff67a6a21b989680be580eb82369b6/fhir2transmart-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "30dced9fd14be378cb3302b1e7392759", "sha256": "acc40c98b5a2235b7dd34c21ae1bd89d00762725977e03003b646457a8efdee7" }, "downloads": -1, "filename": "fhir2transmart-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "30dced9fd14be378cb3302b1e7392759", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 9786, "upload_time": "2019-07-11T09:15:58", "url": "https://files.pythonhosted.org/packages/45/d7/226b015677d0b49aa6e468f86811f80fa3fe45fe18f1b300b06548116943/fhir2transmart-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4460bc898e63076c0b552399058945a2", "sha256": "80207ca78d613d228c0bc465ce3740b1b26236629432cd1141e6f43af9378017" }, "downloads": -1, "filename": "fhir2transmart-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4460bc898e63076c0b552399058945a2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 8892, "upload_time": "2019-07-11T09:16:00", "url": "https://files.pythonhosted.org/packages/77/cf/98c6ea7969b13f43c114371f874eb2ff67a6a21b989680be580eb82369b6/fhir2transmart-0.2.0.tar.gz" } ] }