Note 6 - Notes Payable and Gain on Early Extinguishment of Debt (Details Textual) | Nov. 22, 2017USD ($)$ / sharesshares | Sep. 22, 2017USD ($)$ / sharesshares | Mar. 06, 2017USD ($)$ / sharesshares | Sep. 29, 2014USD ($) | Aug. 31, 2015USD ($) | Dec. 31, 2013USD ($) | Nov. 30, 2013USD ($) | Mar. 02, 2017 | Jun. 30, 2018USD ($)shares | Mar. 31, 2018USD ($) | Jun. 30, 2017USD ($) | Jun. 30, 2018USD ($)shares | Jun. 30, 2017USD ($) | Dec. 31, 2017USD ($)$ / sharesshares | Dec. 31, 2016USD ($) | Dec. 31, 2015USD ($) | Dec. 31, 2013USD ($) | Feb. 07, 2019USD ($) | Sep. 30, 2018USD ($) | Aug. 20, 2018 | Jun. 21, 2017$ / shares | Jun. 15, 2017USD ($) |
Extinguishment of Debt, Amount | | | $ 23,100,000 | | | | | | | | | | | | | | | | | | | |
Gain (Loss) on Extinguishment of Debt, Total | | | | | | | | | | | | | $ 249,458 | | | | | | | | | |
Debt Instrument, Periodic Payment, Cash | | | | | | | | | $ 200,000 | | | | | | | | | | | | | |
Share Price | $ / shares | $ 4.06 | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Term | | | 5 years | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | 5,000 | | | | | | 689,661 | | | 689,661 | | 689,661 | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | $ 26 | | | | | | | | | | | | | | | | | | | |
Contract with Customer, Liability, Noncurrent | | | | | | | | | $ 3,298,500 | | | $ 3,298,500 | | $ 8,153,500 | | | | | | | | |
Medinet [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | | | $ 9,000,000 | | | | | | | | | | | $ 9,000,000 | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | 3.00% | | | | | | | | | | | 3.00% | | | | | |
Proceeds from Notes Payable, Total | | | | | | $ 9,000,000 | | | | | | | | | | | | | | | | |
Notes Payable, Total | | | | | | $ 6,900,000 | | | 5,000,000 | | | 5,000,000 | | 5,000,000 | $ 6,400,000 | | $ 6,900,000 | | | | | |
Debt Instrument, Interest Rate, Effective Percentage | | | | | | 8.00% | | | | | | | | | | | 8.00% | | | | | |
Deferred Credits and Other Liabilities, Noncurrent | | | | | | | | | 1,100,000 | | | 1,100,000 | | 6,900,000 | 5,400,000 | | | | | | | |
Reduction in Notes Payable | | | | | | | | | | | | | | 1,500,000 | 1,500,000 | $ 800,000 | | | | | | |
Reduction in Deferred Liability | | | | | | | | | | | | | | 500,000 | 500,000 | 200,000 | | | | | | |
Deferred Revenue, Additions | | | | | | | | | | $ 5,800,000 | | | | 2,000,000 | 2,000,000 | | | | | | | |
Debt Instrument, Increase, Accrued Interest | | | | | | | | | | | | 1,900,000 | | 1,900,000 | 1,800,000 | | | | | | | |
Nonoperating Income (Expense) [Member] | | | | | | | | | | | | | | | | | | | | | | |
Gain (Loss) on Extinguishment of Debt, Total | | | | | | | | | | | | | | 200,000 | | | | | | | | |
Pharmstandard [Member] | Subsequent Event [Member] | | | | | | | | | | | | | | | | | | | | | | |
Percentage of Outstanding Common Stock Owned by Related Party | | | | | | | | | | | | | | | | | | | | 14.49% | | |
Convertible Note Payable to Invetech Pty Ltd [Member] | | | | | | | | | | | | | | | | | | | | | | |
Repayments of Long-term Debt, Total | | | | | | | | | 150,000 | | | | | $ 200,000 | | | | | | | | |
Debt Instrument, Face Amount | | $ 5,200,000 | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | 6.00% | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Covenant, Accrued and Unpaid Interest Reduction | | $ 250,000 | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Convertible, Conversion Price | $ / shares | | $ 10 | | | | | | | | | | | | | | | | | | | | |
Convertible Note Payable to Invetech Pty Ltd [Member] | Quarters Ending December 31,2017 and March 31, 2018 [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Cash | | $ 200,000 | | | | | | | | | | | | | | | | | | | | |
Convertible Note Payable to Invetech Pty Ltd [Member] | Quarters Ending December 31,2017 and March 31, 2018 [Member] | Maximum [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Shares Issue, Value | | 200,000 | | | | | | | | | | | | | | | | | | | | |
Convertible Note Payable to Invetech Pty Ltd [Member] | Quarters Ending June 30, 2018 Through March 31, 2019 [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Cash | | 150,000 | | | | | | | | | | | | | | | | | | | | |
Convertible Note Payable to Invetech Pty Ltd [Member] | Quarters Ending June 30, 2018 Through March 31, 2019 [Member] | Maximum [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Total | | 300,000 | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Shares Issue, Value | | 150,000 | | | | | | | | | | | | | | | | | | | | |
Convertible Note Payable to Invetech Pty Ltd [Member] | Quarters Ending June 30, 2019 Through June 30, 2020 [Member] | Maximum [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Cash | | 150,000 | | | | | | | | | | | | | | | | | | | | |
Convertible Promissory Note to Saint-Gobain [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | $ 2,400,000 | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | 6.00% | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Cash | | | | | | | | | | 300,000 | | | | | | | | | | | | |
Convertible Promissory Note to Saint-Gobain [Member] | Quarters Ending December 31,2017 and March 31, 2018 [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Cash | $ 200,000 | | | | | | | | | | | | | | | | | | | | | |
Convertible Promissory Note to Saint-Gobain [Member] | Quarters Ending December 31,2017 and March 31, 2018 [Member] | Maximum [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Total | 340,000 | 400,000 | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Shares Issue, Value | 140,000 | | | | | | | | | | | | | | | | | | | | | |
Convertible Promissory Note to Saint-Gobain [Member] | Quarters Ending June 30, 2019 Through June 30, 2020 [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Cash | | | | | | | | | | $ 100,000 | | | | | | | | | | | | |
Convertible Promissory Note to Saint-Gobain [Member] | Quarters Ending June 30, 2018 Through September 30, 2018 [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Cash | 125,000 | | | | | | | | | | | | | | | | | | | | | |
Convertible Promissory Note to Saint-Gobain [Member] | Quarters Ending June 30, 2018 Through September 30, 2018 [Member] | Maximum [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Total | 245,000 | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Shares Issue, Value | 120,000 | | | | | | | | | | | | | | | | | | | | | |
Convertible Promissory Note to Saint-Gobain [Member] | Quarters Ending December 31, 2018 Through March 31, 2019 [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Cash | 100,000 | | | | | | | | | | | | | | | | | | | | | |
Convertible Promissory Note to Saint-Gobain [Member] | Quarters Ending December 31, 2018 Through March 31, 2019 [Member] | Maximum [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Total | 220,000 | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Shares Issue, Value | 120,000 | | | | | | | | | | | | | | | | | | | | | |
Convertible Note Payable to Pharmstandard [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | | | | | | | | $ 6,000,000 | | $ 6,000,000 | | | | | | | | | $ 6,000,000 |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | | | | | | | | | | | | | 9.50% | |
Debt Instrument, Convertible, Conversion Price | $ / shares | | | | | | | | | | | | | | | | | | | | | $ 10 | |
Debt Instrument, Convertible, Conversion Prerequisite, Ownership Percentage Can Not Exceed If Converted | | | | | | | | | | | | | | | | | | | | | 39.90% | |
Venture Loan and Security Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | $ 25,000,000 | | | | | | | | | | | | | | | | | | |
Debt Instrument, One-Month LIBOR Basis Rate | | | | 0.50% | | | | | | | | | | | | | | | | | | |
Debt Related Commitment Fees and Debt Issuance Costs | | | | $ 400,000 | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | | | | | | | | | | | 4,139 | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | | | | $ 181.20 | | | | | | | | |
Debt Instrument, Final Payment Waived in Exchange for Issuance of Warrants | | | | | | | | | | | | | | $ 1,250,000 | | | | | | | | |
Debt Instrument, Prepayment Penalty Waived in Exchange for Issuance of Warrants | | | | | | | | | | | | | | 600,000 | | | | | | | | |
Debt Instrument, Unamortized Discount, Total | | | | $ 300,000 | | | | | | | | | | | | | | | | | | |
Venture Loan and Security Agreement [Member] | Prepayment on or Before Twenty Four Months of Funding Date [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Prepayment Penalty, Percentage of Balance | | | | | | | | 3.00% | | | | | | | | | | | | | | |
Venture Loan and Security Agreement [Member] | Prepayment After Twenty Four Months But on or Before Thirty Six Months [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Prepayment Penalty, Percentage of Balance | | | | | | | | 2.00% | | | | | | | | | | | | | | |
Venture Loan and Security Agreement [Member] | Prepayment After Thirty Six Months of Funding Date [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Prepayment Penalty, Percentage of Balance | | | | | | | | 1.00% | | | | | | | | | | | | | | |
Venture Loan and Security Agreement [Member] | LIBOR Rate In Excess of a Half a Percent [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Basis Spread on Variable Rate | | | | 9.25% | | | | | | | | | | | | | | | | | | |
Venture Loan and Security Agreement [Member] | London Interbank Offered Rate (LIBOR) [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Basis Spread on Variable Rate | | | | 8.75% | | | | | | | | | | | | | | | | | | |
Venture Loan and Security Agreement [Member] | Primary Tranche [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument Tranche Amount | | | | $ 12,500,000 | | | | | | | | | | | | | | | | | | |
Proceeds from Loans | | | | 12,500,000 | $ 12,500,000 | | | | | | | | | | | | | | | | | |
Venture Loan and Security Agreement [Member] | Secondary Tranche [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument Tranche Amount | | | | $ 12,500,000 | | | | | | | | | | | | | | | | | | |
Venture Loan and Security Agreement [Member] | Secondary Tranche [Member] | Primary Payment Period [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Term | | | | | | | | 1 year 180 days | | | | | | | | | | | | | | |
Venture Loan and Security Agreement [Member] | Secondary Tranche [Member] | Secondary Payment Period [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Term | | | | | | | | 2 years | | | | | | | | | | | | | | |
Venture Loan and Security Agreement [Member] | Maximum [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | 10.75% | | | | | | | | | | | | | | | | | | |
Venture Loan and Security Agreement [Member] | Scenario, Forecast [Member] | Primary Tranche [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment Terms, Balloon Payment to be Paid | | | | | | | | | | | | | | | | | | $ 600,000 | $ 600,000 | | | |
December 2013 Note [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | | | $ 9,000,000 | | | | | | | | | | | $ 9,000,000 | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | 3.00% | | | | | | | | | | | 3.00% | | | | | |
Proceeds from Notes Payable, Total | | | | | | | | | | | | | | | | | $ 9,000,000 | | | | | |
Notes Payable, Total | | | | | | $ 6,900,000 | | | 5,000,000 | | | 5,000,000 | | 5,000,000 | | | $ 6,900,000 | | | | | |
Debt Instrument, Interest Rate, Effective Percentage | | | | | | 8.00% | | | | | | | | | | | 8.00% | | | | | |
Deferred Credits and Other Liabilities, Noncurrent | | | | | | $ 2,100,000 | | | | | | | | | | | $ 2,100,000 | | | | | |
Debt Instrument, Increase, Accrued Interest | | | | | | | | | | | | 1,900,000 | | 1,900,000 | | | | | | | | |
Contract with Customer, Liability, Noncurrent | | | | | | | | | $ 1,100,000 | | | $ 1,100,000 | | 6,900,000 | | | | | | | | |
December 2013 Note [Member] | Manufacturing License [Member] | | | | | | | | | | | | | | | | | | | | | | |
Deferred Credits and Other Liabilities, Noncurrent | | | | | | | | | | | | | | | $ 2,000,000 | $ 1,000,000 | | | | | | |
November 2013 Note [Member] | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | 8.31% | | | 8.31% | | | | | | | | | | |
Proceeds from Notes Payable, Total | | | | | | | $ 77,832 | | | | | | | | | | | | | | | |
Notes Payable, Total | | | | | | | | | $ 4,704 | | | $ 4,704 | | 13,825 | | | | | | | | |
Debt Instrument, Number of Payments | | | | | | | | | 60 | | | 60 | | | | | | | | | | |
Extinguishment of Research and Development Obligation to Invetech [Member] | | | | | | | | | | | | | | | | | | | | | | |
Repayments of Long-term Debt, Total | | $ 500,000 | | | | | | | | | | | | | | | | | | | | |
Stock Issued During Period, Shares, Conversion of Convertible Securities | shares | | 57,142 | | | | | | | | | | | | | | | | | | | | |
Stock Issued During Period, Value, Conversion of Convertible Securities | | $ 200,000 | | | | | | | | | | | | | | | | | | | | |
Extinguishment of Debt, Amount | | $ 8,300,000 | | | | | | | | | | | | | | | | | | | | |
Gain (Loss) on Extinguishment of Debt, Total | | | | | | | | | | | | | | $ 1,500,000 | | | | | | | | |
Extinguishment of Research and Development Obligation to Saint-Gobain [Member] | | | | | | | | | | | | | | | | | | | | | | |
Repayments of Long-term Debt, Total | $ 500,000 | | | | | | | | | | | | | | | | | | | | | |
Stock Issued During Period, Shares, Conversion of Convertible Securities | shares | 34,499 | | | | | | | | | | | | | | | | | | | | | |