GithubHelp home page GithubHelp logo

fhir-gen's Introduction

FHIRGen ๐Ÿ”ฅ

๐Ÿš€ A Blazingly Fast Rust CLI tool for generating FHIR resources and exporting them to various formats. This can be handy when looking for vast amounts of Seed Data in Health Applications for testing purposes or populating a database.

Features

  • Select from a list of available FHIR resource types to generate.
  • Generate sample input for each resource type, which the user can then modify.
  • Select from multiple output formats, including JSON, CSV, XML, or copy to clipboard.
  • Validate the generated resources against the FHIR specification.
  • Create custom templates for generating resources.
  • Generate multiple resources at once.
  • Select the FHIR version to generate resources for.
  • Handle errors and provide helpful error messages.

Usage

fhirgen [OPTIONS]

Options:
    -t, --type           Specify the type of FHIR resource to generate
    -o, --output         Specify the output format (json, csv, xml, clipboard)
    -v, --version        Specify the FHIR version to use
    -h, --help           Display this help message

Installation

  • 1 Clone this repository to your local machine.
  • 2 Run cargo build to build the project.
  • 3 Run cargo install to install the tool globally on your system.

Project Structure

.
โ”œโ”€โ”€ Cargo.toml
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ bin
โ”‚   โ”‚   โ””โ”€โ”€ main.rs
โ”‚   โ”œโ”€โ”€ lib.rs
โ”‚   โ”œโ”€โ”€ resources
โ”‚   โ”‚   โ”œโ”€โ”€ mod.rs
โ”‚   โ”‚   โ”œโ”€โ”€ patient.rs
โ”‚   โ”‚   โ””โ”€โ”€ encounter.rs
โ”‚   โ””โ”€โ”€ utils
โ”‚       โ””โ”€โ”€ mod.rs
โ””โ”€โ”€ templates
    โ””โ”€โ”€ patient.toml
| File/Folder Name | Description |
| --- | --- |
| `Cargo.toml` | Contains the dependencies and metadata for the project. |
| `src/bin/main.rs` | Main binary file that contains the code for the FHIRGen CLI. |
| `src/lib.rs` | Library file that exports the functions used by the main binary. |
| `src/resources/mod.rs` | Exports the resource modules, such as `patient` and `encounter`. |
| `src/resources/patient.rs` | Contains the code for generating patient resources. |
| `src/resources/encounter.rs` | Contains the code for generating encounter resources. |
| `src/utils/mod.rs` | Exports the utility modules, such as helper functions for generating resources. |
| `templates/patient.toml` | Example template for generating patient resources. |

Example

Generate a sample patient resource in JSON format:

fhirgen -t patient -o json

Contributions

Contributions are welcome! If you find any bugs or have any suggestions, please open an issue.

Future Work

  • Support for generating FHIR resources from existing templates or sample resources.
  • Integration with FHIR servers for testing and validating generated resources.
  • Option to select which elements of a resource to include in the output.
  • Option to randomize some elements of the resource to generate more diverse and realistic data.
  • Ability to create and manage templates directly from the CLI.
  • Integration with other healthcare-related tools and platforms.
  • Support for generating resources in other formats such as YAML.
  • Generate FHIR resources with cross-resource relationships, such as linking a patient resource to an encounter resource.

License

This project is licensed under the MIT License.

fhir-gen's People

Contributors

liwoo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.