I have incorporated the methodology of supply-chain post-marketing surveillance (PMS) into a Python package, logistigate. This package is available in alpha release on Github, and a walkthrough with examples is available here.
logistigate uses regulator assessments of substandard and falsified (SFP) risk, testing data, and available supply-chain information to infer SFP rates at each supply-chain location. This software meets a few crucial needs of contemporary pharmaceutical regulation in low-resource settings:
No sample-size requirements: Prior PMS implementation used conservative sample sizes stemming from conventional statistical methods to estimate SFP rates. logistigate has no minimum sample size: inference can be produced for the supply chain even if some locations are represented in only one sample. It is left to the modeler to determine whether the resulting inference is sufficient to take enforcement action, or if more testing data are required.
Flexible supply-chain modeling: The literature on SFPs describes a multitude of SFP drivers: neglect by individual outlets, distributors, or manufacturers; geographic distinctions like rivers or mountains that cause different economic conditions; or regulatory capacity at different levels of the supply chain. logistigate allows for multiple definitions of each supply-chain echelon that can capture these different drivers. For instance, a modeler can group all manufacturers by country, and inspect if elevated SFP rates are associated with different source countries. Similarly, if the modeler suspects that SFP rates will markedly differ by national region, testing locations can be grouped by the parent national region, and analysis conducted. This flexibility expands the power of PMS when data collection is frequently constrained by limited sampling budgets.
Speed: A typical supply chain in a low-resource setting has up to a few hundred locations; logistigate generates inference for the SFP rates of a supply chain of this size within a few minutes. This inference speed gives modelers the ability to try different definitions for each echelon and re-run analyses.
Here is an example of such inference, applied to a real set of PMS data for an essential medicine in a low-resource setting:
Each bar signifies 90% credible intervals for the SFP rate at each respective manufacturer. These intervals are generated through regulator assessments of risk (captured by the elicited prior), the set of testing results, and the supply-chain connections revealed in the testing data. Red intervals indicate that the respective manufacturer has a 90% interval exceeding the lower significance threshold of 5%: data indicate that this manufacturer is significant associated with SFP generation. Green intervals indicate that the respective manufacturer has a 90% interval below the upper threshold of 30%: data indicate that this manufacturer is likely not significantly associated with SFP generation. Yellow intervals indicate that the respective manufacturer has a 90% interval below the lower threshold as well as above the upper threshold: more data are required before designations can be made for these manufacturers. Of note is that many of the "green" manufacturers were featured on samples that tested positive as SFPs; however, the associated supply-chain connections meant that the resulting inference attributed these SFPs to causes associated with the districts where these samples were collected, rather than the manufacturers of these samples.
Ongoing work will supplement these basic methods with two additions: estimation of a prospective sampling plan's utility (based on this work), and selection of the prospective sampling plan that maximizes this utility while respecting operational constraints. These supplements will help regulators answer the question of where to test next.