NetReceiveNReportRequest Example for Delphi
procedure TForm1.LEADDicomNet1NetReceiveNReportRequest(ASender: TObject;
hNet: Integer; nPresentationID, nMessageID: Smallint; const pszClass,
pszInstance: WideString; nEvent: Smallint; hDS: Integer);
var
NewNode: TTreeNode;
nRet: Integer;
strName: String;
begin
NewNode:= TreeView1.Items.Add(TreeView1.Selected, 'Command Set - ' + 'N-REPORT-REQUEST');
NewNode.MakeVisible();
TreeView1.Items.Add(NewNode, 'Presentation ID: ' + IntToStr(nPresentationID));
TreeView1.Items.Add(NewNode, 'Message ID: ' + IntToStr(nMessageID));
nRet:= LEADDicomDS1.FindUID (pszClass);
if(nRet = 0)then
begin
strName:= LEADDicomDS1.DefaultInterface.Get_CurrentUID().Name;
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + strName + ' - ' + pszClass);
end
else
TreeView1.Items.Add(NewNode, 'Affected SOP Class: ' + pszClass);
TreeView1.Items.Add(NewNode, 'Affected SOP Instance: ' + pszInstance);
TreeView1.Items.Add(NewNode, 'Event: ' + IntToStr(nEvent));
//send response
LEADDICOMNet1.SendNReportResponse(hNet, nPresentationID, nMessageID, pszClass, pszInstance, COMMAND_STATUS_SUCCESS, nEvent, 0);
end;