private void updateSpeciesDependentParameter(Model.CompoundProcess process, CompoundProcess batchCompoundProcess) { if (string.IsNullOrEmpty(batchCompoundProcess.Species)) { return; } var species = _speciesRepository.FindById(batchCompoundProcess.Species); _compoundProcessTask.SetSpeciesForProcess(process, species); }
private void updateProcessParameters(Model.CompoundProcess compoundProcess, CompoundProcess batchCompoundProcess) { foreach (var parameterValue in batchCompoundProcess.ParameterValues) { var parameter = compoundProcess.Parameter(parameterValue.Key); if (parameter == null) { _batchLogger.AddWarning($"Parameter '{parameterValue.Key}' not found in process '{compoundProcess.InternalName}'"); continue; } parameter.Value = parameterValue.Value; _batchLogger.AddParameterValueToDebug(parameter); } }
private ProcessSelectionGroup selectionGroup <TPartialProcess>(ProcessSelectionGroup processSelectionGroup, Model.CompoundProcess process, params SystemicProcessType[] systemicProcessTypes) where TPartialProcess : PartialProcess { if (process.IsAnImplementationOf <TPartialProcess>()) { return(processSelectionGroup); } var systemicProcess = process as SystemicProcess; if (systemicProcess == null) { return(null); } if (systemicProcess.SystemicProcessType.IsOneOf(systemicProcessTypes)) { return(processSelectionGroup); } return(null); }
private ProcessSelectionGroup selectionGroupFor(CompoundProcessesSelection compoundProcessesSelection, Model.CompoundProcess process) { return(selectionGroup <EnzymaticProcess>(compoundProcessesSelection.MetabolizationSelection, process, SystemicProcessTypes.Hepatic) ?? selectionGroup <TransportPartialProcess>(compoundProcessesSelection.TransportAndExcretionSelection, process, SystemicProcessTypes.GFR, SystemicProcessTypes.Biliary, SystemicProcessTypes.Renal) ?? selectionGroup <SpecificBindingPartialProcess>(compoundProcessesSelection.SpecificBindingSelection, process)); }
private async Task addProcessToProcessSelection(CompoundProcessesSelection compoundProcessesSelection, CompoundProcessSelection snapshotCompoundProcessSelection, Model.CompoundProcess process, SnapshotContext snapshotContext) { var processSelectionGroup = selectionGroupFor(compoundProcessesSelection, process); var processContext = new CompoundProcessSnapshotContext(process, snapshotContext); var processSelection = await _processMappingMapper.MapToModel(snapshotCompoundProcessSelection, processContext); processSelectionGroup.AddProcessSelection(processSelection); }
private async Task addProcessToProcessSelection(CompoundProcessesSelection compoundProcessesSelection, CompoundProcessSelection compoundProcessSelection, Model.CompoundProcess process) { var processSelectionGroup = selectionGroupFor(compoundProcessesSelection, process); var processSelection = await _processMappingMapper.MapToModel(compoundProcessSelection, process); processSelectionGroup.AddProcessSelection(processSelection); }
public CompoundProcessSnapshotContext(Model.CompoundProcess process, SnapshotContext baseContext) : base(baseContext) { Process = process; }