npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dicom-worklist

v1.2.0

Published

DICOM Modality Worklist (MWL) C-FIND client for Node.js. Query scheduled procedures from any PACS supporting MWL SOP Class.

Readme

dicom-worklist

CodeQL Security Policy

DICOM Modality Worklist (MWL) client for Node.js.

Query scheduled procedures from any PACS that supports the Modality Worklist Information Model - FIND SOP Class (1.2.840.10008.5.1.4.31).

Built on top of dcmjs-dimse.

Install

npm install dicom-worklist

Quick Start

const { WorklistClient } = require('dicom-worklist');

const client = new WorklistClient({
  host: 'localhost',
  port: 4242,
  calledAet: 'ORTHANC',
  callingAet: 'MY_SCU',
});

// Query today's scheduled procedures
const items = await client.queryToday();

for (const item of items) {
  console.log(
    `${item.scheduled_time} | ${item.modality} | ${item.station_name} | ${item.exam_description}`
  );
}

API

new WorklistClient(options)

| Option | Type | Default | Description | |---|---|---|---| | host | string | 'localhost' | PACS hostname or IP | | port | number | 4242 | DICOM port | | calledAet | string | 'ORTHANC' | Called AE Title (PACS) | | callingAet | string | 'WORKLIST_SCU' | Calling AE Title (this client) | | timeout | number | 30000 | Timeout in ms |

client.echo()

Tests the DICOM association with a C-ECHO request.

Returns Promise<{ ok: boolean, error?: string }>.

client.queryWorklist(filters?)

Performs a MWL C-FIND query.

| Filter | Type | Default | Description | |---|---|---|---| | date | string | today (YYYYMMDD) | Scheduled date filter | | modality | string | '' (all) | Filter by modality (e.g. 'CT', 'MR') | | stationAet | string | '' (all) | Filter by station AE Title |

Returns Promise<Array<WorklistItem>>.

client.queryToday()

Shortcut for queryWorklist() with today's date.

WorklistItem

Each item returned by queryWorklist has the following shape:

{
  patient_name: 'DOE^JOHN^M',     // Full DICOM patient name (LAST^FIRST^MIDDLE)
  patient_id: 'WL-001',
  modality: 'CT',
  exam_description: 'CT CHEST WITHOUT CONTRAST',
  body_part: 'CHEST',
  station_name: 'CT-SIEMENS-01',
  station_aet: 'CT_SIEMENS_01',
  scheduled_date: '20260101',
  scheduled_time: '08:30',
  accession_number: 'ACC001',
}

Utility functions

For privacy compliance (LGPD/GDPR), use the exported getInitials() helper:

const { WorklistClient, getInitials } = require('dicom-worklist');

const items = await client.queryToday();
for (const item of items) {
  console.log(getInitials(item.patient_name)); // 'J.D.'
}

PACS Configuration

Your PACS must:

  1. Have the Worklist plugin enabled
  2. List this client's AE Title in its allowed modalities

Orthanc example (orthanc.json)

{
  "Worklists": {
    "Enable": true,
    "Database": "/var/lib/orthanc/worklists"
  },
  "DicomModalities": {
    "my_client": ["MY_SCU", "*", 11112]
  }
}

Testing

With Orthanc running on localhost:4242:

npm test

How It Works

This library performs a DICOM C-FIND at the MWL level using the ModalityWorklistInformationModelFind SOP Class. The query dataset is built manually (not via CFindRequest.createWorklistFindRequest()) to avoid encoding issues with certain VR types that cause DCMTK-based servers to abort the association.

License

MIT