VivoQuant
Loading...
Searching...
No Matches
Public Member Functions | List of all members
WorklistTool Class Reference

Object to manage a user's worklist. More...

#include <WorklistTool.h>

Public Member Functions

Object getList (DicomRepositoryIPACS *rep=0)
 Gets the list of all non-completed tasks.
 
Object getDcmRep ()
 Gets the current dcm rep of the worklist.
 
bool setDcmRep (DicomRepositoryIPACS *rep)
 Sets the current dcm rep of the worklist.
 
bool openTask (int index, Array< string > studies=Array< string >(), Array< string > series=Array< string >())
 Opens the given task based on the list indexing.
 
bool openTaskForm (string taskID)
 Opens the given task form without loading images, based on a task ID.
 
bool openTaskForm (int index)
 Opens the given task form without loading images, based on the list indexing.
 
bool openTask (string taskID, Array< string > studies=Array< string >(), Array< string > series=Array< string >())
 Opens the given task based on a task ID.
 
bool appendTask (string taskID, Array< string > studies=Array< string >(), Array< string > series=Array< string >(), bool loadECRF=false)
 Opens the given task based on a task ID.
 
Array< string > downloadTaskFiles (string taskID, int openMode=0, bool append=true)
 Downloads files associated with a task to the cache based on the task ID.
 
string getSelectedTaskID ()
 Returns the selected task ID.
 
bool setSelectedTask (string taskID)
 Sets the selected task ID in Worklist.
 
string getSelectedTaskPanelTab ()
 Gets the selected tab name of the task information panel.
 
bool setSelectedTaskPanelTab (string tabName)
 Selects the given tab name in the task information panel (case insensitive)
 
bool addTask (string scanID, Object &taskData)
 Adds a new task to a given scan.
 
string addScan (string studyInstanceUID, string patientID, Object &scanData)
 Adds a scan to the given study.
 
Object getTaskIDs (string dbPatientID, string scanID=string())
 Get all the task for a given patient.
 
Object getScans (string studyInstanceUID, string patientID=string())
 Get all the scan for a given study or study/patient combination.
 
string getTaskInfo (string taskID)
 Get the task info for the given task unique ID.
 
string getScanInfo (string scanID)
 Get the scan info for the given scan unique ID.
 
bool isGlobal ()
 Returns the global worklist state.
 
void setGlobal (bool global)
 Sets the worklist to be querying globally.
 
void setQueryTimeout (double timeout)
 Sets the timeout for the worklist queries.
 

Detailed Description

Object to manage a user's worklist.

This object can be used to perform actions related to the worklist. Each tasks can be obtained with getList() to retrieve their information.

See also ScriptMaster::workList() to obtain this object.

Member Function Documentation

◆ addScan()

string addScan ( string  studyInstanceUID,
string  patientID,
Object &  scanData 
)

Adds a scan to the given study.

Parameters
studyInstanceUIDThe StudyInstanceUID of the data to add the scan to
patientIDThe Patient ID of the data to add the scan to
Returns
The newly created scanID or empty if it failed

◆ addTask()

bool addTask ( string  scanID,
Object &  taskData 
)

Adds a new task to a given scan.

Parameters
scanIDID of the scan to add the task to
taskDataAn array containing key-value pairs of task information
Returns
True if it succeeded, false otherwise

◆ appendTask()

bool appendTask ( string  taskID,
Array< string >  studies = Array< string >(),
Array< string >  series = Array< string >(),
bool  loadECRF = false 
)

Opens the given task based on a task ID.

Parameters
taskIDthe task ID
loadECRFTrue to overwrite the currently loaded eCRF, false to only append the data
studiesthe list of StudyInstanceUIDs to be appended
seriesthe list of SeriesInstanceUIDs to be appended
Returns
True if it succeeded, false otherwise

◆ downloadTaskFiles()

Array< string > downloadTaskFiles ( string  taskID,
int  openMode = 0,
bool  append = true 
)

Downloads files associated with a task to the cache based on the task ID.

