Skip to content

qie.postDICOMResponse

Signature: qie.postDICOMResponse(response, timeout*, returnError*)

Returns: Boolean responsePosted - true = response successfully posted, false = response did not post

Posts a DICOM response to the original message sender.

Note

The MessageIDBeingRespondedTo tag (0000,0120) of response will be updated with the original request's MessageID tag (0000,0110).

Parameters

Type Name Description Default
DICOM Message response the DICOM response message object to be sent to the sending system
Integer timeout* (optional) seconds to wait to confirm that response is sent 15
Boolean returnError* (optional) default behavior is to suppress connection errors and log them as warnings, setting this option to true will instead explicitly return the errors false

Example

// Example of how to return a DICOM response back to the user:
// C-Find Request was the inbound DICOM message
var cFindRequest = qie.createCFindRQCommand(
    "1.2.840.10008.5.1.4.1.2.2.1", // Study Root Query/Retrieve Information Model – FIND
    0                              // priority (0 = medium)
);
cFindRequest.setNode("/0008,0052", "STUDY");
cFindRequest.setNode("/0010,0010", "Robert*");

// Create a response for the request (Status: Success)
var dicomResponseStatus = 0x0000;
var dicomResponseMessage = qie.createDICOMResponseFromRequest(cFindRequest, dicomResponseStatus);

// Populate response attributes
dicomResponseMessage.setNode("/0008,0052", "STUDY");
dicomResponseMessage.setNode("/0010,0010", "Robert Example");
dicomResponseMessage.setNode("/0020,000D", "1.2.840.113619.2.55.3.604688511.435.1592538156.467");
dicomResponseMessage.setNode("/0008,1030", "Example Study Description");

// Send the response
qie.postDICOMResponse(dicomResponseMessage);