Learn how to load FHIR resources and terminology into FHIRLab Core.
The load-data.sh script uploads example FHIR R4 resources to the server:
./scripts/load-data.shThis loads a variety of example resources including:
- Patients
- Practitioners
- Organizations
- Observations
- Conditions
- Medications
- And more...
The script uses the HAPI FHIR CLI bundled inside the Docker container. No local installation is needed. Reference: HAPI FHIR CLI Documentation
Upload custom terminology files (CodeSystems, ValueSets):
./scripts/upload-terminology.sh <path-to-file>The script copies your file into the Docker container and uses the bundled HAPI FHIR CLI to upload it.
- CodeSystem resources (JSON or XML)
- ValueSet resources (JSON or XML)
- FHIR Bundles containing terminology resources
# Upload a custom CodeSystem
./scripts/upload-terminology.sh ./my-codesystem.json
# Upload a ValueSet
./scripts/upload-terminology.sh ./my-valueset.xmlReference: HAPI FHIR CLI - Upload Terminology
You can also load data directly using the FHIR REST API.
curl -X POST http://localhost:8080/fhir/Patient \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Patient",
"name": [{"family": "Smith", "given": ["John"]}]
}'curl -X POST http://localhost:8080/fhir \
-H "Content-Type: application/fhir+json" \
-d @my-bundle.jsonSnowstorm requires SNOMED CT RF2 release files. Due to licensing requirements, these are not included.
- Register at SNOMED International
- Download the RF2 release files
- Follow the Snowstorm import documentation
Note: SNOMED CT usage requires appropriate licensing. FHIRLab Core uses Snowstorm to avoid licensing issues with the server itself, but content still requires proper licensing.
# List all patients
curl http://localhost:8080/fhir/Patient
# Count observations
curl "http://localhost:8080/fhir/Observation?_summary=count"# List CodeSystems
curl http://localhost:8080/fhir/CodeSystem
# List ValueSets
curl http://localhost:8080/fhir/ValueSetTo remove all data and start fresh:
./scripts/reset.shThis removes all FHIR resources, terminology, and Elasticsearch data.