Created
July 28, 2015 13:32
-
-
Save stucka/fa412a0a5a1baeae8441 to your computer and use it in GitHub Desktop.
SQL table creation for CMS Open Data file
This file contains hidden or 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
CREATE TABLE fl ( | |
`Covered_Recipient_Type` VARCHAR(35) NOT NULL, | |
`Teaching_Hospital_ID` VARCHAR(40), | |
`Teaching_Hospital_Name` VARCHAR(40), | |
`Physician_Profile_ID` varchar(20), | |
`Physician_First_Name` VARCHAR(20) NOT NULL, | |
`Physician_Middle_Name` VARCHAR(20), | |
`Physician_Last_Name` VARCHAR(35), | |
`Physician_Name_Suffix` VARCHAR(10), | |
`Recipient_Primary_Business_Street_Address_Line1` VARCHAR(80) NOT NULL, | |
`Recipient_Primary_Business_Street_Address_Line2` VARCHAR(60), | |
`Recipient_City` VARCHAR(40) NOT NULL, | |
`Recipient_State` VARCHAR(2) NOT NULL, | |
`Recipient_Zip_Code` VARCHAR(10) NOT NULL, | |
`Recipient_Country` VARCHAR(30) NOT NULL, | |
`Recipient_Province` VARCHAR(40), | |
`Recipient_Postal_Code` VARCHAR(40), | |
`Physician_Primary_Type` VARCHAR(40) NOT NULL, | |
`Physician_Specialty` VARCHAR(160), | |
`Physician_License_State_code1` VARCHAR(2) NOT NULL, | |
`Physician_License_State_code2` VARCHAR(4), | |
`Physician_License_State_code3` VARCHAR(4), | |
`Physician_License_State_code4` VARCHAR(4), | |
`Physician_License_State_code5` VARCHAR(32), | |
`Submitting_Applicable_Manufacturer_or_Applicable_GPO_Name` VARCHAR(80) NOT NULL, | |
`Applicable_Manufacturer_or_Applicable_GPO_Making_Payment_ID` varchar(30), | |
`Applicable_Manufacturer_or_Applicable_GPO_Making_Payment_Name` VARCHAR(80) NOT NULL, | |
`Applicable_Manufacturer_or_Applicable_GPO_Making_Payment_State` VARCHAR(4), | |
`Applicable_Manufacturer_or_Applicable_GPO_Making_Payment_Country` VARCHAR(20) NOT NULL, | |
`Total_Amount_of_Payment_USDollars` FLOAT NOT NULL, | |
`Date_of_Payment` varchar(15), | |
`Number_of_Payments_Included_in_Total_Amount` INTEGER NOT NULL, | |
`Form_of_Payment_or_Transfer_of_Value` VARCHAR(60) NOT NULL, | |
`Nature_of_Payment_or_Transfer_of_Value` VARCHAR(160) NOT NULL, | |
`City_of_Travel` VARCHAR(40), | |
`State_of_Travel` VARCHAR(4), | |
`Country_of_Travel` VARCHAR(40), | |
`Physician_Ownership_Indicator` varchar(10), | |
`Third_Party_Payment_Recipient_Indicator` VARCHAR(22) NOT NULL, | |
`Name_of_Third_Party_Entity_Receiving_Payment_or_Value` VARCHAR(80), | |
`Charity_Indicator` varchar(10), | |
`Third_Party_Equals_Covered_Recipient_Indicator` varchar(10), | |
`Contextual_Information` VARCHAR(550), | |
`Delay_in_Publication_Indicator` varchar(20), | |
`Record_ID` INTEGER NOT NULL, | |
`Dispute_Status_for_Publication` varchar(10), | |
`Product_Indicator` VARCHAR(11), | |
`Name_of_Associated_Covered_Drug_or_Biological1` VARCHAR(100), | |
`Name_of_Associated_Covered_Drug_or_Biological2` VARCHAR(100), | |
`Name_of_Associated_Covered_Drug_or_Biological3` VARCHAR(100), | |
`Name_of_Associated_Covered_Drug_or_Biological4` VARCHAR(100), | |
`Name_of_Associated_Covered_Drug_or_Biological5` VARCHAR(100), | |
`NDC_of_Associated_Covered_Drug_or_Biological1` VARCHAR(12), | |
`NDC_of_Associated_Covered_Drug_or_Biological2` VARCHAR(12), | |
`NDC_of_Associated_Covered_Drug_or_Biological3` VARCHAR(12), | |
`NDC_of_Associated_Covered_Drug_or_Biological4` VARCHAR(12), | |
`NDC_of_Associated_Covered_Drug_or_Biological5` VARCHAR(12), | |
`Name_of_Associated_Covered_Device_or_Medical_Supply1` VARCHAR(100), | |
`Name_of_Associated_Covered_Device_or_Medical_Supply2` VARCHAR(100), | |
`Name_of_Associated_Covered_Device_or_Medical_Supply3` VARCHAR(100), | |
`Name_of_Associated_Covered_Device_or_Medical_Supply4` VARCHAR(100), | |
`Name_of_Associated_Covered_Device_or_Medical_Supply5` VARCHAR(100), | |
`Program_Year` INTEGER NOT NULL, | |
`Payment_Publication_Date` varchar(20) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment