Skip to main content

A minimalistic FHIR server for resources as files

Project description

fhirsnake Image

fhirsnake: turn static files to a FHIR server

image

What is it?

fhirsnake is a minimalistic FHIR server that serve yaml and json files as FHIR resources

How it works?

The server reads all yaml and json files from resources directory. Rsources directory should have subdirectories with names equal resource types:

resources/
├── Patient/
│   ├── example.yaml
│   ├── john-doe.json
│   └── patient3.yaml
├── Questionnaire/
│   ├── questionnaire1.yaml
│   ├── questionnaire2.yaml
│   └── questionnaire3.yaml

Supported operations

[!IMPORTANT] All created and updated resources persist in runtime only. All changes are vanished after service restart

  • read, create and update operations are supported
  • search - limied support without any search params
  • GET /$index operation returns a map of all resources in format <resource_type>:<id>

How to use?

  1. Organize resources in a directory
  2. Adjust source destination in Dockerfile.resources if required
  3. Option A: Run a container
    docker run -p 8002:8000 -v ./resources:/app/resources  bedasoftware/fhirsnake
    
  4. Option B: Build an image using the base image
    docker build -t fhirsnake-resources:latest -f Dockerfile.resources .
    docker run -p 8000:8000 fhirsnake-resources 
    

Contribution and feedback

Please, use Issues

Development

Format and fix with ruff

ruff format
ruff check . --fix

Issue new version - run semantic release locally

npx semantic-release --no-ci

Publish to pypi

poetry build
poetry publish

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

fhirsnake-1.0.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

fhirsnake-1.0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file fhirsnake-1.0.2.tar.gz.

File metadata

  • Download URL: fhirsnake-1.0.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.3 Darwin/23.5.0

File hashes

Hashes for fhirsnake-1.0.2.tar.gz
Algorithm Hash digest
SHA256 8519e99ce735b94654acf567be7539e8cb1b33217f78de91bdf2dcad71a61ac9
MD5 bd6672a1c00d3476ff6d3cf6f5b16587
BLAKE2b-256 067b0cb5647d0e6c5173d3e9bf1b765dcce4089d708d915444787aa8cfc2bb47

See more details on using hashes here.

File details

Details for the file fhirsnake-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: fhirsnake-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.3 Darwin/23.5.0

File hashes

Hashes for fhirsnake-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d7f31b29acf6664b69664bbaf391b16aaaffd56749d122d563c558096c9b38f
MD5 4580d5ecf9041b29f266c58efe1c35e7
BLAKE2b-256 fbf92ab6d90344cac120d86ee4bade72e7726db2154f543ff3b3b2a85dc84264

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page