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()));
 }
コード例 #2
0
 public IScenarioNumberPatients Calculate(
     IScenarioNumberPatientsResultElementFactory scenarioNumberPatientsResultElementFactory,
     IScenarioNumberPatientsFactory scenarioNumberPatientsFactory,
     IScenarioNumberPatientsResultElementCalculation scenarioNumberPatientsResultElementCalculation,
     IΛ Λ,
     ISurgeonScenarioNumberPatients surgeonScenarioNumberPatients)
 {
     return(scenarioNumberPatientsFactory.Create(
                Λ.Value
                .Select(i => scenarioNumberPatientsResultElementCalculation.Calculate(
                            scenarioNumberPatientsResultElementFactory,
                            i,
                            surgeonScenarioNumberPatients))
                .ToImmutableList()));
 }
コード例 #3
0
        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);
        }
コード例 #4
0
        public IScenarioNumberPatientsResultElementFactory CreateScenarioNumberPatientsResultElementFactory()
        {
            IScenarioNumberPatientsResultElementFactory factory = null;

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

            return(factory);
        }