Skip to content

DQM CLI Reference

Command-line tool for validation, test message generation, and partner management

Overview
The dqm CLI connects to your on-premises DQM API server

The DQM CLI provides terminal access to the most common DQM workflows — running connectivity validation, generating test messages, reviewing partner scores, and triggering scorecard reports. It requires network access to your DQM server and an API token. No external internet calls are made.

Python 3.10+Any OS with pipOn-prem only
Installation
Install via pip from your package source

From PyPI / internal package index

pip install dqm-cli

Verify installation

dqm --version
The CLI works fully offline — it only contacts your internal DQM server, never the public internet. Suitable for air-gapped environments when installed from a local package mirror.
Configuration
Point the CLI at your DQM server before first use

The CLI stores configuration in ~/.dqm/config.json. Run these commands once after installation:

# Set your DQM server URL
dqm config set-server https://dqm.your-hie.internal

# Authenticate with an API token (obtain from Settings → API Tokens)
dqm config set-token <your-api-token>

# Confirm the connection
dqm config show

Environment variable override

export DQM_SERVER=https://dqm.your-hie.internal
export DQM_TOKEN=<your-api-token>
Commands
Available commands and their subcommands
dqm configManage CLI configuration (server URL, auth token, output format).
dqm config set-server <url>Set the DQM API server URL
dqm config set-token <token>Store an API bearer token
dqm config showPrint current configuration
dqm validateRun connectivity validation against a partner endpoint.
dqm validate <partner-code>Run all validation checks for a partner
dqm validate <partner-code> --stage tlsRun only the TLS stage
dqm validate <partner-code> --jsonOutput results as JSON
dqm generateGenerate synthetic test messages for a partner.
dqm generate <partner-code> --type ADT --count 10Generate 10 ADT messages
dqm generate <partner-code> --error-rate 0.2Inject 20% synthetic errors
dqm generate <partner-code> --format fhirGenerate FHIR R4 resources
dqm partnerView and manage trading partners.
dqm partner listList all trading partners with status
dqm partner show <code>Show partner detail and latest scores
dqm partner scores <code>Print recent quality scores
dqm onboardRun the guided partner onboarding flow from the terminal.
dqm onboard --interactiveStart the interactive onboarding wizard
dqm onboard --file partner.jsonOnboard from a JSON config file
dqm reportGenerate and send partner quality reports.
dqm report send <partner-code>Send an on-demand scorecard email
dqm report preview <partner-code>Preview the scorecard HTML locally
First Run Walkthrough
Verify your setup with a simple end-to-end check
# 1. List all trading partners
dqm partner list

# 2. Run connectivity validation on a partner
dqm validate NORTHWELL

# 3. Generate 5 ADT test messages with 10% error injection
dqm generate NORTHWELL --type ADT --count 5 --error-rate 0.1

# 4. Check the resulting quality scores
dqm partner scores NORTHWELL

# 5. Send an on-demand scorecard report
dqm report send NORTHWELL

All commands accept --help for full option reference. Use --json on most commands for machine-readable output suitable for scripting.