Command Line Interface (CLI)

The package installs an imednet command that wraps common SDK features. The CLI reads authentication details from environment variables (or runs completely offline against synthetic SimulationTransport fixtures when --simulation or IMEDNET_SIMULATION_MODE=true is passed). Every Study-scoped command across core, datadict from-api, export, workflows, and tui accepts either a positional STUDY argument or -s / --study-key STUDY (passing conflicting values exits with status code 2). See Configuration for the full list of environment variables and details on using an .env file.

iMednet SDK Command Line Interface

usage: imednet [-h] [--high-contrast] [--no-interactive] [--simulation]
               {datadict,studies,queries,variables,record-revisions,sites,export,subjects,intervals,jobs,records,forms,visits,codings,users,tui,subject-data,workflows}
               ...

Positional Arguments

command

Possible choices: datadict, studies, queries, variables, record-revisions, sites, export, subjects, intervals, jobs, records, forms, visits, codings, users, tui, subject-data, workflows

Named Arguments

--high-contrast

Enable high-contrast mode for accessibility.

Default: False

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

Default: False

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

Default: False

Sub-commands

datadict

Manage, transform, and validate study data dictionaries.

imednet datadict [-h]
                 {from-csv,from-odm,to-odm,from-redcap,from-api,validate,diff,schema}
                 ...

Positional Arguments

datadict_command

Possible choices: from-csv, from-odm, to-odm, from-redcap, from-api, validate, diff, schema

Sub-commands

from-csv

Compile canonical JSON data dictionary from CSV directory or ZIP archive.

imednet datadict from-csv [-h] [-o OUTPUT] [--study-key STUDY_KEY] [--strict]
                          [--no-raw-xml]
                          path
Positional Arguments
path

Path to directory or ZIP archive containing the 4 data dictionary CSV files.

Named Arguments
-o, --output

Destination JSON file path (default: stdout).

--study-key

Optional study key identifier override.

--strict

Fail fast on unknown columns, unreferenced forms, or format issues.

Default: False

--no-raw-xml

Omit verbatim XML strings from business logic rules.

Default: False

from-odm

Compile canonical JSON data dictionary from CDISC ODM 1.3 XML file.

imednet datadict from-odm [-h] [-o OUTPUT] [--study-key STUDY_KEY] [--strict]
                          [--no-raw-xml] [--archive]
                          path
Positional Arguments
path

Path to CDISC ODM XML file.

Named Arguments
-o, --output

Destination JSON file path (default: stdout).

--study-key

Optional study key identifier override.

--strict

Fail fast on unknown elements, unreferenced definitions, or format issues.

Default: False

--no-raw-xml

Omit verbatim XML strings from business logic rules.

Default: False

--archive

Parse full ODM 1.3.2 archive including AdminData, ReferenceData, and ClinicalData.

Default: False

to-odm

Export data dictionary to CDISC ODM 1.3 XML format.

imednet datadict to-odm [-h] [-o OUTPUT] [--file-oid FILE_OID] file
Positional Arguments
file

Path to data dictionary source (.json, .xml, .csv REDCap, .zip CSV archive, or CSV directory) to export.

Named Arguments
-o, --output

Destination XML file path (default: stdout).

--file-oid

Optional ODM FileOID attribute override.

from-redcap

Compile canonical JSON data dictionary from REDCap CSV file.

imednet datadict from-redcap [-h] [-o OUTPUT] [--study-key STUDY_KEY]
                             [--strict] [--no-raw-xml]
                             path
Positional Arguments
path

Path to REDCap data dictionary CSV file.

Named Arguments
-o, --output

Destination JSON file path (default: stdout).

--study-key

Optional study key identifier override.

--strict

Fail fast on unknown columns, unreferenced forms, or format issues.

Default: False

--no-raw-xml

Omit verbatim XML strings.

Default: False

from-api

Extract study forms and variables from live iMednet REST API.

