Beispiel #1
0
 public ItemsBasedOrder(ItemsBasedOrder order)
 {
     _dateFrom     = order._dateFrom;
     _dateTo       = order._dateTo;
     PlacementMode = order.PlacementMode;
     OrderLevel    = order.OrderLevel;
     Listener      = order.Listener;
 }
Beispiel #2
0
        private Queue <ItemsBasedPicker> Split()
        {
            switch (OrderLevel)
            {
            case OrderLevel.Patient:
            case OrderLevel.Study:
            case OrderLevel.Series:
            case OrderLevel.Image:
                var pickers = new Queue <ItemsBasedPicker>();
                var order   = new ItemsBasedOrder(this);
                if (!Any())
                {
                    return(pickers);
                }
                ItemsBasedPicker picker;
                var first      = NextItem();
                var currentKey = Item.MakeKeyFilter(first, OrderLevel);
                foreach (var item in _items.Values)
                {
                    var nextKey = Item.MakeKeyFilter(item, OrderLevel);
                    if (!nextKey.Equals(currentKey))
                    {
                        order  = new ItemsBasedOrder(this);
                        picker = new ItemsBasedPicker(order);
                        pickers.Enqueue(picker);
                        currentKey = nextKey;
                    }
                    order.CopyRef(item);
                }
                return(pickers);

            default:
                Listener.OnNotify(this,
                                  new NotifyEventArgs(ProgressEventType.Error,
                                                      "DicomRetriever.getDicomCMoveRequest Attempt to request item at unsupported level: " +
                                                      OrderLevel));
                return(null);
            }
        }