pseudonymous

June 25, 2025 · View on GitHub

MegaLinter go docker codecov

Pseudonymize FHIR🔥 resources from and to MongoDB databases

This is a command line tool to run pseudonymization / anonymization on FHIR resources via the FHIR® Pseudonymizer. It currently supports reading from a MongoDB database. Data from all collections are send to the FHIR pseudonymization service and written back to a target database and its collections accordingly.

Usage

The project name is the only required command line flag to provide when running the tool. It is used by convention as a suffix to determine the source database (idat_fhir_[project]). The target database name is set to psn_fhir_[project].

Configuration properties are set via a YAML file which defaults to app.yaml.

Usage:
  pseudonymous [flags]

Flags:
  -c, --config string    config file (default is ./app.yaml)
  -h, --help             help for pseudonymous
  -p, --project string   project name (required)

Installation

Binary releases and docker images are available under releases.

Configuration properties

NameDefaultDescription
app.log-levelinfoLog level (error,warn,info,debug)
app.concurrency5Number of concurrent threads
gpas.domainsexample:
- patient: PATIENT
- encounter: ENC
gPAS domain names and (part) prefix for auto-creating domains
gpas.urlURL to the gPAS SOAP service for auto-creating domains
gpas.auth.basic.usernameBasicAuth username for the gPAS SOAP endpoint
gpas.auth.basic.passwordBasicAuth password for the gPAS SOAP endpoint
fhir.provider.mongodb.connectionmongodb://localhostMongoDB connection string
fhir.provider.mongodb.batch-size5000Batch size when reading data from the source database
fhir.pseudonymizer.urlhttp://localhost:5000/fhirFHIR® Pseudonymizer endpoint url
fhir.pseudonymizer.auth.basic.usernameBasicAuth username for the FHIR® Pseudonymizer endpoint
fhir.pseudonymizer.auth.basic.passwordBasicAuth password for the FHIR® Pseudonymizer endpoint
fhir.pseudonymizer.retry.count10Retry count
fhir.pseudonymizer.retry.timeout10Retry timeout
fhir.pseudonymizer.retry.wait5Retry wait between retries
fhir.pseudonymizer.retry.max-wait20Retry maximum wait

Environment variables

Override configuration properties by providing environment variables with their respective names. Upper case env variables are supported as well as underscores (_) instead of . and -.

License

AGPL-3.0