I can fairly confidently predict this will not happen like it did for software. Chemical analysis has been around a long time and remains difficult for experts to do accurately without context, let alone for a layman. Gas chromatography, for example, requires large and expensive machinery and some idea of what the substance is composed of in order to determine the concentration of analytes.
Reagent testing is cheap, simple, and straightforward, but it is generally only capable of detecting whether or not some class of substances are present above a particular concentration. You cannot use reagent testing to determine "how pure" a medicine is, let alone whether the impurities (which there will assuredly be) are potentially harmful.
As is currently the case for illicit drugs, I imagine there will be an ecosystem to verify that A) the active ingredient is actually present and B) some limited range of problem impurities are not present, but that is a much less stringent form of quality control than pharmaceutical companies perform.
Some kinds of analysis machinery, like GC, ICP, and DSC or DTA, are probably inherently fairly large; other kinds, like FT-IR, other kinds of spectrometry, TLC, HPLC, other kinds of liquid chromatography, XRF, XRD, and NMR, can be miniaturized and mass-produced. There hasn't been much pressure to do this because bio and chem labs don't care if their spectrophotometer costs US$0.12 or US$12000 or whether it weighs 100 mg or 100 kg; they need one to get their work done, they don't need it to be portable, and they aren't going to lose it because it stays in the lab. But that doesn't mean it can't be done. Even Victorian-era-style reagent testing can be made quantitative in some cases!
Many of the types of analysis listed here are elemental analysis only, which are useless for trying to identify pharmaceutical analytes or determine their concentration.
Out of all of these, microfluidic liquid chromatography is the least science fiction. There's plenty of literature about it but nobody really "has it working", and the reality is that it's not likely to ever have the same capability as benchtop HPLC.
That's mostly true, but if a pill has significant amounts of lead, arsenic, and mercury in it, you know something went wrong, and you shouldn't take it. Even XRF might be enough to allow you to safely use lead-based or arsenic-based catalysts in your synthesis.
> Out of all of these, microfluidic liquid chromatography is the least science fiction. There's plenty of literature about it but nobody really "has it working", and the reality is that it's not likely to ever have the same capability as benchtop HPLC.
Thanks! Can you think of any other plausibly miniaturizable general-purpose analysis techniques? Those are just the ones I came up with off the top of my head. I think microfluidic liquid chromatography doesn't actually have to run faster than the bear, just faster than color-changing DanceSafe test kits.
As for science fiction, https://news.ycombinator.com/item?id=29816434 talks a bit about how today's science fiction is tomorrow's old news.
Do you think there are some fundamental obstacles to miniaturizing NMR, and if so, what?
It's certainly possible to audit drug quality by sending it to labs, and people do that for darknet drugs all the time, but there are still problems:
1) There is no way to use ex-post analysis alone to achieve the kind of QA that pharmaceutical companies do; they have visibility into the entire manufacturing process and process control. Put another way, a sample of a drug cannot be used to verify that the process used to manufacture it is safe.
2) There is no assurance that anything you get in the future is made with the same process.
The only way I see this working, honestly, is for a rogue jurisdiction to offer safe harbor to "generic pirates". The rogue jurisdiction would offer legitimate regulatory oversight in exchange for tax revenue, and the drugs would be smuggled out of the jurisdiction for sale. To some extent this is already the case in grey markets where brand name drugs which are sold for less in other countries get arbitraged/smuggled back to high-cost markets.
Buy n = 1024 doses of your insulin or whatever, D(0, i) for i from 0 to n - 1 = 1023, homogenize each dose, and divide each one in half into half-doses called E(0, i) and F(0, i).
Mix pairs F(0, 2*i) and F(0, 2*i + 1) into 512 new doses D(1, i) for i from 0 to 511. Homogenize these new doses and divide each one in half into half-doses called E(1, i) and F(1, i).
Mix pairs F(1, 2*i) and F(1, 2*i + 1) into 256 new doses D(2, i) for i from 0 to 255.
And so on, until in step k = lg n = 10 step you mix the half-doses F(k - 1 = 9, 0) and F(9, 1) into a single dose D(k = 10, 0). Send this D(k, 0) off to the lab to be analyzed.
If the lab is equipped to detect dangerous impurities in your insulin at one-thousandth the danger level, which is reasonable for many contaminants, and the sample comes back clean, then you know that all 1024 doses were safe, though some of them may have the wrong dose. Mix the remaining 1023 doses well so that they all have the same dose and store them safely.
If not, you need to track down the contamination (or massive dilution), so in the next iteration, you send E(9, 0) and E(9, 1) to the lab for analysis. If one of them comes back safe, you know the 511 doses that were mixed into it were okay, and you can mix them well and store them safely, then repeat the process on the contaminated subtree.
Depending on your cost function (latency, shipping and handling costs, etc.) and your priors for correlation among the samples, it might be worthwhile to recurse more deeply on failure: instead of sending E(9, i) for i from 0 to 1 to the lab, you might instead send them E(6, i) for i from 0 to 15. If one out of 30 doses was randomly contaminated, for example, about 14 out of the 16 groups will be bad on average, while if it's one out of 100, then you'll have about 7 bad groups out of 16. At some point you need to give up on the recursion, too, or you'll end up testing almost all 1024 doses when they're all bad.
This of course doesn't solve the problem of future buys, just reduces it by the factor of n.
No, it's not. This is ideological libertarian nonsense. There's a reason pharma came to be regulated in the first place. All this will lead to are more injuries and death of consumers.
If I could flag your post, I would. This is purely political nonsense and a god-like attempt to disprove something through fiat.