Given there are countless substances that are hard/impossible to test for that could affect someone's ability to drive, the solution to this issue seems not to invent a new device for each substance but to come up with a more generalized test to measure someones level of impairment — reaction times are a good proxy.