HUB
Sign inSign up

samply/test-data-loader

Sponsored OSS

By samply

•Updated over 1 year ago

Image
0

10K+

samply/test-data-loader repository overview

⁠Test data loader

A Docker image that generates test data and loads it into a FHIR store.

The data is generated by bbmri-fhir-gen⁠, according to the BBMRI/GBA FHIR profile⁠.

The following FHIR resource types will be present in the generated data:

  • Patient
  • Observation
  • Condition
  • Specimen
  • Organization (for collection and site)

The user can control the naumber of patients generated. The remaining resources are created in proportion to the number of patients.

⁠Quickstart

The supplied docker-compose.yml file can be used for trying things out. It contains a FHIR store (Blaze) and the test data loader. Start it like this:

docker-compose up

Wait for the test data to finish loading (a couple of minutes). Then try this (in a different console):

curl http://localhost:8080/fhir/Patient

This should return a list of patients known to the store (all 2000 of them).

⁠Configuration

The test data loader is configured using environment variables:

VariableDescriptionDefault
FHIR_STORE_URLHTTP Address of the FHIR storehttp://store:8080/fhir⁠
PATIENT_COUNTNumber of patients to be generated.100
START_DELAYTime in seconds before starting upload.0
USE_BRIDGEHEAD_AUTHUse Bridgehead-specific authorization credentials to access Blaze.false
KEEP_ALIVEKeep the script alive once it has done its work.false
WAIT_FOR_BLAZEWait until blaze is ready before starting upload.false

You can use the START_DELAY variable if you want to wait for something (typically Blaze) to start before running the data load.

If you set USE_BRIDGEHEAD_AUTH to true, then the script will look in /etc/bridgehead, to see if there is a file called ccp.local.conf or similar, and try to extract the authorization credentials for Blaze from there.

If you set KEEP_ALIVE to true, the script will never terminate. This can be useful if you are working in a Bridgehead environemnt, where terminating containers cause the Bridgehead to shut down.

If you set WAIT_FOR_BLAZE to true, the script will poll blaze every second and only start the upload when it is ready.

⁠Building

docker build -t samply/test-data-loader . --no-cache

⁠License

Copyright 2023 The Samply Community Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0⁠ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Tag summary
Recent tags
Content type
Image
Digest
sha256:86c257bb3…
Size
94.3 MB
Last updated
almost 2 years ago
docker pull samply/test-data-loader:latest
This week's pulls