Skip to content

Commit

Permalink
Searches can now be based on StudyID
Browse files Browse the repository at this point in the history
  • Loading branch information
RobHolme committed Aug 17, 2021
1 parent 43c8da8 commit 5b4a7e7
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/Send-CFind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ public class SendCFind : PSCmdlet

private string dicomRemoteHost;
private int dicomRemoteHostPort;
private string callingDicomAeTitle = "DICOMTOOLS";
private string callingDicomAeTitle = "DICOMTOOLS-SCU";
private string calledDicomAeTitle = "ANY-SCP";
private string patientName = "";
private string patientID = "";
private string studyID = "";
private bool useTls = false;
private string responseStatus = "";
private string verboseString = "";
Expand Down Expand Up @@ -110,6 +111,19 @@ public string PatientID
set { this.patientID = value; }
}

// Study ID
[Parameter(
Mandatory = true,
Position = 4,
HelpMessage = "The Study ID to search for",
ParameterSetName = "StudyID"
)]
public string StudyID
{
get { return this.studyID; }
set { this.studyID = value; }
}

// Use TLS for the connection
[Parameter(
Mandatory = false,
Expand Down Expand Up @@ -150,7 +164,7 @@ protected override void ProcessRecord()
cFindRequest.Dataset.AddOrUpdate(DicomTag.PatientSex, "");
cFindRequest.Dataset.AddOrUpdate(DicomTag.PatientAddress, "");
cFindRequest.Dataset.AddOrUpdate(DicomTag.StudyDate, "");
cFindRequest.Dataset.AddOrUpdate(DicomTag.StudyInstanceUID, "");
cFindRequest.Dataset.AddOrUpdate(DicomTag.StudyInstanceUID, studyID);

// The encoding of the results ('ISO_IR 100' is 'Latin Alphabet No. 1').
// http://dicom.nema.org/dicom/2013/output/chtml/part02/sect_D.6.html
Expand Down

0 comments on commit 5b4a7e7

Please sign in to comment.