public Medicine(string name = "", string type = "", double price = 0, int ageRestrictions = 0, string intended = "", string composition = "", string comments = "")
            : base(name, type, price, ageRestrictions, intended, composition, comments)
        {
            reimbursedMedicine = new ReimbursedMedicine();
            replacements       = new ObservableCollection <Medicine>();

            GuidMed = Guid.NewGuid();
        }
        public Medicine(StructMedicine structMedicine_, ReimbursedMedicine reimbursedMedicine_)
            : base(structMedicine_.Name, structMedicine_.Type, structMedicine_.Price, structMedicine_.AgeRestrictions, structMedicine_.Intended, structMedicine_.Composition, structMedicine_.Comments)
        {
            reimbursedMedicine = (ReimbursedMedicine)reimbursedMedicine_.Clone();

            replacements = new ObservableCollection <Medicine>();

            GuidMed = Guid.NewGuid();
        }
        public void Copy(Medicine med)
        {
            Name            = med.Name;
            Type            = med.Type;
            Price           = med.Price;
            AgeRestrictions = med.AgeRestrictions;
            Intended        = med.Intended;
            Composition     = med.Composition;
            Comments        = med.Comments;

            GuidMed      = med.GuidMed;
            replacements = new ObservableCollection <Medicine>(med.replacements);

            reimbursedMedicine = (ReimbursedMedicine)this.reimbursedMedicine.Clone();
        }
        public static void AddRandomMedicineToDatabase(Database database)
        {
            string nameMed = RandomText(3, 20);

            while (Regex.IsMatch(nameMed, "^[^ ].*$") == false)
            {
                nameMed = RandomText(3, 20);
            }


            StructMedicine     sMed = new StructMedicine(nameMed, RandomText(0, 15), RandomPrice(1000), rnd.Next(80), RandomText(0, 200), RandomText(0, 200), RandomText(0, 200));
            ReimbursedMedicine rMed = new ReimbursedMedicine(RandomPrice(1000), RandomLevelOfFunding());

            database.AddMedicine(new Medicine(sMed, rMed));
        }