public IScenarioNumberPatientsResultElement Calculate(
     IScenarioNumberPatientsResultElementFactory scenarioNumberPatientsResultElementFactory,
     IΛIndexElement ΛIndexElement,
     ISurgeonScenarioNumberPatients surgeonScenarioNumberPatients)
 {
     return(scenarioNumberPatientsResultElementFactory.Create(
                ΛIndexElement,
                surgeonScenarioNumberPatients.Value
                .Where(w => w.ΛIndexElement == ΛIndexElement)
                .Select(w => w.Value)
                .Sum()));
 }
 public IScenarioNumberPatients Calculate(
     IScenarioNumberPatientsResultElementFactory scenarioNumberPatientsResultElementFactory,
     IScenarioNumberPatientsFactory scenarioNumberPatientsFactory,
     IScenarioNumberPatientsResultElementCalculation scenarioNumberPatientsResultElementCalculation,
     IΛ Λ,
     ISurgeonScenarioNumberPatients surgeonScenarioNumberPatients)
 {
     return(scenarioNumberPatientsFactory.Create(
                Λ.Value
                .Select(i => scenarioNumberPatientsResultElementCalculation.Calculate(
                            scenarioNumberPatientsResultElementFactory,
                            i,
                            surgeonScenarioNumberPatients))
                .ToImmutableList()));
 }
        public IScenarioNumberPatientsResultElementFactory CreateScenarioNumberPatientsResultElementFactory()
        {
            IScenarioNumberPatientsResultElementFactory factory = null;

            try
            {
                factory = new ScenarioNumberPatientsResultElementFactory();
            }
            catch (Exception exception)
            {
                this.Log.Error("Exception message: " + exception.Message + " and stacktrace " + exception.StackTrace);
            }

            return(factory);
        }
Exemple #4
0
        public IScenarioNumberPatientsResultElementFactory CreateScenarioNumberPatientsResultElementFactory()
        {
            IScenarioNumberPatientsResultElementFactory factory = null;

            try
            {
                factory = new ScenarioNumberPatientsResultElementFactory();
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(factory);
        }