Skip to main content

Create labeled FHIR sentences from FHIR resources in JSON.

Project description

FHIR Power - FHIR Sentence Labeling Tool

FHIR Power is an open-source Python tool designed to create labeled FHIR sentences from FHIR resources represented in JSON format. It flattens nested JSON structures, commonly used to represent FHIR resources, into a flat dictionary with labeled keys corresponding to the paths in the nested structure.

Table of Contents

Introduction

FHIR (Fast Healthcare Interoperability Resources) is a standard for exchanging healthcare information electronically. FHIR resources are often represented in JSON format, which can contain nested structures. Kindling simplifies the process of converting these nested structures into flat labeled dictionaries, making it easier for downstream applications such as natural language processing and data analysis.

Installation

To use FHIR Power, you need to have Python installed on your system. You can download Python from the official website: Python Downloads

You can then clone the FHIR Power repository and install the required dependencies using the following commands:

git clone https://github.com/fhirfly/fhirpower.git
cd fhirpower
pip install -r requirements.txt

Usage

To use FHIR Power, you can import the flatten_fhir function from the fhirpower.py module in your own scripts. Here's a basic example of how to use the tool:

from fhirpower import flatten_fhir

# Example nested JSON FHIR resource
nested_json = {
    "resourceType": "Patient",
    "name": [
        {
            "given": "John",
            "family": "Doe"
        }
    ]
}

flat_dict = flatten_fhir(nested_json)
print(flat_dict)

Examples

For more comprehensive examples and use cases, please refer to the examples directory in this repository. Each example demonstrates how to use Kindling for different types of FHIR resources.

Contributing

Contributions to Kindling are welcome! If you'd like to contribute, please follow these steps:

Fork the repository.

Create a new branch for your feature or bug fix: git checkout -b feature-name. Make your changes and commit them with descriptive messages. Push your changes to your fork: git push origin feature-name. Create a pull request detailing your changes. Please ensure your code follows the project's coding style and includes appropriate tests.

License

This project is licensed under the MIT License.

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

fhirpower-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

fhirpower-0.1.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file fhirpower-0.1.0.tar.gz.

File metadata

  • Download URL: fhirpower-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for fhirpower-0.1.0.tar.gz
Algorithm Hash digest
SHA256 99d4a50141147c96d7250982ca7f7d50459d85002717c9b820b8e370307883e5
MD5 672c53e602df2f85e8fc54a15a1b8e52
BLAKE2b-256 eb67c29308800e6916960a8a07cab10a0ad0b1da3ec2da81f81ac40a5d8fc2fe

See more details on using hashes here.

File details

Details for the file fhirpower-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fhirpower-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for fhirpower-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d591d0c35e4368624fdd7abb416bc90aa5d06ca583d6a2159bc5ebdd3ee6160c
MD5 3f21fa2e98982b0761eaf4ad6682a9a6
BLAKE2b-256 0a167a1c46d477631fdec107b8f5680bcf9c936b39bdc6d510fc8f6f6b0a48fb

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