imednet datadict from-api [-h] [-s STUDY_KEY_FLAG] [-o OUTPUT] [--no-raw-xml]
                          [--simulation]
                          [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

Study key identifier to query.

-o, --output

Destination JSON file path (default: stdout).

--no-raw-xml

Omit verbatim XML strings.

Default: False

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

validate

Validate a data dictionary source against model and schema rules.

imednet datadict validate [-h] [--schema SCHEMA] [--format {text,json}] file
Positional Arguments
file

Path to data dictionary source (.json, .xml, .csv REDCap, .zip CSV archive, or CSV directory) to validate.

Named Arguments
--schema

Optional path to custom JSON schema file for validation.

--format

Possible choices: text, json

Output format: text or json (default: text).

diff

Compare two data dictionary sources structurally.

imednet datadict diff [-h] [--format {text,json,md}] old new
Positional Arguments
old

Baseline data dictionary (.json, .xml, .csv REDCap, .zip CSV archive, or CSV dir).

new

Updated data dictionary (.json, .xml, .csv REDCap, .zip CSV archive, or CSV dir).

Named Arguments
--format

Possible choices: text, json, md

Output format: text, json, or md (default: text).

schema

Export the canonical JSON Schema for data dictionaries.

imednet datadict schema [-h] [-o OUTPUT]
Named Arguments
-o, --output

Destination path for schema JSON file (default: stdout).

studies

Manage studies.

imednet studies [-h] {list} ...

Positional Arguments

command

Possible choices: list

Sub-commands

list

List all items of type studies.

imednet studies list [-h] [--format {table,json}] [--no-interactive]
                     [--simulation] [--mask-phi | --no-mask-phi]
                     [-f FILTER_ARGS] [--sort SORT] [--limit LIMIT] [--all]
Named Arguments
--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--mask-phi, --no-mask-phi

Mask sensitive clinical PHI fields with *MASKED* (default: enabled).

Default: True

-f, --filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors. Repeat for multiple AND filters.

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

queries

Manage queries.

imednet queries [-h] {list} ...

Positional Arguments

command

Possible choices: list

Sub-commands

list

List all items of type queries.

imednet queries list [-h] [--format {table,json}] [--no-interactive]
                     [--simulation] [--mask-phi | --no-mask-phi]
                     [-s STUDY_KEY_FLAG]
                     [--status {OPEN,ANSWERED,CLOSED,CANCELLED}]
                     [-f FILTER_ARGS] [--sort SORT] [--limit LIMIT] [--all]
                     [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--mask-phi, --no-mask-phi

Mask sensitive clinical PHI fields with *MASKED* (default: enabled).

Default: True

-s, --study-key

The key identifying the study.

--status

Possible choices: OPEN, ANSWERED, CLOSED, CANCELLED

Filter queries locally by lifecycle status (OPEN, ANSWERED, CLOSED, CANCELLED).

-f, --filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors. Repeat for multiple AND filters.

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

variables

Manage variables.

imednet variables [-h] {list} ...

Positional Arguments

command

Possible choices: list

Sub-commands

list

List all items of type variables.

imednet variables list [-h] [--format {table,json}] [--no-interactive]
                       [--simulation] [--mask-phi | --no-mask-phi]
                       [-s STUDY_KEY_FLAG] [-f FILTER_ARGS] [--sort SORT]
                       [--limit LIMIT] [--all]
                       [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--mask-phi, --no-mask-phi

Mask sensitive clinical PHI fields with *MASKED* (default: enabled).

Default: True

-s, --study-key

The key identifying the study.

-f, --filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors. Repeat for multiple AND filters.

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

record-revisions

Manage record revisions.

imednet record-revisions [-h] {list} ...

Positional Arguments

command

Possible choices: list

Sub-commands

list

List all items of type record revisions.

imednet record-revisions list [-h] [--format {table,json}] [--no-interactive]
                              [--simulation] [--mask-phi | --no-mask-phi]
                              [-s STUDY_KEY_FLAG] [-o OUTPUT]
                              [--start-date START_DATE] [--end-date END_DATE]
                              [-f FILTER_ARGS] [--sort SORT] [--limit LIMIT]
                              [--all]
                              [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--mask-phi, --no-mask-phi

Mask sensitive clinical PHI fields with *MASKED* (default: enabled).

Default: True

-s, --study-key

The key identifying the study.

-o, --output

Save record revisions to a CSV or JSON file (csv, json, or a .csv/.json path).

--start-date

Inclusive lower UTC date or ISO-8601 timestamp bound for dateCreated.

--end-date

Inclusive upper UTC date or ISO-8601 timestamp bound for dateCreated.

-f, --filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors. Repeat for multiple AND filters.

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

sites

Manage sites.

imednet sites [-h] {list} ...

Positional Arguments

command

Possible choices: list

Sub-commands

list

List all items of type sites.

imednet sites list [-h] [--format {table,json}] [--no-interactive]
                   [--simulation] [--mask-phi | --no-mask-phi]
                   [-s STUDY_KEY_FLAG] [-f FILTER_ARGS] [--sort SORT]
                   [--limit LIMIT] [--all]
                   [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--mask-phi, --no-mask-phi

Mask sensitive clinical PHI fields with *MASKED* (default: enabled).

Default: True

-s, --study-key

The key identifying the study.

-f, --filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors. Repeat for multiple AND filters.

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

export

Export study data to various formats.

imednet export [-h]
               {parquet,csv,excel,json,odm,dataset-json,dataset_json,duckdb,sql,mongodb,neo4j,snowflake}
               ...

Positional Arguments

command

Possible choices: parquet, csv, excel, json, odm, dataset-json, dataset_json, duckdb, sql, mongodb, neo4j, snowflake

Sub-commands

parquet

Export study records to a Parquet file.

imednet export parquet [-h] [-s STUDY_KEY_FLAG] [--simulation] [--use-labels]
                       [--since SINCE] [--filter FILTERS]
                       [--record-data-filter RECORD_DATA_FILTER]
                       [--incremental] [--include-deleted]
                       [--stream-name STREAM_NAME] [--ledger-path LEDGER_PATH]
                       [--mask-phi] [--no-mask-phi] [--quality-gate]
                       [--no-quality-gate]
                       [--min-readiness-score MIN_SCHEMA_READINESS_SCORE]
                       [--as-sdtm] [--sdtm-domain SDTM_DOMAIN]
                       [--standards-profile {biologic,device,drug,general,vaccine}]
                       [--min-standards-score MIN_STANDARDS_SCORE]
                       [--naming-convention {snake_case,camelCase,sdtm}]
                       [--no-interactive]
                       [study_key] path
Positional Arguments
study_key

The key identifying the study.

path

Destination Parquet file.

Named Arguments
-s, --study-key

The key identifying the study.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--use-labels

Use variable labels instead of names as column headers.

Default: False

--since

Export records modified on or after this ISO-8601 timestamp or date.

--filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors (e.g. ‘subjectKey==SUBJ-01’). Repeatable.

--record-data-filter

Clinical variable recordDataFilter expression using ==, !=, <, <=, >, >=, =~ (e.g. ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--incremental

Read and commit incremental high-water mark checkpoints via state ledger.

Default: False

--include-deleted

Include voided (deleted=True) records in export output.

Default: False

--stream-name

Optional checkpoint stream identifier.

--ledger-path

Optional file path for file-backed checkpoint state ledger.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

--quality-gate

Enable opt-in pre-write Record schema readiness quality gate filtering (disabled by default).

--no-quality-gate

Disable pre-write Record schema readiness quality gate filtering.

Default: True

--min-readiness-score

Minimum Record schema readiness score (0-100) when quality gate is enabled.

--as-sdtm

Transform exported study records into CDISC SDTM domain format.

Default: False

--sdtm-domain, --domain

Target CDISC SDTM domain code (e.g. AE, DM, VS, LB, CM, EX, MH, DV, DD); implies –as-sdtm.

--standards-profile

Possible choices: biologic, device, drug, general, vaccine

CDISC standards readiness profile used to validate study batches.

--min-standards-score

Minimum CDISC StandardsReadinessValidator score (0-100) required per batch.

--naming-convention

Possible choices: snake_case, camelCase, sdtm

Variable and metadata key naming convention when –as-sdtm is off.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

csv

Export study records to a CSV file.

imednet export csv [-h] [-s STUDY_KEY_FLAG] [--simulation] [--use-labels]
                   [--since SINCE] [--filter FILTERS]
                   [--record-data-filter RECORD_DATA_FILTER] [--incremental]
                   [--include-deleted] [--stream-name STREAM_NAME]
                   [--ledger-path LEDGER_PATH] [--mask-phi] [--no-mask-phi]
                   [--quality-gate] [--no-quality-gate]
                   [--min-readiness-score MIN_SCHEMA_READINESS_SCORE]
                   [--as-sdtm] [--sdtm-domain SDTM_DOMAIN]
                   [--standards-profile {biologic,device,drug,general,vaccine}]
                   [--min-standards-score MIN_STANDARDS_SCORE]
                   [--naming-convention {snake_case,camelCase,sdtm}]
                   [--no-interactive]
                   [study_key] path
Positional Arguments
study_key

The key identifying the study.

path

Destination CSV file.

Named Arguments
-s, --study-key

The key identifying the study.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--use-labels

Use variable labels instead of names as column headers.

Default: False

--since

Export records modified on or after this ISO-8601 timestamp or date.

--filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors (e.g. ‘subjectKey==SUBJ-01’). Repeatable.

--record-data-filter

Clinical variable recordDataFilter expression using ==, !=, <, <=, >, >=, =~ (e.g. ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--incremental

Read and commit incremental high-water mark checkpoints via state ledger.

Default: False

--include-deleted

Include voided (deleted=True) records in export output.

Default: False

--stream-name

Optional checkpoint stream identifier.

--ledger-path

Optional file path for file-backed checkpoint state ledger.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

--quality-gate

Enable opt-in pre-write Record schema readiness quality gate filtering (disabled by default).

--no-quality-gate

Disable pre-write Record schema readiness quality gate filtering.

Default: True

--min-readiness-score

Minimum Record schema readiness score (0-100) when quality gate is enabled.

--as-sdtm

Transform exported study records into CDISC SDTM domain format.

Default: False

--sdtm-domain, --domain

Target CDISC SDTM domain code (e.g. AE, DM, VS, LB, CM, EX, MH, DV, DD); implies –as-sdtm.

--standards-profile

Possible choices: biologic, device, drug, general, vaccine

CDISC standards readiness profile used to validate study batches.

--min-standards-score

Minimum CDISC StandardsReadinessValidator score (0-100) required per batch.

--naming-convention

Possible choices: snake_case, camelCase, sdtm

Variable and metadata key naming convention when –as-sdtm is off.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

excel

Export study records to an Excel workbook.

imednet export excel [-h] [-s STUDY_KEY_FLAG] [--simulation] [--use-labels]
                     [--since SINCE] [--filter FILTERS]
                     [--record-data-filter RECORD_DATA_FILTER] [--incremental]
                     [--include-deleted] [--stream-name STREAM_NAME]
                     [--ledger-path LEDGER_PATH] [--mask-phi] [--no-mask-phi]
                     [--quality-gate] [--no-quality-gate]
                     [--min-readiness-score MIN_SCHEMA_READINESS_SCORE]
                     [--as-sdtm] [--sdtm-domain SDTM_DOMAIN]
                     [--standards-profile {biologic,device,drug,general,vaccine}]
                     [--min-standards-score MIN_STANDARDS_SCORE]
                     [--naming-convention {snake_case,camelCase,sdtm}]
                     [--no-interactive]
                     [study_key] path
Positional Arguments
study_key

The key identifying the study.

path

Destination Excel workbook.

Named Arguments
-s, --study-key

The key identifying the study.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--use-labels

Use variable labels instead of names as column headers.

Default: False

--since

Export records modified on or after this ISO-8601 timestamp or date.

--filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors (e.g. ‘subjectKey==SUBJ-01’). Repeatable.

--record-data-filter

Clinical variable recordDataFilter expression using ==, !=, <, <=, >, >=, =~ (e.g. ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--incremental

Read and commit incremental high-water mark checkpoints via state ledger.

Default: False

--include-deleted

Include voided (deleted=True) records in export output.

Default: False

--stream-name

Optional checkpoint stream identifier.

--ledger-path

Optional file path for file-backed checkpoint state ledger.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

--quality-gate

Enable opt-in pre-write Record schema readiness quality gate filtering (disabled by default).

--no-quality-gate

Disable pre-write Record schema readiness quality gate filtering.

Default: True

--min-readiness-score

Minimum Record schema readiness score (0-100) when quality gate is enabled.

--as-sdtm

Transform exported study records into CDISC SDTM domain format.

Default: False

--sdtm-domain, --domain

Target CDISC SDTM domain code (e.g. AE, DM, VS, LB, CM, EX, MH, DV, DD); implies –as-sdtm.

--standards-profile

Possible choices: biologic, device, drug, general, vaccine

CDISC standards readiness profile used to validate study batches.

--min-standards-score

Minimum CDISC StandardsReadinessValidator score (0-100) required per batch.

--naming-convention

Possible choices: snake_case, camelCase, sdtm

Variable and metadata key naming convention when –as-sdtm is off.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

json

Export study records to a JSON file.

imednet export json [-h] [-s STUDY_KEY_FLAG] [--simulation] [--use-labels]
                    [--hierarchical] [--since SINCE] [--filter FILTERS]
                    [--record-data-filter RECORD_DATA_FILTER] [--incremental]
                    [--include-deleted] [--stream-name STREAM_NAME]
                    [--ledger-path LEDGER_PATH] [--mask-phi] [--no-mask-phi]
                    [--quality-gate] [--no-quality-gate]
                    [--min-readiness-score MIN_SCHEMA_READINESS_SCORE]
                    [--as-sdtm] [--sdtm-domain SDTM_DOMAIN]
                    [--standards-profile {biologic,device,drug,general,vaccine}]
                    [--min-standards-score MIN_STANDARDS_SCORE]
                    [--naming-convention {snake_case,camelCase,sdtm}]
                    [--no-interactive]
                    [study_key] path
Positional Arguments
study_key

The key identifying the study.

path

Destination JSON file.

Named Arguments
-s, --study-key

The key identifying the study.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--use-labels

Use variable labels instead of names as column headers.

Default: False

--hierarchical

Export nested hierarchical tree structure.

Default: False

--since

Export records modified on or after this ISO-8601 timestamp or date.

--filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors (e.g. ‘subjectKey==SUBJ-01’). Repeatable.

--record-data-filter

Clinical variable recordDataFilter expression using ==, !=, <, <=, >, >=, =~ (e.g. ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--incremental

Read and commit incremental high-water mark checkpoints via state ledger.

Default: False

--include-deleted

Include voided (deleted=True) records in export output.

Default: False

--stream-name

Optional checkpoint stream identifier.

--ledger-path

Optional file path for file-backed checkpoint state ledger.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

--quality-gate

Enable opt-in pre-write Record schema readiness quality gate filtering (disabled by default).

--no-quality-gate

Disable pre-write Record schema readiness quality gate filtering.

Default: True

--min-readiness-score

Minimum Record schema readiness score (0-100) when quality gate is enabled.

--as-sdtm

Transform exported study records into CDISC SDTM domain format.

Default: False

--sdtm-domain, --domain

Target CDISC SDTM domain code (e.g. AE, DM, VS, LB, CM, EX, MH, DV, DD); implies –as-sdtm.

--standards-profile

Possible choices: biologic, device, drug, general, vaccine

CDISC standards readiness profile used to validate study batches.

--min-standards-score

Minimum CDISC StandardsReadinessValidator score (0-100) required per batch.

--naming-convention

Possible choices: snake_case, camelCase, sdtm

Variable and metadata key naming convention when –as-sdtm is off.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

odm

Export study metadata, clinical data, audit records, and annotations to CDISC ODM 1.3.2 XML.

imednet export odm [-h] [-s STUDY_KEY_FLAG] [--simulation] [--vars VARS_]
                   [--forms FORMS] [--no-audit-trail] [--no-annotations]
                   [--file-oid FILE_OID]
                   [--creation-datetime CREATION_DATETIME] [--since SINCE]
                   [--filter FILTERS]
                   [--record-data-filter RECORD_DATA_FILTER] [--incremental]
                   [--include-deleted] [--stream-name STREAM_NAME]
                   [--ledger-path LEDGER_PATH] [--mask-phi] [--no-mask-phi]
                   [--quality-gate] [--no-quality-gate]
                   [--min-readiness-score MIN_SCHEMA_READINESS_SCORE]
                   [--standards-profile {biologic,device,drug,general,vaccine}]
                   [--min-standards-score MIN_STANDARDS_SCORE]
                   [--no-interactive]
                   [study_key] path
Positional Arguments
study_key

The key identifying the study.

path

Destination ODM 1.3.2 XML file.

Named Arguments
-s, --study-key

The key identifying the study.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--vars

Comma-separated list of variable names to include.

--forms

Comma-separated list of form IDs to include.

--no-audit-trail

Omit RecordRevision <AuditRecord> elements from the ODM snapshot.

Default: True

--no-annotations

Omit Query <Annotation> elements from the ODM snapshot.

Default: True

--file-oid

Optional deterministic ODM FileOID header value.

--creation-datetime

Optional deterministic ISO-8601 CreationDateTime header value.

--since

Export records modified on or after this ISO-8601 timestamp or date.

--filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors (e.g. ‘subjectKey==SUBJ-01’). Repeatable.

--record-data-filter

Clinical variable recordDataFilter expression using ==, !=, <, <=, >, >=, =~ (e.g. ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--incremental

Read and commit incremental high-water mark checkpoints via state ledger.

Default: False

--include-deleted

Include voided (deleted=True) records in export output.

Default: False

--stream-name

Optional checkpoint stream identifier.

--ledger-path

Optional file path for file-backed checkpoint state ledger.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

--quality-gate

Enable opt-in pre-write Record schema readiness quality gate filtering (disabled by default).

--no-quality-gate

Disable pre-write Record schema readiness quality gate filtering.

Default: True

--min-readiness-score

Minimum Record schema readiness score (0-100) when quality gate is enabled.

--standards-profile

Possible choices: biologic, device, drug, general, vaccine

CDISC standards readiness profile used to validate study batches.

--min-standards-score

Minimum CDISC StandardsReadinessValidator score (0-100) required per batch.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

dataset-json (dataset_json)

Export study clinical datasets to CDISC Dataset-JSON v1.1.

imednet export dataset-json [-h] [-s STUDY_KEY_FLAG] [--simulation]
                            [--use-labels] [--vars VARS_] [--forms FORMS]
                            [--form-key FORM_KEY] [--file-oid FILE_OID]
                            [--creation-datetime CREATION_DATETIME]
                            [--since SINCE] [--filter FILTERS]
                            [--record-data-filter RECORD_DATA_FILTER]
                            [--incremental] [--include-deleted]
                            [--stream-name STREAM_NAME]
                            [--ledger-path LEDGER_PATH] [--mask-phi]
                            [--no-mask-phi] [--quality-gate]
                            [--no-quality-gate]
                            [--min-readiness-score MIN_SCHEMA_READINESS_SCORE]
                            [--as-sdtm] [--sdtm-domain SDTM_DOMAIN]
                            [--standards-profile {biologic,device,drug,general,vaccine}]
                            [--min-standards-score MIN_STANDARDS_SCORE]
                            [--naming-convention {snake_case,camelCase,sdtm}]
                            [--no-interactive]
                            [study_key] path
Positional Arguments
study_key

The key identifying the study.

path

Destination Dataset-JSON v1.1 directory or single-dataset .json file.

Named Arguments
-s, --study-key

The key identifying the study.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--use-labels

Use variable labels instead of names as item names.

Default: False

--vars

Comma-separated list of variable names to include.

--forms

Comma-separated list of form IDs to include.

--form-key

Optional formKey to export a single CDASH Form dataset.

--file-oid

Optional deterministic Dataset-JSON fileOID header value.

--creation-datetime

Optional deterministic ISO-8601 creationDateTime header value.

--since

Export records modified on or after this ISO-8601 timestamp or date.

--filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors (e.g. ‘subjectKey==SUBJ-01’). Repeatable.

--record-data-filter

Clinical variable recordDataFilter expression using ==, !=, <, <=, >, >=, =~ (e.g. ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--incremental

Read and commit incremental high-water mark checkpoints via state ledger.

Default: False

--include-deleted

Include voided (deleted=True) records in export output.

Default: False

--stream-name

Optional checkpoint stream identifier.

--ledger-path

Optional file path for file-backed checkpoint state ledger.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

--quality-gate

Enable opt-in pre-write Record schema readiness quality gate filtering (disabled by default).

--no-quality-gate

Disable pre-write Record schema readiness quality gate filtering.

Default: True

--min-readiness-score

Minimum Record schema readiness score (0-100) when quality gate is enabled.

--as-sdtm

Transform exported study records into CDISC SDTM domain format.

Default: False

--sdtm-domain, --domain

Target CDISC SDTM domain code (e.g. AE, DM, VS, LB, CM, EX, MH, DV, DD); implies –as-sdtm.

--standards-profile

Possible choices: biologic, device, drug, general, vaccine

CDISC standards readiness profile used to validate study batches.

--min-standards-score

Minimum CDISC StandardsReadinessValidator score (0-100) required per batch.

--naming-convention

Possible choices: snake_case, camelCase, sdtm

Variable and metadata key naming convention when –as-sdtm is off.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

duckdb

Export study records to a DuckDB table.

imednet export duckdb [-h] [-s STUDY_KEY_FLAG] [--simulation] [--vars VARS_]
                      [--forms FORMS] [--use-labels] [--since SINCE]
                      [--filter FILTERS]
                      [--record-data-filter RECORD_DATA_FILTER]
                      [--incremental] [--include-deleted]
                      [--stream-name STREAM_NAME] [--ledger-path LEDGER_PATH]
                      [--mask-phi] [--no-mask-phi] [--quality-gate]
                      [--no-quality-gate]
                      [--min-readiness-score MIN_SCHEMA_READINESS_SCORE]
                      [--as-sdtm] [--sdtm-domain SDTM_DOMAIN]
                      [--standards-profile {biologic,device,drug,general,vaccine}]
                      [--min-standards-score MIN_STANDARDS_SCORE]
                      [--naming-convention {snake_case,camelCase,sdtm}]
                      [--no-interactive]
                      [study_key] table_name db_path
Positional Arguments
study_key

The key identifying the study.

table_name

Destination DuckDB table name.

db_path

Path to DuckDB database file.

Named Arguments
-s, --study-key

The key identifying the study.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--vars

Comma-separated list of variable names to include.

--forms

Comma-separated list of form IDs to include.

--use-labels

Use variable labels instead of names as column headers.

Default: False

--since

Export records modified on or after this ISO-8601 timestamp or date.

--filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors (e.g. ‘subjectKey==SUBJ-01’). Repeatable.

--record-data-filter

Clinical variable recordDataFilter expression using ==, !=, <, <=, >, >=, =~ (e.g. ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--incremental

Read and commit incremental high-water mark checkpoints via state ledger.

Default: False

--include-deleted

Include voided (deleted=True) records in export output.

Default: False

--stream-name

Optional checkpoint stream identifier.

--ledger-path

Optional file path for file-backed checkpoint state ledger.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

--quality-gate

Enable opt-in pre-write Record schema readiness quality gate filtering (disabled by default).

--no-quality-gate

Disable pre-write Record schema readiness quality gate filtering.

Default: True

--min-readiness-score

Minimum Record schema readiness score (0-100) when quality gate is enabled.

--as-sdtm

Transform exported study records into CDISC SDTM domain format.

Default: False

--sdtm-domain, --domain

Target CDISC SDTM domain code (e.g. AE, DM, VS, LB, CM, EX, MH, DV, DD); implies –as-sdtm.

--standards-profile

Possible choices: biologic, device, drug, general, vaccine

CDISC standards readiness profile used to validate study batches.

--min-standards-score

Minimum CDISC StandardsReadinessValidator score (0-100) required per batch.

--naming-convention

Possible choices: snake_case, camelCase, sdtm

Variable and metadata key naming convention when –as-sdtm is off.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

sql

Export study records to a SQL table.

imednet export sql [-h] [-s STUDY_KEY_FLAG] [--simulation] [--single-table]
                   [--long-format] [--vars VARS_] [--forms FORMS]
                   [--since SINCE] [--filter FILTERS]
                   [--record-data-filter RECORD_DATA_FILTER] [--incremental]
                   [--include-deleted] [--stream-name STREAM_NAME]
                   [--ledger-path LEDGER_PATH] [--mask-phi] [--no-mask-phi]
                   [--quality-gate] [--no-quality-gate]
                   [--min-readiness-score MIN_SCHEMA_READINESS_SCORE]
                   [--as-sdtm] [--sdtm-domain SDTM_DOMAIN]
                   [--standards-profile {biologic,device,drug,general,vaccine}]
                   [--min-standards-score MIN_STANDARDS_SCORE]
                   [--naming-convention {snake_case,camelCase,sdtm}]
                   [--no-interactive]
                   [study_key] table connection_string
Positional Arguments
study_key

The key identifying the study.

table

Destination table name.

connection_string

Database connection string.

Named Arguments
-s, --study-key

The key identifying the study.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--single-table

Store all records in a single table even when using SQLite.

Default: False

--long-format

Export normalized long-format table.

Default: False

--vars

Comma-separated list of variable names to include.

--forms

Comma-separated list of form IDs to include.

--since

Export records modified on or after this ISO-8601 timestamp or date.

--filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors (e.g. ‘subjectKey==SUBJ-01’). Repeatable.

--record-data-filter

Clinical variable recordDataFilter expression using ==, !=, <, <=, >, >=, =~ (e.g. ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--incremental

Read and commit incremental high-water mark checkpoints via state ledger.

Default: False

--include-deleted

Include voided (deleted=True) records in export output.

Default: False

--stream-name

Optional checkpoint stream identifier.

--ledger-path

Optional file path for file-backed checkpoint state ledger.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

--quality-gate

Enable opt-in pre-write Record schema readiness quality gate filtering (disabled by default).

--no-quality-gate

Disable pre-write Record schema readiness quality gate filtering.

Default: True

--min-readiness-score

Minimum Record schema readiness score (0-100) when quality gate is enabled.

--as-sdtm

Transform exported study records into CDISC SDTM domain format.

Default: False

--sdtm-domain, --domain

Target CDISC SDTM domain code (e.g. AE, DM, VS, LB, CM, EX, MH, DV, DD); implies –as-sdtm.

--standards-profile

Possible choices: biologic, device, drug, general, vaccine

CDISC standards readiness profile used to validate study batches.

--min-standards-score

Minimum CDISC StandardsReadinessValidator score (0-100) required per batch.

--naming-convention

Possible choices: snake_case, camelCase, sdtm

Variable and metadata key naming convention when –as-sdtm is off.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

mongodb

Export study records to MongoDB document envelopes.

imednet export mongodb [-h] [-s STUDY_KEY_FLAG] [--simulation]
                       [--batch-size BATCH_SIZE] [--insert-only]
                       [--since SINCE] [--filter FILTERS]
                       [--record-data-filter RECORD_DATA_FILTER]
                       [--incremental] [--include-deleted]
                       [--stream-name STREAM_NAME] [--ledger-path LEDGER_PATH]
                       [--mask-phi] [--no-mask-phi] [--quality-gate]
                       [--no-quality-gate]
                       [--min-readiness-score MIN_SCHEMA_READINESS_SCORE]
                       [--as-sdtm] [--sdtm-domain SDTM_DOMAIN]
                       [--standards-profile {biologic,device,drug,general,vaccine}]
                       [--min-standards-score MIN_STANDARDS_SCORE]
                       [--naming-convention {snake_case,camelCase,sdtm}]
                       [--no-interactive]
                       [study_key] uri database collection
Positional Arguments
study_key

The key identifying the study.

uri

MongoDB connection URI.

database

MongoDB database name.

collection

MongoDB collection name.

Named Arguments
-s, --study-key

The key identifying the study.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--batch-size

Records per batch.

Default: 500

--insert-only

Use insert-only mode instead of idempotent upserts.

Default: True

--since

Export records modified on or after this ISO-8601 timestamp or date.

--filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors (e.g. ‘subjectKey==SUBJ-01’). Repeatable.

--record-data-filter

Clinical variable recordDataFilter expression using ==, !=, <, <=, >, >=, =~ (e.g. ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--incremental

Read and commit incremental high-water mark checkpoints via state ledger.

Default: False

--include-deleted

Include voided (deleted=True) records in export output.

Default: False

--stream-name

Optional checkpoint stream identifier.

--ledger-path

Optional file path for file-backed checkpoint state ledger.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

--quality-gate

Enable opt-in pre-write Record schema readiness quality gate filtering (disabled by default).

--no-quality-gate

Disable pre-write Record schema readiness quality gate filtering.

Default: True

--min-readiness-score

Minimum Record schema readiness score (0-100) when quality gate is enabled.

--as-sdtm

Transform exported study records into CDISC SDTM domain format.

Default: False

--sdtm-domain, --domain

Target CDISC SDTM domain code (e.g. AE, DM, VS, LB, CM, EX, MH, DV, DD); implies –as-sdtm.

--standards-profile

Possible choices: biologic, device, drug, general, vaccine

CDISC standards readiness profile used to validate study batches.

--min-standards-score

Minimum CDISC StandardsReadinessValidator score (0-100) required per batch.

--naming-convention

Possible choices: snake_case, camelCase, sdtm

Variable and metadata key naming convention when –as-sdtm is off.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

neo4j

Export study records to Neo4j nodes and relationships.

imednet export neo4j [-h] [-s STUDY_KEY_FLAG] [--simulation]
                     [--database DATABASE] [--batch-size BATCH_SIZE]
                     [--create-only] [--since SINCE] [--filter FILTERS]
                     [--record-data-filter RECORD_DATA_FILTER] [--incremental]
                     [--include-deleted] [--stream-name STREAM_NAME]
                     [--ledger-path LEDGER_PATH] [--mask-phi] [--no-mask-phi]
                     [--quality-gate] [--no-quality-gate]
                     [--min-readiness-score MIN_SCHEMA_READINESS_SCORE]
                     [--as-sdtm] [--sdtm-domain SDTM_DOMAIN]
                     [--standards-profile {biologic,device,drug,general,vaccine}]
                     [--min-standards-score MIN_STANDARDS_SCORE]
                     [--naming-convention {snake_case,camelCase,sdtm}]
                     [--no-interactive]
                     [study_key] uri username password
Positional Arguments
study_key

The key identifying the study.

uri

Neo4j URI.

username

Neo4j username.

password

Neo4j password.

Named Arguments
-s, --study-key

The key identifying the study.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--database

Neo4j database name.

Default: 'neo4j'

--batch-size

Records per batch.

Default: 500

--create-only

Use CREATE-only writes instead of idempotent MERGE.

Default: True

--since

Export records modified on or after this ISO-8601 timestamp or date.

--filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors (e.g. ‘subjectKey==SUBJ-01’). Repeatable.

--record-data-filter

Clinical variable recordDataFilter expression using ==, !=, <, <=, >, >=, =~ (e.g. ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--incremental

Read and commit incremental high-water mark checkpoints via state ledger.

Default: False

--include-deleted

Include voided (deleted=True) records in export output.

Default: False

--stream-name

Optional checkpoint stream identifier.

--ledger-path

Optional file path for file-backed checkpoint state ledger.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

--quality-gate

Enable opt-in pre-write Record schema readiness quality gate filtering (disabled by default).

--no-quality-gate

Disable pre-write Record schema readiness quality gate filtering.

Default: True

--min-readiness-score

Minimum Record schema readiness score (0-100) when quality gate is enabled.

--as-sdtm

Transform exported study records into CDISC SDTM domain format.

Default: False

--sdtm-domain, --domain

Target CDISC SDTM domain code (e.g. AE, DM, VS, LB, CM, EX, MH, DV, DD); implies –as-sdtm.

--standards-profile

Possible choices: biologic, device, drug, general, vaccine

CDISC standards readiness profile used to validate study batches.

--min-standards-score

Minimum CDISC StandardsReadinessValidator score (0-100) required per batch.

--naming-convention

Possible choices: snake_case, camelCase, sdtm

Variable and metadata key naming convention when –as-sdtm is off.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

snowflake

Export study records to Snowflake using staged Parquet + COPY INTO.

imednet export snowflake [-h] [-s STUDY_KEY_FLAG] [--simulation]
                         [--stage-prefix STAGE_PREFIX]
                         [--local-staging-dir LOCAL_STAGING_DIR]
                         [--manifest-path MANIFEST_PATH]
                         [--batch-size BATCH_SIZE] [--force-reload]
                         [--since SINCE] [--filter FILTERS]
                         [--record-data-filter RECORD_DATA_FILTER]
                         [--incremental] [--include-deleted]
                         [--stream-name STREAM_NAME]
                         [--ledger-path LEDGER_PATH] [--mask-phi]
                         [--no-mask-phi] [--quality-gate] [--no-quality-gate]
                         [--min-readiness-score MIN_SCHEMA_READINESS_SCORE]
                         [--as-sdtm] [--sdtm-domain SDTM_DOMAIN]
                         [--standards-profile {biologic,device,drug,general,vaccine}]
                         [--min-standards-score MIN_STANDARDS_SCORE]
                         [--naming-convention {snake_case,camelCase,sdtm}]
                         [--no-interactive]
                         [study_key] account user password database schema
                         warehouse stage table
Positional Arguments
study_key

The key identifying the study.

account

Snowflake account identifier.

user

Snowflake username.

password

Snowflake password.

database

Target Snowflake database.

schema

Target Snowflake schema.

warehouse

Snowflake warehouse.

stage

Internal stage name.

table

Target table name.

Named Arguments
-s, --study-key

The key identifying the study.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--stage-prefix

Path prefix in stage.

Default: 'imednet'

--local-staging-dir

Local directory for staged Parquet files.

--manifest-path

Optional JSONL manifest output path.

--batch-size

Records per batch.

Default: 500

--force-reload

Force reloading already-loaded files.

Default: True

--since

Export records modified on or after this ISO-8601 timestamp or date.

--filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors (e.g. ‘subjectKey==SUBJ-01’). Repeatable.

--record-data-filter

Clinical variable recordDataFilter expression using ==, !=, <, <=, >, >=, =~ (e.g. ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--incremental

Read and commit incremental high-water mark checkpoints via state ledger.

Default: False

--include-deleted

Include voided (deleted=True) records in export output.

Default: False

--stream-name

Optional checkpoint stream identifier.

--ledger-path

Optional file path for file-backed checkpoint state ledger.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

--quality-gate

Enable opt-in pre-write Record schema readiness quality gate filtering (disabled by default).

--no-quality-gate

Disable pre-write Record schema readiness quality gate filtering.

Default: True

--min-readiness-score

Minimum Record schema readiness score (0-100) when quality gate is enabled.

--as-sdtm

Transform exported study records into CDISC SDTM domain format.

Default: False

--sdtm-domain, --domain

Target CDISC SDTM domain code (e.g. AE, DM, VS, LB, CM, EX, MH, DV, DD); implies –as-sdtm.

--standards-profile

Possible choices: biologic, device, drug, general, vaccine

CDISC standards readiness profile used to validate study batches.

--min-standards-score

Minimum CDISC StandardsReadinessValidator score (0-100) required per batch.

--naming-convention

Possible choices: snake_case, camelCase, sdtm

Variable and metadata key naming convention when –as-sdtm is off.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

subjects

Manage subjects within a study.

imednet subjects [-h] {list,register} ...

Positional Arguments

command

Possible choices: list, register

Sub-commands

list

List subjects for a specific study.

imednet subjects list [-h] [--format {table,json}] [--no-interactive]
                      [--simulation] [--mask-phi | --no-mask-phi]
                      [-s STUDY_KEY_FLAG] [-f SUBJECT_FILTER] [--sort SORT]
                      [--limit LIMIT] [--all]
                      [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--mask-phi, --no-mask-phi

Mask sensitive clinical PHI fields with *MASKED* (default: enabled).

Default: True

-s, --study-key

The key identifying the study.

-f, --filter

Filter criteria (e.g., ‘subject_status=Screened’ or ‘subjectStatus==Screened’). Repeat for multiple filters.

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

register

Register one or more subjects in a study.

imednet subjects register [-h] [-s STUDY_KEY_FLAG] [-f INPUT_FILE]
                          [--json JSON_PAYLOAD] [--form-key FORM_KEY]
                          [--form-id FORM_ID] [--site-name SITE_NAME]
                          [--site-id SITE_ID] [--subject-key SUBJECT_KEY]
                          [--subject-oid SUBJECT_OID]
                          [--record-status RECORD_STATUS]
                          [--reason-for-change REASON_FOR_CHANGE]
                          [-d DATA_PAIRS] [--skip-existing]
                          [--subject-key-field SUBJECT_KEY_FIELD]
                          [--schema SCHEMA_SOURCE] [--dry-run] [--wait]
                          [--timeout TIMEOUT] [--interval INTERVAL]
                          [--chunk-size CHUNK_SIZE]
                          [--email-notify EMAIL_NOTIFY] [--resolve-results]
                          [--no-resolve-results] [--format {table,json}]
                          [--no-interactive] [--simulation]
                          [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

-f, --file

Path to CSV or JSON file of subject registration requests (‘-’ for stdin JSON or CSV).

--json

Inline JSON object or array of subject registration requests.

--form-key

Registration form key (formKey) for inline registration or file default.

--form-id

Registration form ID (formId) for inline registration or file default.

--site-name

Enrollment site name (siteName) for inline registration or file default.

--site-id

Enrollment site ID (siteId) for inline registration or file default.

--subject-key

Subject key (subjectKey) for inline registration.

--subject-oid

Subject OID (subjectOid) for inline registration.

--record-status

Target record status (recordStatus) for inline registration or file override.

--reason-for-change

Audit reason for record creation or modification (reasonForChange).

-d, --data

Registration variable assignment in KEY=VALUE form. Repeat for multiple variables.

--skip-existing, --filter-enrolled

Skip subjects whose key or OID is already enrolled in the study.

Default: False

--subject-key-field

Optional variable name inside record data holding the subject key.

--schema

Validation schema path (.json DataDictionary, .xml ODM, .csv REDCap, .zip CSV archive, or CSV dir) or ‘api’ to fetch live study variables.

--dry-run

Validate payload(s) locally without sending HTTP write requests.

Default: False

--wait

Wait for submitted background job(s) to reach a terminal state.

Default: False

--timeout

Maximum seconds to wait when –wait is enabled (default: 300).

Default: 300.0

--interval

Polling interval in seconds when –wait is enabled (default: 5).

Default: 5.0

--chunk-size

Maximum records per POST batch chunk (default: 100).

Default: 100

--email-notify

Optional email address or boolean flag for job completion notifications.

--resolve-results

Fetch external resultUrl payloads when –wait is enabled (default).

Default: True

--no-resolve-results

Skip fetching external resultUrl payloads when –wait is enabled.

Default: True

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

intervals

Manage intervals.

imednet intervals [-h] {list} ...

Positional Arguments

command

Possible choices: list

Sub-commands

list

List all items of type intervals.

imednet intervals list [-h] [--format {table,json}] [--no-interactive]
                       [--simulation] [--mask-phi | --no-mask-phi]
                       [-s STUDY_KEY_FLAG] [--sort SORT] [--limit LIMIT]
                       [--all]
                       [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--mask-phi, --no-mask-phi

Mask sensitive clinical PHI fields with *MASKED* (default: enabled).

Default: True

-s, --study-key

The key identifying the study.

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

jobs

Manage background jobs.

imednet jobs [-h] {status,wait} ...

Positional Arguments

command

Possible choices: status, wait

Sub-commands

status

Fetch a job’s current status.

imednet jobs status [-h] [-s STUDY_KEY_FLAG] [--format {table,json}]
                    [--no-interactive] [--simulation]
                    [study_key] batch_id
Positional Arguments
study_key

The key identifying the study.

batch_id

Job batch ID.

Named Arguments
-s, --study-key

The key identifying the study.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

wait

Wait for a job to reach a terminal state.

imednet jobs wait [-h] [-s STUDY_KEY_FLAG] [--interval INTERVAL]
                  [--timeout TIMEOUT] [--resolve-results]
                  [--format {table,json}] [--no-interactive] [--simulation]
                  [study_key] batch_id
Positional Arguments
study_key

The key identifying the study.

batch_id

Job batch ID.

Named Arguments
-s, --study-key

The key identifying the study.

--interval

Polling interval in seconds.

Default: 5

--timeout

Maximum time to wait.

Default: 300

--resolve-results

Fetch and attach terminal resultUrl payloads after polling completes.

Default: False

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

records

Manage records within a study.

imednet records [-h] {list,create,update,import} ...

Positional Arguments

command

Possible choices: list, create, update, import

Sub-commands

list

List records for a study.

imednet records list [-h] [-s STUDY_KEY_FLAG] [-o OUTPUT] [--mask-phi]
                     [--no-mask-phi] [-f RECORD_FILTER]
                     [--record-data-filter RECORD_DATA_FILTER] [--sort SORT]
                     [--limit LIMIT] [--all] [--format {table,json}]
                     [--no-interactive] [--simulation]
                     [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

-o, --output

Deprecated: save records to a file (json, csv, or a .json/.csv path); prefer –format json or ‘imednet export’.

--mask-phi

Mask sensitive Subject PHI fields with *MASKED* (enabled by default).

Default: True

--no-mask-phi

Disable default PHI masking for authorized raw exports.

Default: True

-f, --filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors. Repeat for multiple AND filters.

--record-data-filter

Server recordDataFilter expression for Form Variable values using ==, !=, <, <=, >, >=, =~ (e.g., ‘AESER==Serious;AGE>=18’ or ‘AETERM=~^Head’).

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

create

Create or update one or more records in a study.

imednet records create [-h] [-s STUDY_KEY_FLAG] [-f INPUT_FILE]
                       [--json JSON_PAYLOAD] [--form-key FORM_KEY]
                       [--form-id FORM_ID] [--record-id RECORD_ID]
                       [--record-oid RECORD_OID] [--visit-id VISIT_ID]
                       [--record-status RECORD_STATUS]
                       [--reason-for-change REASON_FOR_CHANGE]
                       [--subject-key SUBJECT_KEY] [--subject-oid SUBJECT_OID]
                       [--subject-id SUBJECT_ID] [--site-name SITE_NAME]
                       [--site-id SITE_ID] [--interval-name INTERVAL_NAME]
                       [--interval-id INTERVAL_ID] [-d DATA_PAIRS]
                       [--schema SCHEMA_SOURCE] [--dry-run] [--wait]
                       [--timeout TIMEOUT] [--interval INTERVAL]
                       [--chunk-size CHUNK_SIZE] [--email-notify EMAIL_NOTIFY]
                       [--resolve-results] [--no-resolve-results]
                       [--format {table,json}] [--no-interactive]
                       [--simulation]
                       [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

-f, --file

Path to JSON or CSV file of record payloads (‘-’ for stdin JSON or CSV).

--json

Inline JSON object or array of record payloads.

--form-key

Target form key (formKey).

--form-id

Target form ID (formId).

--record-id

Target record ID (recordId).

--record-oid

Target record OID (recordOid).

--visit-id

Target visit ID (visitId).

--record-status

Target record status (recordStatus).

--reason-for-change

Audit reason for modifying an existing record (reasonForChange).

--subject-key

Target subject key (subjectKey).

--subject-oid

Target subject OID (subjectOid).

--subject-id

Target subject ID (subjectId).

--site-name

Target site name (siteName).

--site-id

Target site ID (siteId).

--interval-name

Target interval name (intervalName).

--interval-id

Target interval ID (intervalId).

-d, --data

Clinical variable assignment in KEY=VALUE form. Repeat for multiple variables.

--schema

Validation schema path (.json DataDictionary, .xml ODM, .csv REDCap, .zip CSV archive, or CSV dir) or ‘api’ to fetch live study variables.

--dry-run

Validate payload(s) locally without sending HTTP write requests.

Default: False

--wait

Wait for submitted background job(s) to reach a terminal state.

Default: False

--timeout

Maximum seconds to wait when –wait is enabled (default: 300).

Default: 300.0

--interval

Polling interval in seconds when –wait is enabled (default: 5).

Default: 5.0

--chunk-size

Maximum records per POST batch chunk (default: 100).

Default: 100

--email-notify

Optional email address or boolean flag for job completion notifications.

--resolve-results

Fetch external resultUrl payloads when –wait is enabled (default).

Default: True

--no-resolve-results

Skip fetching external resultUrl payloads when –wait is enabled.

Default: True

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

update

Update one or more existing records in a study.

imednet records update [-h] [-s STUDY_KEY_FLAG] [-f INPUT_FILE]
                       [--json JSON_PAYLOAD] [--form-key FORM_KEY]
                       [--form-id FORM_ID] [--record-id RECORD_ID]
                       [--record-oid RECORD_OID] [--visit-id VISIT_ID]
                       [--record-status RECORD_STATUS]
                       [--reason-for-change REASON_FOR_CHANGE]
                       [--subject-key SUBJECT_KEY] [--subject-oid SUBJECT_OID]
                       [--subject-id SUBJECT_ID] [--site-name SITE_NAME]
                       [--site-id SITE_ID] [--interval-name INTERVAL_NAME]
                       [--interval-id INTERVAL_ID] [-d DATA_PAIRS]
                       [--schema SCHEMA_SOURCE] [--dry-run] [--wait]
                       [--timeout TIMEOUT] [--interval INTERVAL]
                       [--chunk-size CHUNK_SIZE] [--email-notify EMAIL_NOTIFY]
                       [--resolve-results] [--no-resolve-results]
                       [--format {table,json}] [--no-interactive]
                       [--simulation]
                       [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

-f, --file

Path to JSON or CSV file of record payloads (‘-’ for stdin JSON or CSV).

--json

Inline JSON object or array of record payloads.

--form-key

Target form key (formKey).

--form-id

Target form ID (formId).

--record-id

Target record ID (recordId).

--record-oid

Target record OID (recordOid).

--visit-id

Target visit ID (visitId).

--record-status

Target record status (recordStatus).

--reason-for-change

Audit reason for modifying an existing record (reasonForChange).

--subject-key

Target subject key (subjectKey).

--subject-oid

Target subject OID (subjectOid).

--subject-id

Target subject ID (subjectId).

--site-name

Target site name (siteName).

--site-id

Target site ID (siteId).

--interval-name

Target interval name (intervalName).

--interval-id

Target interval ID (intervalId).

-d, --data

Clinical variable assignment in KEY=VALUE form. Repeat for multiple variables.

--schema

Validation schema path (.json DataDictionary, .xml ODM, .csv REDCap, .zip CSV archive, or CSV dir) or ‘api’ to fetch live study variables.

--dry-run

Validate payload(s) locally without sending HTTP write requests.

Default: False

--wait

Wait for submitted background job(s) to reach a terminal state.

Default: False

--timeout

Maximum seconds to wait when –wait is enabled (default: 300).

Default: 300.0

--interval

Polling interval in seconds when –wait is enabled (default: 5).

Default: 5.0

--chunk-size

Maximum records per POST batch chunk (default: 100).

Default: 100

--email-notify

Optional email address or boolean flag for job completion notifications.

--resolve-results

Fetch external resultUrl payloads when –wait is enabled (default).

Default: True

--no-resolve-results

Skip fetching external resultUrl payloads when –wait is enabled.

Default: True

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

import

Import study records from a CSV or JSON file (or ‘-’ for stdin).

imednet records import [-h] [-s STUDY_KEY_FLAG] [--schema SCHEMA_SOURCE]
                       [--dry-run] [--wait] [--timeout TIMEOUT]
                       [--interval INTERVAL] [--chunk-size CHUNK_SIZE]
                       [--email-notify EMAIL_NOTIFY] [--resolve-results]
                       [--no-resolve-results] [--format {table,json}]
                       [--no-interactive] [--simulation]
                       [study_key] file
Positional Arguments
study_key

The key identifying the study.

file

Path to CSV or JSON file to import (‘-’ for stdin JSON or CSV).

Named Arguments
-s, --study-key

The key identifying the study.

--schema

Validation schema path (.json DataDictionary, .xml ODM, .csv REDCap, .zip CSV archive, or CSV dir) or ‘api’ to fetch live study variables.

--dry-run

Validate payload(s) locally without sending HTTP write requests.

Default: False

--wait

Wait for submitted background job(s) to reach a terminal state.

Default: False

--timeout

Maximum seconds to wait when –wait is enabled (default: 300).

Default: 300.0

--interval

Polling interval in seconds when –wait is enabled (default: 5).

Default: 5.0

--chunk-size

Maximum records per POST batch chunk (default: 100).

Default: 100

--email-notify

Optional email address or boolean flag for job completion notifications.

--resolve-results

Fetch external resultUrl payloads when –wait is enabled (default).

Default: True

--no-resolve-results

Skip fetching external resultUrl payloads when –wait is enabled.

Default: True

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

forms

Manage forms.

imednet forms [-h] {list} ...

Positional Arguments

command

Possible choices: list

Sub-commands

list

List all items of type forms.

imednet forms list [-h] [--format {table,json}] [--no-interactive]
                   [--simulation] [--mask-phi | --no-mask-phi]
                   [-s STUDY_KEY_FLAG] [-f FILTER_ARGS] [--sort SORT]
                   [--limit LIMIT] [--all]
                   [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--mask-phi, --no-mask-phi

Mask sensitive clinical PHI fields with *MASKED* (default: enabled).

Default: True

-s, --study-key

The key identifying the study.

-f, --filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors. Repeat for multiple AND filters.

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

visits

Manage visits.

imednet visits [-h] {list} ...

Positional Arguments

command

Possible choices: list

Sub-commands

list

List all items of type visits.

imednet visits list [-h] [--format {table,json}] [--no-interactive]
                    [--simulation] [--mask-phi | --no-mask-phi]
                    [-s STUDY_KEY_FLAG] [-f FILTER_ARGS] [--sort SORT]
                    [--limit LIMIT] [--all]
                    [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--mask-phi, --no-mask-phi

Mask sensitive clinical PHI fields with *MASKED* (default: enabled).

Default: True

-s, --study-key

The key identifying the study.

-f, --filter

Server filter expression using =, ==, !=, <, <=, >, >= and ‘;’ (AND) or ‘,’ (OR) connectors. Repeat for multiple AND filters.

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

codings

Manage medical codings within a study.

imednet codings [-h] {list} ...

Positional Arguments

command

Possible choices: list

Sub-commands

list

List codings for a specific study.

imednet codings list [-h] [--format {table,json}] [--no-interactive]
                     [--simulation] [--mask-phi | --no-mask-phi]
                     [-s STUDY_KEY_FLAG] [-f CODING_FILTER] [--sort SORT]
                     [--limit LIMIT] [--all]
                     [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--mask-phi, --no-mask-phi

Mask sensitive clinical PHI fields with *MASKED* (default: enabled).

Default: True

-s, --study-key

The key identifying the study.

-f, --filter

Filter criteria (e.g., ‘dictionaryName=MedDRA’ or ‘dictionaryName==MedDRA’). Repeat for multiple filters.

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

users

Manage users within a study.

imednet users [-h] {list} ...

Positional Arguments

command

Possible choices: list

Sub-commands

list

List users for a specific study.

imednet users list [-h] [--format {table,json}] [--no-interactive]
                   [--simulation] [--mask-phi | --no-mask-phi]
                   [-s STUDY_KEY_FLAG] [--include-inactive] [--sort SORT]
                   [--limit LIMIT] [--all]
                   [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

--mask-phi, --no-mask-phi

Mask sensitive clinical PHI fields with *MASKED* (default: enabled).

Default: True

-s, --study-key

The key identifying the study.

--include-inactive

Include inactive user accounts.

Default: False

--sort

Server sort specification (e.g., ‘dateCreated,desc’ or ‘recordId,asc’).

--limit

Maximum number of items to fetch before stopping.

--all

Fetch all matching pages even in interactive TTY sessions.

Default: False

tui

Interactive terminal interface for browsing clinical studies, sites, subjects, and jobs.

imednet tui [-h] [-s STUDY_KEY_FLAG] [-b BATCH_IDS] [--high-contrast]
            [--force] [--no-interactive] [--simulation]
            [study_key]

Positional Arguments

study_key

The key identifying the study.

Named Arguments

-s, --study, --study-key

The key identifying the study.

-b, --batch, --batch-id

Job batch ID to monitor in the Jobs tab (repeatable or comma-separated).

--high-contrast

Enable high-contrast mode for accessibility.

--force

Force launch even if terminal streams appear non-interactive.

Default: False

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

subject-data

Retrieve all data for a single subject within a study. Arguments may be provided via flags (–study-key, –subject-key/–subject), positional arguments (<study_key> <subject_key>), or hybrid combinations where a remaining positional argument maps deterministically to the missing key. Flags take precedence over positional arguments.

imednet subject-data [-h] [-s STUDY_KEY_FLAG] [-k SUBJECT_KEY_FLAG]
                     [--mask-phi | --no-mask-phi] [--format {table,json}]
                     [--no-interactive] [--simulation]
                     [study_key] [subject_key]

Positional Arguments

study_key

The key identifying the study.

subject_key

The key identifying the subject.

Named Arguments

-s, --study-key

The key identifying the study.

-k, --subject-key, --subject

The key identifying the subject.

--mask-phi, --no-mask-phi

Mask clinical PHI fields with ‘*MASKED*’ (default: enabled).

Default: True

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

workflows

Execute common data workflows.

imednet workflows [-h]
                  {extract-records,sync-worker,state,uat,validate-standards,extract-audit-trail,ingest-revisions,queries,triage}
                  ...

Positional Arguments

wf_command

Possible choices: extract-records, sync-worker, state, uat, validate-standards, extract-audit-trail, ingest-revisions, queries, triage

Sub-commands

extract-records

Extract records based on criteria spanning subjects, visits, and records.

imednet workflows extract-records [-h] [-s STUDY_KEY_FLAG]
                                  [--record-filter RECORD_FILTER]
                                  [--record-data-filter RECORD_DATA_FILTER]
                                  [--subject-filter SUBJECT_FILTER]
                                  [--visit-filter VISIT_FILTER]
                                  [--limit LIMIT] [--all] [--interactive]
                                  [--mask-phi | --no-mask-phi]
                                  [--format {table,json}] [--no-interactive]
                                  [--simulation]
                                  [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--record-filter

Record filter criteria (e.g., ‘form_key=DEMO’). Repeat for multiple filters.

--record-data-filter

Filter by form variable values (e.g., ‘AGE>25’, ‘RACE==White’). Repeatable; combined with AND.

--subject-filter

Subject filter criteria (e.g., ‘subject_status=Screened’). Repeat for multiple filters.

--visit-filter

Visit filter criteria (e.g., ‘interval_name=Screening’). Repeat for multiple filters.

--limit

Maximum number of items to return (default: 100 in table mode; unlimited for –format json).

--all

Fetch all matching pages without the default 100-item table cap.

Default: False

--interactive

Run in interactive wizard mode with step-by-step prompts.

Default: False

--mask-phi, --no-mask-phi

Mask clinical PHI fields with ‘*MASKED*’ (default: enabled).

Default: True

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

sync-worker

Run an idempotent background cache refresh worker.

imednet workflows sync-worker [-h] [-s STUDY_KEY_FLAG] [--interval INTERVAL]
                              [--once] [--no-interactive] [--simulation]
                              [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--interval

Polling interval in seconds.

Default: 900

--once

Run a single sync cycle and exit.

Default: False

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

state

Manage high-water mark execution ledger state.

imednet workflows state [-h] {show,set,reset} ...
Positional Arguments
state_command

Possible choices: show, set, reset

Sub-commands
show

Show the current high-water mark records and stream metadata.

imednet workflows state show [-h] [-l LEDGER_PATH] [-s STUDY_KEY_FLAG]
                             [--interactive] [--format {table,json}]
                             [--no-interactive]
                             [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-l, --ledger-path

Path to the pipeline ledger JSON file.

Default: '/home/runner/.imednet/pipeline_ledger.json'

-s, --study-key

Filter the ledger by a specific study key.

--interactive

Run in interactive wizard mode.

Default: False

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

set

Manually set a high-water mark timestamp for a study and stream.

imednet workflows state set [-h] [-s STUDY_KEY_FLAG] [-m STREAM]
                            [-t TIMESTAMP] [-r RECORDS_PROCESSED]
                            [-l LEDGER_PATH] [-f] [--interactive]
                            [--format {table,json}] [--no-interactive]
                            [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The study key.

-m, --stream

The stream name.

-t, --timestamp

The ISO-8601 timestamp (UTC).

-r, --records-processed

Number of records processed.

Default: 0

-l, --ledger-path

Path to the pipeline ledger JSON file.

Default: '/home/runner/.imednet/pipeline_ledger.json'

-f, --force

Force state transition override even when the current status disallows it.

Default: False

--interactive

Run in interactive wizard mode.

Default: False

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

reset

Reset (clear) high-water mark state for a study/stream.

imednet workflows state reset [-h] [-s STUDY_KEY_FLAG] [-m STREAM]
                              [-l LEDGER_PATH] [-f] [--interactive]
                              [--format {table,json}] [--no-interactive]
                              [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The study key.

-m, --stream

The stream name. If omitted, all streams for the study will be reset.

-l, --ledger-path

Path to the pipeline ledger JSON file.

Default: '/home/runner/.imednet/pipeline_ledger.json'

-f, --force

Force state reset even when an active RUNNING lease is held.

Default: False

--interactive

Run in interactive wizard mode.

Default: False

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

uat

Manage and execute UAT acceptance test pipelines.

imednet workflows uat [-h] {build-spec,run} ...
Positional Arguments
uat_command

Possible choices: build-spec, run

Sub-commands
build-spec

Inspect a study and export a UATSpecification JSON plan.

imednet workflows uat build-spec [-h] [-s STUDY_KEY_FLAG]
                                 [--subject-count SUBJECT_COUNT]
                                 [--site-name SITE_NAME]
                                 [--form-key ENABLED_FORM_KEYS]
                                 [--data-dictionary DATA_DICTIONARY]
                                 [--seed SEED] [-o OUTPUT] [--no-interactive]
                                 [--simulation]
                                 [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--subject-count

Number of test subjects to generate (1..100).

Default: 2

--site-name

Target enrollment-eligible site name for synthetic subjects.

--form-key

Target active form key to include. Repeat for multiple forms.

--data-dictionary

Offline Data Dictionary path (.json, .xml ODM, .csv REDCap, .zip, or CSV directory).

--seed

Optional random seed to record in the generated UATSpecification.

-o, --output

Output file path for UATSpecification JSON (writes to stdout if omitted).

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

run

Run the end-to-end UAT pipeline for a study.

imednet workflows uat run [-h] [-s STUDY_KEY_FLAG] [--interactive]
                          [--subject-count SUBJECT_COUNT]
                          [--site-name SITE_NAME]
                          [--form-key ENABLED_FORM_KEYS]
                          [--email-notify EMAIL_NOTIFY] [--spec SPEC_PATH]
                          [--data-dictionary DATA_DICTIONARY]
                          [--schema SCHEMA_SOURCE] [--dry-run] [--seed SEED]
                          [--format {table,json}] [--no-interactive]
                          [--simulation]
                          [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--interactive

Run in interactive wizard mode.

Default: False

--subject-count

Number of test subjects to generate (1..100).

--site-name

Target site name for synthetic subjects.

--form-key

Target form key to include. Repeat for multiple forms.

--email-notify

Optional email notification destination or boolean (‘true’/’false’).

--spec

Path to a saved UATSpecification JSON file.

--data-dictionary

Offline Data Dictionary path (.json, .xml ODM, .csv REDCap, .zip, or CSV directory).

--schema

Validation schema path (.json, .xml ODM, .csv REDCap, .zip, or CSV dir) or ‘api’ to fetch live study variables.

--dry-run

Inspect, generate, and validate synthetic UAT payloads locally without API writes.

Default: False

--seed

Deterministic random seed for synthetic record generation.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

validate-standards

Validate study records and schema against CDISC CDASH and SDTM readiness rules.

imednet workflows validate-standards [-h] [-s STUDY_KEY_FLAG]
                                     [--profile {biologic,device,drug,general,vaccine}]
                                     [--domain SDTM_DOMAIN]
                                     [--min-score MIN_STANDARDS_SCORE]
                                     [--mask-phi | --no-mask-phi]
                                     [--format {table,json}]
                                     [--no-interactive] [--simulation]
                                     [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--profile, --standards-profile

Possible choices: biologic, device, drug, general, vaccine

Regulatory CDISC standards profile (default: general).

Default: 'general'

--domain, --sdtm-domain

Optional target SDTM domain code (e.g. DM, AE, LB, VS, CM, EX, MH).

--min-score, --min-standards-score

Minimum standards readiness score (0-100) required for exit code 0.

--mask-phi, --no-mask-phi

Mask clinical PHI in reported diagnostics (default: enabled).

Default: True

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

extract-audit-trail

Extract date-bounded RecordRevision audit trails with optional 21 CFR Part 11 chain checks.

imednet workflows extract-audit-trail [-h] [-s STUDY_KEY_FLAG]
                                      [--start-date START_DATE]
                                      [--end-date END_DATE] [-f FILTER]
                                      [--sort SORT] [--validate-chain]
                                      [--allow-partial | --no-allow-partial]
                                      [--mask-phi | --no-mask-phi] [-o OUTPUT]
                                      [--format {table,json}]
                                      [--no-interactive] [--simulation]
                                      [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--start-date

Inclusive UTC lower bound on dateCreated (ISO-8601 date or timestamp).

--end-date

Inclusive UTC upper bound on dateCreated (ISO-8601 date or timestamp).

-f, --filter

Filter revisions by attribute (e.g., ‘user==sim_user’, ‘recordId==601’). Repeatable; dateCreated and lastUpdated support dual lower/upper bounds.

--sort

Sort property and direction (e.g., ‘recordRevision,asc’).

--validate-chain

Validate monotonic 21 CFR Part 11 revision chain invariants.

Default: False

--allow-partial, --no-allow-partial

Allow partial/sliced revision chains when –validate-chain is enabled (auto-enabled when date bounds or attribute filters are supplied).

--mask-phi, --no-mask-phi

Mask clinical PHI fields with ‘*MASKED*’ (default: enabled).

Default: True

-o, --output

Export audit trail directly to file (‘csv’, ‘json’, ‘odm’, or a .csv/.json/.xml path).

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

ingest-revisions

Ingest Study RecordRevision audit logs into DuckDB bronze/silver lineage tables.

imednet workflows ingest-revisions [-h] [-s STUDY_KEY_FLAG]
                                   [--db-path DB_PATH]
                                   [--mode {append,replace}]
                                   [--start-date START_DATE]
                                   [--end-date END_DATE]
                                   [--mask-phi | --no-mask-phi]
                                   [--validate-chain]
                                   [--allow-partial | --no-allow-partial]
                                   [--include-deleted] [-o OUTPUT]
                                   [--format {table,json}] [--no-interactive]
                                   [--simulation]
                                   [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--db-path

Path to DuckDB database file, or ‘:memory:’ when paired with -o/–output (default: ./audit_lakehouse.duckdb).

Default: './audit_lakehouse.duckdb'

--mode

Possible choices: append, replace

DuckDB bronze write mode (‘append’ deduplicates; ‘replace’ refreshes only this study).

Default: 'append'

--start-date

Inclusive UTC lower bound on dateCreated (ISO-8601 date or timestamp).

--end-date

Inclusive UTC upper bound on dateCreated (ISO-8601 date or timestamp).

--mask-phi, --no-mask-phi

Mask clinical PHI fields prior to DuckDB storage and file export (default: enabled).

Default: True

--validate-chain

Validate monotonic 21 CFR Part 11 revision chain invariants during ingestion.

Default: False

--allow-partial, --no-allow-partial

Allow partial/sliced revision chains when –validate-chain is enabled (auto-enabled when date bounds are supplied).

--include-deleted

Include deleted=True revisions in silver_current_state and -o/–output exports.

Default: False

-o, --output

Export materialized silver_records_history rows for the study to CSV or JSON.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

queries

Inspect study query discrepancy summaries and synchronize triage queues.

imednet workflows queries [-h] {list,counts,sync} ...
Positional Arguments
queries_command

Possible choices: list, counts, sync

Sub-commands
list

List study queries filtered by lifecycle status, subject, or site.

imednet workflows queries list [-h] [-s STUDY_KEY_FLAG]
                               [--status {OPEN,ANSWERED,CLOSED,CANCELLED}]
                               [--unresolved] [-k SUBJECT_KEY]
                               [--site-key SITE_KEY] [-f FILTER_ARGS]
                               [--mask-phi | --no-mask-phi] [--no-interactive]
                               [--format {table,json}] [--simulation]
                               [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--status

Possible choices: OPEN, ANSWERED, CLOSED, CANCELLED

Filter queries by lifecycle status (OPEN, ANSWERED, CLOSED, CANCELLED).

--unresolved

Return only unresolved (OPEN and ANSWERED) queries.

Default: False

-k, --subject-key, --subject

Filter queries attached to a specific subject key.

--site-key, --site

Filter queries across enrolled subjects at a specific site.

-f, --filter

Additional query filter expressions (e.g., ‘variable==V_AGE’, ‘status==OPEN’).

--mask-phi, --no-mask-phi

Mask clinical PHI fields with ‘*MASKED*’ (default: enabled).

Default: True

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

counts

Count study queries grouped by QueryStatus (OPEN, ANSWERED, CLOSED, CANCELLED).

imednet workflows queries counts [-h] [-s STUDY_KEY_FLAG] [-f FILTER_ARGS]
                                 [--no-interactive] [--format {table,json}]
                                 [--simulation]
                                 [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

-f, --filter

Optional query filter expressions applied before counting.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

sync

Synchronize study queries into the local SQLite TriageStore queue.

imednet workflows queries sync [-h] [-s STUDY_KEY_FLAG] [--db-path DB_PATH]
                               [--unresolved] [--severity DEFAULT_SEVERITY]
                               [-f FILTER_ARGS] [--mask-phi | --no-mask-phi]
                               [--no-interactive] [--format {table,json}]
                               [--simulation]
                               [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--db-path

Optional SQLite triage database path (defaults to IMEDNET_TRIAGE_DB_PATH or ~/.imednet/<origin>/triage.sqlite3).

--unresolved

Synchronize only unresolved (OPEN and ANSWERED) queries.

Default: False

--severity

Default severity assigned to newly created triage items (default: medium).

-f, --filter

Filter queries before syncing (e.g., ‘subjectKey==SUBJ-001’, ‘status==OPEN’).

--mask-phi, --no-mask-phi

Mask clinical PHI fields with ‘*MASKED*’ (default: enabled).

Default: True

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

triage

Manage local SQLite query triage queues, reviewer assignments, and transition history.

imednet workflows triage [-h] {sync,list,counts,assign,resolve,history} ...
Positional Arguments
triage_command

Possible choices: sync, list, counts, assign, resolve, history

Sub-commands
sync

Pull study queries from iMednet into the local SQLite TriageStore queue.

imednet workflows triage sync [-h] [-s STUDY_KEY_FLAG] [--db-path DB_PATH]
                              [--unresolved] [--severity DEFAULT_SEVERITY]
                              [-f FILTER_ARGS] [--mask-phi | --no-mask-phi]
                              [--no-interactive] [--format {table,json}]
                              [--simulation]
                              [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--db-path

Optional SQLite triage database path (defaults to IMEDNET_TRIAGE_DB_PATH or ~/.imednet/<origin>/triage.sqlite3).

--unresolved

Synchronize only unresolved (OPEN and ANSWERED) queries.

Default: False

--severity

Default severity assigned to newly created triage items (default: medium).

-f, --filter

Filter queries before syncing (e.g., ‘subjectKey==SUBJ-001’, ‘status==OPEN’).

--mask-phi, --no-mask-phi

Mask clinical PHI fields with ‘*MASKED*’ (default: enabled).

Default: True

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

--simulation

Run offline against deterministic synthetic simulation data without live API credentials.

list

List queued triage items for a study from the local SQLite TriageStore.

imednet workflows triage list [-h] [-s STUDY_KEY_FLAG]
                              [--status {NEW,UNDER_REVIEW,RESOLVED}]
                              [-a ASSIGNEE] [--db-path DB_PATH]
                              [--mask-phi | --no-mask-phi] [--no-interactive]
                              [--format {table,json}]
                              [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--status

Possible choices: NEW, UNDER_REVIEW, RESOLVED

Filter triage items by status (NEW, UNDER_REVIEW, RESOLVED).

-a, --assignee

Filter triage items assigned to a specific reviewer user ID.

--db-path

Optional SQLite triage database path.

--mask-phi, --no-mask-phi

Mask clinical PHI fields with ‘*MASKED*’ (default: enabled).

Default: True

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

counts

Count local triage queue items grouped by TriageStatus (NEW, UNDER_REVIEW, RESOLVED).

imednet workflows triage counts [-h] [-s STUDY_KEY_FLAG] [--db-path DB_PATH]
                                [--no-interactive] [--format {table,json}]
                                [study_key]
Positional Arguments
study_key

The key identifying the study.

Named Arguments
-s, --study-key

The key identifying the study.

--db-path

Optional SQLite triage database path.

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

assign

Assign ownership of a triage item to a reviewer and optionally add a scrubbed note.

imednet workflows triage assign [-h] [--item-id ITEM_ID_FLAG]
                                [-a ASSIGNEE_FLAG] [-u USER_ID] [-c COMMENT]
                                [--db-path DB_PATH]
                                [--mask-phi | --no-mask-phi]
                                [--no-interactive] [--format {table,json}]
                                [item_id] [assignee]
Positional Arguments
item_id

Identifier of the triage item (e.g. ‘DEMO-STUDY:701’).

assignee

Reviewer user ID to assign ownership to.

Named Arguments
--item-id

Identifier of the triage item (e.g. ‘DEMO-STUDY:701’).

-a, --assignee

Reviewer user ID to assign ownership to.

-u, --user, --user-id

Reviewer user ID recorded on optional –comment annotation (defaults to assignee).

-c, --comment

Optional reviewer note scrubbed for PHI and appended to item annotations.

--db-path

Optional SQLite triage database path.

--mask-phi, --no-mask-phi

Mask clinical PHI fields with ‘*MASKED*’ (default: enabled).

Default: True

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

resolve

Transition a triage item status (defaults to RESOLVED) and record audit history.

imednet workflows triage resolve [-h] [--item-id ITEM_ID_FLAG]
                                 [--status {NEW,UNDER_REVIEW,RESOLVED}]
                                 [-u USER_ID] [-c COMMENT] [--db-path DB_PATH]
                                 [--mask-phi | --no-mask-phi]
                                 [--no-interactive] [--format {table,json}]
                                 [item_id]
Positional Arguments
item_id

Identifier of the triage item (e.g. ‘DEMO-STUDY:701’).

Named Arguments
--item-id

Identifier of the triage item (e.g. ‘DEMO-STUDY:701’).

--status

Possible choices: NEW, UNDER_REVIEW, RESOLVED

Target triage status (NEW, UNDER_REVIEW, RESOLVED; default: RESOLVED).

-u, --user, --user-id

Reviewer user ID recorded in transition history (defaults to item assignee or ‘cli’).

-c, --comment

Optional transition note scrubbed for PHI before persisting.

--db-path

Optional SQLite triage database path.

--mask-phi, --no-mask-phi

Mask clinical PHI fields with ‘*MASKED*’ (default: enabled).

Default: True

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

history

Inspect ordered status transition history for a triage item.

imednet workflows triage history [-h] [--item-id ITEM_ID_FLAG]
                                 [--db-path DB_PATH]
                                 [--mask-phi | --no-mask-phi]
                                 [--no-interactive] [--format {table,json}]
                                 [item_id]
Positional Arguments
item_id

Identifier of the triage item (e.g. ‘DEMO-STUDY:701’).

Named Arguments
--item-id

Identifier of the triage item (e.g. ‘DEMO-STUDY:701’).

--db-path

Optional SQLite triage database path.

--mask-phi, --no-mask-phi

Mask clinical PHI fields with ‘*MASKED*’ (default: enabled).

Default: True

--no-interactive

Disable interactive terminal UI, live spinners, and stdin prompts.

--format

Possible choices: table, json

Response format: human table (default) or versioned JSON on stdout.

Install optional CLI features: pip install ‘imednet[cli]’

Interactive terminal interface and data grid

Install imednet[tui] (or imednet-tui) to launch the interactive Mission Control dashboard for browsing studies, sites, subjects, and background jobs:

pip install "imednet[tui]"
imednet tui
imednet tui --study DEMO-STUDY --batch BATCH --batch JOB-1002
imednet tui DEMO-STUDY --simulation
imednet tui --high-contrast
IMEDNET_HIGH_CONTRAST=1 imednet --high-contrast tui

Within imednet tui, use Tab / Shift+Tab and arrow keys to move across panels, Enter to select a study or site (re-selecting the active site clears the site filter) or to validate and stage/register batch IDs in #batch_id_input (staging QUEUED entries when no Study is selected yet and preserving draft text if validation fails), Enter or Space on #job_table to toggle the focusable split #job_detail_panel alongside #job_table (displaying the six-field Job metadata jobId, batchId, state, dateCreated, dateStarted, and dateFinished, plus sanitized resultUrl, Record errors, and explicit NOT_FOUND or failure diagnostics, scrollable via Tab and Up / Down / PageUp / PageDown / Home / End while keeping #job_table rows visible on 80x24 consoles), Esc on the Jobs tab to exit #batch_id_input or close #job_detail_panel (and Esc on the Logs tab or once #job_detail_panel is closed to clear an active site filter immediately), q to quit, d to toggle dark mode, h to toggle high-contrast mode, r to refresh active study data, and a to load all pages when a panel is truncated. Single-key shortcuts are suppressed automatically while typing batch IDs in #batch_id_input, and LogViewer and #job_detail_panel mask default Subject PHI and committed StudyConfiguration phiFields across URL filters, plain filter expressions, and multiline JSON to ***MASKED*** without masking exempt study/subject/record identifiers. Pass --study and repeatable --batch flags at launch to open a study and monitor specific batch jobs immediately (or pass --batch without --study to stage QUEUED batches until a Study is selected), and pass --force only when intentionally bypassing TTY stream checks.

When stdin and stdout are attached to an interactive terminal (with a valid non-dumb TERM entry in terminfo), core list commands render results in InteractiveDataGrid, a curses-driven table with live filtering and record inspection:

  • Up / Down (or k / j), Page Up / Page Down, Home / End: navigate rows.

  • Left / Right (or h / l): scroll columns horizontally across wide tables.

  • /: enter live search mode across table columns, record metadata, and form variables (Enter commits search input; Esc cancels uncommitted search edits and restores the anchored selection; in normal mode, Esc closes an open inspection panel/modal first and then clears the active filter).

  • a: load all remaining pages into InteractiveDataGrid when the initial 100-item TTY view is truncated, re-evaluating any active / filter.

  • Space: toggle record inspection—opening a split side panel on >= 50-column terminals or a full-width detail modal on narrow 24–49-column panes ([ / ] scrolls overflowing lines and { / } scrolls pages with Lines X-Y of Z ▲ / ▼ cues; Esc or Space closes the panel or modal).

  • q: exit InteractiveDataGrid.

Set IMEDNET_NON_INTERACTIVE=1 or pass --no-interactive (or pipe stdout in scripts and CI) to bypass InteractiveDataGrid and emit plain ASCII tabular output instead, or use imednet tui --no-interactive to block full-screen TUI launches with exit code 1:

IMEDNET_NON_INTERACTIVE=1 imednet studies list
imednet tui --no-interactive

Interactive workflow wizards

When imednet-workflows is installed, workflow commands support --interactive step-by-step wizard prompts for study keys, filters, and state ledger updates:

imednet workflows extract-records --interactive
imednet workflows state show --interactive
imednet workflows state set --interactive
imednet workflows state reset --interactive
imednet workflows uat run --interactive

Machine-readable core reads

The CLI uses standard-library argparse; install imednet[cli] only for optional dotenv/logging helpers. Use the existing nested --help for command-specific flags.

imednet studies list --simulation --format json
imednet subjects list STUDY --filter subject_status=Enrolled --format json
imednet subjects list --study-key STUDY --format json
imednet users list STUDY --include-inactive --format json
imednet codings list STUDY -f dictionaryName=MedDRA --format json
imednet records list STUDY --format json
imednet jobs status STUDY BATCH --format json
imednet jobs wait STUDY JOB-1002 --resolve-results --timeout 60 --format json
imednet workflows extract-records STUDY --format json
imednet workflows state show --study-key STUDY --format json
imednet workflows uat run STUDY --dry-run --simulation --format json
imednet subject-data STUDY SUB1 --format json
IMEDNET_CLI_OUTPUT_FORMAT=json imednet studies list

Supported core list resources are studies, queries, variables, record-revisions, sites, forms, records, subjects, intervals, visits, codings, and users, alongside workflows extract-records, workflows state show (resource ledger_state), workflows uat run (resource uat_run), and subject-data (plus write batch summaries for records create, records update, records import, and subjects register). JSON reads emit one envelope with schemaVersion: "1.0", resource, status: "complete", count and items (set IMEDNET_CLI_OUTPUT_FORMAT=json to default --format commands, datadict validate, and datadict diff to JSON unless an explicit --format flag overrides it), while write commands emit status: "failed" with exit code 1 (including unsubmittedChunks when a batch write stops mid-submission) when schema/input validation, a chunk POST, or --wait polling fails; API or path-validation errors occurring before chunk writes start leave stdout empty and report redacted diagnostics on stderr. Empty list results use an empty items array, whereas subject-data exits 1 on stderr when the requested Subject does not exist in the Study. Item fields use the SDK models’ JSON aliases; the JSON view includes model fields beyond the human summary table. Progress and diagnostics use stderr. A retrieval or serialization failure emits no success response and exits 1; partial iterators are not reported as complete. Usage failures exit 2, SDK-command interruption exits 130, and success/help exits 0.

Batch writes, schema-aware coercion, and dry runs

imednet records create, imednet records update, imednet records import, and imednet subjects register share a unified write pipeline across inline flags, --json, -f / --file (or positional FILE on records import), and piped - stdin (auto-detecting JSON or CSV while rejecting interactive TTY stdin before opening SDK connections):

imednet records create STUDY --form-key F_DM --subject-key SUB-001 \
    -d ZIP_CODE=90210 -d 'NOTE="0042"' --schema ./study_dd.json --dry-run
imednet records update STUDY --record-id 601 --visit-id 401 --record-status Complete \
    -d V_AGE=51 --reason-for-change "Chart correction" --wait --format json
cat batch.csv | imednet records import STUDY - --schema api --wait --format json
imednet subjects register STUDY --file subjects.csv --skip-existing --wait
imednet subjects register STUDY --form-id 10 --site-id 1 \
    --record-status "Record Complete" --reason-for-change "Enrollment" --wait --format json

When --wait is supplied on write commands, terminal resultUrl payloads are resolved automatically (opt out with --no-resolve-results) and JSON batch summaries include createdRecordIds, enrolledSubjectKeys, and sanitized recordErrors; imednet jobs wait keeps read-only polling by default unless --resolve-results is passed.

records create and records update accept all 14 iMednet POST /records write attributes via inline flags (--form-key / --form-id, --site-name / --site-id, --subject-key / --subject-id / --subject-oid, --interval-name / --interval-id, --visit-id, --record-id / --record-oid, --record-status, and --reason-for-change) alongside repeatable -d / --data KEY=VALUE clinical variable assignments or --file / --json payloads.

Passing --schema (api, canonical DataDictionary JSON, CDISC ODM XML, REDCap CSV, or a 4-file CSV directory/ZIP) preserves string values on text, string, and memo Variables for both CSV cells and -d KEY=VALUE overrides, while double-quoted -d 'KEY="90210"' values always remain strings even without --schema. Offline --dry-run runs with an offline --schema perform local validation only without issuing HTTP requests, whereas --dry-run without --schema loads the live Study DataDictionary to validate Form and Variable keys before reporting results.

Legacy records list -o/--output accepts json, csv, or an explicit .json / .csv destination path (preserving ./records.json and ./records.csv for -o json and -o csv), flattens recordData variables, masks Subject PHI to ***MASKED*** by default (--mask-phi; opt out with --no-mask-phi), and emits a stderr deprecation warning (prefer --format json for stdout or imednet export for file exports); combining -o/--output with --format json is an error. Existing export commands (which also accept --no-interactive to suppress live spinners) and datadict JSON/schema/diff outputs (see Data Dictionary Workflows and Rule Validation) retain their own contracts. This is not a global JSON wrapper for arbitrary third-party plugins. See CLI framework and output contracts for the framework decision, error/partial-output policy and compatibility inventory.

Path segment validation and exit codes

Every Study- or resource-scoped CLI command (decorated with @with_sdk, calling validate_cli_path_segment, or dispatched through imednet workflows subcommands such as extract-records and uat run) validates dynamic URL segments (study_key, batch_id, and item_id across Study, Subject, Site, Form, Record, Visit, Interval, Variable, Query, Data Dictionary, and Job targets) with validate_path_segment() and build_safe_path() before issuing HTTP requests.

When an argument contains path traversal sequences (.., %2e%2e), path separators (/ or \), query/fragment delimiters (? or #), or control characters, PathTraversalValidationError is caught at the CLI boundary: a redacted diagnostic is written to stderr, stdout remains empty (no partial JSON envelope or table rows), and the process exits with status code 1:

import contextlib
import io
from imednet.cli import app

for bad_argv in (
    ["records", "list", "../secret", "--simulation", "--format", "json"],
    ["workflows", "extract-records", "../secret", "--simulation", "--format", "json"],
):
    out_buf = io.StringIO()
    err_buf = io.StringIO()
    exit_code: int | str | None = None
    with contextlib.redirect_stdout(out_buf), contextlib.redirect_stderr(err_buf):
        try:
            app(bad_argv)
        except SystemExit as cli_exit:
            exit_code = cli_exit.code
    assert exit_code == 1
    assert out_buf.getvalue() == ""
    assert "Error:" in err_buf.getvalue()

Data Dictionary commands

The imednet datadict subcommands convert Study metadata across 4-file CSV exports, CDISC ODM 1.3 XML, REDCap CSV files, and the EDC REST API, validate offline sources (.json, .xml, REDCap .csv, .zip, or 4-file CSV directories), export the JSON Schema or CDISC ODM XML, and compute structural revision diffs across formats (see Data Dictionary Workflows and Rule Validation for Python equivalents and Record validation):

imednet datadict from-csv ./datadict_export.zip --study-key STUDY -o study_dd.json --strict --no-raw-xml
imednet datadict from-odm ./study_odm.xml --study-key STUDY -o study_dd.json --strict
imednet datadict to-odm study_dd.json -o study_odm.xml --file-oid ODM.STUDY.001
imednet datadict from-redcap ./redcap_dictionary.csv --study-key STUDY -o study_dd.json
imednet datadict from-api --study-key STUDY -o api_dd.json --no-raw-xml
imednet datadict from-api STUDY --simulation -o sim_dd.json
imednet datadict schema -o data-dictionary.schema.json
imednet datadict validate study_dd.json --schema data-dictionary.schema.json
imednet datadict diff baseline_dd.json study_dd.json --format md

Terminal capabilities and non-interactive mode

Multi-item list commands open an interactive keyboard grid when both stdin and stdout are connected to a capable TTY, while single-job commands (imednet jobs status and imednet jobs wait) always print a static summary table to stdout and exit immediately.

Pass --no-interactive (at the root command or on imednet tui, read, write, export, and workflow subcommands) or set IMEDNET_NON_INTERACTIVE=1 to disable full-screen curses grids, live stderr spinners, and interactive stdin prompts. Passing imednet tui --no-interactive (or invoking imednet tui while IMEDNET_NON_INTERACTIVE is enabled) exits immediately with status code 1, even when --force is supplied. Set NO_COLOR=1 (or any non-empty value) or TERM=dumb to suppress ANSI color escape sequences across tables and diagnostics while preserving --high-contrast palettes when color output is permitted. Interactive workflow wizards reject piped or non-TTY stdin streams immediately with exit code 1.

Server-side filters, sorting, and bounded fetches

Eleven filter-capable list commands (studies, sites, forms, intervals, queries, record-revisions, variables, visits, records, subjects, and codings) accept repeatable -f / --filter arguments using = or the standard iMednet comparison operators (<, <=, >, >=, ==, !=) with exclusive ; (AND) or , (OR) connectors. Filter attribute names (in snake_case or camelCase) and scalar values are validated locally against each endpoint’s documented filter allowlist and resource model before sending HTTP requests: string identifiers preserve leading zeros, double-quoted strings (including empty ""), and non-ASCII text (such as subject_key=001, code=0042, reason=="", or value=²), while integer and boolean attributes reject invalid values on stderr with exit code 1. Commands that take a positional study_key reject redundant study_key / studyKey attributes in --filter before issuing requests, whereas imednet studies list accepts them. records list and workflows extract-records additionally expose --record-data-filter (supporting =~ regular-expression matching in addition to the six standard operators, plus the literal none bypass) to filter Form Variable values on the server. All twelve list commands—including users list—accept --sort, --limit, --all, and --mask-phi / --no-mask-phi (enabled by default).

imednet records list STUDY --filter "formKey==F_DM;recordId>=600" \
    --record-data-filter "V_GENDER==Female;V_AGE>=18" --sort dateCreated,desc --limit 50
imednet queries list STUDY --filter "type==record,type==question" --sort annotationId,desc
imednet users list STUDY --include-inactive --sort login,asc --limit 25

Interactive TTY table sessions fetch one bounded page of 100 items by default and display a truncation notice when additional Study items exist; press a inside InteractiveDataGrid or pass --limit N (upstream size is automatically capped at 500 per page) or --all to retrieve larger batches. Non-interactive runs (--no-interactive, IMEDNET_NON_INTERACTIVE=1, or piped stdout), headless --format json, and file exports (--output json|csv) continue to fetch all matching pages unless --limit is explicitly specified.

Export PHI masking, SDTM, and quality-gate controls

Every imednet export subcommand (csv, parquet, excel, json, duckdb, sql, mongodb, neo4j, and snowflake) masks sensitive Subject identifiers and committed StudyConfiguration phiFields to ***MASKED*** by default (--mask-phi) before building USUBJID or domain outputs, even when --use-labels or --hierarchical is active. Authorized compliance workflows operating inside a restricted enclave can opt out explicitly with --no-mask-phi.

Exports also support native CDISC SDTM transformation (--as-sdtm and --sdtm-domain), batch-level CDISC standards readiness gating via StandardsReadinessValidator (--standards-profile and --min-standards-score), raw Variable casing alignment (--naming-convention snake_case|camelCase|sdtm), and opt-in pre-write Record schema readiness filtering (disabled by default across all nine subcommands, including SQLite per-Form, --single-table, and --long-format SQL exports; enable with --quality-gate and optional --min-readiness-score):

imednet export csv STUDY ./ae_sdtm.csv --sdtm-domain AE --standards-profile drug \
    --min-standards-score 85 --simulation
imednet workflows validate-standards STUDY --profile drug --simulation
imednet export parquet STUDY ./aligned_study.parquet --naming-convention snake_case
imednet export json STUDY ./study_tree.json --hierarchical --use-labels
imednet export neo4j STUDY bolt://localhost:7687 neo4j "$NEO4J_PASSWORD" \
    --quality-gate --min-readiness-score 90 --standards-profile general
imednet export parquet STUDY /secure/enclave/raw_study.parquet --no-mask-phi