public static ProductDto GetParacetamolDto() { var subst = new ProductSubstanceDto { Id = Guid.NewGuid().ToString(), Name = "paracetamol", Quantity = 500, SortOrder = 1, Substance = "paracetamol", UnitAbbreviation = "mg", UnitDivisor = 1000, UnitGroupAllowConversion = true, UnitGroupName = "massa", UnitIsReference = false, UnitMultiplier = 1 / 1000, UnitName = "milligram" }; var route = new RouteDto { Id = Guid.NewGuid().ToString(), Name = "oraal", Abbreviation = "or" }; var dto = new ProductDto { BrandName = "", GenericName = "paracetamol", DisplayName = "paracetamol 500 mg tablet", Id = Guid.NewGuid().ToString(), Name = DisplayName, PackageAbbreviation = "tabl", PackageName = "tablet", ProductCode = "2", Quantity = 1M, Routes = new List <RouteDto> { route }, ShapeName = "tablet", Substances = new List <ProductSubstanceDto> { subst }, UnitAbbreviation = "stuk", UnitDivisor = 1, UnitGroupAllowConversion = false, UnitGroupName = "verpakking", UnitIsReference = false, UnitMultiplier = 1, UnitName = "stuk" }; return(dto); }
public static ProductSubstance Create(ProductSubstanceDto dto, Product product, Substance substance, Unit unit) { return(new ProductSubstance { Product = product, Name = dto.Name, Quantity = new UnitValue(dto.Quantity, unit), Substance = substance, SortOrder = dto.SortOrder }); }
internal static ProductSubstance Create(ProductSubstanceDto dto, Product product, Substance substance, UnitValue quantity) { var prodSubst = new ProductSubstance { Product = product, Substance = substance, Name = dto.Name, Quantity = quantity, SortOrder = dto.SortOrder }; Validate(prodSubst); return(prodSubst); }
private static UnitDto GetUnitDto(ProductSubstanceDto dto) { var unitDto = new UnitDto { Abbreviation = dto.UnitAbbreviation, AllowConversion = dto.UnitGroupAllowConversion, Divisor = dto.UnitDivisor, IsReference = dto.UnitIsReference, Multiplier = dto.UnitMultiplier, Name = dto.UnitName, UnitGroupName = dto.UnitGroupName }; return(unitDto); }
public static ProductDto GetDopamineDto() { var subst = new ProductSubstanceDto { Id = Guid.NewGuid().ToString(), Name = "dopamine", Quantity = 200, SortOrder = 1, Substance = "dopamine", UnitAbbreviation = "mg", UnitDivisor = 1000, UnitGroupAllowConversion = true, UnitGroupName = "massa", UnitIsReference = false, UnitMultiplier = 1 / 1000, UnitName = "milligram" }; var dto = new ProductDto { BrandName = "Dynatra", GenericName = "dopamine", DisplayName = "dopamine 200 mg (Dynatra) 5 mL infusievloeistof per ampul", Id = Guid.NewGuid().ToString(), Name = DisplayName, PackageAbbreviation = "amp", PackageName = "ampul", ProductCode = "1", Quantity = 5M, Routes = new List <RouteDto> { RouteTestFixtures.GetRouteIvDto() }, ShapeName = "infusievloeistof", Substances = new List <ProductSubstanceDto> { subst }, UnitAbbreviation = "mL", UnitDivisor = 1000, UnitGroupAllowConversion = true, UnitGroupName = "volume", UnitIsReference = false, UnitMultiplier = 1 / 1000, UnitName = "milliliter" }; return(dto); }
public static ProductDto GetDopamineDto() { var subst = new ProductSubstanceDto { Id = Guid.NewGuid().ToString(), Name = "dopamine", Quantity = 200, SortOrder = 1, Substance = "dopamine", UnitAbbreviation = "mg", UnitDivisor = 1000, UnitGroupAllowConversion = true, UnitGroupName = "massa", UnitIsReference = false, UnitMultiplier = 1 / 1000, UnitName = "milligram" }; var dto = new ProductDto { BrandName = "Dynatra", GenericName = "dopamine", DisplayName = "dopamine 200 mg (Dynatra) 5 mL infusievloeistof per ampul", Id = Guid.NewGuid().ToString(), Name = DisplayName, PackageAbbreviation = "amp", PackageName = "ampul", ProductCode = "1", Quantity = 5M, Routes = new List<RouteDto> { RouteTestFixtures.GetRouteIvDto() }, ShapeName = "infusievloeistof", Substances = new List<ProductSubstanceDto> { subst }, UnitAbbreviation = "mL", UnitDivisor = 1000, UnitGroupAllowConversion = true, UnitGroupName = "volume", UnitIsReference = false, UnitMultiplier = 1 / 1000, UnitName = "milliliter" }; return dto; }
private Unit GetUnit(ProductSubstanceDto dto) { var unitDto = GetUnitDto(dto); return(new UnitFactory(unitDto).Get()); }
public static ProductDto GetParacetamolDto() { var subst = new ProductSubstanceDto { Id = Guid.NewGuid().ToString(), Name = "paracetamol", Quantity = 500, SortOrder = 1, Substance = "paracetamol", UnitAbbreviation = "mg", UnitDivisor = 1000, UnitGroupAllowConversion = true, UnitGroupName = "massa", UnitIsReference = false, UnitMultiplier = 1/1000, UnitName = "milligram" }; var route = new RouteDto { Id = Guid.NewGuid().ToString(), Name = "oraal", Abbreviation = "or" }; var dto = new ProductDto { BrandName = "", GenericName = "paracetamol", DisplayName = "paracetamol 500 mg tablet", Id = Guid.NewGuid().ToString(), Name = DisplayName, PackageAbbreviation = "tabl", PackageName = "tablet", ProductCode = "2", Quantity = 1M, Routes = new List<RouteDto> { route }, ShapeName = "tablet", Substances = new List<ProductSubstanceDto> {subst}, UnitAbbreviation = "stuk", UnitDivisor = 1, UnitGroupAllowConversion = false, UnitGroupName = "verpakking", UnitIsReference = false, UnitMultiplier = 1, UnitName = "stuk" }; return dto; }