Ejemplo n.º 1
0
        private IEnumerable <object> pkAnalysisFor(Simulation simulation, CurveChart chart, OSPSuiteTracker buildTracker)
        {
            var report = new List <object>();

            var globalPKAnalysis = _globalPKAnalysisTask.CalculateGlobalPKAnalysisFor(new[] { simulation });

            updateDisplayUnits(globalPKAnalysis, PresentationSettingsFor(chart, PresenterConstants.PresenterKeys.GlobalPKAnalysisPresenter));

            var globalPKAnalysisTable = _globalPKAnalysisToDataTableMapper.MapFrom(globalPKAnalysis);

            if (globalPKAnalysisTable.Rows.Count > 0)
            {
                report.Add(buildTracker.GetStructureElementRelativeToLast(PKSimConstants.UI.GlobalPKAnalyses, 1));
                report.Add(globalPKAnalysisTable);
            }

            var curvesToDisplay = chart.Curves.ForPKAnalysis();
            var pkAnalyses      = _pkAnalysisTask.CalculateFor(new[] { simulation }, curvesToDisplay.Select(c => c.yData)).ToList();

            updateDisplayUnits(pkAnalyses, PresentationSettingsFor(chart, PresenterConstants.PresenterKeys.IndividualPKParametersPresenter));
            var pkAnalysesTable     = _pkAnalysisToDataTableMapper.MapFrom(pkAnalyses, curvesToDisplay);
            var pkAnalysesForReport = new PKAnalysesTable(pkAnalysesTable);

            report.Add(buildTracker.GetStructureElementRelativeToLast(PKSimConstants.UI.PKAnalyses, 1));
            report.Add(pkAnalysesForReport);

            return(report);
        }
Ejemplo n.º 2
0
        public IEnumerable <DataTable> ExportToDataTable(IEnumerable <DataColumn> dataColumns, GlobalPKAnalysis globalPKAnalysis, DataTable dataTable, IEnumerable <Simulation> simulations)
        {
            var allDataTables  = new List <DataTable>();
            var allSimulations = simulations.ToList();

            if (allSimulations.Any())
            {
                allDataTables.AddRange(_dataRepositoryTask.ToDataTable(dataColumns, x => _quantityDisplayPathMapper.DisplayPathAsStringFor(simulationForColumn(x, allSimulations), x)));
            }

            allDataTables.Add(_globalPKAnalysisToDataTableMapper.MapFrom(globalPKAnalysis));
            allDataTables.Add(dataTable);

            return(allDataTables);
        }
Ejemplo n.º 3
0
        public IEnumerable <DataTable> ExportToDataTable(IEnumerable <DataColumn> dataColumns, GlobalPKAnalysis globalPKAnalysis, DataTable dataTable, IEnumerable <Simulation> simulations)
        {
            var allDataTables  = new List <DataTable>();
            var allSimulations = simulations.ToList();

            if (allSimulations.Any())
            {
                string ColumnNameRetriever(DataColumn dataColumn) => _quantityDisplayPathMapper.DisplayPathAsStringFor(simulationForColumn(dataColumn, allSimulations), dataColumn);

                allDataTables.AddRange(_dataRepositoryTask.ToDataTable(dataColumns, ColumnNameRetriever, _dimensionFactory.MergedDimensionFor));
            }

            allDataTables.Add(_globalPKAnalysisToDataTableMapper.MapFrom(globalPKAnalysis));
            allDataTables.Add(dataTable);

            return(allDataTables);
        }
Ejemplo n.º 4
0
 public GlobalPKAnalysisDTO MapFrom(GlobalPKAnalysis globalPKAnalysis)
 {
     return(new GlobalPKAnalysisDTO(_dataTableMapper.MapFrom(globalPKAnalysis, addMetaData: true)));
 }