Secondary Use FHIR Server Implementation Guide
0.1.0 - ci-build
Publish Box goes here
Start both services with the default ports:
GRADLE_USER_HOME=$PWD/.gradle ./gradlew run --args="--mock-port=8090 --adapter-port=8080 --dataset=hospital --data-dir=data/generated --salt=local-demo-salt"
The process starts:
http://127.0.0.1:8090/fhirhttp://127.0.0.1:8080/fhirHealth checks:
curl http://127.0.0.1:8090/health
curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8090/fhir/metadata
curl http://127.0.0.1:8080/fhir/metadata
Both endpoints return a FHIR R4 CapabilityStatement.
The mock server capability describes a synthetic FHIR source. The adapter capability describes the Bulk-shaped export surface.
Search the mock server directly:
curl http://127.0.0.1:8090/fhir/Patient
curl 'http://127.0.0.1:8090/fhir/Condition?code=34000006&_summary=count'
curl 'http://127.0.0.1:8090/fhir/MedicationStatement?code=386872004&_summary=count'
The mock search endpoint returns a FHIR searchset Bundle. With _summary=count, total is populated and entries are omitted.
curl -i 'http://127.0.0.1:8080/fhir/$export?mode=pseudonymized'
The response is 202 Accepted with Content-Location and Location headers pointing to the job status URL.
Poll the status URL:
curl http://127.0.0.1:8080/fhir/bulk-status/<job-id>
Download an NDJSON file from one of the output[].url values:
curl http://127.0.0.1:8080/fhir/bulk-files/<job-id>/Patient.ndjson
Crohn disease cohort, minimized output, selected types:
curl -i 'http://127.0.0.1:8080/fhir/$export?mode=minimized&condition-code=34000006&_type=Patient,Condition,Observation'
Infliximab cohort:
curl -i 'http://127.0.0.1:8080/fhir/$export?mode=pseudonymized&medication-code=386872004'
Count preview without writing a Bulk job:
curl 'http://127.0.0.1:8080/fhir/$export?_summary=count&condition-code=34000006&_type=Patient,Condition'
After starting both services:
scripts/smoke.sh
Override ports if needed:
MOCK_BASE=http://127.0.0.1:8190 ADAPTER_BASE=http://127.0.0.1:8180 scripts/smoke.sh