Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weno database changes #2348

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 40 additions & 0 deletions sql/5_0_1-to-5_0_2_upgrade.sql
Expand Up @@ -860,3 +860,43 @@ ALTER TABLE `insurance_companies` ADD `eligibility_id` VARCHAR(32) DEFAULT NULL;
#IfMissingColumn x12_default_eligibility_id insurance_companies
ALTER TABLE `insurance_companies` ADD `x12_default_eligibility_id` INT(11) DEFAULT NULL;
#Endif

#IfTable erx_drug_paid
DROP TABLE `erx_drug_paid`;
#Endif

#IfNotTable erx_weno_drugs
CREATE TABLE `erx_weno_drugs` (
`drug_id` int(11) NOT NULL AUTO_INCREMENT,
`rxcui_drug_coded` int(11) DEFAULT NULL,
`generic_rxcui` int(11) DEFAULT NULL,
`drug_db_code_qualifier` text,
`full_name` varchar(250) NOT NULL,
`rxn_dose_form` text,
`full_generic_name` varchar(250) NOT NULL,
`brand_name` varchar(250) NOT NULL,
`display_name` varchar(250) NOT NULL,
`route` text,
`new_dose_form` varchar(100) DEFAULT NULL,
`strength` varchar(15) DEFAULT NULL,
`supress_for` text,
`display_name_synonym` text,
`is_retired` text,
`sxdg_rxcui` varchar(10) DEFAULT NULL,
`sxdg_tty` text,
`sxdg_name` varchar(100) DEFAULT NULL,
`psn-drugdescription` varchar(100) DEFAULT NULL,
`ncpdp_quantity_term` text,
`potency-unit-code` varchar(10) DEFAULT NULL,
`dea_schedule_no` int(2) DEFAULT NULL,
`dea_schedule` varchar(7) DEFAULT NULL,
`ingredients` varchar(100) DEFAULT NULL,
`drug_interaction` varchar(100) DEFAULT NULL,
`unit_source_code` varchar(3) DEFAULT NULL,
`code_list_qualifier` int(3) DEFAULT NULL,
PRIMARY KEY (`drug_id`)
) ENGINE=InnoDB;
#Endif

#IfNotWenoRx
#Endif
50 changes: 34 additions & 16 deletions sql/database.sql
Expand Up @@ -1526,22 +1526,40 @@ CREATE TABLE `erx_ttl_touch` (
-----------------------------------------------------------

--
-- Table structure for table `erx_drug_paid`
--

DROP TABLE IF EXISTS `erx_drug_paid`;
CREATE TABLE `erx_drug_paid` (
`drugid` int(11) NOT NULL AUTO_INCREMENT,
`drug_label_name` varchar(45) NOT NULL,
`ahfs_descr` varchar(45) NOT NULL,
`ndc` bigint(12) NOT NULL,
`price_per_unit` decimal(5,2) NOT NULL,
`avg_price` decimal(6,2) NOT NULL,
`avg_price_paid` int(6) NOT NULL,
`avg_savings` decimal(6,2) NOT NULL,
`avg_percent` decimal(6,2) NOT NULL,
PRIMARY KEY (`drugid`)
) ENGINE=InnoDB;
-- Table structure for table `erx_weno_drugs`
--

DROP TABLE IF EXISTS `erx_weno_drugs`;
CREATE TABLE IF NOT EXISTS `erx_weno_drugs` (
`drug_id` int(11) NOT NULL AUTO_INCREMENT,
`rxcui_drug_coded` int(11) DEFAULT NULL,
`generic_rxcui` int(11) DEFAULT NULL,
`drug_db_code_qualifier` text,
`full_name` varchar(250) NOT NULL,
`rxn_dose_form` text,
`full_generic_name` varchar(250) NOT NULL,
`brand_name` varchar(250) NOT NULL,
`display_name` varchar(250) NOT NULL,
`route` text,
`new_dose_form` varchar(100) DEFAULT NULL,
`strength` varchar(15) DEFAULT NULL,
`supress_for` text,
`display_name_synonym` text,
`is_retired` text,
`sxdg_rxcui` varchar(10) DEFAULT NULL,
`sxdg_tty` text,
`sxdg_name` varchar(100) DEFAULT NULL,
`psn-drugdescription` varchar(100) DEFAULT NULL,
`ncpdp-quantity-term` text,
`potency-unit-code` varchar(10) DEFAULT NULL,
`dea-schedule-no` int(2) DEFAULT NULL,
`dea-schedule` varchar(7) DEFAULT NULL,
`ingredients` varchar(100) DEFAULT NULL,
`drug-interaction` varchar(100) DEFAULT NULL,
`unit-source-code` varchar(3) DEFAULT NULL,
`code-list-qualifier` int(3) DEFAULT NULL,
PRIMARY KEY (`drug_id`)
) ENGINE=InnoDB;

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

Expand Down