Debt - Narrative (Details)
1 Months Ended 3 Months Ended 12 Months Ended
Dec. 15, 2017
USD ($)
Oct. 31, 2017
USD ($)
Aug. 24, 2017
shares
Aug. 31, 2018
USD ($)
Dec. 31, 2017
USD ($)
Dec. 31, 2018
USD ($)
payment
Dec. 31, 2017
USD ($)
Jun. 15, 2018
USD ($)
Feb. 28, 2018
USD ($)
Jan. 31, 2018
USD ($)
Sep. 30, 2017
USD ($)
Aug. 31, 2017
USD ($)
Jan. 31, 2017
USD ($)
Jul. 31, 2016
USD ($)
Jan. 31, 2016
USD ($)
Aug. 31, 2015
USD ($)
Debt Instrument [Line Items]                                
Value of shares granted to purchase           $ 2,000,000                    
Shares offered to resell ratio           0.5                    
Line of Credit | Madryn Credit Agreement                                
Debt Instrument [Line Items]                                
Interest expense           $ 5,400,000 $ 1,400,000                  
Fair value of options                       $ 15,100,000        
Principal balance outstanding         $ 40,000,000   40,000,000                  
Maximum borrowing capacity                       55,000,000.0        
Borrowings on credit facility         10,000,000                      
Weighted average interest rate           13.44%                    
Number of payments | payment           8                    
Quarterly principal payments percentage           12.50%                    
Debt discount $ 5,000,000                     $ 5,000,000        
Legal expenses                     $ 1,300,000          
Maximum investment in subsidiary                 $ 5,000,000.0 $ 5,000,000.0            
Line of Credit | Madryn Credit Agreement | London Interbank Offered Rate (LIBOR)                                
Debt Instrument [Line Items]                                
Credit agreement interest rate           11.00%                    
Default interest rate           4.00%                    
Line of Credit | Madryn Credit Agreement - Term A                                
Debt Instrument [Line Items]                                
Capacity available for trade purchases           $ 30,000,000                    
Line of Credit | Madryn Credit Agreement - Term B and C                                
Debt Instrument [Line Items]                                
Borrowing capacity available upon achieving revenue milestones           25,000,000                    
Line of Credit | Madryn Credit Agreement - Term B-1                                
Debt Instrument [Line Items]                                
Borrowings on credit facility   $ 5,000,000                            
Line of Credit | Madryn Credit Agreement - Term B-2                                
Debt Instrument [Line Items]                                
Borrowings on credit facility $ 5,000,000                              
Line of Credit | Madryn Credit Agreement - Term B-3                                
Debt Instrument [Line Items]                                
Capacity available for trade purchases               $ 5,000,000.0                
Line of Credit | Madyrn Credit Agreement - Term C                                
Debt Instrument [Line Items]                                
Capacity available for trade purchases               $ 10,000,000                
Affiliated Entity | Notes Payable                                
Debt Instrument [Line Items]                                
Principal balance                         $ 1,200,000      
Affiliated Entity | Notes Payable | Seven Percent Notes Payable                                
Debt Instrument [Line Items]                                
Principal balance                               $ 4,200,000
Simple rate                               7.00%
Interest expense           200,000 200,000                  
Repayment of debt       $ 5,100,000                        
Accrued interest subject to compromise       $ 900,000                        
Principal balance outstanding         4,218,000 $ 0 4,218,000                 $ 4,300,000
Affiliated Entity | Convertible Debt | Related Party Convertible Notes Payable                                
Debt Instrument [Line Items]                                
Simple rate           10.00%                    
Maximum borrowing capacity                           $ 19,800,000.0 $ 18,000,000.0 15,000,000.0
Amortization of debt discount                               1,100,000
Fair value of options                               $ 100,000
Conversion of related party convertible notes payable into ordinary shares | shares     5,869,417                          
Principal balance outstanding         $ 0 $ 0 $ 0