public ISurgeonScenarioNumberPatientsResultElementFactory CreateSurgeonScenarioNumberPatientsResultElementFactory()
        {
            ISurgeonScenarioNumberPatientsResultElementFactory factory = null;

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

            return(factory);
        }
Exemplo n.º 2
0
        public ISurgeonScenarioNumberPatientsResultElementFactory CreateSurgeonScenarioNumberPatientsResultElementFactory()
        {
            ISurgeonScenarioNumberPatientsResultElementFactory factory = null;

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

            return(factory);
        }
 public ISurgeonScenarioNumberPatients Calculate(
     ISurgeonScenarioNumberPatientsResultElementFactory surgeonScenarioNumberPatientsResultElementFactory,
     ISurgeonScenarioNumberPatientsFactory surgeonScenarioNumberPatientsFactory,
     ISurgeonScenarioNumberPatientsResultElementCalculation surgeonScenarioNumberPatientsResultElementCalculation,
     Irt rt,
     IsΛ sΛ,
     In n,
     Ix x)
 {
     return(surgeonScenarioNumberPatientsFactory.Create(
                sΛ.Value
                .Select(w => surgeonScenarioNumberPatientsResultElementCalculation.Calculate(
                            surgeonScenarioNumberPatientsResultElementFactory,
                            w.sIndexElement,
                            w.ΛIndexElement,
                            rt,
                            n,
                            x))
                .ToImmutableList()));
 }
Exemplo n.º 4
0
 public ISurgeonScenarioNumberPatientsResultElement Calculate(
     ISurgeonScenarioNumberPatientsResultElementFactory surgeonScenarioNumberPatientsResultElementFactory,
     IsIndexElement sIndexElement,
     IΛIndexElement ΛIndexElement,
     Irt rt,
     In n,
     Ix x)
 {
     return(surgeonScenarioNumberPatientsResultElementFactory.Create(
                sIndexElement,
                ΛIndexElement,
                rt.Value
                .Select(a =>
                        x.GetElementAtAsint(
                            sIndexElement,
                            a.rIndexElement,
                            a.tIndexElement)
                        *
                        n.GetElementAtAsint(
                            sIndexElement,
                            ΛIndexElement))
                .Sum()));
 }