SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

--
-- Database: `wcs`
--

-- --------------------------------------------------------

--
-- Table structure for table `dc_audit`
--

CREATE TABLE `dc_audit` (
  `Audit_ID_LNK` int(11) NOT NULL,
  `Audit_UserID_LNK` int(11) NOT NULL,
  `Audit_Type` int(11) NOT NULL,
  `Audit_Object_ID_LNK` int(11) NOT NULL,
  `Audit_Details` varchar(255) NOT NULL,
  `Audit_DateTime` datetime NOT NULL,
  `Deleted` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `dc_audit`
--
ALTER TABLE `dc_audit`
  ADD PRIMARY KEY (`Audit_ID_LNK`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `dc_audit`
--
ALTER TABLE `dc_audit`
  MODIFY `Audit_ID_LNK` int(11) NOT NULL AUTO_INCREMENT;COMMIT;

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

--
-- Database: `wcs`
--

-- --------------------------------------------------------

--
-- Table structure for table `dc_dropdown_items`
--

CREATE TABLE `dc_dropdown_items` (
  `ID_LNK` int(11) NOT NULL,
  `Type` int(11) DEFAULT NULL,
  `Value` varchar(255) DEFAULT NULL,
  `Deleted` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `dc_dropdown_items`
--

INSERT INTO `dc_dropdown_items` (`ID_LNK`, `Type`, `Value`, `Deleted`) VALUES
(2, 1, 'B - Made Under Section 10', 0),
(3, 1, 'D - Clinical Trial', 0),
(4, 1, 'C - Bought and Dispensed', 0),
(5, 1, 'A - Made under MS License', 0),
(6, 1, 'E - None', 0),
(8, 2, 'B - Worksheet and Label Check', 0),
(10, 2, 'C - Operator check in preparation area', 0),
(11, 2, 'E - At Labelling', 0),
(12, 2, 'During Labelling', 1),
(13, 2, 'F - Final Check Prior to Release', 0),
(14, 2, 'A - First Check in Assembly Area', 0),
(15, 2, 'D - Process Check During Prep', 0),
(16, 2, 'H - After Release Prior to Administration', 0),
(17, 2, 'J - Other', 0),
(18, 3, 'A - Cytotoxic Adult', 0),
(19, 3, 'B - Cytotoxic Paediatric', 0),
(20, 3, 'C - Parenteral Nutrition - Adult', 0),
(21, 3, 'D - Parenteral Nutrition Paediatric', 0),
(22, 5, 'I - Incorrect Containers e.g. Infuser Bag', 0),
(23, 5, 'D - Incorrect Dose/Strength', 0),
(24, 5, 'B - Calculation Error', 0),
(25, 5, 'E - Incorrect Diluent/Infusion Fluid', 0),
(26, 5, 'C - Incorrect Drug', 0),
(27, 5, 'H - Incorrect Expiry Date', 0),
(28, 5, 'G - Labelling Error', 0),
(29, 5, 'J - Other', 0),
(30, 5, 'K - No Answer', 0),
(31, 5, 'F - Incorrect Final Volume', 0),
(32, 5, 'A - Incorrect Transcription', 0),
(33, 4, 'H - Staff Level Below Establishment', 0),
(34, 4, 'A - Staff Error', 0),
(35, 4, 'E - Inadequate Computer System', 0),
(36, 4, 'D - Poor Quality of Starter Materials Used', 0),
(37, 4, 'C - Facility/Equipment Error', 0),
(38, 4, 'G - Poor Storage/Distribution', 0),
(39, 4, 'I - Workload Above Planned Capacity', 0),
(40, 4, 'F - Process Design', 0),
(41, 4, 'B - Inadequate Training', 0),
(42, 4, 'J - Poor Segregation', 0),
(44, 6, 'Low', 0),
(45, 6, 'Medium', 0),
(46, 6, 'High', 0),
(47, 3, 'Cytotoxic adult', 1),
(48, 3, 'Cytotoxic paediatric', 1),
(49, 2, 'I - No Answer', 0),
(50, 3, 'E - Monoclonal Antibody', 0),
(51, 3, 'F - Other Aseptic Product', 1),
(52, 4, 'K - Distraction/Interruptions', 0),
(53, 4, 'L - No Answer', 0),
(54, 1, 'test', 1);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `dc_dropdown_items`
--
ALTER TABLE `dc_dropdown_items`
  ADD PRIMARY KEY (`ID_LNK`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `dc_dropdown_items`
--
ALTER TABLE `dc_dropdown_items`
  MODIFY `ID_LNK` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=55;COMMIT;

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

--
-- Database: `wcs`
--

-- --------------------------------------------------------

--
-- Table structure for table `dc_errors`
--

CREATE TABLE `dc_errors` (
  `ID_LNK` int(11) NOT NULL,
  `ErrorID` int(11) NOT NULL,
  `ErrorDate` date NOT NULL,
  `Comment` varchar(255) NOT NULL,
  `PotentialOutcomeID` int(11) NOT NULL,
  `Product` int(11) NOT NULL,
  `ProductDetails` varchar(255) NOT NULL,
  `LicensedStatus` int(11) NOT NULL,
  `ProductStage` int(11) NOT NULL,
  `ErrorType` int(11) NOT NULL,
  `ErrorStage` int(11) NOT NULL,
  `Factor` int(11) NOT NULL,
  `Severity` int(11) NOT NULL,
  `Created` int(11) NOT NULL,
  `CreatedText` varchar(255) DEFAULT NULL,
  `SiteID_LNK` int(11) NOT NULL,
  `Deleted` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `dc_errors`
--
ALTER TABLE `dc_errors`
  ADD PRIMARY KEY (`ID_LNK`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `dc_errors`
--
ALTER TABLE `dc_errors`
  MODIFY `ID_LNK` int(11) NOT NULL AUTO_INCREMENT;COMMIT;

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

--
-- Database: `wcs`
--

-- --------------------------------------------------------

--
-- Table structure for table `dc_group`
--

CREATE TABLE `dc_group` (
  `ID_LNK` int(11) NOT NULL,
  `GroupName` varchar(255) NOT NULL,
  `Deleted` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `dc_group`
--
ALTER TABLE `dc_group`
  ADD PRIMARY KEY (`ID_LNK`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `dc_group`
--
ALTER TABLE `dc_group`
  MODIFY `ID_LNK` int(11) NOT NULL AUTO_INCREMENT;COMMIT;

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

--
-- Database: `wcs`
--

-- --------------------------------------------------------

--
-- Table structure for table `dc_product`
--

CREATE TABLE `dc_product` (
  `ID_LNK` int(11) NOT NULL,
  `ProductName` varchar(255) DEFAULT NULL,
  `Deleted` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `dc_product`
--

INSERT INTO `dc_product` (`ID_LNK`, `ProductName`, `Deleted`) VALUES
(1, 'Abatacept', 0),
(2, 'Acelarin', 0),
(3, 'Acetylcysteine', 0),
(4, 'Aciclovir', 0),
(5, 'Alemtuzumab', 0),
(6, 'Alglucosidase alfa', 0),
(7, 'Allergy I.D challenge', 0),
(8, 'Ambisome (bag)', 0),
(9, 'Ambisome (syringe)', 0),
(10, 'Amikacin', 0),
(11, 'Aminophylline (elastomeric device) ', 0),
(12, 'Amoxicillin', 0),
(13, 'Amsacrine', 0),
(14, 'Apatorsen', 0),
(15, 'apr-246 ', 0),
(16, 'ARB-200', 0),
(17, 'Argatroban', 0),
(18, 'Arsenic Trioxide', 0),
(19, 'Atezolizumab', 0),
(20, 'ATG Equine', 0),
(21, 'ATG Rabbit', 0),
(22, 'Atgam', 0),
(23, 'atx-gd-59', 0),
(24, 'Avelumab', 0),
(25, 'Azacitadine', 0),
(26, 'Aztreonam (bag)', 0),
(27, 'Aztreonam (syringe)', 0),
(28, 'Bendamustine', 0),
(29, 'Benzylpenicillin', 0),
(30, 'bevacizumab', 0),
(31, 'Bleomycin (bag)', 0),
(32, 'Bleomycin (syringe)', 0),
(33, 'Blinatumomab', 0),
(34, 'Blinatumomab (pump) ', 0),
(35, 'Bortezomib', 0),
(36, 'Brentuximab', 0),
(37, 'Busulfan', 0),
(38, 'Cabazitaxel', 0),
(39, 'Calcium folinate', 0),
(40, 'Carboplatin', 0),
(41, 'Cardioplegia', 0),
(42, 'Carfilzomib', 0),
(43, 'Carmustine', 0),
(44, 'Caspofungin', 0),
(45, 'Cefotaxime', 0),
(46, 'Cefoxitin', 0),
(47, 'Ceftazidime', 0),
(48, 'Ceftazidime desensitisation', 0),
(49, 'Ceftriaxone', 0),
(50, 'Cefuroxime', 0),
(51, 'Cetuximab', 0),
(52, 'Chimeric Antibody CH14.18 (bag)', 0),
(53, 'Chimeric Antibody CH14.18 (infusor)', 0),
(54, 'Cidofovir', 0),
(55, 'Cisplatin', 0),
(56, 'Cladribine', 0),
(57, 'Clarithromycin', 0),
(58, 'Clofarabine', 0),
(59, 'Colomycin ', 0),
(60, 'CPX-351', 0),
(61, 'Cyclophophamide', 0),
(62, 'Cyclophosphamide/Etoposide/Cisplatin', 0),
(63, 'Cytarabine (bag)', 0),
(64, 'Cytarabine (syringe)', 0),
(65, 'Cytarabine IT', 0),
(66, 'Dacarbazine (bag)', 0),
(67, 'Dacarbazine (syringe)', 0),
(68, 'Dactinomycin', 0),
(69, 'Daratumumab', 0),
(70, 'Daunorubicin', 0),
(71, 'Daunorubicin Liposomal', 0),
(72, 'dc bead', 0),
(73, 'Defibrotide', 0),
(74, 'Dexrazoxane', 0),
(75, 'di-b4', 0),
(76, 'Diamorphine', 0),
(77, 'Disodium pamidronate', 0),
(78, 'dnib0600a', 0),
(79, 'Docetaxel', 0),
(80, 'Doxorubicin (bag)', 0),
(81, 'Doxorubicin (syringe)', 0),
(82, 'Doxorubicin Liposomal ', 0),
(83, 'Doxorubin', 0),
(84, 'dtx101', 0),
(85, 'Durvalumab', 0),
(86, 'Elosulphase alfa ', 0),
(87, 'Epirubicin', 0),
(88, 'Epoprostenol', 0),
(89, 'Epratuzumab', 0),
(90, 'Eribulin', 0),
(91, 'Etopophos', 0),
(92, 'Etoposide', 0),
(93, 'Ferinject', 0),
(94, 'Flucloxacillin', 0),
(95, 'Flucytoscine ', 0),
(96, 'Fludarabine (bag)', 0),
(97, 'Fludarabine (liquid)', 0),
(98, 'Fludarabine (syringe)', 0),
(99, 'Fluorouracil', 0),
(100, 'Flurouracil Opthalmic', 0),
(101, 'Fosaprepitant', 0),
(102, 'Foscarnet', 0),
(103, 'Furosemide             ', 0),
(104, 'g100', 0),
(105, 'Ganciclovir (bag)', 0),
(106, 'Ganciclovir (syringe)', 0),
(107, 'Ganetespib', 0),
(108, 'Gardenia Infliximab', 0),
(109, 'Gemcitabine', 0),
(110, 'Gemtuzumab', 0),
(111, 'Genatamicin (bag)', 0),
(112, 'Genatamicin (syringe)', 0),
(113, 'Genatamicin 180mg/4ml', 0),
(114, 'Genatamicin 240mg/6ml', 0),
(115, 'gm-csf', 0),
(116, 'Heparin', 0),
(117, 'Heparin flush', 0),
(118, 'Heparinised Saline', 0),
(119, 'HTL009936', 0),
(120, 'hu5f9-g4', 0),
(121, 'humax-tf-adc', 0),
(122, 'Hydrations - electrolytes', 0),
(123, 'Hydrations - mannitol', 0),
(124, 'Hydrations - mesna', 0),
(125, 'Hydrocortisone (IT syringe)', 0),
(126, 'Hydrocortisone bag', 0),
(127, 'Idarubicin (bag)', 0),
(128, 'Idarubicin (syringe)', 0),
(129, 'Idursulfase', 0),
(130, 'Ifosfamide', 0),
(131, 'Ifosfamide / Mesna', 0),
(132, 'Iloprost', 0),
(133, 'imcgp100', 0),
(134, 'Infliximab (INFLECTRA)', 0),
(135, 'Infliximab (REMECADE)', 0),
(136, 'Infliximab (REMSIMA)', 0),
(137, 'Inotuzumab', 0),
(138, 'Ipilumumab', 0),
(139, 'Irinotecan', 0),
(140, 'Iron Dextran (Cosmofer)', 0),
(141, 'Iron sucrose (Venofer)', 0),
(142, 'Irrinotecan', 0),
(143, 'Kadcyla I/V', 0),
(144, 'Lenograstim', 0),
(145, 'Lilotomab', 0),
(146, 'Magnesium chloride 10.15%', 0),
(147, 'medi4736', 0),
(148, 'Melphalan', 0),
(149, 'Mepolizumab syringe', 0),
(150, 'Meropenem', 0),
(151, 'Mesna', 0),
(152, 'Methotrexate (bag)', 0),
(153, 'Methotrexate (syringe)', 0),
(154, 'Clindamycin', 0),
(155, 'Methylprednisolone  ', 0),
(156, 'Metronidazole', 0),
(157, 'Micafungin', 0),
(158, 'Mitomycin (bag)', 0),
(159, 'Mitomycin (syringe)', 0),
(160, 'Mitomycin Opthalmic', 0),
(161, 'Mitoxantrone', 0),
(162, 'mk3476', 0),
(163, 'mm-111', 0),
(164, 'Morphine', 0),
(165, 'mpdl3280a', 0),
(166, 'nab-paclitaxel', 0),
(167, 'NaCL/KCl', 0),
(168, 'Nelarabine', 0),
(169, 'Nivolumab', 0),
(170, 'Obinutuzumab', 0),
(171, 'Ofatumumab', 0),
(172, 'Olaratumab', 0),
(173, 'Oncaspar', 0),
(174, 'onx-0801', 0),
(175, 'Oxaliplatin', 0),
(176, 'Oxytocin 30U', 0),
(177, 'Oxytocin 40U ', 0),
(178, 'Paclitaxel', 0),
(179, 'Palivizumab', 0),
(180, 'Panitumumab', 0),
(181, 'Pembrolizumab', 0),
(182, 'Pemetrexed', 0),
(183, 'Pentamidine ', 0),
(184, 'Pentostatin', 0),
(185, 'Pertuzumab', 0),
(186, 'Piperacillin/Tazobactam', 0),
(187, 'Pixantrone', 0),
(188, 'Polatuzumab', 0),
(189, 'Pralatrexate', 0),
(190, 'Ramucirumab', 0),
(191, 'Ribavirin', 0),
(192, 'Rituximab (bag)', 0),
(193, 'Rituximab (syringe)', 0),
(194, 'Romiplostin', 0),
(195, 'Siltuximab', 0),
(196, 'Sodium chloride 3%', 0),
(197, 'Sodium Valproate ', 0),
(198, 'Suxamethonium', 0),
(199, 'syd985 ', 0),
(200, 'Talc (sterile)  for pleurodesis', 0),
(201, 'Teicoplanin', 0),
(202, 'tgo1', 0),
(203, 'Thiopental', 0),
(204, 'Thiotepa', 0),
(205, 'Tobramycin', 0),
(206, 'Tocilizumab (bag)', 0),
(207, 'Topotecan', 0),
(208, 'Trastuzumab', 0),
(209, 'Tremelimumab', 0),
(210, 'Treosulfan', 0),
(211, 'u3-1784', 0),
(212, 'Ustekinumab', 0),
(213, 'Vancomycin (bag)', 0),
(214, 'Vancomycin (syringe)', 0),
(215, 'Vedolizumab', 0),
(216, 'Vinblastine (bag)', 0),
(217, 'Vinblastine (syringe) ', 0),
(218, 'Vinc/Etop/Dox', 0),
(219, 'Vincristine (bag)', 0),
(220, 'Vincristine (syringe)', 0),
(221, 'Vindesine', 0),
(222, 'Vinflunine', 0),
(223, 'Vinorelbine', 0),
(224, 'vx-970', 0),
(225, 'Zolendronic Acid', 0),
(226, 'Tocilizumab (syringe)', 0),
(227, 'Steroids', 1),
(228, 'test', 1);

ALTER TABLE `dc_product`
  ADD PRIMARY KEY (`ID_LNK`);

ALTER TABLE `dc_product`
  MODIFY `ID_LNK` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=229;COMMIT;

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

--
-- Database: `wcs`
--

-- --------------------------------------------------------

--
-- Table structure for table `dc_sites`
--

CREATE TABLE `dc_sites` (
  `ID_LNK` int(11) NOT NULL,
  `SiteName` varchar(255) NOT NULL,
  `TrustID` int(11) NOT NULL,
  `Deleted` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `dc_sites`
--
ALTER TABLE `dc_sites`
  ADD PRIMARY KEY (`ID_LNK`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `dc_sites`
--
ALTER TABLE `dc_sites`
  MODIFY `ID_LNK` int(11) NOT NULL AUTO_INCREMENT;COMMIT;

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

--
-- Database: `wcs`
--

-- --------------------------------------------------------

--
-- Table structure for table `dc_site_items`
--

CREATE TABLE `dc_site_items` (
  `ID_LNK` int(11) NOT NULL,
  `SiteID_LNK` int(11) NOT NULL,
  `Month` date NOT NULL,
  `NoofItems` int(11) NOT NULL,
  `OutsourcedItems` int(11) NOT NULL,
  `Deleted` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `dc_site_items`
--
ALTER TABLE `dc_site_items`
  ADD PRIMARY KEY (`ID_LNK`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `dc_site_items`
--
ALTER TABLE `dc_site_items`
  MODIFY `ID_LNK` int(11) NOT NULL AUTO_INCREMENT;COMMIT;

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

--
-- Database: `wcs`
--

-- --------------------------------------------------------

--
-- Table structure for table `dc_trustgroup`
--

CREATE TABLE `dc_trustgroup` (
  `ID_LNK` int(11) NOT NULL,
  `GroupID_LNK` int(11) NOT NULL,
  `TrustID_LNK` int(11) NOT NULL,
  `Deleted` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `dc_trustgroup`
--
ALTER TABLE `dc_trustgroup`
  ADD PRIMARY KEY (`ID_LNK`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `dc_trustgroup`
--
ALTER TABLE `dc_trustgroup`
  MODIFY `ID_LNK` int(11) NOT NULL AUTO_INCREMENT;COMMIT;

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

--
-- Database: `wcs`
--

-- --------------------------------------------------------

--
-- Table structure for table `dc_trusts`
--

CREATE TABLE `dc_trusts` (
  `ID_LNK` int(11) NOT NULL,
  `TrustName` varchar(255) NOT NULL,
  `Profile` varchar(255) DEFAULT NULL,
  `Error_Counter` int(11) NOT NULL DEFAULT '0',
  `Deleted` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `dc_trusts`
--
ALTER TABLE `dc_trusts`
  ADD PRIMARY KEY (`ID_LNK`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `dc_trusts`
--
ALTER TABLE `dc_trusts`
  MODIFY `ID_LNK` int(11) NOT NULL AUTO_INCREMENT;COMMIT;

ALTER TABLE `usercategorys` ADD `ErrorReporting` INT(1) NOT NULL AFTER `DrugShortages`;

ALTER TABLE `users` ADD `TrustIDLNK` INT(11) DEFAULT NULL AFTER `DrugShortages`, ADD `TrustActivated` INT(1) NOT NULL AFTER `DrugShortages`, ADD `Requested` INT(11) NOT NULL AFTER `DrugShortages`;



