{"id":26522584,"url":"https://github.com/miracum/fhir-gateway","last_synced_at":"2026-01-12T15:29:15.841Z","repository":{"id":37027941,"uuid":"255855749","full_name":"miracum/fhir-gateway","owner":"miracum","description":"A thin layer between FHIR REST clients and resource processing pipelines.","archived":false,"fork":false,"pushed_at":"2026-01-10T12:48:33.000Z","size":2903,"stargazers_count":14,"open_issues_count":9,"forks_count":7,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-10T22:22:29.370Z","etag":null,"topics":["fhir","fhir-api","fhir-server","kafka"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miracum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-15T08:39:31.000Z","updated_at":"2026-01-10T12:47:55.000Z","dependencies_parsed_at":"2025-12-11T08:07:18.666Z","dependency_job_id":null,"html_url":"https://github.com/miracum/fhir-gateway","commit_stats":null,"previous_names":[],"tags_count":175,"template":false,"template_full_name":null,"purl":"pkg:github/miracum/fhir-gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miracum%2Ffhir-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miracum%2Ffhir-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miracum%2Ffhir-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miracum%2Ffhir-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miracum","download_url":"https://codeload.github.com/miracum/fhir-gateway/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miracum%2Ffhir-gateway/sbom","scorecard":{"id":112594,"data":{"date":"2025-08-15T13:06:08Z","repo":{"name":"github.com/miracum/fhir-gateway","commit":"b3f85fb58b816e19bc973325efcd8f06da5b68a8"},"scorecard":{"version":"v5.2.1","commit":"ab2f6e92482462fe66246d9e32f642855a691dc1"},"score":8.3,"checks":[{"name":"Code-Review","score":2,"reason":"Found 4/14 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"21 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#maintained"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: RenovateBot: .renovaterc.json:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dependency-update-tool"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#security-policy"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:   6 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   3 out of   3 third-party GitHubAction dependencies pinned","Info:   3 out of   3 containerImage dependencies pinned","Info:   1 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/ci.yaml:23","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yaml:18","Warn: jobLevel 'packages' permission set to 'write': .github/workflows/ci.yaml:20","Info: jobLevel 'actions' permission set to 'read': .github/workflows/ci.yaml:22","Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/ci.yaml:150","Info: jobLevel 'actions' permission set to 'read': .github/workflows/ci.yaml:151","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yaml:147","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yaml:165","Info: jobLevel 'contents' permission set to 'read': .github/workflows/schedule.yaml:16","Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/schedule.yaml:18","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yaml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/lint-pr-title.yaml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/schedule.yaml:10","Info: topLevel 'contents' permission set to 'read': .github/workflows/scorecard.yaml:19"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":10,"reason":"5 out of the last 5 releases have a total of 5 signed artifacts.","details":["Info: provenance for release artifact: ghcr.io-miracum-fhir-gateway-v3.14.15.intoto.jsonl: https://github.com/miracum/fhir-gateway/releases/tag/v3.14.15","Info: provenance for release artifact: ghcr.io-miracum-fhir-gateway-v3.14.14.intoto.jsonl: https://github.com/miracum/fhir-gateway/releases/tag/v3.14.14","Info: provenance for release artifact: ghcr.io-miracum-fhir-gateway-v3.14.13.intoto.jsonl: https://github.com/miracum/fhir-gateway/releases/tag/v3.14.13","Info: provenance for release artifact: ghcr.io-miracum-fhir-gateway-v3.14.12.intoto.jsonl: https://github.com/miracum/fhir-gateway/releases/tag/v3.14.12","Info: provenance for release artifact: ghcr.io-miracum-fhir-gateway-v3.14.11.intoto.jsonl: https://github.com/miracum/fhir-gateway/releases/tag/v3.14.11"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (20) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#sast"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during GetBranch(beta): error during branchesHandler.query: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#branch-protection"}},{"name":"CI-Tests","score":10,"reason":"20 out of 20 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#ci-tests"}},{"name":"Contributors","score":3,"reason":"project has 1 contributing companies or organizations -- score normalized to 3","details":["Info: found contributions from: semantic-release"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#contributors"}}]},"last_synced_at":"2025-08-15T13:18:15.024Z","repository_id":37027941,"created_at":"2025-08-15T13:18:15.024Z","updated_at":"2025-08-15T13:18:15.024Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["fhir","fhir-api","fhir-server","kafka"],"created_at":"2025-03-21T13:36:46.944Z","updated_at":"2026-01-12T15:29:15.822Z","avatar_url":"https://github.com/miracum.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FHIR Gateway\n\n![License](https://img.shields.io/github/license/miracum/fhir-gateway)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/miracum/fhir-gateway/badge)](https://scorecard.dev/viewer/?uri=github.com/miracum/fhir-gateway)\n[![SLSA 3](https://slsa.dev/images/gh-badge-level3.svg)](https://slsa.dev)\n\nA thin layer between FHIR REST clients and resource processing pipelines.\n\n## Overview\n\n![Overview](docs/img/overview.png \"Overview\")\n\n## Run it\n\nThe recommended deployment is on Kubernetes. See \u003chttps://github.com/miracum/charts/tree/master/charts/fhir-gateway\u003e for\na Helm Chart.\n\nAn example for deploying using (Docker) Compose can be found in the [deploy folder](./deploy/README.md).\n\nAlso see the now archived \u003chttps://github.com/num-codex/num-knoten\u003e for an example end-to-end deployment.\n\n## Configuration\n\nTo configure your deployment, you can change the following environment variables:\n\n| Variable                                                        | Description                                                                                                                                                                                                                                                                                                                          | Default                                   |\n|-----------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|\n| SPRING_DATASOURCE_URL                                           | JDBC URL of the Postgres DB to store the received FHIR resources, needs to be set to an empty variable if no PSQL db is to be connected to                                                                                                                                                                                           | jdbc:postgresql://fhir-db:5432/fhir       |\n| SPRING_DATASOURCE_USERNAME                                      | Username of the Postgres DB                                                                                                                                                                                                                                                                                                          | postgres                                  |\n| SPRING_DATASOURCE_PASSWORD                                      | Password for the Postgres DB                                                                                                                                                                                                                                                                                                         | postgres                                  | \n| SERVICES_LOINC_CONVERSIONS_ENABLED                              | Wether LOINC harmonization should be enabled                                                                                                                                                                                                                                                                                         | false                                     |\n| SERVICES_LOINC_CONVERSIONS_URL                                  | URL of the [LOINC conversion service](https://github.com/miracum/loinc-conversion)                                                                                                                                                                                                                                                   | \u003chttp://loinc-converter:8080/conversions\u003e |\n| SERVICES_PSEUDONYMIZER_ENABLED                                  | Whether pseudonymization should be enabled.                                                                                                                                                                                                                                                                                          | false                                     |\n| SERVICES_PSEUDONYMIZER_URL                                      | URL of the [FHIR Pseudonymizer service](https://github.com/miracum/fhir-pseudonymizer)                                                                                                                                                                                                                                               | \u003chttp://fhir-pseudonymizer:8080/fhir\u003e     |\n| SERVICES_FHIRSERVER_ENABLED                                     | Wether storing resources in a downstream FHIR Server should be enabled                                                                                                                                                                                                                                                               | false                                     |\n| SERVICES_FHIRSERVER_URL                                         | URL of the FHIR server to send data to                                                                                                                                                                                                                                                                                               | \u003chttp://fhir-server:8080/fhir\u003e            |\n| SERVICES_FHIRSERVER_AUTH_BASIC_ENABLED                          | Enable HTTP basic auth for sending data to FHIR server                                                                                                                                                                                                                                                                               | false                                     |\n| SERVICES_FHIRSERVER_AUTH_BASIC_USERNAME                         | HTTP basic auth username of the FHIR server to send data to                                                                                                                                                                                                                                                                          | `\"\"`                                      |\n| SERVICES_FHIRSERVER_AUTH_BASIC_PASSWORD                         | HTTP basic auth password of the FHIR server to send data to                                                                                                                                                                                                                                                                          | `\"\"`                                      |\n| SERVICES_PSQL_ENABLED                                           | Wether storing resources in a PostgreSQL database should be enabled                                                                                                                                                                                                                                                                  | false                                     |\n| SERVICES_KAFKA_ENABLED                                          | Wether Kafka should be enabled. Note Kafka options below                                                                                                                                                                                                                                                                             | false                                     |\n| SERVICES_KAFKA_PROCESSOR_ENABLED                                | Enable reading FHIR resources from, and writing them back to a Kafka cluster                                                                                                                                                                                                                                                         | false                                     |\n| SERVICES_KAFKA_PROCESSOR_GENERATE_OUTPUT_TOPIC_MATCH_EXPRESSION | Allows for dynamically generating the Kafka output topic's name based on the input topic. Used to set a regular expression which is applied to the input topic and the first match is replaced with the value of `SERVICES_KAFKA_GENERATE_OUTPUT_TOPIC_REPLACE_WITH`. You can set this to `\"^\"` to add a prefix to the output topic. | `\"\"`                                      |\n| SERVICES_KAFKA_PROCESSOR_CONSUME_ONLY                           | Only reads FHIR resources from a Kafka cluster without writing them back                                                                                                                                                                                                                                                             | false                                     |\n| SERVICES_KAFKA_STORE_FROM_API_ENABLED                           | Wether storing resources in a Kafka topic should be enabled (only applicable for resources received by the FHIR Gateway's FHIR REST API                                                                                                                                                                                              | false                                     |\n| SERVICES_KAFKA_STORE_FROM_API_OUTPUT_TOPIC                      | Name of the topic where resources received from API should be written to                                                                                                                                                                                                                                                             | fhir.gateway.ouput                        |\n\nFor the Kafka configuration and other configuration options,\nsee [application.yml](src/main/resources/application.yml).\n\n### Running without database persistence\n\nBy default, the FHIR gateway persists any received FHIR resource in a PostgreSQL database.\nTo run without persistence, the following variables both need to be set:\n\n- `SPRING_SERVICE_PSQL_ENABLED=\"false\"`\n- `SPRING_SQL_INIT_MODE=\"never\"`\n\nthis allows the gateway to start without the database.\n\n## Supported Operations\n\nThe FHIR Gateway is not a fully-fledged FHIR server and only supports a subset of the RESTful server\ninteractions.\n\n### POST/PUT\n\nThe Gateway only supports persisting resources that are HTTP POSTed as FHIR Bundles using\nthe [update-as-create](https://www.hl7.org/fhir/http.html#upsert) semantics.\nSee [bundle.json](tests/e2e/data/bundle.json) for an example.\n\n### DELETE\n\nFHIR Bundles containing `DELETE` requests are also handled and will result in deleting the resource\nspecified in the request URL. Note that the resources are marked as `is_deleted` in the Gateway's\nPostgreSQL DB instead of being physically deleted.\n\nNote that neither conditional creates nor deletes are supported. While this works:\n\n```json\n{\n  \"request\": {\n    \"method\": \"DELETE\",\n    \"url\": \"Patient/234\"\n  }\n}\n```\n\nThis does not:\n\n```json\n{\n  \"request\": {\n    \"method\": \"DELETE\",\n    \"url\": \"Patient?identifier=123456\"\n  }\n}\n```\n\n## Development\n\nStart all fixtures to run the FHIR GW:\n\n```sh\ndocker compose \\\n  -f dev/docker-compose.dev.yml \\\n  -f dev/docker-compose.gw-deps.yml \\\n  -f dev/docker-compose.exposed.yml up\n```\n\nThis contains a few optional services: Kafka, a FHIR server, FHIR Pseudonymizer, Vfps. You might simplify the\ndocker-compose.dev.yml and only include relevant components for development.\n\nRun the FHIR Gateway from your terminal:\n\n```sh\n./gradlew :bootRun\n```\n\nBy default, this runs using Kafka as a source of FHIR resources to process. You can view the generated Kafka topics\nat \u003chttp://localhost:9000/ui/kafka/topic\u003e.\n\n## Database Tuning\n\n### Partitioning\n\nIf the size of the `resources` table is expected to grow significantly, you can leverage\npartitioning to split the stored resources by type. Run the following **before** starting the\nFHIR-Gateway to create the `resources` table with partitions for the most common resource types:\n\n```postgresql\nCREATE TABLE resources (\n    id              SERIAL,\n    fhir_id         VARCHAR(64) NOT NULL,\n    type            VARCHAR(64) NOT NULL,\n    data            JSONB       NOT NULL,\n    created_at      TIMESTAMP   NOT NULL DEFAULT NOW(),\n    last_updated_at TIMESTAMP   NOT NULL DEFAULT NOW(),\n    is_deleted      BOOLEAN     NOT NULL DEFAULT FALSE,\n    CONSTRAINT fhir_id_unique UNIQUE (fhir_id, type)\n) PARTITION BY LIST (type);\n\nCREATE TABLE resources_patient PARTITION OF resources FOR VALUES IN ('Patient');\nCREATE TABLE resources_encounter PARTITION OF resources FOR VALUES IN ('Encounter');\nCREATE TABLE resources_condition PARTITION OF resources FOR VALUES IN ('Condition');\nCREATE TABLE resources_observation PARTITION OF resources FOR VALUES IN ('Observation');\nCREATE TABLE resources_medication PARTITION OF resources FOR VALUES IN ('Medication');\nCREATE TABLE resources_medication_statement PARTITION OF resources FOR VALUES IN ('MedicationStatement');\nCREATE TABLE resources_medication_administration PARTITION OF resources FOR VALUES IN ('MedicationAdministration');\nCREATE TABLE resources_procedure PARTITION OF resources FOR VALUES IN ('Procedure');\nCREATE TABLE resources_others PARTITION OF resources DEFAULT;\n\nCREATE INDEX resource_id_idx ON resources (id);\nCREATE INDEX resource_type_idx ON resources (type);\nCREATE INDEX last_updated_at_idx ON resources (last_updated_at DESC);\n```\n\nBe sure to set `SPRING_SQL_INIT_MODE=never` before starting the FHIR GW.\n\nThis isn't part of the default initialization schema, but may become the default as part of the next\nmajor release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiracum%2Ffhir-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiracum%2Ffhir-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiracum%2Ffhir-gateway/lists"}