{"id":19664243,"url":"https://github.com/beda-software/fhirsnake","last_synced_at":"2026-01-30T01:14:04.979Z","repository":{"id":254467076,"uuid":"846555296","full_name":"beda-software/fhirsnake","owner":"beda-software","description":"A minimalistic FHIR server for resources as files","archived":false,"fork":false,"pushed_at":"2024-08-26T08:58:51.000Z","size":437,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-31T09:47:27.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beda-software.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-23T13:06:52.000Z","updated_at":"2024-08-26T08:58:52.000Z","dependencies_parsed_at":"2024-08-23T17:58:09.596Z","dependency_job_id":null,"html_url":"https://github.com/beda-software/fhirsnake","commit_stats":null,"previous_names":["beda-software/fhirsnake"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Ffhirsnake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Ffhirsnake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Ffhirsnake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Ffhirsnake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beda-software","download_url":"https://codeload.github.com/beda-software/fhirsnake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224133813,"owners_count":17261303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T16:17:02.499Z","updated_at":"2026-01-30T01:14:04.971Z","avatar_url":"https://github.com/beda-software.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/beda-software/fhirsnake/raw/main/coral%20snake.webp\" alt=\"fhirsnake Image\" height=\"200\"\u003e\n\n# fhirsnake: turn static files to a FHIR server\n\n![image](https://img.shields.io/badge/fastapi-109989?style=for-the-badge\u0026logo=FASTAPI\u0026logoColor=white)\n\n## What is it?\n**fhirsnake** is a minimalistic FHIR server that serve yaml and json files as FHIR resources\n\n## How it works?\nThe server reads all `yaml` and `json` files from `resources` directory.\nResources directory should have subdirectories with names equal resource types:\n```markdown\nresources/\n├── Patient/\n│   ├── example.yaml\n│   ├── john-doe.json\n│   └── patient3.yaml\n├── Questionnaire/\n│   ├── questionnaire1.yaml\n│   ├── questionnaire2.yaml\n│   └── sudbir/\n│       └── questionnaire3.yaml\n```\n\n## Environment variable substitution\n\nTo use environment variables in resources, you can use the syntax `${VAR_NAME}`.\nIn the case of missing environment variable, the exception will be raised.\n\nNOTE: The syntax `$VAR` without braces is not supported because it might be used in resources.\n\n## Supported operations\n\u003e [!IMPORTANT]\n\u003e All created and updated resources persist in runtime only. All changes are vanished after service restart\n\n- **read**, **create** and **update** operations are supported\n- **search** - limied support without any search params\n- `GET /$index` operation returns a map of all resources in format `\u003cresource_type\u003e:\u003cid\u003e`\n\n\n## Usage\n\n1. Organize resources in a directory\n\n### Server\n1. Option A: Run a container\n    ```bash\n    docker run -p 8002:8000 -v ./resources:/app/resources bedasoftware/fhirsnake\n    ```\n2. Option B: Adjust source destination in `Dockerfile.resources` if required\n2.1. Build an image using the base image\n    ```bash\n    docker build -t fhirsnake-resources:latest -f Dockerfile.resources .\n    docker run -p 8000:8000 fhirsnake-resources \n    ```\n\n### Export\n1. Export resources as .json (Bundle) or .ndjson or ndjson.gz\n    ```bash\n    docker run -v ./resources:/app/resources -v ./output:/output bedasoftware/fhirsnake export --external-questionnaire-fce-fhir-converter-url=http://host.docker.internal:3000/to-fhir --output /output/seeds.ndjson.gz\n    ```\n\n### Watch\n1. Watch resources for changes and send as PUT requests to external fhir server\n    ```bash\n    docker run -v ./resources:/app/resources -v ./output:/output bedasoftware/fhirsnake watch --external-fhir-server-url http://host.docker.internal:8080 --external-fhir-server-header \"Authorization: Token token\" --external-questionnaire-fce-fhir-converter-url=http://host.docker.internal:3000/to-fhir\n    ```    \n\n### Using external questionnaire FCE-\u003eFHIR converter\n\nThere's an image `bedasoftware/questionnaire-fce-fhir-converter:latest` available that provides `/to-fhir` endpoint that can be used along with `--external-questionnaire-fce-fhir-converter-url` args for watch and export commands.\n\n   \n## Contribution and feedback\nPlease, use [Issues](https://github.com/beda-software/fhirsnake/issues)\n\n\n## Development\n\n### Format and fix with ruff\n   ```sh\n   ruff format\n   ruff check . --fix\n   ```\n\n### Issue new version - run [semantic release](https://semantic-release.gitbook.io/semantic-release/usage/installation) locally\n   ```sh\n   npx semantic-release --no-ci\n   ```\n\n### Publish to pypi\n   ```sh\n   poetry build\n   poetry publish\n   ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeda-software%2Ffhirsnake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeda-software%2Ffhirsnake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeda-software%2Ffhirsnake/lists"}