Exemplo n.º 1
0
 public IWardNumberAssignedOperatingRoomsResultElement Calculate(
     IWardNumberAssignedOperatingRoomsResultElementFactory wardNumberAssignedOperatingRoomsResultElementFactory,
     IWParameterElement WParameterElement,
     ITPz z)
 {
     return(wardNumberAssignedOperatingRoomsResultElementFactory.Create(
                WParameterElement.wIndexElement,
                WParameterElement.Value
                .SelectMany(a => z.Value.Where(i => i.sIndexElement == a && i.Value)
                            .Select(w => w.rIndexElement))
                .Distinct()
                .Count()));
 }
 public IWardNumberAssignedActiveDaysResultElement Calculate(
     IWardNumberAssignedActiveDaysResultElementFactory wardNumberAssignedActiveDaysResultElementFactory,
     IWParameterElement WParameterElement,
     ITPz z)
 {
     return(wardNumberAssignedActiveDaysResultElementFactory.Create(
                WParameterElement.wIndexElement,
                WParameterElement.Value
                .SelectMany(a => z.Value.Where(i => i.sIndexElement == a && i.Value)
                            .Select(i => i.aIndexElement.Value.ToDateTimeOffset(TimeSpan.Zero).UtcDateTime.DayOfWeek))
                .Distinct()
                .Count()));
 }
        public IWParameterElement Create(
            IwIndexElement wIndexElement,
            ImmutableList <IsIndexElement> value)
        {
            IWParameterElement parameterElement = null;

            try
            {
                parameterElement = new WParameterElement(
                    wIndexElement,
                    value);
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(parameterElement);
        }