Skip to content

Commit

Permalink
Fix a defect about Sequence search
Browse files Browse the repository at this point in the history
  • Loading branch information
celeron533 committed Jul 3, 2024
1 parent 77cd8a2 commit 0b7a9d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions DicomGrepCore/Services/SearchService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,14 @@ private IList<ResultDicomItem> CompareDicomTagAndValue(DicomDataset dataset, ref
{
DicomSequence sequenceItem = (DicomSequence)dicomItem;

if (string.IsNullOrWhiteSpace(criteria.SearchTag) ||
CompareDicomTag(dicomItem.Tag, criteria.DicomSearchTag))
if (string.IsNullOrEmpty(criteria.SearchText) &&
(string.IsNullOrWhiteSpace(criteria.SearchTag) ||
CompareDicomTag(dicomItem.Tag, criteria.DicomSearchTag)))
{
resultDicomItems ??= new List<ResultDicomItem>();
resultDicomItems.Add(new ResultDicomItem(dicomItem.Tag, $"Count = {sequenceItem.Items.Count}", []));
}

foreach (DicomDataset innerDataset in sequenceItem.Items)
{
CompareDicomTagAndValue(innerDataset, ref resultDicomItems);
Expand Down

0 comments on commit 0b7a9d6

Please sign in to comment.