-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from skirmer/master
Cleaning drug manufacturer data sourced from CMS.
- Loading branch information
Showing
3 changed files
with
219 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Cleaning January 2016 CMS drug name, manufacturer, and dosage data | ||
# S. Kirmer | ||
# Data4Democracy - Drug Spending Project | ||
# January 2017 | ||
|
||
list1 <- read.csv("U:https://Medicaid_Drug/2016-January-ASP-NDC-HCPCS-Crosswalk/Section 508 version of Jan 2016 AWP NDC-HCPCS Crosswalk 120815.csv", skip = 7, stringsAsFactors=FALSE) | ||
list2 <- read.csv("U:https://Medicaid_Drug/2016-January-ASP-NDC-HCPCS-Crosswalk/section 508 version of January 2016 ASP NDC-HCPCS Crosswalk 010716.csv", skip = 6, stringsAsFactors=FALSE) | ||
list3 <- read.csv("U:https://Medicaid_Drug/2016-January-ASP-NDC-HCPCS-Crosswalk/section 508 version of January 2016 NOC NDC-HCPCS Crosswalk 120915.csv", skip = 6, stringsAsFactors=FALSE) | ||
list4 <- read.csv("U:https://Medicaid_Drug/2016-January-ASP-NDC-HCPCS-Crosswalk/section 508 version of January 2016 OPPS NDC-HCPCS Crosswalk 120915.csv", skip = 6, stringsAsFactors=FALSE) | ||
|
||
list5 <- read.csv("U:https://Medicaid_Drug/2016-January-ASP-NDC-HCPCS-Crosswalk/section 508 version of NDC-HCPCS Crosswalk Introduction Text 120915.csv") | ||
|
||
colnames(list1) <- toupper(names(list1)) | ||
colnames(list2) <- toupper(names(list2)) | ||
colnames(list3) <- toupper(names(list3)) | ||
colnames(list4) <- toupper(names(list4)) | ||
|
||
colnames(list2)[1] <- "HCPCS CODE" | ||
colnames(list4)[1] <- "HCPCS CODE" | ||
colnames(list1)[2] <- "SHORT DESCRIPTION" | ||
colnames(list3)[5] <- "HCPCS DOSAGE" | ||
colnames(list2)[4] <- "NDC" | ||
colnames(list3)[3] <- "NDC" | ||
colnames(list4)[4] <- "NDC" | ||
|
||
mergedlist <- merge(list1, list2, by=c("HCPCS CODE", "SHORT DESCRIPTION", "LABELER NAME","DRUG NAME", "NDC","HCPCS DOSAGE", "PKG SIZE","PKG QTY", | ||
"BILLUNITS","BILLUNITSPKG"), all=T) | ||
|
||
mergedlist <- merge(mergedlist, list3, by.x=c("SHORT DESCRIPTION", "LABELER NAME","DRUG NAME","NDC", "HCPCS DOSAGE", "PKG SIZE","PKG QTY", | ||
"BILLUNITS","BILLUNITSPKG"), | ||
by.y=c("DRUG GENERIC NAME", "LABELER NAME","DRUG NAME", "NDC","HCPCS DOSAGE", "PKG SIZE","PKG QTY", | ||
"BILLUNITS","BILLUNITSPKG"), all=T) | ||
mergedlist <- merge(mergedlist, list4, by.x=c("HCPCS CODE","SHORT DESCRIPTION", "LABELER NAME","DRUG NAME","NDC", "HCPCS DOSAGE", "PKG SIZE","PKG QTY", | ||
"BILLUNITS","BILLUNITSPKG"), | ||
by.y=c("HCPCS CODE","SHORT DESCRIPTOR", "LABELER NAME","DRUG NAME", "NDC","HCPCS DOSAGE", "PKG SIZE","PKG QTY", | ||
"BILLUNITS","BILLUNITSPKG"), all=T) | ||
|
||
|
||
mergedlist$`HCPCS DOSAGE` <- gsub('MG', ' MG', mergedlist$`HCPCS DOSAGE`) | ||
mergedlist$`HCPCS DOSAGE` <- gsub('mg', ' MG', mergedlist$`HCPCS DOSAGE`) | ||
|
||
mergedlist <- tidyr::separate(mergedlist, `HCPCS DOSAGE` ,c("DOSAGENUM", "DOSAGEUNITS"), " ", extra="merge", remove=FALSE) | ||
mergedlist$DOSAGENUM <- as.numeric(mergedlist$DOSAGENUM) | ||
|
||
mergedlist <- mergedlist[,c(1,5,3, 4, 2, 6:12)] | ||
mergedlist$ASOFDATE <- "01/01/2016" | ||
|
||
write.csv(mergedlist, "U:https://Medicaid_Drug/2016drugdata.csv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Cleaning January 2017 CMS drug name, manufacturer, and dosage data | ||
# S. Kirmer | ||
# Data4Democracy - Drug Spending Project | ||
# January 2017 | ||
|
||
|
||
list1 <- read.csv("U:https://Medicaid_Drug/January-2017-ASP-NDC-HCPCS-Crosswalk/Section 508 version of Jan 2017 AWP NDC-HCPCS Crosswalk_12062016.csv", skip = 7, stringsAsFactors=FALSE) | ||
list2 <- read.csv("U:https://Medicaid_Drug/January-2017-ASP-NDC-HCPCS-Crosswalk/section 508 version of January 2017 ASP NDC-HCPCS Crosswalk 121316.csv", skip = 6, stringsAsFactors=FALSE) | ||
list3 <- read.csv("U:https://Medicaid_Drug/January-2017-ASP-NDC-HCPCS-Crosswalk/section 508 version of January 2017 NOC NDC-HCPCS Crosswalk 120216.csv", skip = 6, stringsAsFactors=FALSE) | ||
list4 <- read.csv("U:https://Medicaid_Drug/January-2017-ASP-NDC-HCPCS-Crosswalk/section 508 version of January 2017 OPPS NDC-HCPCS Crosswalk 120216.csv", skip = 6, stringsAsFactors=FALSE) | ||
|
||
colnames(list1) <- toupper(names(list1)) | ||
colnames(list2) <- toupper(names(list2)) | ||
colnames(list3) <- toupper(names(list3)) | ||
colnames(list4) <- toupper(names(list4)) | ||
|
||
colnames(list2)[1] <- "HCPCS CODE" | ||
colnames(list4)[1] <- "HCPCS CODE" | ||
colnames(list1)[2] <- "SHORT DESCRIPTION" | ||
colnames(list3)[5] <- "HCPCS DOSAGE" | ||
colnames(list2)[4] <- "NDC" | ||
colnames(list3)[3] <- "NDC" | ||
colnames(list4)[4] <- "NDC" | ||
|
||
mergedlist <- merge(list1, list2, by=c("HCPCS CODE", "SHORT DESCRIPTION", "LABELER NAME","DRUG NAME", "NDC","HCPCS DOSAGE", "PKG SIZE","PKG QTY", | ||
"BILLUNITS","BILLUNITSPKG"), all=T) | ||
|
||
mergedlist <- merge(mergedlist[,-11], list3, by.x=c("SHORT DESCRIPTION", "LABELER NAME","DRUG NAME","NDC", "HCPCS DOSAGE", "PKG SIZE","PKG QTY", | ||
"BILLUNITS","BILLUNITSPKG"), | ||
by.y=c("DRUG GENERIC NAME", "LABELER NAME","DRUG NAME", "NDC","HCPCS DOSAGE", "PKG SIZE","PKG QTY", | ||
"BILLUNITS","BILLUNITSPKG"), all=T) | ||
mergedlist <- merge(mergedlist, list4, by.x=c("HCPCS CODE","SHORT DESCRIPTION", "LABELER NAME","DRUG NAME","NDC", "HCPCS DOSAGE", "PKG SIZE","PKG QTY", | ||
"BILLUNITS","BILLUNITSPKG"), | ||
by.y=c("HCPCS CODE","SHORT DESCRIPTOR", "LABELER NAME","DRUG NAME", "NDC","HCPCS DOSAGE", "PKG SIZE","PKG QTY", | ||
"BILLUNITS","BILLUNITSPKG"), all=T) | ||
|
||
|
||
mergedlist$`HCPCS DOSAGE` <- gsub('MG', ' MG', mergedlist$`HCPCS DOSAGE`) | ||
mergedlist$`HCPCS DOSAGE` <- gsub('mg', ' MG', mergedlist$`HCPCS DOSAGE`) | ||
|
||
mergedlist <- tidyr::separate(mergedlist, `HCPCS DOSAGE` ,c("DOSAGENUM", "DOSAGEUNITS"), " ", extra="merge", remove=FALSE) | ||
mergedlist$DOSAGENUM <- as.numeric(mergedlist$DOSAGENUM) | ||
|
||
mergedlist <- mergedlist[,c(1,5,3, 4, 2, 6:12)] | ||
mergedlist$ASOFDATE <- "01/01/2017" | ||
|
||
write.csv(mergedlist, "U:https://Medicaid_Drug/2017drugdata.csv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# Cleaning January 2017 CMS drug name, manufacturer, and dosage data | ||
# S. Kirmer | ||
# Data4Democracy - Drug Spending Project | ||
# January 2017 | ||
|
||
# Script follows the drug_manufacturer_data_cleaning scripts. | ||
|
||
drugs_2017 <- read.csv("U:https://Medicaid_Drug/2017drugdata.csv", stringsAsFactors = FALSE) | ||
drugs_2016 <- read.csv("U:https://Medicaid_Drug/2016drugdata.csv", stringsAsFactors = FALSE) | ||
|
||
drugs <- rbind(drugs_2017, drugs_2016) | ||
|
||
drugs$LABELER.NAME <- toupper(drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("abbvie",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "ABBVIE US, LLC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("ACCORD",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "ACCORD HEALTHCARE INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("ACTAVIS",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "ACTAVIS INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("AKORN",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "AKORN", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("AMGEN",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "AMGEN USA, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("AMNEAL",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "AMNEAL PHARMACEUTICALS, LLC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("AMPHASTAR",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "AMPHASTAR PHARMACEUTICALS, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("ASTRAZENECA",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "ASTRAZENECA PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("BAUSCH & LOMB",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "BAUSCH & LOMB", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("ASTRAZENECA",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "ASTRAZENECA PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("ASTRAZENECA",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "ASTRAZENECA PHARMACEUTICALS", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("BAXALTA",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "BAXALTA US INC.", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("BAXTER",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "BAXTER HEALTHCARE CORPORATION", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("BAYER",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "BAYER HEALTHCARE PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("BIOCSL",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "BIOCSL INC", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("BIOGEN",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "BIOGEN IDEC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("BLUEPOINT",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "BLUE POINT LABORATORIES", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("BRACCO",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "BRACCO DIAGNOSTICS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("BRISTOL-MYERS",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "BRISTOL-MYERS SQUIBB COMPANY", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("CANGENE",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "CANGENE BIOPHARMA, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("CEPHALON",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "CEPHALON INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("CHIESI",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "CHIESI USA, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("COVIS PHARMACEUTICALS",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "COVIS PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("CREALTA",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "CREALTA PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("CSL BEHRING",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "CSL BEHRING LLC", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("REDDY'S",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "DR. REDDY'S LABORATORIES, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("DURATA",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "DURATA PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("DYAX",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "DYAX CORPORATION", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("ENDO",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "ENDO PHARMACEUTICALS VALERA INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("FERRING",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "FERRING PHARMACEUTICALS INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("FRESENIUS",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "FRESENIUS KABI USA LLC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("GENZYME",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "GENZYME CORPORATION", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("GREENSTONE",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "GREENSTONE LLC", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("GRIFOLS",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "GRIFOLS USA, LLC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("HALOZYME",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "HALOZYME THERAPEUTICS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("HERITAGE",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "HERITAGE PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("HI-TECH",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "HI-TECH PHARMACEUTICAL CO, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("IPSEN",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "IPSEN BIOPHARMACEUTICALS", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("JANSSEN",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "JANSSEN PHARMACEUTICALS, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("JHP",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "JHP PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("KEDRION",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "KEDRION BIOPHARMA, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("KINETIC",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "KINETIC CONCEPTS INCORPORATED", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("LANTHEUS",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "LANTHEUS MEDICAL IMAGING", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("MEDICIS",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "MEDICIS PHARMACEUTICALS, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("MERCK",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "MERCK", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("MERZ",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "MERZ PHARMACEUTICALS, LLC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("MYLAN",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "MYLAN PHARMACEUTICALS, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("NOVARTIS",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "NOVARTIS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("NOVO NORDISK",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "NOVO NORDISK, INC", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("OMEROS",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "OMEROS CORPORATION", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("PAR ",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "PAR PHARMACEUTICAL", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("PERRIGO",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "PERRIGO PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("PFIZER",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "PFIZER INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("RITEDOSE",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "RITEDOSE PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("ROXANE",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "ROXANE LABORATORIES", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("SAGENT",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "SAGENT PHARMACEUTICALS INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("SANDOZ",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "SANDOZ, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("SANOFI",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "SANOFI-AVENTIS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("SCHERING",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "SCHERING CORPORATION", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("SHIRE",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "SHIRE US, INC", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("SICOR",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "SICOR PHARMACEUTICALS, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("STRIDES",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "STRIDES PHARMA INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("SUN PHARMACEUTICAL",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "SUN PHARMACEUTICAL INDUSTRIES, LTD", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("TARO",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "TARO PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("THERAVANCE",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "THERAVANCE BIOPHARMA, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("TEVA",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "TEVA PHARMACEUTICALS USA, INC", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("UNITED THERAPEUTICS",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "UNITED THERAPEUTICS CORPORATION", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("TOLMAR",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "TOLMAR PHARMACEUTICALS, INC", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("WATSON",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "WATSON PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("WG CRITICAL",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "WG CRITICAL CARE LLC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("WYETH",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "WYETH PHARMACEUTICAL", drugs$LABELER.NAME) | ||
|
||
drugs$LABELER.NAME <- ifelse(grepl("WEST-WARD",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "WEST-WARD PHARMACEUTICALS CORP", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("X-GEN",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "X-GEN PHARMACEUTICALS, INC", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("ZYDUS",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "ZYDUS PHARMACEUTICALS", drugs$LABELER.NAME) | ||
drugs$LABELER.NAME <- ifelse(grepl("ZIMMER",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE, "ZIMMER BIOMET, INC/SEIKAGAKU CORP", drugs$LABELER.NAME) | ||
|
||
# abbvie <- drugs[grepl("X-GEN",drugs$LABELER.NAME, ignore.case = TRUE) == TRUE,] | ||
|
||
drugs <- unique(drugs) | ||
|
||
write.csv(drugs[,c(2:14)], "U:https://Medicaid_Drug/drugdata_clean.csv") | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|