Parameters
taskIDthe task ID
openMode0 = Download only (download files to the cache but do not try to open any of them) 1 = Automatic (use file extension to determine whether to open in VQ or externally) 2 = VQ (try to open all files in VQ) 3 = External (try to open all files externally)
appendTrue if files that can be opened in VQ should be appended
Returns
paths List of the paths to which the files were downloaded

◆ getDcmRep()

Object getDcmRep ( )

Gets the current dcm rep of the worklist.

Returns
A DicomRepositoryIPACS object

◆ getList()

Object getList ( DicomRepositoryIPACS *  rep = 0)

Gets the list of all non-completed tasks.

Parameters
repA DicomRepositoryIPACS object, if none is specified, the current repository of the worklist is used
Returns
An array containing WorklistTask

◆ getScanInfo()

string getScanInfo ( string  scanID)

Get the scan info for the given scan unique ID.

Parameters
scanIDThe scan ID
Returns
A JSON formatted string containing the task info

◆ getScans()

Object getScans ( string  studyInstanceUID,
string  patientID = string() 
)

Get all the scan for a given study or study/patient combination.

Parameters
studyInstanceUIDThe study instance UID
patientIDThe DICOM patient ID (optional)
Returns
An array of scans info key/value pairs

◆ getSelectedTaskID()

string getSelectedTaskID ( )

Returns the selected task ID.

Returns
The selected task ID or an empty string if nothing is selected

◆ getSelectedTaskPanelTab()

string getSelectedTaskPanelTab ( )

Gets the selected tab name of the task information panel.

Returns
The selected task panel tab name

◆ getTaskIDs()

Object getTaskIDs ( string  dbPatientID,
string  scanID = string() 
)

Get all the task for a given patient.

Parameters
dbPatientIDThe database patient ID
Returns
An array of tasks info strings

◆ getTaskInfo()

string getTaskInfo ( string  taskID)

Get the task info for the given task unique ID.

Parameters
taskIDThe task ID
Returns
A JSON formatted string containing the task info

◆ openTask() [1/2]

bool openTask ( int  index,
Array< string >  studies = Array< string >(),
Array< string >  series = Array< string >() 
)

Opens the given task based on the list indexing.

Parameters
indexthe task index in the list
studiesthe list of StudyInstanceUIDs to be opened
seriesthe list of SeriesInstanceUIDs to be opened
Returns
True if it succeeded, false otherwise

◆ openTask() [2/2]

bool openTask ( string  taskID,
Array< string >  studies = Array< string >(),
Array< string >  series = Array< string >() 
)

Opens the given task based on a task ID.

Parameters
taskIDthe task ID
studiesthe list of StudyInstanceUIDs to be opened
seriesthe list of SeriesInstanceUIDs to be opened
Returns
True if it succeeded, false otherwise

◆ openTaskForm() [1/2]

bool openTaskForm ( int  index)

Opens the given task form without loading images, based on the list indexing.

Parameters
indexthe task index in the list
Returns
True if it succeeded, false otherwise

◆ openTaskForm() [2/2]

bool openTaskForm ( string  taskID)

Opens the given task form without loading images, based on a task ID.

Parameters
taskIDthe task ID
Returns
True if it succeeded, false otherwise

◆ setDcmRep()

bool setDcmRep ( DicomRepositoryIPACS *  rep)

Sets the current dcm rep of the worklist.

Parameters
repA DicomRepositoryIPACS object

◆ setGlobal()

void setGlobal ( bool  global)
inline

Sets the worklist to be querying globally.

Parameters
globalSet to true to activate the global query.

◆ setQueryTimeout()

void setQueryTimeout ( double  timeout)
inline

Sets the timeout for the worklist queries.

Parameters
timeoutThe timeout value in milliseconds

◆ setSelectedTask()

bool setSelectedTask ( string  taskID)

Sets the selected task ID in Worklist.

Parameters
taskIDthe task ID (or an empty string to clear the selection)
Returns
True if the task was selected, false if not

◆ setSelectedTaskPanelTab()

bool setSelectedTaskPanelTab ( string  tabName)

Selects the given tab name in the task information panel (case insensitive)

Parameters
tabNamethe tab name the panel to select
Returns
True if the tab was selected, false if not