VivoQuant
Public Member Functions | List of all members
WorklistTool Class Reference

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

Public Member Functions

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

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