| INCOME TAXES - Tax Credits (Details) - USD ($) $ in Thousands | Dec. 31, 2017 | Dec. 31, 2016 | 
|---|---|---|
| Tax credit carryforward | ||
| Orphan drug and research and development credits | $ 51,744 | $ 44,348 | 
| Federal jurisdiction | Research | ||
| Tax credit carryforward | ||
| Amount of tax credit carryforward | 37,100 | |
| State jurisdiction | Research | ||
| Tax credit carryforward | ||
| Amount of tax credit carryforward | $ 26,900 | 
| X | ||||||||||
| 
- Definition Amount before allocation of valuation allowances of deferred tax asset attributable to deductible research tax credit carryforwards. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition The amount of the tax credit carryforward, before tax effects, available to reduce future taxable income under enacted tax laws. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. No definition available. 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 |