Ejemplo n.º 1
0
        private void LaunchReconstitution()
        {
            Kit ck = SelectedInventoryItem as Kit;
            ReconstitutedColdKit bs = new ReconstitutedColdKit();

            ReconstitutionViewModel rvm = new ReconstitutionViewModel(ck);

            DesktopApplication.MakeModalDocument(rvm);
        }
Ejemplo n.º 2
0
        private void SaveBulkDose()
        {
            ReconstitutedColdKit bd = (Item as Kit).ReconstituteColdKit(BdCalibrationActivity, DateTime.Today.Add(CalibrationTime), BdExpiryDate, "", DrawnVolume, SelectedIngredient, TotalVolume);

            DesktopApplication.Librarian.SaveItem(bd);
            //SelectedIngredient.Volume = SelectedIngredient.Volume - DrawnVolume;
            //SelectedIngredient.CalibrationActivity = SelectedIngredient.CalibrationActivity - BdCalibrationActivity;
            //SelectedIngredient.CalibrationDate = DateTime.Today.Add(CalibrationTime);
            //Platform.Retriever.SaveItem(SelectedIngredient);
            Close();
        }
Ejemplo n.º 3
0
        private void addNewInventoryItem()
        {
            //Application.ShowDialog("Debug",SelectedInventoryType);
            if (SelectedInventoryType == "Split Unit Dose")
            {
                SplitUnitDose d = new SplitUnitDose();
                d.CalibrationDate = DateTime.Now;
                d.ExpiryDate      = DateTime.Now.AddHours(12);
                d.ItemSaving     += InventoryItem_ItemSaved;
                DesktopApplication.MakeModalDocument(new SplitUnitDoseViewModel(d));
            }
            else if (SelectedInventoryType == "Bulk Tc99m")
            {
                Elution bd = new Elution();
                bd.CalibrationDate = DateTime.Now;
                bd.ExpiryDate      = DateTime.Now.AddDays(1);

                bd.ItemSaving += InventoryItem_ItemSaved;
                System.Diagnostics.Debug.WriteLine("Bulk Dose has been created");

                //InventoryItems.Add(bd);
                //System.Diagnostics.Debug.WriteLine("Bulk Dose added to inventory");
                DesktopApplication.MakeModalDocument(new BulkDoseViewModel(bd));
            }
            else if (SelectedInventoryType == "Reconstituted Kit")
            {
                ReconstitutedColdKit bd = new ReconstitutedColdKit();
                bd.CalibrationDate = DateTime.Now;
                bd.ExpiryDate      = DateTime.Now.AddDays(1);

                bd.ItemSaving += InventoryItem_ItemSaved;


                //InventoryItems.Add(bd);
                //System.Diagnostics.Debug.WriteLine("Bulk Dose added to inventory");
                DesktopApplication.MakeModalDocument(new ReconstitutedColdKitViewModel(bd));
            }
            else if (SelectedInventoryType == "Cold Kit")
            {
                Kit ck = new Kit();
                ck.ExpiryDate  = DateTime.Now.AddDays(30);
                ck.ItemSaving += InventoryItem_ItemSaved;


                //InventoryItems.Add(bd);
                //System.Diagnostics.Debug.WriteLine("Bulk Dose added to inventory");
                DesktopApplication.MakeModalDocument(new DataStoreItemViewModel(ck));
            }
            else if (SelectedInventoryType == "Generator")
            {
                Generator ck = new Generator();
                ck.ItemSaving     += InventoryItem_ItemSaved;
                ck.CalibrationDate = DateTime.Now;
                ck.ExpiryDate      = DateTime.Now.AddDays(7);

                //InventoryItems.Add(bd);
                //System.Diagnostics.Debug.WriteLine("Bulk Dose added to inventory");
                DesktopApplication.MakeModalDocument(new GeneratorViewModel(ck));
            }
            else if (SelectedInventoryType == "Unit Dose")
            {
                SyringeUnitDose ck = new SyringeUnitDose();
                ck.ItemSaving     += InventoryItem_ItemSaved;
                ck.CalibrationDate = DateTime.Now;
                ck.ExpiryDate      = DateTime.Now.AddDays(1);

                //InventoryItems.Add(bd);
                //System.Diagnostics.Debug.WriteLine("Bulk Dose added to inventory");
                DesktopApplication.MakeModalDocument(new BaseUnitDoseViewModel(ck));
            }
            else if (SelectedInventoryType == "Capsule")
            {
                CapsuleUnitDose cap = new CapsuleUnitDose();
                cap.ItemSaving     += InventoryItem_ItemSaved;
                cap.CalibrationDate = DateTime.Now;
                cap.ExpiryDate      = DateTime.Now.AddDays(1);

                //InventoryItems.Add(bd);
                //System.Diagnostics.Debug.WriteLine("Bulk Dose added to inventory");
                DesktopApplication.MakeModalDocument(new CapsuleUnitDoseViewModel(cap));
            }
        }