dicom2fhir


Namedicom2fhir JSON
Version 0.1.21 PyPI version JSON
download
home_pageNone
SummaryConvert dicoms to FHIR Bundles containing ImagingStudy, Patient, Device, and Observation resources.
upload_time2025-07-08 20:49:03
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords dicom fhir resources python hl7 health it healthcare
VCS
bugtrack_url
requirements beautifulsoup4 fhir.resources pydicom PyYAML html5lib setuptools lxml pandas
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dicom-fhir-converter
This project was originally forked from [alexa-ian/dicom-fhir-converter](https://github.com/alexa-ian/dicom-fhir-converter). However, due to extensive refactoring and structural changes, it has since been detached from the upstream repository and is now maintained as an independent, standalone Python library.

The library converts DICOM data into a FHIR transaction Bundle that includes an ImagingStudy resource, a Patient resource, a Device resource, and optionally Observation resources. It supports two input modes: either a directory containing DICOM files (recursively parsed), or an `AsyncGenerator[dict, None]` of DICOM JSON dicts instances passed directly to the API.

This library utilizes the following projects:
- fhir.resources project (https://pypi.org/project/fhir.resources/) - used to create FHIR models
- pydicom (https://pydicom.github.io/) - (partially) used to read dicom instances

Compared to the original project, the dependency on pydicom has been reduced and the library now uses its own DicomJsonProxy class to process DICOM JSON data. This allows for more lenient and efficient parsing of DICOM data when it is already in JSON format, and avoids the somewhat stringent checks of DICOM tags not used by pydicom anyway.

The library also works internally with [Asynchronous Generators](https://superfastpython.com/asynchronous-generators-in-python/), which can increase the complexity of handling the library somewhat, but is considerably more memory-efficient, especially for extensive studies with sometimes 1000 or more DICOM instances.

## Installation

```shell
pip install dicom2fhir
```

## Usage

Parse from a directory containing DICOM files:

```python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os
from dicom2fhir.dicom2fhir import from_directory
from pprint import pprint
import asyncio

# Some directory containing DICOM files (recursively parsed)
dcmDir = os.path.join("some", "directory", "with", "dicom-files")

# Configuration for the dicom2fhir conversion
dicom2fhir_config = {
    "dicom_timezone": "Europe/Berlin",  # Set the timezone for DICOM dates
    "generator": {
        "imaging_study": {
            "add_instance": False  # Do not add single instances, only series to the ImagingStudy
        },
        "observation": {
            "add_vital_signs": True  # Add vital signs Observations for body weight and height
        }
    }
}

# Async wrapper
async def main():
    # Convert to FHIR Bundle
    bundle = await from_directory(dcmDir, config=dicom2fhir_config)

    # Print the resulting FHIR Bundle as JSON
    pprint(bundle.model_dump_json(indent=2))

if __name__ == "__main__":
    asyncio.run(main())
```

Parse from an iterable of DICOM JSON dicts:

```python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os
from dicom2fhir.dicom2fhir import from_generator
from pprint import pprint
import asyncio

# Configuration for the dicom2fhir conversion
dicom2fhir_config = {
    "dicom_timezone": "Europe/Berlin",  # Set the timezone for DICOM dates
    "generator": {
        "imaging_study": {
            "add_instance": False  # Do not add single instances, only series to the ImagingStudy
        },
        "observation": {
            "add_vital_signs": True  # Add vital signs Observations for body weight and height
        }
    }
}

# Dummy async generator function to simulate DICOM JSON dicts
async def async_get_dicom_json_generator():
    yield {
        # A minimal valid DICOM-to-FHIR dictionary structure (example content)
        "00080020": {"vr": "DA", "Value": ["20210101"]},
        "00100010": {"vr": "PN", "Value": [{"Alphabetic": "Doe^John"}]},
    }

# Main coroutine to run the conversion
async def main():
    dicom_json_dicts = async_get_dicom_json_generator()

    # Convert to FHIR Bundle
    bundle = await from_generator(dicom_json_dicts, config=dicom2fhir_config)

    # Print the resulting FHIR Bundle as JSON
    pprint(bundle.model_dump_json(indent=2))

# Run the async main function
if __name__ == "__main__":
    asyncio.run(main())
```

Apart from the above configuration options you can also pass a custom function via `config['id_function']` to create FHIR resource ids from business identifiers. This is useful if you want to use a different identifier scheme than the default one, which is based on the DICOM Study UID. Please see the [default id function](/dicom2fhir/helpers.py#L36) for reference.


The resulting object is a FHIR R4B transaction [Bundle](https://hl7.org/fhir/R4B/bundle.html) containing:
-	One [ImagingStudy](https://hl7.org/fhir/R4B/imagingstudy.html) resource
-	One [Patient](https://hl7.org/fhir/R4B/patient.html) resource
-	One [Device](https://hl7.org/fhir/R4B/device.html) resource
-	Optionally, [Observation](https://hl7.org/fhir/R4B/observation.html) resources for body weight and height if the corresponding DICOM tags are present.

If you need to update the bodysite Snomed mappings run:

```bash
cd dicom2fhir 
./build_terminologies.py
```

Activate tests against Firemetrics:
```bash
export RUN_FMX_TESTS=1
```

## Structure 
The FHIR Imaging Study id is being generated internally within the library. 
The DICOM Study UID is actually stored as part of the "identifier" (see ```"system":"urn:dicom:uid"``` object for DICOM study uid.

### Sample Output
```json
{
  "resourceType": "Bundle",
  "id": "f87746a0-7ff5-4666-8302-423cfdf3f275",
  "type": "transaction",
  "entry": [
    {
      "fullUrl": "urn:uuid:7423de5ec8508bb1dc9036a7478d7bd4940a6c5daf5751d8ad2ca13f1dae85d0",
      "resource": {
        "resourceType": "ImagingStudy",
        "id": "7423de5ec8508bb1dc9036a7478d7bd4940a6c5daf5751d8ad2ca13f1dae85d0",
        "identifier": [
          {
            "use": "usual",
            "type": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                  "code": "ACSN"
                }
              ]
            },
            "value": "62541999"
          },
          {
            "system": "urn:dicom:uid",
            "value": "urn:oid:1.2.840.113711.9425041.6.7312.599853596.26.2116281012.165600"
          }
        ],
        "status": "available",
        "modality": [
          {
            "system": "http://dicom.nema.org/resources/ontology/DCM",
            "code": "CR"
          }
        ],
        "subject": {
          "reference": "Patient/c13a8cd37541b87b256fe08a3800b5f409439357a250661efaec6a9642901d72"
        },
        "started": "2020-01-11T00:00:00",
        "numberOfSeries": 4,
        "numberOfInstances": 4,
        "procedureCode": [
          {
            "coding": [
              {
                "system": "UNKNOWN",
                "code": "7003520",
                "display": "XR Ribs w/ PA Chest Left"
              }
            ],
            "text": "XR Ribs w/ PA Chest Left"
          }
        ],
        "series": [
          {
            "uid": "1.2.840.113564.19216812.20200110232537925600",
            "number": 2,
            "modality": {
              "system": "http://dicom.nema.org/resources/ontology/DCM",
              "code": "CR"
            },
            "description": "AP",
            "numberOfInstances": 1,
            "bodySite": {
              "code": "RIBS",
              "userSelected": true
            },
            "instance": [
              {
                "uid": "1.2.840.113564.19216812.20200110232537925610.2203801020003",
                "sopClass": {
                  "system": "urn:ietf:rfc:3986",
                  "code": "urn:oid:1.2.840.10008.5.1.4.1.1.1"
                },
                "number": 1,
                "title": "DERIVED\\PRIMARY"
              }
            ]
          },
          {
            "uid": "1.2.840.113564.19216812.20200110232537987660",
            "number": 5,
            "modality": {
              "system": "http://dicom.nema.org/resources/ontology/DCM",
              "code": "CR"
            },
            "description": "RPO",
            "numberOfInstances": 1,
            "bodySite": {
              "code": "RIBS",
              "userSelected": true
            },
            "instance": [
              {
                "uid": "1.2.840.113564.19216812.20200110232537987670.2203801020003",
                "sopClass": {
                  "system": "urn:ietf:rfc:3986",
                  "code": "urn:oid:1.2.840.10008.5.1.4.1.1.1"
                },
                "number": 1,
                "title": "DERIVED\\PRIMARY"
              }
            ]
          },
          {
            "uid": "1.2.840.113564.19216812.20200110232538003680",
            "number": 6,
            "modality": {
              "system": "http://dicom.nema.org/resources/ontology/DCM",
              "code": "CR"
            },
            "description": "LPO",
            "numberOfInstances": 1,
            "bodySite": {
              "code": "RIBS",
              "userSelected": true
            },
            "instance": [
              {
                "uid": "1.2.840.113564.19216812.20200110232538003690.2203801020003",
                "sopClass": {
                  "system": "urn:ietf:rfc:3986",
                  "code": "urn:oid:1.2.840.10008.5.1.4.1.1.1"
                },
                "number": 1,
                "title": "DERIVED\\PRIMARY"
              }
            ]
          },
          {
            "uid": "1.2.840.113564.19216812.20200110232537909580",
            "number": 1,
            "modality": {
              "system": "http://dicom.nema.org/resources/ontology/DCM",
              "code": "CR"
            },
            "description": "PA",
            "numberOfInstances": 1,
            "bodySite": {
              "system": "http://snomed.info/sct",
              "code": "43799004",
              "display": "Chest"
            },
            "instance": [
              {
                "uid": "1.2.840.113564.19216812.20200110232537909590.2203801020003",
                "sopClass": {
                  "system": "urn:ietf:rfc:3986",
                  "code": "urn:oid:1.2.840.10008.5.1.4.1.1.1"
                },
                "number": 1,
                "title": "DERIVED\\PRIMARY"
              }
            ]
          }
        ]
      },
      "request": {
        "method": "PUT",
        "url": "ImagingStudy/7423de5ec8508bb1dc9036a7478d7bd4940a6c5daf5751d8ad2ca13f1dae85d0"
      }
    },
    {
      "fullUrl": "urn:uuid:c13a8cd37541b87b256fe08a3800b5f409439357a250661efaec6a9642901d72",
      "resource": {
        "resourceType": "Patient",
        "id": "c13a8cd37541b87b256fe08a3800b5f409439357a250661efaec6a9642901d72",
        "identifier": [
          {
            "use": "usual",
            "system": "urn:dicom:patient-id",
            "value": "A09650600b71bfe4043b5b44e05b362015f"
          }
        ],
        "name": [
          {
            "family": "Doe",
            "given": ["John", "A."],
            "prefix": "Dr.",
            "suffix": "MD"
          }
        ],
        "gender": "male",
        "birthDate": "1976-01-01"
      },
      "request": {
        "method": "PUT",
        "url": "Patient/c13a8cd37541b87b256fe08a3800b5f409439357a250661efaec6a9642901d72"
      }
    },
    {
      "fullUrl": "urn:uuid:5a4d77e9-04a7-4897-ad05-b80432794242",
      "resource": {
        "resourceType": "Device",
        "id": "5a4d77e9-04a7-4897-ad05-b80432794242",
        "manufacturer": "Carestream Health",
        "deviceName": [
          {
            "name": "DRX-Evolution",
            "type": "model-name"
          }
        ],
        "type": {
          "text": "CR"
        },
        "version": [
          {
            "value": "5.7.412.7005"
          }
        ]
      },
      "request": {
        "method": "PUT",
        "url": "Device/5a4d77e9-04a7-4897-ad05-b80432794242"
      }
    }
  ]
}
```

## Trigger GitHub action to build and upload the library

Change `version` in `pyproject.toml` to the new version number, then run:

```shell
git add -u
git commit -m "Bump version to x.y.z"
git push origin main
git tag <version>
git push origin <version>
```

## Manually build and upload the library

Change `version` in `pyproject.toml` to the new version number, then run:

```bash
rm -rf dist/ build/ *.egg-info
python -m build
twine upload dist/*
```

## Todo 

- [x] Allow to pass custom function to create FHIR resource ids from business identifiers
- [ ] Making FHIR profiles compatible with the [MII-KDS](https://www.medizininformatik-initiative.de/en/basic-modules-mii-core-data-set)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dicom2fhir",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "dicom, fhir, resources, python, hl7, health IT, healthcare",
    "author": null,
    "author_email": "Felix Nensa <felix.nensa@uk-essen.de>",
    "download_url": "https://files.pythonhosted.org/packages/1c/bc/95d691da26f543633c1c17406d6fcd3494f5c2b624e9f24ec789b99b4cf2/dicom2fhir-0.1.21.tar.gz",
    "platform": null,
    "description": "# dicom-fhir-converter\nThis project was originally forked from [alexa-ian/dicom-fhir-converter](https://github.com/alexa-ian/dicom-fhir-converter). However, due to extensive refactoring and structural changes, it has since been detached from the upstream repository and is now maintained as an independent, standalone Python library.\n\nThe library converts DICOM data into a FHIR transaction Bundle that includes an ImagingStudy resource, a Patient resource, a Device resource, and optionally Observation resources. It supports two input modes: either a directory containing DICOM files (recursively parsed), or an `AsyncGenerator[dict, None]` of DICOM JSON dicts instances passed directly to the API.\n\nThis library utilizes the following projects:\n- fhir.resources project (https://pypi.org/project/fhir.resources/) - used to create FHIR models\n- pydicom (https://pydicom.github.io/) - (partially) used to read dicom instances\n\nCompared to the original project, the dependency on pydicom has been reduced and the library now uses its own DicomJsonProxy class to process DICOM JSON data. This allows for more lenient and efficient parsing of DICOM data when it is already in JSON format, and avoids the somewhat stringent checks of DICOM tags not used by pydicom anyway.\n\nThe library also works internally with [Asynchronous Generators](https://superfastpython.com/asynchronous-generators-in-python/), which can increase the complexity of handling the library somewhat, but is considerably more memory-efficient, especially for extensive studies with sometimes 1000 or more DICOM instances.\n\n## Installation\n\n```shell\npip install dicom2fhir\n```\n\n## Usage\n\nParse from a directory containing DICOM files:\n\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport os\nfrom dicom2fhir.dicom2fhir import from_directory\nfrom pprint import pprint\nimport asyncio\n\n# Some directory containing DICOM files (recursively parsed)\ndcmDir = os.path.join(\"some\", \"directory\", \"with\", \"dicom-files\")\n\n# Configuration for the dicom2fhir conversion\ndicom2fhir_config = {\n    \"dicom_timezone\": \"Europe/Berlin\",  # Set the timezone for DICOM dates\n    \"generator\": {\n        \"imaging_study\": {\n            \"add_instance\": False  # Do not add single instances, only series to the ImagingStudy\n        },\n        \"observation\": {\n            \"add_vital_signs\": True  # Add vital signs Observations for body weight and height\n        }\n    }\n}\n\n# Async wrapper\nasync def main():\n    # Convert to FHIR Bundle\n    bundle = await from_directory(dcmDir, config=dicom2fhir_config)\n\n    # Print the resulting FHIR Bundle as JSON\n    pprint(bundle.model_dump_json(indent=2))\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nParse from an iterable of DICOM JSON dicts:\n\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport os\nfrom dicom2fhir.dicom2fhir import from_generator\nfrom pprint import pprint\nimport asyncio\n\n# Configuration for the dicom2fhir conversion\ndicom2fhir_config = {\n    \"dicom_timezone\": \"Europe/Berlin\",  # Set the timezone for DICOM dates\n    \"generator\": {\n        \"imaging_study\": {\n            \"add_instance\": False  # Do not add single instances, only series to the ImagingStudy\n        },\n        \"observation\": {\n            \"add_vital_signs\": True  # Add vital signs Observations for body weight and height\n        }\n    }\n}\n\n# Dummy async generator function to simulate DICOM JSON dicts\nasync def async_get_dicom_json_generator():\n    yield {\n        # A minimal valid DICOM-to-FHIR dictionary structure (example content)\n        \"00080020\": {\"vr\": \"DA\", \"Value\": [\"20210101\"]},\n        \"00100010\": {\"vr\": \"PN\", \"Value\": [{\"Alphabetic\": \"Doe^John\"}]},\n    }\n\n# Main coroutine to run the conversion\nasync def main():\n    dicom_json_dicts = async_get_dicom_json_generator()\n\n    # Convert to FHIR Bundle\n    bundle = await from_generator(dicom_json_dicts, config=dicom2fhir_config)\n\n    # Print the resulting FHIR Bundle as JSON\n    pprint(bundle.model_dump_json(indent=2))\n\n# Run the async main function\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nApart from the above configuration options you can also pass a custom function via `config['id_function']` to create FHIR resource ids from business identifiers. This is useful if you want to use a different identifier scheme than the default one, which is based on the DICOM Study UID. Please see the [default id function](/dicom2fhir/helpers.py#L36) for reference.\n\n\nThe resulting object is a FHIR R4B transaction [Bundle](https://hl7.org/fhir/R4B/bundle.html) containing:\n-\tOne [ImagingStudy](https://hl7.org/fhir/R4B/imagingstudy.html) resource\n-\tOne [Patient](https://hl7.org/fhir/R4B/patient.html) resource\n-\tOne [Device](https://hl7.org/fhir/R4B/device.html) resource\n-\tOptionally, [Observation](https://hl7.org/fhir/R4B/observation.html) resources for body weight and height if the corresponding DICOM tags are present.\n\nIf you need to update the bodysite Snomed mappings run:\n\n```bash\ncd dicom2fhir \n./build_terminologies.py\n```\n\nActivate tests against Firemetrics:\n```bash\nexport RUN_FMX_TESTS=1\n```\n\n## Structure \nThe FHIR Imaging Study id is being generated internally within the library. \nThe DICOM Study UID is actually stored as part of the \"identifier\" (see ```\"system\":\"urn:dicom:uid\"``` object for DICOM study uid.\n\n### Sample Output\n```json\n{\n  \"resourceType\": \"Bundle\",\n  \"id\": \"f87746a0-7ff5-4666-8302-423cfdf3f275\",\n  \"type\": \"transaction\",\n  \"entry\": [\n    {\n      \"fullUrl\": \"urn:uuid:7423de5ec8508bb1dc9036a7478d7bd4940a6c5daf5751d8ad2ca13f1dae85d0\",\n      \"resource\": {\n        \"resourceType\": \"ImagingStudy\",\n        \"id\": \"7423de5ec8508bb1dc9036a7478d7bd4940a6c5daf5751d8ad2ca13f1dae85d0\",\n        \"identifier\": [\n          {\n            \"use\": \"usual\",\n            \"type\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n                  \"code\": \"ACSN\"\n                }\n              ]\n            },\n            \"value\": \"62541999\"\n          },\n          {\n            \"system\": \"urn:dicom:uid\",\n            \"value\": \"urn:oid:1.2.840.113711.9425041.6.7312.599853596.26.2116281012.165600\"\n          }\n        ],\n        \"status\": \"available\",\n        \"modality\": [\n          {\n            \"system\": \"http://dicom.nema.org/resources/ontology/DCM\",\n            \"code\": \"CR\"\n          }\n        ],\n        \"subject\": {\n          \"reference\": \"Patient/c13a8cd37541b87b256fe08a3800b5f409439357a250661efaec6a9642901d72\"\n        },\n        \"started\": \"2020-01-11T00:00:00\",\n        \"numberOfSeries\": 4,\n        \"numberOfInstances\": 4,\n        \"procedureCode\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"UNKNOWN\",\n                \"code\": \"7003520\",\n                \"display\": \"XR Ribs w/ PA Chest Left\"\n              }\n            ],\n            \"text\": \"XR Ribs w/ PA Chest Left\"\n          }\n        ],\n        \"series\": [\n          {\n            \"uid\": \"1.2.840.113564.19216812.20200110232537925600\",\n            \"number\": 2,\n            \"modality\": {\n              \"system\": \"http://dicom.nema.org/resources/ontology/DCM\",\n              \"code\": \"CR\"\n            },\n            \"description\": \"AP\",\n            \"numberOfInstances\": 1,\n            \"bodySite\": {\n              \"code\": \"RIBS\",\n              \"userSelected\": true\n            },\n            \"instance\": [\n              {\n                \"uid\": \"1.2.840.113564.19216812.20200110232537925610.2203801020003\",\n                \"sopClass\": {\n                  \"system\": \"urn:ietf:rfc:3986\",\n                  \"code\": \"urn:oid:1.2.840.10008.5.1.4.1.1.1\"\n                },\n                \"number\": 1,\n                \"title\": \"DERIVED\\\\PRIMARY\"\n              }\n            ]\n          },\n          {\n            \"uid\": \"1.2.840.113564.19216812.20200110232537987660\",\n            \"number\": 5,\n            \"modality\": {\n              \"system\": \"http://dicom.nema.org/resources/ontology/DCM\",\n              \"code\": \"CR\"\n            },\n            \"description\": \"RPO\",\n            \"numberOfInstances\": 1,\n            \"bodySite\": {\n              \"code\": \"RIBS\",\n              \"userSelected\": true\n            },\n            \"instance\": [\n              {\n                \"uid\": \"1.2.840.113564.19216812.20200110232537987670.2203801020003\",\n                \"sopClass\": {\n                  \"system\": \"urn:ietf:rfc:3986\",\n                  \"code\": \"urn:oid:1.2.840.10008.5.1.4.1.1.1\"\n                },\n                \"number\": 1,\n                \"title\": \"DERIVED\\\\PRIMARY\"\n              }\n            ]\n          },\n          {\n            \"uid\": \"1.2.840.113564.19216812.20200110232538003680\",\n            \"number\": 6,\n            \"modality\": {\n              \"system\": \"http://dicom.nema.org/resources/ontology/DCM\",\n              \"code\": \"CR\"\n            },\n            \"description\": \"LPO\",\n            \"numberOfInstances\": 1,\n            \"bodySite\": {\n              \"code\": \"RIBS\",\n              \"userSelected\": true\n            },\n            \"instance\": [\n              {\n                \"uid\": \"1.2.840.113564.19216812.20200110232538003690.2203801020003\",\n                \"sopClass\": {\n                  \"system\": \"urn:ietf:rfc:3986\",\n                  \"code\": \"urn:oid:1.2.840.10008.5.1.4.1.1.1\"\n                },\n                \"number\": 1,\n                \"title\": \"DERIVED\\\\PRIMARY\"\n              }\n            ]\n          },\n          {\n            \"uid\": \"1.2.840.113564.19216812.20200110232537909580\",\n            \"number\": 1,\n            \"modality\": {\n              \"system\": \"http://dicom.nema.org/resources/ontology/DCM\",\n              \"code\": \"CR\"\n            },\n            \"description\": \"PA\",\n            \"numberOfInstances\": 1,\n            \"bodySite\": {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"43799004\",\n              \"display\": \"Chest\"\n            },\n            \"instance\": [\n              {\n                \"uid\": \"1.2.840.113564.19216812.20200110232537909590.2203801020003\",\n                \"sopClass\": {\n                  \"system\": \"urn:ietf:rfc:3986\",\n                  \"code\": \"urn:oid:1.2.840.10008.5.1.4.1.1.1\"\n                },\n                \"number\": 1,\n                \"title\": \"DERIVED\\\\PRIMARY\"\n              }\n            ]\n          }\n        ]\n      },\n      \"request\": {\n        \"method\": \"PUT\",\n        \"url\": \"ImagingStudy/7423de5ec8508bb1dc9036a7478d7bd4940a6c5daf5751d8ad2ca13f1dae85d0\"\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:c13a8cd37541b87b256fe08a3800b5f409439357a250661efaec6a9642901d72\",\n      \"resource\": {\n        \"resourceType\": \"Patient\",\n        \"id\": \"c13a8cd37541b87b256fe08a3800b5f409439357a250661efaec6a9642901d72\",\n        \"identifier\": [\n          {\n            \"use\": \"usual\",\n            \"system\": \"urn:dicom:patient-id\",\n            \"value\": \"A09650600b71bfe4043b5b44e05b362015f\"\n          }\n        ],\n        \"name\": [\n          {\n            \"family\": \"Doe\",\n            \"given\": [\"John\", \"A.\"],\n            \"prefix\": \"Dr.\",\n            \"suffix\": \"MD\"\n          }\n        ],\n        \"gender\": \"male\",\n        \"birthDate\": \"1976-01-01\"\n      },\n      \"request\": {\n        \"method\": \"PUT\",\n        \"url\": \"Patient/c13a8cd37541b87b256fe08a3800b5f409439357a250661efaec6a9642901d72\"\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:5a4d77e9-04a7-4897-ad05-b80432794242\",\n      \"resource\": {\n        \"resourceType\": \"Device\",\n        \"id\": \"5a4d77e9-04a7-4897-ad05-b80432794242\",\n        \"manufacturer\": \"Carestream Health\",\n        \"deviceName\": [\n          {\n            \"name\": \"DRX-Evolution\",\n            \"type\": \"model-name\"\n          }\n        ],\n        \"type\": {\n          \"text\": \"CR\"\n        },\n        \"version\": [\n          {\n            \"value\": \"5.7.412.7005\"\n          }\n        ]\n      },\n      \"request\": {\n        \"method\": \"PUT\",\n        \"url\": \"Device/5a4d77e9-04a7-4897-ad05-b80432794242\"\n      }\n    }\n  ]\n}\n```\n\n## Trigger GitHub action to build and upload the library\n\nChange `version` in `pyproject.toml` to the new version number, then run:\n\n```shell\ngit add -u\ngit commit -m \"Bump version to x.y.z\"\ngit push origin main\ngit tag <version>\ngit push origin <version>\n```\n\n## Manually build and upload the library\n\nChange `version` in `pyproject.toml` to the new version number, then run:\n\n```bash\nrm -rf dist/ build/ *.egg-info\npython -m build\ntwine upload dist/*\n```\n\n## Todo \n\n- [x] Allow to pass custom function to create FHIR resource ids from business identifiers\n- [ ] Making FHIR profiles compatible with the [MII-KDS](https://www.medizininformatik-initiative.de/en/basic-modules-mii-core-data-set)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Convert dicoms to FHIR Bundles containing ImagingStudy, Patient, Device, and Observation resources.",
    "version": "0.1.21",
    "project_urls": {
        "Repository": "https://github.com/UMEssen/dicom-fhir-converter"
    },
    "split_keywords": [
        "dicom",
        " fhir",
        " resources",
        " python",
        " hl7",
        " health it",
        " healthcare"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3852d5a747d80ef93629a170f8e73db27ed71e3670fac78fd9a62f1d14467879",
                "md5": "1b9929be8121ece7fe578ea2b933e084",
                "sha256": "aa99deee36da11ff19803069297e27e265e0d3ed570c651cd2efe225ae4984d8"
            },
            "downloads": -1,
            "filename": "dicom2fhir-0.1.21-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1b9929be8121ece7fe578ea2b933e084",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 31333,
            "upload_time": "2025-07-08T20:49:02",
            "upload_time_iso_8601": "2025-07-08T20:49:02.579871Z",
            "url": "https://files.pythonhosted.org/packages/38/52/d5a747d80ef93629a170f8e73db27ed71e3670fac78fd9a62f1d14467879/dicom2fhir-0.1.21-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1cbc95d691da26f543633c1c17406d6fcd3494f5c2b624e9f24ec789b99b4cf2",
                "md5": "9a80f53a96b293cc032f8b27b3b81cc2",
                "sha256": "1ad5610e806ff6891bed4be304114022b57cc5972f7d8656af42ab12610aeed0"
            },
            "downloads": -1,
            "filename": "dicom2fhir-0.1.21.tar.gz",
            "has_sig": false,
            "md5_digest": "9a80f53a96b293cc032f8b27b3b81cc2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 31324,
            "upload_time": "2025-07-08T20:49:03",
            "upload_time_iso_8601": "2025-07-08T20:49:03.816153Z",
            "url": "https://files.pythonhosted.org/packages/1c/bc/95d691da26f543633c1c17406d6fcd3494f5c2b624e9f24ec789b99b4cf2/dicom2fhir-0.1.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-08 20:49:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "UMEssen",
    "github_project": "dicom-fhir-converter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "beautifulsoup4",
            "specs": [
                [
                    ">=",
                    "4.13.4"
                ]
            ]
        },
        {
            "name": "fhir.resources",
            "specs": [
                [
                    ">=",
                    "7.0.2"
                ]
            ]
        },
        {
            "name": "pydicom",
            "specs": [
                [
                    ">=",
                    "2.4.3"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    ">=",
                    "6.0.2"
                ]
            ]
        },
        {
            "name": "html5lib",
            "specs": [
                [
                    ">=",
                    "1.1"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": []
        },
        {
            "name": "lxml",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        }
    ],
    "lcname": "dicom2fhir"
}
        
Elapsed time: 0.42662s