Beispiel #1
0
        public Schema CreateWithDefaultItem(ApplicationType applicationType, IContainer container)
        {
            var schema     = Create(container);
            var schemaItem = _schemaItemFactory.Create(applicationType, schema);

            schema.AddSchemaItem(schemaItem);
            return(schema);
        }
Beispiel #2
0
        public override async Task <ModelSchemaItem> MapToModel(SnapshotSchemaItem snapshot)
        {
            var applicationType = ApplicationTypes.ByName(snapshot.ApplicationType);
            var schemaItem      = _schemaItemFactory.Create(applicationType);

            MapSnapshotPropertiesToModel(snapshot, schemaItem);
            await UpdateParametersFromSnapshot(snapshot, schemaItem, PKSimConstants.ObjectTypes.SchemaItem);

            schemaItem.FormulationKey    = snapshot.FormulationKey;
            schemaItem.TargetOrgan       = snapshot.TargetOrgan;
            schemaItem.TargetCompartment = snapshot.TargetCompartment;
            return(schemaItem);
        }
Beispiel #3
0
        private SchemaItem createSchemaItem(double startTime, SimpleProtocol simpleProtocol, Schema schema)
        {
            var schemaItem = _schemaItemFactory.Create(simpleProtocol.ApplicationType, schema);

            schemaItem.StartTime.Value       = startTime;
            schemaItem.StartTime.DisplayUnit = simpleProtocol.TimeUnit;
            schemaItem.Dose.Value            = simpleProtocol.Dose.Value;
            schemaItem.Dose.DisplayUnit      = simpleProtocol.DoseUnit;
            schemaItem.TargetCompartment     = simpleProtocol.TargetCompartment;
            schemaItem.TargetOrgan           = simpleProtocol.TargetOrgan;
            foreach (var parameter in _schemaItemParameterRetriever.AllDynamicParametersFor(simpleProtocol))
            {
                schemaItem.Parameter(parameter.Name).Value = parameter.Value;
            }

            schemaItem.FormulationKey = simpleProtocol.FormulationKey;
            return(schemaItem);
        }