43.1.1smileutil: Bulk Import
Trial

 

The 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.

43.1.2Usage
Trial

 
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/

43.1.3Options
Trial

 
  • -v [version] (or --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 NDJSON-formatted files and process them. The files can be in compressed or uncompressed format. The files that will be processed must have one of the following filename extensions: [.json, .ndjson, .json.gz, .ndjson.gz] IMPORTANT: The smileutil will throw a DataFormatException if any of the files in this directory are not NDJSON-formatted!

  • --target-base [base URL] – The base URL of the target FHIR server.

  • -b [username:password] (or --basic-auth [username:password]) – (optional) If specified, provides a username and password that will be supplied to the server in an HTTP Basic Authorization header 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 Authorization header. If the value supplied is "PROMPT", smileutil will prompt the user to enter a bearer token interactively.