bulk-import command uses the FHIR Bulk Data Access
$import operation to upload data to a HAPI FHIR / Smile CDR server with Bulk Import functionality enabled.
See FHIR Bulk Import for a description of this operation.
bin/smileutil bulk-import --fhir-version r4 --port 9999 --source-directory /path/to/files --source-base http://my-ip:9999 --target-base https://example.com/target/fhir/
--fhir-version [version]) – (optional) The version of FHIR supported by the server.
--port [port]– The port to listen on. If set to 0, an available free port will be selected.
--source-base [base URL]– (optional) The URL to advertise as the base URL for the HTTP server created by this command for the purpose of accessing the files (i.e. this is the address that this command will declare that it is listening on). If not present, the server will default to "http://localhost:[port]" which will only work if the server is on the same host as the target server.
--source-directory [directory]– The source directory. This directory will be scanned for files with an extension of .json or .ndjson and any files in this directory will be assumed to be NDJSON and uploaded. This command will read the first resource from each file to verify its resource type, and will assume that all resources in the file are of the same type.
--target-base [base URL]– The base URL of the target FHIR server.
--basic-auth [username:password]) – (optional) If specified, provides a username and password that will be supplied to the server in an HTTP Basic
Authorizationheader in the form of
"username:password". If the value supplied is "
PROMPT", smileutil will prompt the user to enter credentials interactively.
--bearer-token [token]– (optional) If specified, provides a bearer token that will be supplied to the server in an HTTP
Authorizationheader. If the value supplied is "
PROMPT", smileutil will prompt the user to enter a bearer token interactively.